|
|
603de6 |
From 2f007b48c581a81d7e95678b6bcb77cfbe177135 Mon Sep 17 00:00:00 2001
|
|
|
603de6 |
From: Kairui Song <kasong@redhat.com>
|
|
|
603de6 |
Date: Tue, 29 Jan 2019 11:14:15 +0800
|
|
|
603de6 |
Subject: [PATCH] [PATCH v2] honor the CFLAGS from environment variables
|
|
|
603de6 |
|
|
|
603de6 |
This makes it possible to pass in extra cflags, for example, hardening
|
|
|
603de6 |
flags could be passed in with environment variable when building a
|
|
|
603de6 |
hardened package.
|
|
|
603de6 |
|
|
|
603de6 |
Also introduce a CFLAGS_BASE to hold common CFLAGS, which simplify the
|
|
|
603de6 |
CFLAGS definition.
|
|
|
603de6 |
|
|
|
603de6 |
Suggested-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
|
|
|
603de6 |
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
|
603de6 |
---
|
|
|
603de6 |
Makefile | 9 ++++-----
|
|
|
603de6 |
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
603de6 |
|
|
|
603de6 |
diff --git a/Makefile b/Makefile
|
|
|
603de6 |
index ea3c47d..bd681d2 100644
|
|
|
603de6 |
--- a/makedumpfile-1.6.5/Makefile
|
|
|
603de6 |
+++ b/makedumpfile-1.6.5/Makefile
|
|
|
603de6 |
@@ -8,11 +8,10 @@ ifeq ($(strip $CC),)
|
|
|
603de6 |
CC = gcc
|
|
|
603de6 |
endif
|
|
|
603de6 |
|
|
|
603de6 |
-CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
|
|
|
603de6 |
- -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \
|
|
|
603de6 |
- -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
|
|
|
603de6 |
-CFLAGS_ARCH = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
|
|
|
603de6 |
- -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
|
|
|
603de6 |
+CFLAGS_BASE := $(CFLAGS) -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
|
|
|
603de6 |
+ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
|
|
|
603de6 |
+CFLAGS := $(CFLAGS_BASE) -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
|
|
|
603de6 |
+CFLAGS_ARCH := $(CFLAGS_BASE)
|
|
|
603de6 |
# LDFLAGS = -L/usr/local/lib -I/usr/local/include
|
|
|
603de6 |
|
|
|
603de6 |
HOST_ARCH := $(shell uname -m)
|
|
|
603de6 |
--
|
|
|
603de6 |
2.20.1
|
|
|
603de6 |
|