]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/python: corrently use LDFLAGS and CFLAGS
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 26 Apr 2016 10:25:28 +0000 (12:25 +0200)
committerWei Liu <wei.liu2@citrix.com>
Wed, 27 Apr 2016 13:14:27 +0000 (14:14 +0100)
It is incorrect to add the LDFLAGS to the CFLAGS, and some compilers will
error out if linker flags are passed when creating object files. Fix this by
properly passing CFLAGS and LDFLAGS, instead of putting everything in
CFLAGS.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/python/Makefile

index 23635374c131294a57c0481ee0babe376236c5e2..da08f46fb8b86d498be7d0fd5912ac0de9921405 100644 (file)
@@ -4,7 +4,8 @@ include $(XEN_ROOT)/tools/Rules.mk
 .PHONY: all
 all: build
 
-PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) $(LDFLAGS) $(APPEND_LDFLAGS)
+PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
+PY_LDFLAGS = $(LDFLAGS) $(APPEND_LDFLAGS)
 
 .PHONY: build
 build:
@@ -14,8 +15,9 @@ build:
 install:
        $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 
-       CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py install \
-               $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
+       CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
+               setup.py install $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)"  \
+               --force
 
        $(INSTALL_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
        $(INSTALL_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)