[PATCH v2] makedumpfile: honor the CFLAGS from environment variables

Kairui Song kasong at redhat.com
Mon Jan 28 19:14:15 PST 2019

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.

Suggested-by: Kazuhito Hagio <k-hagio at ab.jp.nec.com>
Signed-off-by: Kairui Song <kasong at redhat.com>
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(-)

diff --git a/Makefile b/Makefile
index 612b9d0..bca9984 100644
--- a/Makefile
+++ b/Makefile
@@ -8,11 +8,10 @@ ifeq ($(strip $CC),)
 CC	= gcc
-CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
 # LDFLAGS = -L/usr/local/lib -I/usr/local/include
 HOST_ARCH := $(shell uname -m)

More information about the kexec mailing list