Blob Blame History Raw
From c0980dceebc0c67eeb25315b860f6d843e1baed6 Mon Sep 17 00:00:00 2001
From: "d.marlin" <dmarlin@redhat.com>
Date: Mon, 24 Jun 2013 14:57:40 -0500
Subject: [PATCH 03/16] 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 5a151ce..94cef27 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.9.3