diff options
Diffstat (limited to 'patches/0001-ltmain.in-ensure-that-local-source-tree-directories-.patch')
-rw-r--r-- | patches/0001-ltmain.in-ensure-that-local-source-tree-directories-.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/patches/0001-ltmain.in-ensure-that-local-source-tree-directories-.patch b/patches/0001-ltmain.in-ensure-that-local-source-tree-directories-.patch new file mode 100644 index 0000000..8f057de --- /dev/null +++ b/patches/0001-ltmain.in-ensure-that-local-source-tree-directories-.patch @@ -0,0 +1,71 @@ +From 076339142cba4e0fb55396231c5284544f6ee622 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <gray@gnu.org.ua> +Date: Thu, 12 Dec 2019 15:55:19 +0200 +Subject: [PATCH] ltmain.in: ensure that local source tree directories precede + any other in compiler_flags + +This is necessary to ensure that the program run by a libtool wrapper +links with the libraries from the source tree. +--- + build-aux/ltmain.in | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 96b37003..b21d82cc 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -4660,6 +4660,7 @@ func_mode_link () + xrpath= + perm_rpath= + temp_rpath= ++ temp_rpath_tail= + thread_safe=no + vinfo= + vinfo_number=no +@@ -6196,7 +6197,10 @@ func_mode_link () + # Make sure the rpath contains only unique directories. + case $temp_rpath: in + *"$absdir:"*) ;; +- *) func_append temp_rpath "$absdir:" ;; ++ *) case $absdir in ++ "$progdir/"*) func_append temp_rpath "$absdir:" ;; ++ *) func_append temp_rpath_tail "$absdir:" ;; ++ esac + esac + fi + +@@ -6208,7 +6212,9 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) func_append compile_rpath " $absdir" ;; ++ *) case $absdir in ++ "$progdir/"*) func_append compile_rpath " $absdir" ;; ++ esac + esac + ;; + esac +@@ -6282,7 +6288,9 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) func_append compile_rpath " $absdir" ;; ++ *) case $absdir in ++ "$progdir/"*) func_append compile_rpath " $absdir" ;; ++ esac + esac + ;; + esac +@@ -6646,6 +6654,9 @@ func_mode_link () + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs ++ ++ func_append temp_rpath "$temp_rpath_tail" ++ + if test link = "$pass"; then + if test prog = "$linkmode"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" +-- +2.14.5 + |