From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2] tools/python: pass more -rpath-link options to ld
Date: Wed, 4 Nov 2020 18:22:41 +0100 [thread overview]
Message-ID: <20201104172241.GY1447@mail-itl> (raw)
In-Reply-To: <8cf8cfa9-2b0c-123a-2d23-8932e61085fa@suse.com>
[-- Attachment #1: Type: text/plain, Size: 3666 bytes --]
On Wed, Nov 04, 2020 at 03:57:49PM +0100, Jan Beulich wrote:
> 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@suse.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> ---
> v2: Pass on and use SHLIB_libxen*.
> ---
> It's unclear to me whether this is ld version dependent - the pattern
> of where I've seen such warnings doesn't suggest a clear version
> dependency.
>
> Obviously (I think) the other similar variables (XEN_libxen*,
> CFLAGS_libxen*, etc) would better also be made use of to eliminate at
> least most of the PATH_* variables, but that's not the purpose of this
> change.
>
> --- 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)
>
> --- 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]
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-11-04 17:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 14:57 [PATCH v2] tools/python: pass more -rpath-link options to ld Jan Beulich
2020-11-04 17:19 ` Elliott Mitchell
2020-11-05 8:27 ` Jan Beulich
2020-11-04 17:22 ` Marek Marczykowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201104172241.GY1447@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.