From b5e2b7e12a349a9260f59b04150b555c47344114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Thu, 31 Dec 2015 11:02:51 +0200 Subject: 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. --- build.macros.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.macros.in') 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 \ -- cgit v1.2.1