mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-28 02:34:52 +00:00
Use build_cflags when setting ASMFLAGS
While the current implementation works on Fedora, on c9s/rhel the CFLAGS haven't been set at this point yet, so we are missing the -fcfprotection flag in ASMFLAGS. Using build_cflags avoids this ordering problem. Additionally, add -Wl,-z,cet-report=error to the libLLVM.so linker flags, so we can detect such issues earlier in the future.
This commit is contained in:
parent
dd44fc12ea
commit
2abc096557
1 changed files with 2 additions and 1 deletions
|
@ -253,7 +253,7 @@ mv %{third_party_srcdir} third-party
|
|||
%endif
|
||||
|
||||
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
||||
export ASMFLAGS=$CFLAGS
|
||||
export ASMFLAGS="%{build_cflags}"
|
||||
|
||||
# force off shared libs as cmake macros turns it on.
|
||||
%cmake -G Ninja \
|
||||
|
@ -329,6 +329,7 @@ export ASMFLAGS=$CFLAGS
|
|||
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \
|
||||
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-z,cet-report=error" \
|
||||
-DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0"
|
||||
|
||||
# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
|
||||
|
|
Loading…
Reference in a new issue