[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/12] libtool: Fix support for NIOS2 processor
From: |
Sam James |
Subject: |
[PATCH v2 12/12] libtool: Fix support for NIOS2 processor |
Date: |
Sat, 16 Apr 2022 18:58:25 +0100 |
From: Marek Vasut <marex@denx.de>
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.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
build-aux/ltmain.in | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 126b3097..2acf1178 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -519,6 +519,12 @@ libtool_validate_options ()
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
+ ;;
# 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*)
@@ -6275,6 +6281,15 @@ func_mode_link ()
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*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
@@ -6345,6 +6360,11 @@ func_mode_link ()
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*)
func_arith $current - $age
major=$func_arith_result
--
2.35.1
- Re: [PATCH v2 01/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs, (continued)
[PATCH v2 02/12] ltmain.in: Handle trailing slashes on install commands correctly, Sam James, 2022/04/16
[PATCH v2 04/12] ltmain.in: Don't encode RATHS which match default linker paths, Sam James, 2022/04/16
[PATCH v2 03/12] libtool.m4: For reproducibility stop encoding hostname in libtool script, Sam James, 2022/04/16
[PATCH v2 05/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils, Sam James, 2022/04/16
[PATCH v2 07/12] libtool: Check for static libs for internal compiler libraries, Sam James, 2022/04/16
[PATCH v2 11/12] Makefile.am: make sure autoheader run before automake, Sam James, 2022/04/16
[PATCH v2 06/12] Makefile.am: make sure autoheader run before autoconf, Sam James, 2022/04/16
[PATCH v2 12/12] libtool: Fix support for NIOS2 processor,
Sam James <=
[PATCH v2 08/12] ltmain.in: Add missing sysroot to library path, Sam James, 2022/04/16
[PATCH v2 10/12] ltmain.in: Handle prefix-map compiler options correctly, Sam James, 2022/04/16
[PATCH v2 09/12] libtool.m4: Handle "/" as a sysroot correctly, Sam James, 2022/04/16
Re: [PATCH v2 00/12] Rebased version of Yocto patches, Alex Ameen, 2022/04/16