From: Timo Röhling Date: Sat, 23 Oct 2021 17:22:50 +0000 (+0200) Subject: Adjust linker flags X-Git-Tag: archive/raspbian/1.9.25+dfsg2-6+rpi1~2^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cc49cad815fd97fe1f6ab4754de3811ac6b0673d;p=filament.git Adjust linker flags Gbp-Pq: Name 0006-Adjust-linker-flags.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d674dc..ce4192c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -331,12 +331,6 @@ endif() # ================================================================================================== # Linker flags # ================================================================================================== -# Strip unused sections -if (NOT WEBGL) - set(GC_SECTIONS "-Wl,--gc-sections") -endif() -set(B_SYMBOLIC_FUNCTIONS "-Wl,-Bsymbolic-functions") - if (APPLE) set(GC_SECTIONS "-Wl,-dead_strip") set(B_SYMBOLIC_FUNCTIONS "") @@ -349,8 +343,7 @@ if (APPLE) set(CMAKE_CXX_ARCHIVE_CREATE " qc -S ") endif() -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GC_SECTIONS}") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GC_SECTIONS} ${B_SYMBOLIC_FUNCTIONS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs") if (WEBGL) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_WEBGL2=1")