diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-06-03 11:07:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-06-04 12:04:52 +0100 |
commit | b4e430a42e086091a08d60018ac694fa99c4b8c7 (patch) | |
tree | 27463ca785d457cc79075b22abb17549fbe848b7 /meta | |
parent | 80d4ed954a49091ce3f79e195288ca4b13521bf2 (diff) | |
download | poky-b4e430a42e086091a08d60018ac694fa99c4b8c7.tar.gz |
autotools/libtool: Drop libtool sysroot patch as not needed
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.
(From OE-Core rev: 7c8553f81bccc3e8c2bb1116ee1e89f5f8af4c9e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
6 files changed, 6 insertions, 185 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 151cf0c4ea..822d190a30 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
@@ -58,7 +58,7 @@ enabled tests are listed here, the do_package_qa task will run under fakeroot." | |||
58 | 58 | ||
59 | ALL_QA = "${WARN_QA} ${ERROR_QA}" | 59 | ALL_QA = "${WARN_QA} ${ERROR_QA}" |
60 | 60 | ||
61 | UNKNOWN_CONFIGURE_OPT_IGNORE ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot --disable-static" | 61 | UNKNOWN_CONFIGURE_OPT_IGNORE ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --disable-static" |
62 | 62 | ||
63 | # This is a list of directories that are expected to be empty. | 63 | # This is a list of directories that are expected to be empty. |
64 | QA_EMPTY_DIRS ?= " \ | 64 | QA_EMPTY_DIRS ?= " \ |
diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass index 7ee1b0d9c7..9ebdca4768 100644 --- a/meta/classes-recipe/autotools.bbclass +++ b/meta/classes-recipe/autotools.bbclass | |||
@@ -57,12 +57,6 @@ export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" | |||
57 | export LD_FOR_BUILD = "${BUILD_LD}" | 57 | export LD_FOR_BUILD = "${BUILD_LD}" |
58 | export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}" | 58 | export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}" |
59 | 59 | ||
60 | def append_libtool_sysroot(d): | ||
61 | # Only supply libtool sysroot option for non-native packages | ||
62 | if not bb.data.inherits_class('native', d): | ||
63 | return '--with-libtool-sysroot=${STAGING_DIR_HOST}' | ||
64 | return "" | ||
65 | |||
66 | CONFIGUREOPTS = " --build=${BUILD_SYS} \ | 60 | CONFIGUREOPTS = " --build=${BUILD_SYS} \ |
67 | --host=${HOST_SYS} \ | 61 | --host=${HOST_SYS} \ |
68 | --target=${TARGET_SYS} \ | 62 | --target=${TARGET_SYS} \ |
@@ -81,8 +75,7 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \ | |||
81 | --infodir=${infodir} \ | 75 | --infodir=${infodir} \ |
82 | --mandir=${mandir} \ | 76 | --mandir=${mandir} \ |
83 | --disable-silent-rules \ | 77 | --disable-silent-rules \ |
84 | ${CONFIGUREOPT_DEPTRACK} \ | 78 | ${CONFIGUREOPT_DEPTRACK}" |
85 | ${@append_libtool_sysroot(d)}" | ||
86 | CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking" | 79 | CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking" |
87 | 80 | ||
88 | CACHED_CONFIGUREVARS ?= "" | 81 | CACHED_CONFIGUREVARS ?= "" |
diff --git a/meta/recipes-devtools/libtool/libtool-2.5.0.inc b/meta/recipes-devtools/libtool/libtool-2.5.0.inc index dd6215476e..a609de6369 100644 --- a/meta/recipes-devtools/libtool/libtool-2.5.0.inc +++ b/meta/recipes-devtools/libtool/libtool-2.5.0.inc | |||
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
10 | 10 | ||
11 | SRC_URI = "https://alpha.gnu.org/gnu/libtool/libtool-${PV}.tar.gz \ | 11 | SRC_URI = "https://alpha.gnu.org/gnu/libtool/libtool-${PV}.tar.gz \ |
12 | file://0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch \ | 12 | file://0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch \ |
13 | file://0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch \ | ||
14 | file://0003-ltmain.in-Add-missing-sysroot-to-library-path.patch \ | 13 | file://0003-ltmain.in-Add-missing-sysroot-to-library-path.patch \ |
15 | file://0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch \ | 14 | file://0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch \ |
16 | file://0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch \ | 15 | file://0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch \ |
diff --git a/meta/recipes-devtools/libtool/libtool-native_2.5.0.bb b/meta/recipes-devtools/libtool/libtool-native_2.5.0.bb index 19024f7830..90c06f0ec3 100644 --- a/meta/recipes-devtools/libtool/libtool-native_2.5.0.bb +++ b/meta/recipes-devtools/libtool/libtool-native_2.5.0.bb | |||
@@ -4,7 +4,7 @@ DEPENDS = "" | |||
4 | 4 | ||
5 | inherit native | 5 | inherit native |
6 | 6 | ||
7 | EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}" | 7 | EXTRA_OECONF = " --with-sysroot=${STAGING_DIR_NATIVE}" |
8 | 8 | ||
9 | do_configure:prepend () { | 9 | do_configure:prepend () { |
10 | # Remove any existing libtool m4 since old stale versions would break | 10 | # 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 index 156622bb54..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
1 | From: Khem Raj <raj.khem@gmail.com> | ||
2 | Subject: [PATCH 02/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils | ||
3 | |||
4 | This patch renames the --with-sysroot option to --with-libtool-sysroot | ||
5 | to avoid namespace conflict with binutils, gcc and other toolchain | ||
6 | components since these componets also add that option to configure | ||
7 | and this becomes confusing and conflicting otherwise. | ||
8 | |||
9 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
10 | |||
11 | Upstream report: | ||
12 | http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html | ||
13 | |||
14 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00014.html] | ||
15 | |||
16 | Index: libtool-2.5.0/m4/libtool.m4 | ||
17 | =================================================================== | ||
18 | --- libtool-2.5.0.orig/m4/libtool.m4 | ||
19 | +++ libtool-2.5.0/m4/libtool.m4 | ||
20 | @@ -1243,16 +1243,16 @@ _LT_DECL([], [ECHO], [1], [An echo progr | ||
21 | AC_DEFUN([_LT_WITH_SYSROOT], | ||
22 | [m4_require([_LT_DECL_SED])dnl | ||
23 | AC_MSG_CHECKING([for sysroot]) | ||
24 | -AC_ARG_WITH([sysroot], | ||
25 | -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], | ||
26 | +AC_ARG_WITH([libtool-sysroot], | ||
27 | +[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@], | ||
28 | [Search for dependent libraries within DIR (or the compiler's sysroot | ||
29 | if not specified).])], | ||
30 | -[], [with_sysroot=no]) | ||
31 | +[], [with_libtool_sysroot=no]) | ||
32 | |||
33 | dnl lt_sysroot will always be passed unquoted. We quote it here | ||
34 | dnl in case the user passed a directory name. | ||
35 | lt_sysroot= | ||
36 | -case $with_sysroot in #( | ||
37 | +case $with_libtool_sysroot in #( | ||
38 | yes) | ||
39 | if test yes = "$GCC"; then | ||
40 | # Trim trailing / since we'll always append absolute paths and we want | ||
41 | @@ -1261,12 +1261,12 @@ case $with_sysroot in #( | ||
42 | fi | ||
43 | ;; #( | ||
44 | /*) | ||
45 | - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` | ||
46 | + lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"` | ||
47 | ;; #( | ||
48 | no|'') | ||
49 | ;; #( | ||
50 | *) | ||
51 | - AC_MSG_RESULT([$with_sysroot]) | ||
52 | + AC_MSG_RESULT([$with_libtool_sysroot]) | ||
53 | AC_MSG_ERROR([The sysroot must be an absolute path.]) | ||
54 | ;; | ||
55 | esac | ||
56 | Index: libtool-2.5.0/tests/sysroot.at | ||
57 | =================================================================== | ||
58 | --- libtool-2.5.0.orig/tests/sysroot.at | ||
59 | +++ libtool-2.5.0/tests/sysroot.at | ||
60 | @@ -65,7 +65,7 @@ while read file; do | ||
61 | done]) | ||
62 | |||
63 | LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" | ||
64 | -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" | ||
65 | +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" | ||
66 | |||
67 | #??? | ||
68 | if test PATH = "$shlibpath_var"; then | ||
69 | @@ -115,7 +115,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
70 | AC_PROG_CC | ||
71 | AC_CONFIG_SRCDIR([lib2.c]) | ||
72 | LT_INIT | ||
73 | -sysroot=$with_sysroot | ||
74 | +sysroot=$with_libtool_sysroot | ||
75 | AC_SUBST([sysroot]) | ||
76 | AC_OUTPUT(Makefile) | ||
77 | ]]) | ||
78 | @@ -156,7 +156,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
79 | AC_PROG_CC | ||
80 | AC_CONFIG_SRCDIR([prog.c]) | ||
81 | LT_INIT | ||
82 | -sysroot=$with_sysroot | ||
83 | +sysroot=$with_libtool_sysroot | ||
84 | AC_SUBST([sysroot]) | ||
85 | AC_OUTPUT(Makefile) | ||
86 | ]]) | ||
87 | Index: libtool-2.5.0/tests/testsuite | ||
88 | =================================================================== | ||
89 | --- libtool-2.5.0.orig/tests/testsuite | ||
90 | +++ libtool-2.5.0/tests/testsuite | ||
91 | @@ -49054,7 +49054,7 @@ $at_traceon; } | ||
92 | |||
93 | |||
94 | LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" | ||
95 | -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" | ||
96 | +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" | ||
97 | |||
98 | #??? | ||
99 | if test PATH = "$shlibpath_var"; then | ||
100 | @@ -49269,7 +49269,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
101 | AC_PROG_CC | ||
102 | AC_CONFIG_SRCDIR([lib2.c]) | ||
103 | LT_INIT | ||
104 | -sysroot=$with_sysroot | ||
105 | +sysroot=$with_libtool_sysroot | ||
106 | AC_SUBST([sysroot]) | ||
107 | AC_OUTPUT(Makefile) | ||
108 | _ATEOF | ||
109 | @@ -49463,7 +49463,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
110 | AC_PROG_CC | ||
111 | AC_CONFIG_SRCDIR([prog.c]) | ||
112 | LT_INIT | ||
113 | -sysroot=$with_sysroot | ||
114 | +sysroot=$with_libtool_sysroot | ||
115 | AC_SUBST([sysroot]) | ||
116 | AC_OUTPUT(Makefile) | ||
117 | _ATEOF | ||
118 | @@ -49821,7 +49821,7 @@ $at_traceon; } | ||
119 | |||
120 | |||
121 | LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" | ||
122 | -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" | ||
123 | +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" | ||
124 | |||
125 | #??? | ||
126 | if test PATH = "$shlibpath_var"; then | ||
127 | @@ -50036,7 +50036,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
128 | AC_PROG_CC | ||
129 | AC_CONFIG_SRCDIR([lib2.c]) | ||
130 | LT_INIT | ||
131 | -sysroot=$with_sysroot | ||
132 | +sysroot=$with_libtool_sysroot | ||
133 | AC_SUBST([sysroot]) | ||
134 | AC_OUTPUT(Makefile) | ||
135 | _ATEOF | ||
136 | @@ -50230,7 +50230,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
137 | AC_PROG_CC | ||
138 | AC_CONFIG_SRCDIR([prog.c]) | ||
139 | LT_INIT | ||
140 | -sysroot=$with_sysroot | ||
141 | +sysroot=$with_libtool_sysroot | ||
142 | AC_SUBST([sysroot]) | ||
143 | AC_OUTPUT(Makefile) | ||
144 | _ATEOF | ||
145 | @@ -50588,7 +50588,7 @@ $at_traceon; } | ||
146 | |||
147 | |||
148 | LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" | ||
149 | -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" | ||
150 | +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" | ||
151 | |||
152 | #??? | ||
153 | if test PATH = "$shlibpath_var"; then | ||
154 | @@ -50803,7 +50803,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
155 | AC_PROG_CC | ||
156 | AC_CONFIG_SRCDIR([lib2.c]) | ||
157 | LT_INIT | ||
158 | -sysroot=$with_sysroot | ||
159 | +sysroot=$with_libtool_sysroot | ||
160 | AC_SUBST([sysroot]) | ||
161 | AC_OUTPUT(Makefile) | ||
162 | _ATEOF | ||
163 | @@ -50997,7 +50997,7 @@ AM_INIT_AUTOMAKE([foreign]) | ||
164 | AC_PROG_CC | ||
165 | AC_CONFIG_SRCDIR([prog.c]) | ||
166 | LT_INIT | ||
167 | -sysroot=$with_sysroot | ||
168 | +sysroot=$with_libtool_sysroot | ||
169 | AC_SUBST([sysroot]) | ||
170 | AC_OUTPUT(Makefile) | ||
171 | _ATEOF | ||
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 index 435c52c730..feb1048b55 100644 --- 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 | |||
@@ -17,7 +17,7 @@ Index: libtool-2.5.0/m4/libtool.m4 | |||
17 | @@ -1253,18 +1253,18 @@ dnl lt_sysroot will always be passed unq | 17 | @@ -1253,18 +1253,18 @@ dnl lt_sysroot will always be passed unq |
18 | dnl in case the user passed a directory name. | 18 | dnl in case the user passed a directory name. |
19 | lt_sysroot= | 19 | lt_sysroot= |
20 | case $with_libtool_sysroot in #( | 20 | case $with_sysroot in #( |
21 | - yes) | 21 | - yes) |
22 | + no) | 22 | + no) |
23 | if test yes = "$GCC"; then | 23 | if test yes = "$GCC"; then |
@@ -29,10 +29,10 @@ Index: libtool-2.5.0/m4/libtool.m4 | |||
29 | + yes|''|/) | 29 | + yes|''|/) |
30 | + ;; #( | 30 | + ;; #( |
31 | /*) | 31 | /*) |
32 | lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"` | 32 | lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` |
33 | ;; #( | 33 | ;; #( |
34 | - no|'') | 34 | - no|'') |
35 | - ;; #( | 35 | - ;; #( |
36 | *) | 36 | *) |
37 | AC_MSG_RESULT([$with_libtool_sysroot]) | 37 | AC_MSG_RESULT([$with_sysroot]) |
38 | AC_MSG_ERROR([The sysroot must be an absolute path.]) | 38 | AC_MSG_ERROR([The sysroot must be an absolute path.]) |