Skip to content
Permalink
Browse files

core, bugfix: static linking to GLIBCXX causes failure on older versi…

…ons of Linux.
  • Loading branch information...
xicilion committed Apr 6, 2019
1 parent aed20b5 commit 80d823a2fd363b14d48a500e82922e5f8e1007ad
Showing with 2 additions and 6 deletions.
  1. +1 −5 fibjs/program/CMakeLists.txt
  2. +1 −1 fibjs/program/build
@@ -45,16 +45,12 @@ if(${BUILD_TYPE} STREQUAL "release")
set(flags "${flags} -fomit-frame-pointer")
endif()

set(link_flags "${link_flags} ${BUILD_OPTION}")
set(link_flags "${link_flags} ${BUILD_OPTION} -static-libstdc++")
add_definitions(-DNDEBUG=1)

if(HAVE_GLIB_C_225_H)
set(link_flags "${link_flags} -Wl,--wrap=memcpy")
endif()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(link_flags "${link_flags} -static-libgcc -static-libstdc++ -Wl,--no-as-needed")
endif()
endif()

if(${BUILD_TYPE} STREQUAL "debug")
@@ -190,7 +190,7 @@ if [ "${BUILD_TYPE}" = "release" ]; then
if [ $TARGET_OS = "Linux" ]; then
echo ''
echo '==== GLIBC ===='
${BUILD_PREFIX}objdump fibjs -p | grep GLIBC_[0-9.]* -o | sort | uniq
${BUILD_PREFIX}objdump fibjs -p | grep GLIBCX*_[0-9.]* -o | sort | uniq
fi

if [ "${CI}" = "ci" ]; then

0 comments on commit 80d823a

Please sign in to comment.
You can’t perform that action at this time.