tools/python: corrently use LDFLAGS and CFLAGS

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>
This commit is contained in:
Roger Pau Monne authored and Wei Liu committed 2016-04-27 14:14:27 +01:00
1 parent 92afa655e7
commit dbed24c7c4
1 file changed
+5 -3
+5 -3
View 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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.