]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
build: Use -fcf-protection for GCC >= 8 or Clang >= 7
authorAndrei Tudor TOPALĂ (101668) <topala.andrei@gmail.com>
Mon, 24 Jul 2023 21:15:20 +0000 (00:15 +0300)
committerUnikraft <monkey@unikraft.io>
Mon, 14 Aug 2023 19:47:08 +0000 (19:47 +0000)
Signed-off-by: Andrei Tudor TOPALĂ <topala.andrei@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #944

Makefile.uk

index 1fc93f2067aeed860c4804b850933b41716e7a48..6689fbf5f007d13d973aa1777e8afab09a28c704 100644 (file)
@@ -11,7 +11,8 @@ COMPFLAGS-$(call have_gcc)    += -fno-tree-sra -fno-split-stack
 ifneq ($(HAVE_STACKPROTECTOR),y)
 COMPFLAGS    += -fno-stack-protector
 endif
-COMPFLAGS    += -fcf-protection=none
+COMPFLAGS-$(call gcc_version_ge,8,0)   += -fcf-protection=none
+COMPFLAGS-$(call have_clang)   += -fcf-protection=none
 
 COMPFLAGS    += -Wall -Wextra
 COMPFLAGS-$(call have_clang)   += -Wdocumentation -Wdocumentation-pedantic