Skip to content

Commit

Permalink
Move "-z execstack" to cflags/cxxflags
Browse files Browse the repository at this point in the history
  • Loading branch information
thurstond committed Jan 24, 2025
1 parent 3860e16 commit e203bf8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions zorg/buildbot/builders/sanitizers/buildbot_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ function configure_scudo_compiler_rt {
fi

local linker_flags=
[[ "${arch}" =~ "mips*" ]] && linker_flags="-latomic -Wl,-z,execstack -Wl,-z,notext -Wno-unused-command-line-argument"
[[ "${arch}" =~ "mips*" ]] && linker_flags="-latomic -Wl,-z,notext -Wno-unused-command-line-argument"

local c_flags=
[[ "${arch}" =~ "mips*" ]] && c_flags="-Wl,-z,execstack"
c_flags="-fPIC ${c_flags}"

local cxx_flags="${c_flags}"

local out_dir=llvm_build2_${name}
rm -rf ${out_dir}
Expand Down Expand Up @@ -220,8 +226,8 @@ function configure_scudo_compiler_rt {
-DCOMPILER_RT_INCLUDE_TESTS=ON \
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DCMAKE_CXX_FLAGS=-fPIC \
-DCMAKE_C_FLAGS=-fPIC \
-DCMAKE_CXX_FLAGS="${c_flags}" \
-DCMAKE_C_FLAGS="${cxx_flags}" \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld ${linker_flags}" \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld ${linker_flags}" \
-DCOMPILER_RT_TEST_COMPILER_CFLAGS="--target=${target} ${linker_flags}" \
Expand Down

0 comments on commit e203bf8

Please sign in to comment.