diff mbox series

[2/2] Let package manager override CFLAGS and CPPFLAGS

Message ID 20200520212540.263946-3-Jes.Sorensen@gmail.com (mailing list archive)
State Superseded
Headers show
Series fsverity-utils Makefile fixes | expand

Commit Message

Jes Sorensen May 20, 2020, 9:25 p.m. UTC
From: Jes Sorensen <jsorensen@fb.com>

Package managers such as RPM wants to build everything with their
preferred flags, and we shouldn't hard override flags.

Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
 Makefile | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index e7fb5cf..18f08c3 100644
--- a/Makefile
+++ b/Makefile
@@ -29,16 +29,12 @@ 
 cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null &>/dev/null; \
 	      then echo $(1); fi)
 
-#### Common compiler flags.  You can add additional flags by defining CFLAGS
-#### and/or CPPFLAGS in the environment or on the 'make' command line.
-
-override CFLAGS := -O2 -Wall -Wundef				\
+CFLAGS := -O2 -Wall -Wundef				\
 	$(call cc-option,-Wdeclaration-after-statement)		\
 	$(call cc-option,-Wmissing-prototypes)			\
 	$(call cc-option,-Wstrict-prototypes)			\
 	$(call cc-option,-Wvla)					\
-	$(call cc-option,-Wimplicit-fallthrough)		\
-	$(CFLAGS)
+	$(call cc-option,-Wimplicit-fallthrough)
 
 override CPPFLAGS := -D_FILE_OFFSET_BITS=64 $(CPPFLAGS)