summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch')
-rw-r--r--meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch81
1 files changed, 38 insertions, 43 deletions
diff --git a/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch
index 277afe0af6..676ce7fd1b 100644
--- a/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch
+++ b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch
@@ -1,65 +1,60 @@
-From: Marek Vasut <marex@denx.de>
-Subject: [PATCH 07/12] libtool: Fix support for NIOS2 processor
+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,
in particular the *os2* branches of switch statements match for
the nios2 string, which results in incorrect behavior of libtool.
-This patch adds an explicit check for *nios2* before the *os2*
-checks to prevent the OS/2 check incorrectly trapping the nios2
-as well.
+Switch to use $host_os instead of $host and tweak the patterns to
+match to avoid this problem for nios2.
+
+* build-aux/ltmain.in: Fix NIOS2 support
+---
+ build-aux/ltmain.in | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
-Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00021.html]
+Submitted: https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00021.html
+Reworked and submitted: https://lists.gnu.org/archive/html/libtool-patches/2024-01/msg00068.html
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=49e6cb0d4dfdca2a59b909dc4532fe22dbc57ad5]
-diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
-index 6fb58ed2..606f17be 100644
---- a/build-aux/ltmain.in
-+++ b/build-aux/ltmain.in
-@@ -519,6 +519,12 @@ libtool_validate_options ()
+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
+@@ -518,10 +518,10 @@ libtool_validate_options ()
+ # preserve --debug
test : = "$debug_cmd" || func_append preserve_args " --debug"
- case $host in
-+ # For NIOS2, we want to make sure that it's not caught by the
-+ # more general OS/2 check below. Otherwise, NIOS2 is the same
-+ # as the default option.
-+ *nios2*)
-+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-+ ;;
+- case $host in
++ case $host_os in
# 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*)
-@@ -6246,6 +6252,15 @@ func_mode_link ()
+- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
++ cygwin* | mingw* | pw32* | cegcc* | solaris2* | os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+@@ -6273,8 +6273,8 @@ func_mode_link ()
+ fi
if test -n "$library_names" &&
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
- case $host in
-+ *nios2*)
-+ # For NIOS2, we want to make sure that it's not caught by the
-+ # more general OS/2 check below. Otherwise, NIOS2 is the same
-+ # as the default option.
-+ if test no = "$installed"; then
-+ func_append notinst_deplibs " $lib"
-+ need_relink=yes
-+ fi
-+ ;;
- *cygwin* | *mingw* | *cegcc* | *os2*)
+- case $host in
+- *cygwin* | *mingw* | *cegcc* | *os2*)
++ case $host_os in
++ cygwin* | mingw* | cegcc* | os2*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
-@@ -6316,6 +6331,11 @@ func_mode_link ()
+ need_relink=no
+@@ -6343,8 +6343,8 @@ func_mode_link ()
+ soname=$dlname
elif test -n "$soname_spec"; then
# bleh windows
- case $host in
-+ *nios2*)
-+ # For NIOS2, we want to make sure that it's not caught by the
-+ # more general OS/2 check below. Otherwise, NIOS2 is the same
-+ # as the default option.
-+ ;;
- *cygwin* | mingw* | *cegcc* | *os2*)
+- case $host in
+- *cygwin* | mingw* | *cegcc* | *os2*)
++ case $host_os in
++ cygwin* | mingw* | cegcc* | os2*)
func_arith $current - $age
major=$func_arith_result
---
-2.25.1
-
+ versuffix=-$major