tboot/SOURCES/0001-Fix-CFLAGS-passing-to-recursive-makefiles.patch
2021-10-08 17:03:54 +00:00

41 lines
1.2 KiB
Diff

From 363750fb3ee0089755aa6210f092446818ab1296 Mon Sep 17 00:00:00 2001
From: Lukasz Hawrylko <lukasz.hawrylko@intel.com>
Date: Tue, 12 May 2020 10:13:40 +0200
Subject: Fix CFLAGS passing to recursive makefiles
Signed-off-by: Lukasz Hawrylko <lukasz.hawrylko@intel.com>
Signed-off-by: Tony Camuso <tcamuso@redhat.com>
---
Config.mk | 2 ++
safestringlib/makefile | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Config.mk b/Config.mk
index a47147a..ba997b0 100644
--- a/Config.mk
+++ b/Config.mk
@@ -92,6 +92,8 @@ endif
CFLAGS += -I$(ROOTDIR)/safestringlib/include
+export CFLAGS
+
# common dummy rule to force execution
.PHONY: FORCE
FORCE :
diff --git a/safestringlib/makefile b/safestringlib/makefile
index 163defa..d9ca2be 100644
--- a/safestringlib/makefile
+++ b/safestringlib/makefile
@@ -1,6 +1,6 @@
IDIR = include
CC ?= gcc
-CFLAGS += -I$(IDIR) -fstack-protector-strong -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -DSTDC_HEADERS
+CFLAGS += -I$(IDIR) -fstack-protector-strong -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -DSTDC_HEADERS -Wno-implicit-fallthrough
LDFLAGS += -z noexecstack -z relo -z now
ODIR=obj
--
2.18.1