Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Cc: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>,
	Tudor Holton <buildroot@tudorholton.com>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>,
	Angelo Compagnucci <angelo.compagnucci@gmail.com>,
	Olivier Schonken <olivier.schonken@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Romain Naour <romain.naour@gmail.com>,
	Giulio Benetti <giulio.benetti@benettiengineering.com>
Subject: [Buildroot] [PATCH v4 13/21] package/snappy: enable rtti
Date: Fri,  1 May 2026 17:27:49 +0200	[thread overview]
Message-ID: <20260501152758.2610763-14-bernd@kuhls.net> (raw)
In-Reply-To: <20260501152758.2610763-1-bernd@kuhls.net>

Added patch to enable rtti, needed for upcoming bump of rocksdb to fix
link error:

output/per-package/rocksdb/host/bin/../lib/gcc/x86_64-buildroot-linux-
gnu/15.2.0/../../../../x86_64-buildroot-linux-gnu/bin/ld:
 librocksdb.so.10.7.5: undefined reference to `typeinfo for snappy::Sink'

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 .../0002-add-option-to-enable-rtti.patch      | 52 +++++++++++++++++++
 package/snappy/snappy.mk                      |  5 +-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 package/snappy/0002-add-option-to-enable-rtti.patch

diff --git a/package/snappy/0002-add-option-to-enable-rtti.patch b/package/snappy/0002-add-option-to-enable-rtti.patch
new file mode 100644
index 0000000000..e82328b0ff
--- /dev/null
+++ b/package/snappy/0002-add-option-to-enable-rtti.patch
@@ -0,0 +1,52 @@
+From 376f14b5933e91d08ade6a503fdd657a6e01a149 Mon Sep 17 00:00:00 2001
+From: Max <tchristy001@outlook.com>
+Date: Wed, 24 Nov 2021 12:16:23 -0600
+Subject: [PATCH] add option to enable rtti, set default to current behavior
+
+Upstream: https://github.com/google/snappy/pull/147 (rejected)
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+[rebased for 1.2.2]
+---
+ CMakeLists.txt | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6eef485..aefd35b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,8 +53,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+   add_definitions(-D_HAS_EXCEPTIONS=0)
+ 
+   # Disable RTTI.
+-  string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
++  if(NOT SNAPPY_ENABLE_RTTI)
++    string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
++  endif(SNAPPY_ENABLE_RTTI)
+ else(MSVC)
+   # Use -Wall for clang and gcc.
+   if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
+@@ -78,8 +80,10 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
+ 
+   # Disable RTTI.
+-  string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
++  if(NOT SNAPPY_ENABLE_RTTI)
++    string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
++  endif(SNAPPY_ENABLE_RTTI)
+ endif(MSVC)
+ 
+ # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
+@@ -98,6 +102,8 @@ option(SNAPPY_REQUIRE_AVX2 "Target processors with AVX2 support." OFF)
+ 
+ option(SNAPPY_INSTALL "Install Snappy's header and library" ON)
+ 
++option(SNAPPY_ENABLE_RTTI "Enable RTTI for Snappy's library" OFF)
++
+ include(TestBigEndian)
+ test_big_endian(SNAPPY_IS_BIG_ENDIAN)
+ 
diff --git a/package/snappy/snappy.mk b/package/snappy/snappy.mk
index 57c688b673..cd61bbb078 100644
--- a/package/snappy/snappy.mk
+++ b/package/snappy/snappy.mk
@@ -10,6 +10,9 @@ SNAPPY_LICENSE = BSD-3-Clause
 SNAPPY_LICENSE_FILES = COPYING
 SNAPPY_CPE_ID_VENDOR = google
 SNAPPY_INSTALL_STAGING = YES
-SNAPPY_CONF_OPTS = -DSNAPPY_BUILD_BENCHMARKS=OFF -DSNAPPY_BUILD_TESTS=OFF
+SNAPPY_CONF_OPTS = \
+	-DSNAPPY_BUILD_BENCHMARKS=OFF \
+	-DSNAPPY_BUILD_TESTS=OFF \
+	-DSNAPPY_ENABLE_RTTI=ON
 
 $(eval $(cmake-package))
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-05-01 15:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 15:27 [Buildroot] [PATCH v4 00/21] package/gcc: add version 16.1.0 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 01/21] package/autoconf: bump version to 2.73 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 02/21] package/autoconf-archive: bump version to 2024.10.16 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 03/21] package/redis-plus-plus: disable -Werror Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 04/21] package/dump1090: " Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 05/21] package/qt5/qt5webkit: Fix build with gcc 16.x Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 06/21] package/grantlee: " Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 07/21] package/cups-filters: add upstream patch to fix CVE-2025-64524 Bernd Kuhls
2026-05-04 14:55   ` Thomas Perale via buildroot
2026-05-01 15:27 ` [Buildroot] [PATCH v4 08/21] package/qpdf: bump to version 12.3.2 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 09/21] package/cups-filters: fix build against qpdf 12 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 10/21] package/cups-filters: needs autoreconf to fix build with gcc 16.x Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 11/21] package/openjdk{-bin}: bump versions to latest 17.x and 21.x series Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 12/21] package/openjdk{-bin}: add OpenJDK25 and configure it as latest Bernd Kuhls
2026-05-01 15:27 ` Bernd Kuhls [this message]
2026-05-01 15:27 ` [Buildroot] [PATCH v4 14/21] package/rocksdb: bump version to 11.0.4 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 15/21] toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_16 blind option Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 16/21] arch/Config.in: introduce BR2_ARCH_NEEDS_GCC_AT_LEAST_17 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 17/21] toolchain/toolchain-external/toolchain-external-custom: add gcc 16 version selection Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 18/21] package/gcc: add version 16.1.0 Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 19/21] package/gcc: switch to GCC 15.x as the default Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 20/21] support/config-fragments/autobuild/br-arm-internal-glibc: update to bleeding edge components Bernd Kuhls
2026-05-01 15:27 ` [Buildroot] [PATCH v4 21/21] package/gcc: drop support for GCC 13.x Bernd Kuhls

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260501152758.2610763-14-bernd@kuhls.net \
    --to=bernd@kuhls.net \
    --cc=angelo.compagnucci@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=buildroot@tudorholton.com \
    --cc=fontaine.fabrice@gmail.com \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=mr.zoltan.gyarmati@gmail.com \
    --cc=olivier.schonken@gmail.com \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox