makedumpfile: honor the CFLAGS from environment variables
Subsystems (3)
PATCH v2 1/1 makedumpfile: honor the CFLAGS from environment variables
This makes it possible to pass in extra cflags, for example, hardening flags could be passed in with environment variable when building a hardened package.
Also introduce a CFLAGS_BASE to hold common CFLAGS, which simplify the CFLAGS definition.
---
Update from V1:
- Use a CFLAGS_BASE to simplify CFLAGS definition
- Use immediate set rather than lazy set to avoid unexpected flag duplication
Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Makefile +4 -5
@@ -8,11 +8,10 @@ ifeq ($(strip $CC),) CC = gcc endif -CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ - -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"' -CFLAGS_ARCH = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +CFLAGS_BASE := $(CFLAGS) -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +CFLAGS := $(CFLAGS_BASE) -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"' +CFLAGS_ARCH := $(CFLAGS_BASE) # LDFLAGS = -L/usr/local/lib -I/usr/local/include HOST_ARCH := $(shell uname -m)
Signature · 7 lines
2.20.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 39 lines · Kairui Song
This makes it possible to pass in extra cflags, for example, hardening flags could be passed in with environment variable when building a hardened package.
Also introduce a
CFLAGS_BASEto hold common CFLAGS, which simplify the CFLAGS definition.Suggested-by Kazuhito Hagio <[email protected]>Signed-off-by Kairui Song <[email protected]>---
Update from V1:
- Use aCFLAGS_BASEto simplify CFLAGS definition
- Use immediate set rather than lazy set to avoid unexpected flag duplicationMakefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)Makefile +4
-6@@ -8,11 +8,10 @@ ifeq ($(strip $CC),) CC = gcc endif -CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ - -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"' -CFLAGS_ARCH = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +CFLAGS_BASE := $(CFLAGS) -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +CFLAGS := $(CFLAGS_BASE) -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"' +CFLAGS_ARCH := $(CFLAGS_BASE) # LDFLAGS = -L/usr/local/lib -I/usr/local/include HOST_ARCH := $(shell uname -m) --
Quoted 2 lines
2.20.1
Thank you Kairui, applied.
Kazu
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec