From 7a457315e659383c7523a02181901c731e79ebc9 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 5 Dec 2022 16:54:25 +0100 Subject: [PATCH] Copy CFLAGS to ASMFLAGs to enable CET in asm files See here for the relevant equivalent of this change in Fedora: https://src.fedoraproject.org/rpms/llvm/c/8e1f53d786eed2a421793e354f7e08f327a31f73?branch=rawhide Resolves: rhbz#2118567 --- llvm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm.spec b/llvm.spec index 6e055ec..4255d3b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -271,6 +271,9 @@ mv %{cmake_srcdir} cmake %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif +# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. +export ASMFLAGS=$CFLAGS + # force off shared libs as cmake macros turns it on. %cmake -G Ninja \ -DBUILD_SHARED_LIBS:BOOL=OFF \