diff --git a/llvm13.changes b/llvm13.changes index 896e8fa..32a792a 100644 --- a/llvm13.changes +++ b/llvm13.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Apr 24 20:52:29 UTC 2022 - Aaron Puchert + +- Don't override default linker flags. (We were losing -Wl,-z,now.) + ------------------------------------------------------------------- Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert diff --git a/llvm13.spec b/llvm13.spec index d636048..0c36205 100644 --- a/llvm13.spec +++ b/llvm13.spec @@ -727,7 +727,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo) %define __builder ninja %define __builddir stage1 -# -z,now is breaking now, it needs to be fixed +%define build_ldflags -Wl,--no-keep-memory %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS:BOOL=OFF \ @@ -750,10 +750,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo) -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \ -DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \ -DCOMPILER_RT_BUILD_XRAY:BOOL=OFF \ - -DLLDB_DISABLE_PYTHON=ON \ - -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" \ - -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" \ - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" + -DLLDB_DISABLE_PYTHON=ON ninja -v %{?_smp_mflags} clang llvm-tblgen clang-tblgen \ %if %{with thin_lto} llvm-ar llvm-ranlib \ @@ -794,6 +791,7 @@ max_link_jobs=1 %endif %define __builddir build +%define build_ldflags -Wl,--build-id=sha1 export PATH=${PWD}/stage1/bin:$PATH export CC=${PWD}/stage1/bin/clang export CXX=${PWD}/stage1/bin/clang++ @@ -809,7 +807,6 @@ export CLANG_TOOLS_EXTRA_DIR=${PWD}/tools/clang/tools/extra # The build occasionally uses tools linking against previously built # libraries (mostly libLLVM.so), but we don't want to set RUNPATHs. export LD_LIBRARY_PATH=${PWD}/build/%{_lib} -# -z,now is breaking now, it needs to be fixed %cmake \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DLLVM_HOST_TRIPLE=%{host_triple} \ @@ -865,9 +862,6 @@ export LD_LIBRARY_PATH=${PWD}/build/%{_lib} -DLLDB_DISABLE_PYTHON=ON \ %endif -DCMAKE_SKIP_RPATH:BOOL=ON \ - -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \ - -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \ - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \ -DLLVM_POLLY_LINK_INTO_TOOLS=OFF \ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=${CLANG_TOOLS_EXTRA_DIR} \ -DPOLLY_BUNDLED_ISL:BOOL=ON