diff mbox

[v3,for-4.7,16/16] tools/pygrub: fix usage of LDFLAGS

Message ID 1461755514-23754-17-git-send-email-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monné April 27, 2016, 11:11 a.m. UTC
LDFLAGS cannot be appended to CFLAGS, instead pass them down as env
variables.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/pygrub/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Wei Liu April 27, 2016, 11:27 a.m. UTC | #1
On Wed, Apr 27, 2016 at 01:11:54PM +0200, Roger Pau Monne wrote:
> LDFLAGS cannot be appended to CFLAGS, instead pass them down as env
> variables.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>
diff mbox

Patch

diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index fe8e03b..a318490 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -2,7 +2,8 @@ 
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) $(APPEND_LDFLAGS)
+PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
+PY_LDFLAGS = $(LDFLAGS) $(APPEND_LDFLAGS)
 
 .PHONY: all
 all: build
@@ -12,8 +13,8 @@  build:
 
 .PHONY: install
 install: all
-	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py install \
-		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
+	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
+		setup.py install $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)"  \
 		--install-scripts=$(LIBEXEC_BIN) --force
 	set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
 	             "`readlink -f $(DESTDIR)/$(bindir)`" != \