diff options
Diffstat (limited to 'meta/recipes-devtools/libtool/libtool')
21 files changed, 380 insertions, 462 deletions
diff --git a/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch new file mode 100644 index 0000000000..4c4d0547a3 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch @@ -0,0 +1,39 @@ +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 01/12] ltmain.in: Handle trailing slashes on install commands correctly + +A command like: + +libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/image/usr/lib/gnome-keyring/standalone/' + +where the path ends with a trailing slash currently fails. This occurs in +software like gnome-keyring or pulseaudio and is because the comparision +code doesn't see the paths as equal. Strip both paths to ensure this works +reliably. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00010.html] + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 96b37003..3d5dcd0a 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -2378,8 +2378,14 @@ func_mode_install () + func_append dir "$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ func_stripname '' '/' "$destdir" ++ s_destdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch new file mode 100644 index 0000000000..0285c143d2 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch @@ -0,0 +1,28 @@ +From: Khem Raj <raj.khem@gmail.com> +Subject: [PATCH] ltmain.in: Parse additional clang options + +clang uses -rtlib and --unwindlib to select proper compiler runtime in +some cases. There fore pass these options to linker when found in +ldflags + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: libtool-2.4.7/build-aux/ltmain.in +=================================================================== +--- libtool-2.4.7.orig/build-aux/ltmain.in ++++ libtool-2.4.7/build-aux/ltmain.in +@@ -5420,10 +5420,12 @@ func_mode_link () + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -f*-prefix-map* needed for lto linking ++ # -rtlib=* select c runtime lib with clang ++ # --unwindlib=* select unwinder library with clang + # -Wa,* Pass flags directly to the assembler + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ +- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ ++ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-rtlib=*|--unwindlib=*| \ + -specs=*|-fsanitize=*|-fuse-ld=*|-f*-prefix-map*|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result diff --git a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch b/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch index ad2b110530..1920e2e6db 100644 --- a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch +++ b/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch @@ -1,24 +1,26 @@ -Upstream-Status: Pending +From: Khem Raj <raj.khem@gmail.com> +Subject: [PATCH 02/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils This patch renames the --with-sysroot option to --with-libtool-sysroot to avoid namespace conflict with binutils, gcc and other toolchain -components. +components since these componets also add that option to configure +and this becomes confusing and conflicting otherwise. -I also reported the problem to libtool here +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Upstream report: http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html --Khem Raj <raj.khem@gmail.com> +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00014.html] -Updated by: Robert Yang <liezhi.yang@windriver.com> - -diff --git a/m4/libtool.m4 b/m4/libtool.m4 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -1215,28 +1215,28 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) - # ---------------- +Index: libtool-2.4.7/m4/libtool.m4 +=================================================================== +--- libtool-2.4.7.orig/m4/libtool.m4 ++++ libtool-2.4.7/m4/libtool.m4 +@@ -1244,28 +1244,28 @@ _LT_DECL([], [ECHO], [1], [An echo progr AC_DEFUN([_LT_WITH_SYSROOT], - [AC_MSG_CHECKING([for sysroot]) + [m4_require([_LT_DECL_SED])dnl + AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], +AC_ARG_WITH([libtool-sysroot], @@ -39,8 +41,8 @@ diff --git a/m4/libtool.m4 b/m4/libtool.m4 fi ;; #( /*) -- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` +- lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ++ lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -50,10 +52,11 @@ diff --git a/m4/libtool.m4 b/m4/libtool.m4 AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac -diff --git a/tests/sysroot.at b/tests/sysroot.at ---- a/tests/sysroot.at -+++ b/tests/sysroot.at -@@ -64,7 +64,7 @@ while read file; do +Index: libtool-2.4.7/tests/sysroot.at +=================================================================== +--- libtool-2.4.7.orig/tests/sysroot.at ++++ libtool-2.4.7/tests/sysroot.at +@@ -65,7 +65,7 @@ while read file; do done]) LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" @@ -62,7 +65,7 @@ diff --git a/tests/sysroot.at b/tests/sysroot.at #??? if test PATH = "$shlibpath_var"; then -@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign]) +@@ -115,7 +115,7 @@ AM_INIT_AUTOMAKE([foreign]) AC_PROG_CC AC_CONFIG_SRCDIR([lib2.c]) LT_INIT @@ -71,7 +74,7 @@ diff --git a/tests/sysroot.at b/tests/sysroot.at AC_SUBST([sysroot]) AC_OUTPUT(Makefile) ]]) -@@ -155,7 +155,7 @@ AM_INIT_AUTOMAKE([foreign]) +@@ -156,7 +156,7 @@ AM_INIT_AUTOMAKE([foreign]) AC_PROG_CC AC_CONFIG_SRCDIR([prog.c]) LT_INIT diff --git a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch b/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch index 6af99f327c..07c7f911e0 100644 --- a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch +++ b/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch @@ -1,17 +1,20 @@ -Upstream-Status: Pending +From: Khem Raj <raj.khem@gmail.com> +Subject: [PATCH 03/12] ltmain.in: Add missing sysroot to library path -When using sysroot we should append it to libdir, which is helpful in +When using a sysroot we should append it to libdir, which is helpful in cross builds as the system is staged in the sysroot. For normal builds, i.e. when lt_sysroot is not set, it will still behave the same and add -L/usr/lib to the relink command. --Khem Raj <raj.khem@gmail.com> -Updated by: Robert Yang <liezhi.yang@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00017.html] diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 3d5dcd0a..2c994612 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -6421,7 +6421,7 @@ func_mode_link () +@@ -6475,7 +6475,7 @@ func_mode_link () fi else # We cannot seem to hardcode it, guess we'll fake it. @@ -20,3 +23,6 @@ diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch b/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch index 5c9f8cc9c0..4fcf456b0b 100644 --- a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch +++ b/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch @@ -1,32 +1,33 @@ -Upstream-Status: Inappropriate [embedded specific] +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 04/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs -Enalbing sysroot support exposed a bug where the final library -had an RPATH encoded into it which still pointed to the sysroot. -This works around the issue until it gets sorted out upstream. +There is a bug where RPATHs could end up containing sysroot values when +cross compiling which is obviously incorrect. Strip out sysroot components +from libdir when building RPATH values to avoid this. -Fix suggested by Richard Purdie <richard.purdie@intel.com> -Signed-off-by: Scott Garman <scott.a.garman@intel.com> -Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> -Updated by: Robert Yang <liezhi.yang@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00009.html] diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 2c994612..96238350 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -7569,9 +7569,11 @@ EOF +@@ -7654,9 +7654,11 @@ EOF test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result -+ func_stripname '=' '' "$libdir" -+ libdir=$func_stripname_result ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else -@@ -8301,6 +8303,10 @@ EOF +@@ -8386,6 +8388,10 @@ EOF hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then @@ -37,7 +38,7 @@ diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir -@@ -8352,6 +8358,10 @@ EOF +@@ -8437,6 +8443,10 @@ EOF hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then @@ -48,3 +49,6 @@ diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch b/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch index a2ec9473e7..589a33e8a6 100644 --- a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch +++ b/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch @@ -1,18 +1,22 @@ -We don't want to add RPATHS which match default linker -search paths, they're a waste of space. This patch -filters libtools list and removes the ones we don't need. +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 05/12] ltmain.in: Don't encode RATHS which match default linker paths -RP 23/9/2011 +We don't want to add RPATHS which match default linker search paths, they're +a waste of space. This patch filters libtools list of paths to encoode and +removes the ones we don't need. -Upstream-Status: Pending +Libtool may be passed link paths of the form "/usr/lib/../lib" so normalize +the paths before comparision. -Updated by: Robert Yang <liezhi.yang@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Index: libtool-2.4.2/build-aux/ltmain.in -=================================================================== ---- libtool-2.4.2.orig/build-aux/ltmain.in -+++ libtool-2.4.2/build-aux/ltmain.in -@@ -7286,8 +7286,14 @@ EOF +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00013.html] + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 96238350..6fb58ed2 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -7672,8 +7672,16 @@ EOF esac fi else @@ -20,8 +24,10 @@ Index: libtool-2.4.2/build-aux/ltmain.in - func_append dep_rpath " $flag" + # We only want to hardcode in an rpath if it isn't in the + # default dlsearch path. ++ func_normal_abspath "$libdir" ++ libdir_norm=$func_normal_abspath_result + case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; ++ *" $libdir_norm "*) ;; + *) eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + ;; @@ -29,7 +35,7 @@ Index: libtool-2.4.2/build-aux/ltmain.in fi elif test -n "$runpath_var"; then case "$perm_rpath " in -@@ -8019,8 +8025,14 @@ EOF +@@ -8406,8 +8414,16 @@ EOF esac fi else @@ -37,8 +43,10 @@ Index: libtool-2.4.2/build-aux/ltmain.in - func_append rpath " $flag" + # We only want to hardcode in an rpath if it isn't in the + # default dlsearch path. ++ func_normal_abspath "$libdir" ++ libdir_norm=$func_normal_abspath_result + case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; ++ *" $libdir_norm "*) ;; + *) eval flag=\"$hardcode_libdir_flag_spec\" + rpath+=" $flag" + ;; @@ -46,7 +54,7 @@ Index: libtool-2.4.2/build-aux/ltmain.in fi elif test -n "$runpath_var"; then case "$perm_rpath " in -@@ -8070,8 +8082,14 @@ EOF +@@ -8461,8 +8477,14 @@ EOF esac fi else @@ -63,3 +71,6 @@ Index: libtool-2.4.2/build-aux/ltmain.in fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch new file mode 100644 index 0000000000..a221dab528 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch @@ -0,0 +1,43 @@ +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly + +Update libtool.m4 to resolve a problem with lt_sysroot not being properly +updated if the option '--with[-libtool]-sysroot' is not provided when +running the 'configure' script for a package so that "/" as a sysroot +is handled correctly by libtool. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream Report: +http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00018.html] + +Index: libtool-2.4.7/m4/libtool.m4 +=================================================================== +--- libtool-2.4.7.orig/m4/libtool.m4 ++++ libtool-2.4.7/m4/libtool.m4 +@@ -1254,16 +1254,20 @@ dnl lt_sysroot will always be passed unq + dnl in case the user passed a directory name. + lt_sysroot= + case $with_libtool_sysroot in #( +- yes) ++ no) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ # Treat "/" the same a an unset sysroot. ++ if test "$lt_sysroot" = /; then ++ lt_sysroot= ++ fi + fi + ;; #( ++ yes|''|/) ++ ;; #( + /*) + lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"` + ;; #( +- no|'') +- ;; #( + *) + AC_MSG_RESULT([$with_libtool_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) diff --git a/meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch index bbd36d8dc1..277afe0af6 100644 --- a/meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch +++ b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch @@ -1,7 +1,5 @@ -From df2cd898e48208f26320d40c3ed6b19c75c27142 Mon Sep 17 00:00:00 2001 From: Marek Vasut <marex@denx.de> -Date: Thu, 17 Sep 2015 00:43:15 +0200 -Subject: [PATCH] libtool: Fix support for NIOS2 processor +Subject: [PATCH 07/12] libtool: Fix support for NIOS2 processor The name of the system contains the string "nios2". This string is caught by the some of the greedy checks for OS/2 in libtool, @@ -13,16 +11,15 @@ checks to prevent the OS/2 check incorrectly trapping the nios2 as well. Signed-off-by: Marek Vasut <marex@denx.de> -Upstream-Status: Submitted ---- - build-aux/ltmain.in | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00021.html] diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in -index d5cf07a..4164284 100644 +index 6fb58ed2..606f17be 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -504,6 +504,12 @@ libtool_validate_options () +@@ -519,6 +519,12 @@ libtool_validate_options () test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in @@ -35,7 +32,7 @@ index d5cf07a..4164284 100644 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) -@@ -6220,6 +6226,15 @@ func_mode_link () +@@ -6246,6 +6252,15 @@ func_mode_link () if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in @@ -51,7 +48,7 @@ index d5cf07a..4164284 100644 *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" -@@ -6290,6 +6305,11 @@ func_mode_link () +@@ -6316,6 +6331,11 @@ func_mode_link () elif test -n "$soname_spec"; then # bleh windows case $host in @@ -64,5 +61,5 @@ index d5cf07a..4164284 100644 func_arith $current - $age major=$func_arith_result -- -2.5.1 +2.25.1 diff --git a/meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch b/meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch new file mode 100644 index 0000000000..83c74373ae --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch @@ -0,0 +1,33 @@ +From: Khem Raj <raj.khem@gmail.com> +Subject: [PATCH 08/12] libtool: Check for static libs for internal compiler libraries + +Libtool checks only for libraries linked as -l* when trying to +find internal compiler libraries. Clang, however uses the absolute +path to link its internal libraries e.g. compiler_rt. This patch +handles clang's statically linked libraries when finding internal +compiler libraries. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +https://crbug.com/749263 +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00016.html] + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 180dd9d1..022c1292 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -7560,7 +7560,7 @@ if AC_TRY_EVAL(ac_compile); then + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in + +- -L* | -R* | -l*) ++ -L* | -R* | -l* | */libclang_rt.*.a) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test x-L = "$p" || +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch b/meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch new file mode 100644 index 0000000000..437c09fa6d --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch @@ -0,0 +1,31 @@ +From: Mingli Yu <mingli.yu@windriver.com> +Subject: [PATCH 09/12] Makefile.am: make sure autoheader run before autoconf + +autoheader will update ../libtool-2.4.6/libltdl/config-h.in which +autoconf needs, so there comes a race sometimes as below: + | configure.ac:45: error: required file 'config-h.in' not found + | touch '../libtool-2.4.6/libltdl/config-h.in' + +So make sure autoheader run before autoconf to avoid this race. + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00015.html] + +diff --git a/Makefile.am b/Makefile.am +index 6b546092..84795d87 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -370,7 +370,7 @@ lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps) + $(lt_aclocal_m4): $(lt_aclocal_m4_deps) + $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I ../m4 + +-$(lt_configure): $(lt_configure_deps) ++$(lt_configure): $(lt_configure_deps) $(lt_config_h_in) + $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOCONF) + + $(lt_config_h_in): $(lt_configure_deps) +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch b/meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch new file mode 100644 index 0000000000..a92e22905f --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch @@ -0,0 +1,33 @@ +From: Mingli Yu <mingli.yu@windriver.com> +Subject: [PATCH 10/12] Makefile.am: make sure autoheader run before automake + +When use automake to generate Makefile.in from Makefile.am, there +comes below race: + | configure.ac:45: error: required file 'config-h.in' not found + +It is because the file config-h.in in updating process by autoheader, +so make automake run after autoheader to avoid the above race. + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00020.html] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> + +diff --git a/Makefile.am b/Makefile.am +index 84795d87..8c9949ed 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -333,7 +333,7 @@ EXTRA_DIST += $(lt_aclocal_m4) \ + $(lt_obsolete_m4) \ + $(stamp_mk) + +-$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) ++$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) $(lt_config_h_in) + $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile + + # Don't let unused scripts leak into the libltdl Makefile +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch b/meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch new file mode 100644 index 0000000000..4945533bad --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch @@ -0,0 +1,28 @@ +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 11/12] ltmain.in: Handle prefix-map compiler options correctly + +If lto is enabled, we need the prefix-map variables to be passed to the linker. +Add these to the list of options libtool passes through. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00019.html] + +Index: libtool-2.4.7/build-aux/ltmain.in +=================================================================== +--- libtool-2.4.7.orig/build-aux/ltmain.in ++++ libtool-2.4.7/build-aux/ltmain.in +@@ -5419,11 +5419,12 @@ func_mode_link () + # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC ++ # -f*-prefix-map* needed for lto linking + # -Wa,* Pass flags directly to the assembler + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ +- -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) ++ -specs=*|-fsanitize=*|-fuse-ld=*|-f*-prefix-map*|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result + func_append compile_command " $arg" diff --git a/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch b/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch new file mode 100644 index 0000000000..c750303d43 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch @@ -0,0 +1,29 @@ +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 12/12] libtool.m4: For reproducibility stop encoding hostname in libtool script + +For reproducibilty, stop encoding the hostname into the libtool script, this isn't +really adding much to debugging and most distros are carrying such a patch now as +reproducibility is important. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +https://sources.debian.org/data/main/libt/libtool/2.4.6-10/debian/patches/ + no_hostname.patch + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00011.html] + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 022c1292..1a8a2998 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([ + cat <<_LT_EOF >> "$cfgfile" + #! $SHELL + # Generated automatically by $as_me ($PACKAGE) $VERSION +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + + # Provide generalized library-building support services. +-- +2.25.1 + diff --git a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch deleted file mode 100644 index 1bd95980c0..0000000000 --- a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch +++ /dev/null @@ -1,42 +0,0 @@ -Upstream-Status: Pending - -This patch updates libtool.m4 (and its output) to resolve a problem -with variable 'lt_sysroot' not being properly updated if the option -'--with[-libtool]-sysroot' is not provided when running the 'configure' -script for a package. - -I have also reported the problem to libtool here - -http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html - -Signed-off-by: Hans Beckerus <hans.beckerus at gmail.com> -Updated by: Robert Yang <liezhi.yang@windriver.com> ---- -diff --git a/m4/libtool.m4 b/m4/libtool.m4 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -1225,16 +1225,21 @@ dnl lt_sysroot will always be passed unquoted. We quote it here - dnl in case the user passed a directory name. - lt_sysroot= - case $with_libtool_sysroot in #( -- yes) -+ no) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ # Treat "/" the same a an unset sysroot. It seems to be more -+ # compatible across host platforms that way!? -+ if test "$lt_sysroot" = /; then -+ lt_sysroot= -+ fi - fi - ;; #( -+ yes|''|/) -+ ;; #( - /*) - lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` - ;; #( -- no|'') -- ;; #( - *) - AC_MSG_RESULT([$with_libtool_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) diff --git a/meta/recipes-devtools/libtool/libtool/fixinstall.patch b/meta/recipes-devtools/libtool/libtool/fixinstall.patch index 8f343bf436..48330d82fb 100644 --- a/meta/recipes-devtools/libtool/libtool/fixinstall.patch +++ b/meta/recipes-devtools/libtool/libtool/fixinstall.patch @@ -27,9 +27,9 @@ diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in - if test -n "$relink_command"; then + if test "$fast_install" = no && test -n "$relink_command"; then - # Strip any trailing slash from the destination. - func_stripname '' '/' "$libdir" - destlibdir=$func_stripname_result + # Strip any trailing slash from the destination. + func_stripname '' '/' "$libdir" + destlibdir=$func_stripname_result @@ -2394,7 +2394,7 @@ func_mode_install () shift diff --git a/meta/recipes-devtools/libtool/libtool/multilib.patch b/meta/recipes-devtools/libtool/libtool/multilib.patch new file mode 100644 index 0000000000..018f066652 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/multilib.patch @@ -0,0 +1,23 @@ +Without this patch /usr/bin/libtoolize is different for each multilib +since their host-triplets are different, despite there being no difference in +the functionality of libtoolize itself. + +Ugly, but just patch this out. This fixes issues where libtool and +libXX-libtool couldn't be installed into the same system. + +Upstream-Status: Inappropriate +RP 2018/7/30 + +Index: libtool-2.4.6/libtoolize.in +=================================================================== +--- libtool-2.4.6.orig/libtoolize.in ++++ libtool-2.4.6/libtoolize.in +@@ -113,7 +113,7 @@ You must 'cd' to the top directory of yo + When reporting a bug, please describe a test case to reproduce it and + include the following information: + +- host-triplet: @host_triplet@ ++ host-triplet <redacted> + version: $progname (GNU @PACKAGE@) @VERSION@ + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` diff --git a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch index b2239fbade..fcbce7286b 100644 --- a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch +++ b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch @@ -4,6 +4,8 @@ hardcoding paths. RP 2015/2/3 +Upstream-Status: Inappropriate + Index: libtool-2.4.5/libtoolize.in =================================================================== --- libtool-2.4.5.orig/libtoolize.in diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch deleted file mode 100644 index 1e4c65e024..0000000000 --- a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch +++ /dev/null @@ -1,38 +0,0 @@ -libtool: normalize link paths before considering for RPATH - -Libtool may be passed link paths of the form "/usr/lib/../lib", which -fool its detection code into thinking it should be included as an -RPATH in the generated binary. Normalize before comparision. - -Signed-off-by: Andy Ross <andy.ross@windriver.com> -Upstream-Status: Pending - -Updated by: Robert Yang <liezhi.yang@windriver.com> - -diff -ur a/build-aux/ltmain.in b/build-aux/ltmain.in ---- a/build-aux/ltmain.in 2012-08-16 13:58:55.058900363 -0700 -+++ b/build-aux/ltmain.in 2012-08-22 11:01:34.191345989 -0700 -@@ -7288,8 +7288,10 @@ - else - # We only want to hardcode in an rpath if it isn't in the - # default dlsearch path. -+ func_normal_abspath "$libdir" -+ libdir_norm=$func_normal_abspath_result - case " $sys_lib_dlsearch_path " in -- *" $libdir "*) ;; -+ *" $libdir_norm "*) ;; - *) eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - ;; -@@ -8027,8 +8029,10 @@ - else - # We only want to hardcode in an rpath if it isn't in the - # default dlsearch path. -+ func_normal_abspath "$libdir" -+ libdir_norm=$func_normal_abspath_result - case " $sys_lib_dlsearch_path " in -- *" $libdir "*) ;; -+ *" $libdir_norm "*) ;; - *) eval flag=\"$hardcode_libdir_flag_spec\" - rpath+=" $flag" - ;; diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch deleted file mode 100644 index a73df2e4a7..0000000000 --- a/meta/recipes-devtools/libtool/libtool/prefix.patch +++ /dev/null @@ -1,98 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure -it can't be confused with the host libtool. - -Originally by: RP - -Updated: Date: 2010/06/28 -Nitin A Kamble <nitin.a.kamble@intel.com> - -It also adjusts libtool so that the header at the script is used for -script execution and not thevalue of $SHELL. This is because many -Makefiles change $SHELL so dash can get used to execute what is -otherwise configured as a bash shell script. Since we don't need to -execute scipts this way on any system I'm aware of us building upon, -the simplest fix is just to remove $SHELL. - -Updated: Date: 2011/11/09 -RP - -Updated by: Robert Yang <liezhi.yang@windriver.com> - -diff --git a/Makefile.am b/Makefile.am ---- a/Makefile.am -+++ b/Makefile.am -@@ -31,7 +31,7 @@ SUBDIRS = . - DIST_SUBDIRS = $(SUBDIRS) - EXTRA_DIST = - --BUILT_SOURCES = libtool libtoolize -+BUILT_SOURCES = $(host_alias)-libtool libtoolize - - CLEANFILES = - MOSTLYCLEANFILES = -@@ -67,7 +67,7 @@ build_scripts = $(srcdir)/$(aux_dir)/announce-gen \ - - EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \ - GNUmakefile --CLEANFILES += libtool libtoolize -+CLEANFILES += $(host_alias)-libtool libtoolize - - ## If a file is named several times below, and especially if it - ## is a distributed file created during Libtool bootstrap, we -@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \ - -e 's|@srcdir\@|$(srcdir)|g' - - # The libtool distributor and the standalone libtool script. --bin_SCRIPTS = libtool -+bin_SCRIPTS = $(host_alias)-libtool - - libtoolize: $(libtoolize_in) $(config_status) - $(AM_V_at)rm -f '$@' -@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status) - # We used to do this with a 'stamp-vcl' file, but non-gmake builds - # would rerun configure on every invocation, so now we manually - # check the version numbers from the build rule when necessary. --libtool: $(ltmain_sh) $(config_status) $(dotversion) -+$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion) - @$(rebuild); \ - if test -f '$@'; then \ - eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \ -@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ - - BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ - LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ -- LIBTOOL="$(abs_top_builddir)/libtool" \ -+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \ - tst_aclocaldir="$(abs_top_srcdir)/m4" - - INSTALLCHECK_ENVIRONMENT = \ - LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \ -- LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \ -+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \ - LTDLINCL="-I$(includedir)" \ - LIBLTDL="$(libdir)/libltdl.la" \ - tst_aclocaldir="$(aclocaldir)" -diff --git a/m4/libtool.m4 b/m4/libtool.m4 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1]) - LIBTOOL_DEPS=$ltmain - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - AC_SUBST(LIBTOOL)dnl - - _LT_SETUP -@@ -199,7 +200,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a '.a' archive for static linking (except MSVC, diff --git a/meta/recipes-devtools/libtool/libtool/trailingslash.patch b/meta/recipes-devtools/libtool/libtool/trailingslash.patch deleted file mode 100644 index e8824d7db9..0000000000 --- a/meta/recipes-devtools/libtool/libtool/trailingslash.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Pending - -A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio) - -This is because libdir has a trailing slash which breaks the comparision. - -RP 2/1/10 - -Merged a patch received from Gary Thomas <gary@mlbassoc.com> - -Date: 2010/07/12 -Nitin A Kamble <nitin.a.kamble@intel.com> - -Updated by: Robert Yang <liezhi.yang@windriver.com> - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -2356,8 +2356,15 @@ func_mode_install () - func_append dir "$objdir" - - if test -n "$relink_command"; then -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$libdir" -+ destlibdir=$func_stripname_result -+ -+ func_stripname '' '/' "$destdir" -+ s_destdir=$func_stripname_result -+ - # Determine the prefix the user has applied to our future dir. -- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` -+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that diff --git a/meta/recipes-devtools/libtool/libtool/unwind-opt-parsing.patch b/meta/recipes-devtools/libtool/libtool/unwind-opt-parsing.patch deleted file mode 100644 index b633bc41bb..0000000000 --- a/meta/recipes-devtools/libtool/libtool/unwind-opt-parsing.patch +++ /dev/null @@ -1,179 +0,0 @@ -Cut and paste the pieces of build-aux/options-parser inline into the main -ltmain.sh code. This removes a performance degradation caused by the -repeated calls to func_quote_for_eval, the mechanism funclib uses -to construct the functions used for option parsing. - -Upstream-Status: Submitted [Being discussed on mailing list Feb 2015] - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in -index d5cf07a..0f54303 100644 ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -342,11 +342,15 @@ _LT_EOF - # libtool_options_prep [ARG]... - # ----------------------------- - # Preparation for options parsed by libtool. --libtool_options_prep () --{ -+#libtool_options_prep () -+#{ - $debug_mode - - # Option defaults: -+ opt_verbose=false -+ opt_warning_types= -+ -+ # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false -@@ -382,19 +386,14 @@ libtool_options_prep () - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac -- -- # Pass back the list of options. -- func_quote_for_eval ${1+"$@"} -- libtool_options_prep_result=$func_quote_for_eval_result --} --func_add_hook func_options_prep libtool_options_prep -+#} - - - # libtool_parse_options [ARG]... - # --------------------------------- - # Provide handling for libtool specific options. --libtool_parse_options () --{ -+#libtool_parse_options () -+#{ - $debug_cmd - - # Perform our own loop to consume as many options as possible in -@@ -474,29 +473,90 @@ libtool_parse_options () - func_append preserve_args " $_G_opt" - ;; - -- # An option not handled by this hook function: -- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; -- esac -- done -+ --debug|-x) debug_cmd='set -x' -+ func_echo "enabling shell trace mode" -+ $debug_cmd -+ ;; - -+ --no-warnings|--no-warning|--no-warn) -+ set dummy --warnings none ${1+"$@"} -+ shift -+ ;; - -- # save modified positional parameters for caller -- func_quote_for_eval ${1+"$@"} -- libtool_parse_options_result=$func_quote_for_eval_result --} --func_add_hook func_parse_options libtool_parse_options -+ --warnings|--warning|-W) -+ test $# = 0 && func_missing_arg $_G_opt && break -+ case " $warning_categories $1" in -+ *" $1 "*) -+ # trailing space prevents matching last $1 above -+ func_append_uniq opt_warning_types " $1" -+ ;; -+ *all) -+ opt_warning_types=$warning_categories -+ ;; -+ *none) -+ opt_warning_types=none -+ warning_func=: -+ ;; -+ *error) -+ opt_warning_types=$warning_categories -+ warning_func=func_fatal_error -+ ;; -+ *) -+ func_fatal_error \ -+ "unsupported warning category: '$1'" -+ ;; -+ esac -+ shift -+ ;; -+ -+ --verbose|-v) opt_verbose=: ;; -+ --version) func_version ;; -+ -\?|-h) func_usage ;; -+ --help) func_help ;; -+ -+ # Separate optargs to long options (plugins may need this): -+ --*=*) func_split_equals "$_G_opt" -+ set dummy "$func_split_equals_lhs" \ -+ "$func_split_equals_rhs" ${1+"$@"} -+ shift -+ ;; -+ -+ # Separate optargs to short options: -+ -W*) -+ func_split_short_opt "$_G_opt" -+ set dummy "$func_split_short_opt_name" \ -+ "$func_split_short_opt_arg" ${1+"$@"} -+ shift -+ ;; -+ -+ # Separate non-argument short options: -+ -\?*|-h*|-v*|-x*) -+ func_split_short_opt "$_G_opt" -+ set dummy "$func_split_short_opt_name" \ -+ "-$func_split_short_opt_arg" ${1+"$@"} -+ shift -+ ;; -+ -+ --) break ;; -+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; -+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; -+ esac -+ done -+#} - -+# Display all warnings if -W was not given. -+test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - - # libtool_validate_options [ARG]... - # --------------------------------- - # Perform any sanity checks on option settings and/or unconsumed - # arguments. --libtool_validate_options () --{ -+#libtool_validate_options () -+#{ - # save first non-option argument - if test 0 -lt $#; then -- nonopt=$1 -+ nonopt=$_G_opt - shift - fi - -@@ -537,20 +597,10 @@ libtool_validate_options () - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } -+#} - -- # Pass back the unparsed argument list -- func_quote_for_eval ${1+"$@"} -- libtool_validate_options_result=$func_quote_for_eval_result --} --func_add_hook func_validate_options libtool_validate_options -- -- --# Process options as early as possible so that --help and --version --# can return quickly. --func_options ${1+"$@"} --eval set dummy "$func_options_result"; shift -- -- -+# Bail if the options were screwed! -+$exit_cmd $EXIT_FAILURE - - ## ----------- ## - ## Main. ## |