Skip to content
Snippets Groups Projects
Commit b1276a5d authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Rename and extend the Debian libtool overlinking patch.

parent 88435ef6
No related branches found
No related tags found
1 merge request!14Draft: K202125/cdi 1.8.x pio merge followup
......@@ -35,7 +35,7 @@ autoreconf -fvi || exit $?
# Patch libtool.m4:
for patch in \
contrib/000link_all_deplibs-patch/link_all_deplibs.patch \
contrib/000debian-no-overlink-patch/debian-no-overlink.patch \
; do
echo "applying $patch"
patch -p 1 --no-backup-if-mismatch --forward -r - -i $patch -d .
......
This patch is borrowed from the Debian project:
http://deb.debian.org/debian/pool/main/libt/libtool/libtool_2.4.6-15.debian.tar.xz
This is a combination of patches from the Debian project:
https://sources.debian.org/patches/libtool/2.4.6-15/deplib_binary.patch
https://sources.debian.org/patches/libtool/2.4.6-15/link_all_deplibs.patch
The comment for the patch in the aformentioned archive says:
The patch prevents overlinking.
The comment in link_all_deplibs.patch says:
## Do not link against deplibs. This is not needed for shared libs
## on atleast ELF systems since those already know which libs they
## need themself. This seems to break a few things and will be fixed
......
......@@ -12,6 +12,36 @@
esac
fi
if test lib,dlpreopen = "$linkmode,$pass"; then
@@ -7887,19 +7890,19 @@ func_mode_link ()
# It is a libtool convenience library, so add in its objects.
func_append convenience " $ladir/$objdir/$old_library"
func_append old_convenience " $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
elif test prog != "$linkmode" && test lib != "$linkmode"; then
func_fatal_error "'$lib' is not a convenience library"
fi
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_preserve_dup_deps; then
- case "$tmp_libs " in
- *" $deplib "*) func_append specialdeplibs " $deplib" ;;
- esac
- fi
- func_append tmp_libs " $deplib"
- done
continue
fi # $pass = conv
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4936,6 +4936,9 @@ m4_if([$1], [CXX], [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment