From: Andrei Tudor TOPALÄ‚ (101668) Date: Mon, 24 Jul 2023 21:15:20 +0000 (+0300) Subject: build: Use -fcf-protection for GCC >= 8 or Clang >= 7 X-Git-Tag: RELEASE-0.14.0~26 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bc9a34657b02a40900826fcf707849292e4fba7a;p=unikraft%2Funikraft.git build: Use -fcf-protection for GCC >= 8 or Clang >= 7 Signed-off-by: Andrei Tudor TOPALÄ‚ Reviewed-by: Maria Sfiraiala Reviewed-by: Stefan Jumarea Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #944 --- diff --git a/Makefile.uk b/Makefile.uk index 1fc93f206..6689fbf5f 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -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