Skip to content

Commit dba2752

Browse files
committed
Remove static link to libstdc++ to avoid conflicts (#493)
(cherry picked from commit 639786f)
1 parent fb3cbd4 commit dba2752

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

lib/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ target_include_directories(PULSAR_OBJECT_LIB PUBLIC
7676
"${CMAKE_SOURCE_DIR}/include"
7777
"${CMAKE_BINARY_DIR}/include")
7878

79-
option(LINK_STATIC_GCC_CXX "Link statically to libgcc and libstdc++" OFF)
8079
include(CheckCXXSymbolExists)
8180
if (BUILD_DYNAMIC_LIB)
8281
add_library(pulsarShared SHARED $<TARGET_OBJECTS:PULSAR_OBJECT_LIB>)
@@ -94,10 +93,6 @@ if (BUILD_DYNAMIC_LIB)
9493
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
9594
target_link_options(pulsarShared PRIVATE -Wl,-Bsymbolic)
9695
endif ()
97-
check_cxx_symbol_exists(__GLIBCXX__ iostream GLIBCXX)
98-
if (GLIBCXX AND LINK_STATIC_GCC_CXX)
99-
target_link_libraries(pulsarShared PUBLIC -static-libgcc -static-libstdc++)
100-
endif ()
10196
endif()
10297

10398
check_cxx_symbol_exists(getauxval sys/auxv.h HAVE_AUXV_GETAUXVAL)

pkg/deb/build-deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pushd $CPP_DIR
4141
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
4242

4343
chmod +x $(find . -name "*.sh")
44-
cmake . -DBUILD_TESTS=OFF -DBUILD_PERF_TOOLS=OFF -DLINK_STATIC=ON -DLINK_STATIC_GCC_CXX=ON
44+
cmake . -DBUILD_TESTS=OFF -DBUILD_PERF_TOOLS=OFF -DLINK_STATIC=ON
4545
make -j 3
4646
popd
4747

pkg/rpm/SPECS/pulsar-client.spec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ static library.
5555
%build
5656
git clone https://github.com/microsoft/vcpkg.git
5757
cmake -B build -DINTEGRATE_VCPKG=ON -DCMAKE_BUILD_TYPE=Release \
58-
-DLINK_STATIC_GCC_CXX=ON \
5958
-DBUILD_TESTS=OFF -DBUILD_DYNAMIC_LIB=ON -DBUILD_STATIC_LIB=ON
6059
cmake --build build -j8
6160
./build-support/merge_archives_vcpkg.sh $PWD/build

0 commit comments

Comments
 (0)