Blob Blame History Raw
From 28c9a212031ce7db05bf9a4bd0802f93c5e6ef39 Mon Sep 17 00:00:00 2001
From: "d.marlin" <dmarlin@redhat.com>
Date: Mon, 24 Jun 2013 14:57:40 -0500
Subject: [PATCH grubby/master] 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 d299b77..dd8104e 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 := 
 
-- 
1.8.1.4