diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-04-18 08:00:13 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-04-18 08:53:53 +0200 |
commit | 29a56a6af7ff4a777dc2e91ce7d905d2483c1ec7 (patch) | |
tree | a7700c126023cb2761898db2c95e4de235217938 | |
parent | 004badb702994ade724c481e5ad906ded77b77ef (diff) | |
download | ptxdist-29a56a6af7ff4a777dc2e91ce7d905d2483c1ec7.tar.gz ptxdist-29a56a6af7ff4a777dc2e91ce7d905d2483c1ec7.tar.xz |
wrapper: add rpath-link for some rpaths
With new versions of binutils, ld will prepend the sysroot to all absolute
rpaths before using them at build time. This breaks rpaths for build
directories.
Specifically it breaks building the gobject-introspection helper programs.
Fix this by adding the same path with -rpath-link.
Note: This is incomplete: It only works for "-Wl,-rpath,<path>" but not for
"-Wl,-rpath -Wl,<path>". It fixes all known issues in PTXdist so it is good
enough for now.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/wrapper/libwrapper.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh index 2b1e66088..516b1be8b 100644 --- a/scripts/wrapper/libwrapper.sh +++ b/scripts/wrapper/libwrapper.sh @@ -71,6 +71,9 @@ cc_check_args() { exit 1 fi ;; + -Wl,-rpath,/*build-target*) + add_late_arg "-Wl,-rpath-link${ARG#-Wl,-rpath}" + ;; -) COMPILING=true ;; |