[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] tools/python: pass more -rpath-link options to ld



commit 2b8314a3c354d04545700c80ff5a5f86799b79c7
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Nov 5 16:48:37 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Nov 5 16:48:37 2020 +0100

    tools/python: pass more -rpath-link options to ld
    
    With the split of libraries, I've observed a number of warnings from
    (old?) ld.
    
    Instead of duplicating the additions in two places, introduce a setup.py
    make variable holding all the common parts of the invocations.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
 tools/python/Makefile | 14 ++++++++------
 tools/python/setup.py |  7 ++++++-
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/tools/python/Makefile b/tools/python/Makefile
index 5e555acf1c..cc76423647 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -8,19 +8,21 @@ PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
 PY_LDFLAGS = $(SHLIB_LDFLAGS) $(APPEND_LDFLAGS)
 INSTALL_LOG = build/installed_files.txt
 
+setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" 
LDFLAGS="$(PY_LDFLAGS)" \
+           SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \
+           SHLIB_libxenguest="$(SHLIB_libxenguest)" \
+           SHLIB_libxenstore="$(SHLIB_libxenstore)" \
+           $(PYTHON) setup.py
+
 .PHONY: build
 build:
-       CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" 
LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build
+       $(setup.py) build
 
 .PHONY: install
 install:
        $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-
-       CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \
-               LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \
-               --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
+       $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
                --root="$(DESTDIR)" --force
-
        $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream 
$(DESTDIR)$(LIBEXEC_BIN)
        $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
 
diff --git a/tools/python/setup.py b/tools/python/setup.py
index 1afe800479..8c95db7769 100644
--- a/tools/python/setup.py
+++ b/tools/python/setup.py
@@ -4,6 +4,10 @@ import os, sys
 
 XEN_ROOT = "../.."
 
+SHLIB_libxenctrl = os.environ['SHLIB_libxenctrl'].split()
+SHLIB_libxenguest = os.environ['SHLIB_libxenguest'].split()
+SHLIB_libxenstore = os.environ['SHLIB_libxenstore'].split()
+
 extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
 
 PATH_XEN      = XEN_ROOT + "/tools/include"
@@ -24,7 +28,7 @@ xc = Extension("xc",
                library_dirs       = [ PATH_LIBXENCTRL, PATH_LIBXENGUEST ],
                libraries          = [ "xenctrl", "xenguest" ],
                depends            = [ PATH_LIBXENCTRL + "/libxenctrl.so", 
PATH_LIBXENGUEST + "/libxenguest.so" ],
-               extra_link_args    = [ "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ],
+               extra_link_args    = SHLIB_libxenctrl + SHLIB_libxenguest,
                sources            = [ "xen/lowlevel/xc/xc.c" ])
 
 xs = Extension("xs",
@@ -33,6 +37,7 @@ xs = Extension("xs",
                library_dirs       = [ PATH_XENSTORE ],
                libraries          = [ "xenstore" ],
                depends            = [ PATH_XENSTORE + "/libxenstore.so" ],
+               extra_link_args    = SHLIB_libxenstore,
                sources            = [ "xen/lowlevel/xs/xs.c" ])
 
 plat = os.uname()[0]
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.