aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2015-12-31 11:02:51 +0200
committerJani Välimaa <wally@mageia.org>2015-12-31 12:10:07 +0200
commitb5e2b7e12a349a9260f59b04150b555c47344114 (patch)
tree69f206c755cfeb413aa513f46884086e827c472b
parent259026fe475487da468085184148c70c7da1ff16 (diff)
downloadrpm-setup-b5e2b7e12a349a9260f59b04150b555c47344114.tar
rpm-setup-b5e2b7e12a349a9260f59b04150b555c47344114.tar.gz
rpm-setup-b5e2b7e12a349a9260f59b04150b555c47344114.tar.bz2
rpm-setup-b5e2b7e12a349a9260f59b04150b555c47344114.tar.xz
rpm-setup-b5e2b7e12a349a9260f59b04150b555c47344114.zip
Don't append %ldflags to $LDFLAGS forcibly
This makes the behaviour similar with CFLAGS/CXXFLAGS/FFLAGS. Previously 'export LDFLAGS="%{ldflags} -lfoo"' before %setup_compile_flags usage in .spec caused LDFLAGS being exported as '%{ldflags} -lfoo %{ldflags}' If %ldflags is %nil which is pretty unlikely and LDFLAGS isn't exported beforehand, then LDFLAGS is just empty.
-rw-r--r--NEWS2
-rw-r--r--build.macros.in2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index b2c3e42..9de80c0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- don't append %ldflags to $LDFLAGS forcibly
+
Version 2.17 - 15 November 2015, by Pascal Terjan
- move rubygem build macros to the rubygems package
diff --git a/build.macros.in b/build.macros.in
index 8515793..612a238 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -226,7 +226,7 @@ export CFLAGS="%optflags"; export CXXFLAGS="%optflags"; export RPM_OPT_FLAGS="%o
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
- %(if [ -n '%ldflags' ]; then echo 'LDFLAGS="$LDFLAGS%ldflags"; export LDFLAGS ;'; fi)
+ LDFLAGS="${LDFLAGS:-%ldflags}" ; export LDFLAGS
%before_configure \
%setup_compile_flags \