Blob Blame History Raw
From d214fbcca2578677f06d2561e357eb483be93782 Mon Sep 17 00:00:00 2001
From: "d.marlin" <dmarlin@redhat.com>
Date: Mon, 24 Jun 2013 14:57:40 -0500
Subject: [PATCH 01/41] Only set RPM_OPT_FLAGS if undefined.

Currently RPM_OPT_FLAGS are set even if they were already defined.
This overrides any defaults set by RPM, including architecture-specific
values that may be needed to compile on some architectures.

To avoid this issue, only set RPM_OPT_FLAGS if previously undefined.

Signed-off-by: David A. Marlin <dmarlin@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 3f6370b..5dbf0f7 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ TARGETS = grubby
 OBJECTS = grubby.o log.o
 
 CC = gcc
-RPM_OPT_FLAGS := -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
+RPM_OPT_FLAGS ?= -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
 CFLAGS += $(RPM_OPT_FLAGS) -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wno-unused-function -ggdb
 LDFLAGS := 
 
-- 
2.4.3