]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
autotools/libtool: Drop libtool sysroot patch as not needed
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Jun 2024 10:07:40 +0000 (11:07 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Jun 2024 11:04:36 +0000 (12:04 +0100)
libtool auto detects the sysroot from gcc's parameters or configuration so we
don't need to pass in this configuration separately to libtool.

Whilst the option names do conflict with gcc/binutils, that is an issue for those
projects to resolve, not us. Upstream libtool did reject the patch. We can
drop this patch and simplify our code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/insane.bbclass
meta/classes-recipe/autotools.bbclass
meta/recipes-devtools/libtool/libtool-2.5.0.inc
meta/recipes-devtools/libtool/libtool-native_2.5.0.bb
meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch [deleted file]
meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch

index 151cf0c4eaca09f450f3e5da7e397ec62eb7e1fb..822d190a3046b81a0839f072bc460a41c867f92e 100644 (file)
@@ -58,7 +58,7 @@ enabled tests are listed here, the do_package_qa task will run under fakeroot."
 
 ALL_QA = "${WARN_QA} ${ERROR_QA}"
 
-UNKNOWN_CONFIGURE_OPT_IGNORE ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot --disable-static"
+UNKNOWN_CONFIGURE_OPT_IGNORE ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --disable-static"
 
 # This is a list of directories that are expected to be empty.
 QA_EMPTY_DIRS ?= " \
index 7ee1b0d9c7487f81c04ab230a634aefe27a39319..9ebdca4768079034ea2d4b021d70b8b40a5fd2d3 100644 (file)
@@ -57,12 +57,6 @@ export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
 export LD_FOR_BUILD = "${BUILD_LD}"
 export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}"
 
-def append_libtool_sysroot(d):
-    # Only supply libtool sysroot option for non-native packages
-    if not bb.data.inherits_class('native', d):
-        return '--with-libtool-sysroot=${STAGING_DIR_HOST}'
-    return ""
-
 CONFIGUREOPTS = " --build=${BUILD_SYS} \
                  --host=${HOST_SYS} \
                  --target=${TARGET_SYS} \
@@ -81,8 +75,7 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
                  --infodir=${infodir} \
                  --mandir=${mandir} \
                  --disable-silent-rules \
-                 ${CONFIGUREOPT_DEPTRACK} \
-                 ${@append_libtool_sysroot(d)}"
+                 ${CONFIGUREOPT_DEPTRACK}"
 CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking"
 
 CACHED_CONFIGUREVARS ?= ""
index dd6215476e834de8fff2a0d27f0e88ac7f043eaf..a609de6369b7c461201e891637befad2b0d055e1 100644 (file)
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
 SRC_URI = "https://alpha.gnu.org/gnu/libtool/libtool-${PV}.tar.gz \
            file://0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch \
-           file://0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch \
            file://0003-ltmain.in-Add-missing-sysroot-to-library-path.patch \
            file://0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch \
            file://0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch \
index 19024f7830cc9467a7ca0dafe681a27a9a8aac10..90c06f0ec3f20b4358c71ad469386088ac1a288a 100644 (file)
@@ -4,7 +4,7 @@ DEPENDS = ""
 
 inherit native
 
-EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}"
+EXTRA_OECONF = " --with-sysroot=${STAGING_DIR_NATIVE}"
 
 do_configure:prepend () {
        # Remove any existing libtool m4 since old stale versions would break
diff --git a/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch b/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch
deleted file mode 100644 (file)
index 156622b..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-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 since these componets also add that option to configure
-and this becomes confusing and conflicting otherwise.
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
-Upstream report:
-http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
-
-Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00014.html]
-
-Index: libtool-2.5.0/m4/libtool.m4
-===================================================================
---- libtool-2.5.0.orig/m4/libtool.m4
-+++ libtool-2.5.0/m4/libtool.m4
-@@ -1243,16 +1243,16 @@ _LT_DECL([], [ECHO], [1], [An echo progr
- AC_DEFUN([_LT_WITH_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],
-+[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@],
-   [Search for dependent libraries within DIR (or the compiler's sysroot
-    if not specified).])],
--[], [with_sysroot=no])
-+[], [with_libtool_sysroot=no])
- 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_sysroot in #(
-+case $with_libtool_sysroot in #(
-  yes)
-    if test yes = "$GCC"; then
-      # Trim trailing / since we'll always append absolute paths and we want
-@@ -1261,12 +1261,12 @@ case $with_sysroot in #(
-    fi
-    ;; #(
-  /*)
--   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
-+   lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"`
-    ;; #(
-  no|'')
-    ;; #(
-  *)
--   AC_MSG_RESULT([$with_sysroot])
-+   AC_MSG_RESULT([$with_libtool_sysroot])
-    AC_MSG_ERROR([The sysroot must be an absolute path.])
-    ;;
- esac
-Index: libtool-2.5.0/tests/sysroot.at
-===================================================================
---- libtool-2.5.0.orig/tests/sysroot.at
-+++ libtool-2.5.0/tests/sysroot.at
-@@ -65,7 +65,7 @@ while read file; do
- done])
- LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
--configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
-+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
- #???
- if test PATH = "$shlibpath_var"; then
-@@ -115,7 +115,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([lib2.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- ]])
-@@ -156,7 +156,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([prog.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- ]])
-Index: libtool-2.5.0/tests/testsuite
-===================================================================
---- libtool-2.5.0.orig/tests/testsuite
-+++ libtool-2.5.0/tests/testsuite
-@@ -49054,7 +49054,7 @@ $at_traceon; }
- LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
--configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
-+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
- #???
- if test PATH = "$shlibpath_var"; then
-@@ -49269,7 +49269,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([lib2.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- _ATEOF
-@@ -49463,7 +49463,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([prog.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- _ATEOF
-@@ -49821,7 +49821,7 @@ $at_traceon; }
- LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
--configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
-+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
- #???
- if test PATH = "$shlibpath_var"; then
-@@ -50036,7 +50036,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([lib2.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- _ATEOF
-@@ -50230,7 +50230,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([prog.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- _ATEOF
-@@ -50588,7 +50588,7 @@ $at_traceon; }
- LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
--configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
-+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
- #???
- if test PATH = "$shlibpath_var"; then
-@@ -50803,7 +50803,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([lib2.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- _ATEOF
-@@ -50997,7 +50997,7 @@ AM_INIT_AUTOMAKE([foreign])
- AC_PROG_CC
- AC_CONFIG_SRCDIR([prog.c])
- LT_INIT
--sysroot=$with_sysroot
-+sysroot=$with_libtool_sysroot
- AC_SUBST([sysroot])
- AC_OUTPUT(Makefile)
- _ATEOF
index 435c52c7301de7e144b092d72f29b4b1d6c45f0c..feb1048b554dee317392f98d5ef21445de3f7965 100644 (file)
@@ -17,7 +17,7 @@ Index: libtool-2.5.0/m4/libtool.m4
 @@ -1253,18 +1253,18 @@ dnl lt_sysroot will always be passed unq
  dnl in case the user passed a directory name.
  lt_sysroot=
- case $with_libtool_sysroot in #(
+ case $with_sysroot in #(
 - yes)
 + no)
     if test yes = "$GCC"; then
@@ -29,10 +29,10 @@ Index: libtool-2.5.0/m4/libtool.m4
 + yes|''|/)
 +   ;; #(
   /*)
-    lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"`
+    lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
     ;; #(
 - no|'')
 -   ;; #(
   *)
-    AC_MSG_RESULT([$with_libtool_sysroot])
+    AC_MSG_RESULT([$with_sysroot])
     AC_MSG_ERROR([The sysroot must be an absolute path.])