- add CONFIG_EXTRA_CFLAGS (thanks to keesj)
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 22 Jan 2009 13:27:14 +0000 (13:27 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 22 Jan 2009 13:27:14 +0000 (13:27 -0000)
  This helps with remembering additional flags like e.g. cpu settings for
  people who did not configured their compiler to produce code for their cpu
  per default.

Config.in
Makefile.flags

index 4fd9d1111d926357bda158d8405c315f75c26ff3..fff6d83d58efcf58c692de9a26997d1bb7a32447 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -411,6 +411,12 @@ config CROSS_COMPILER_PREFIX
 
          Native builds leave this empty.
 
+config EXTRA_CFLAGS
+       string "Additional CFLAGS"
+       default ""
+       help
+         Additional CFLAGS to pass to the compiler verbatim.
+
 endmenu
 
 menu 'Debugging Options'
index e31480204e885f58ca41e6299d53df6a911c47b3..ad8d5e1f9b5764759fc218abbed01649b79685f6 100644 (file)
@@ -81,6 +81,11 @@ CFLAGS_busybox += $(ARCH_PIE)
 CFLAGS += $(ARCH_FPIE)
 endif
 
+ifneq ($(CONFIG_EXTRA_CFLAGS),)
+CFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_CFLAGS)))
+#"))
+endif
+
 LDLIBS += m crypt
 
 ifeq ($(CONFIG_PAM),y)