Skip to content

Commit

Permalink
Fix #91 by patching the produced ltmain.sh.
Browse files Browse the repository at this point in the history
This should be reported to libtoolize upstream?
  • Loading branch information
pjaaskel committed Jul 13, 2019
1 parent acc2409 commit 820fe44
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tce/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,8 @@ if [ "x$config" = "x" ] ; then
$VERBOSE_ECHO "Could not locate the configure template (from `pwd`)"
fi

patch -p0 < ltmain.sh.patch || true

# summarize
$ECHO "done"
$ECHO
Expand Down
19 changes: 19 additions & 0 deletions tce/ltmain.sh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
At least Ubuntu 18.04's libtoolize generates wrapper
scripts which _prepend_ the system path to the LD_LIBRARY_PATH,
causing the system's libllvm to be found before the user's
own installed LLVM (overridden using LB_LIBRARY_PATH).

This patches it such that the path is appended to the path
instead.

--- ltmain.sh.orig 2019-07-13 12:06:11.050523601 +0300
+++ ltmain.sh 2019-07-13 12:06:46.427026644 +0300
@@ -5479,7 +5479,7 @@
if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
$ECHO "\
# Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+ $shlibpath_var=\"\$$shlibpath_var:$temp_rpath\"

# Some systems cannot cope with colon-terminated $shlibpath_var
# The second colon is a workaround for a bug in BeOS R4 sed

0 comments on commit 820fe44

Please sign in to comment.