Skip to content

Commit

Permalink
Merge pull request #250 from rhubert/libtool-2.5
Browse files Browse the repository at this point in the history
libtool: add patch for 2.5
  • Loading branch information
jkloetzke authored Feb 14, 2025
2 parents 781099e + eaabf30 commit e81aaf0
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
2 changes: 2 additions & 0 deletions classes/libtool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ checkoutSetup: |
else
patchApplySeries -n libtool $<<libtool/buildroot-libtool-v2.4.patch>>
fi
elif [[ "${ltmain_version}" = "2.5" ]] ; then
patchApplySeries -n libtool $<<libtool/buildroot-libtool-v2.5.patch>>
fi
popd
done
Expand Down
89 changes: 89 additions & 0 deletions classes/libtool/buildroot-libtool-v2.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
--- a/ltmain.sh 2025-02-13 21:53:39.246113458 +0100
+++ b/ltmain.sh 2025-02-13 22:02:57.804766837 +0100
@@ -2947,8 +2947,8 @@ func_infer_tag ()
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
- func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with '--tag'"
+ func_echo "defaulting to \`CC'"
+ func_echo "if this is not correct, specify a tag with \`--tag'"
# else
# func_verbose "using $tagname tagged configuration"
fi
@@ -4541,8 +4541,11 @@ func_mode_install ()
# At present, this check doesn't affect windows .dll's that
# are installed into $libdir/../bin (currently, that works fine)
# but it's something to keep an eye on.
- test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+ #
+ # This breaks install into our staging area. -PB
+ #
+ # test "$inst_prefix_dir" = "$destdir" && \
+ # func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"

if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
@@ -6833,7 +6836,8 @@ func_mode_link ()
;;
-all-static | -static | -static-libtool-libs)
case $arg in
- -all-static)
+ # Make -static behave like --all-static
+ -all-static | -static)
if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
func_warning "complete static linking is impossible in this configuration"
fi
@@ -6842,12 +6846,6 @@ func_mode_link ()
fi
prefer_static_libs=yes
;;
- -static)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=built
- ;;
-static-libtool-libs)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
@@ -7148,7 +7146,8 @@ func_mode_link ()
prevarg=$arg

case $arg in
- -all-static)
+ # Make -static behave like -all-static
+ -all-static | -static)
if test -n "$link_static_flag"; then
# See comment for -static flag below, for more details.
func_append compile_command " $link_static_flag"
@@ -7451,7 +7450,7 @@ func_mode_link ()
continue
;;

- -static | -static-libtool-libs)
+ -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -8438,7 +8437,7 @@ func_mode_link ()
*)
if test no = "$installed"; then
func_append notinst_deplibs " $lib"
- need_relink=yes
+ need_relink=no
fi
;;
esac
@@ -10960,6 +10959,10 @@ func_mode_link ()
# Replace all uninstalled libtool libraries with the installed ones
newdependency_libs=
for deplib in $dependency_libs; do
+ # Replacing uninstalled with installed can easily break crosscompilation,
+ # since the installed path is generally the wrong architecture. -CL
+ newdependency_libs="$newdependency_libs $deplib"
+ continue
case $deplib in
*.la)
func_basename "$deplib"

0 comments on commit e81aaf0

Please sign in to comment.