branch master updated: libtool: Fix support for NIOS2 processor

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.gnu.libtool.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

vapier pushed a commit to branch master
in repository libtool.

The following commit(s) were added to refs/heads/master by this push:
     new 49e6cb0d libtool: Fix support for NIOS2 processor
49e6cb0d is described below

commit 49e6cb0d4dfdca2a59b909dc4532fe22dbc57ad5
Author: Richard Purdie <[email protected]>
AuthorDate: Tue Jan 16 15:14:24 2024 +0000

    libtool: Fix support for NIOS2 processor
    
    When building for a nios2 system, the $host tuple starts with "nios2-"
    which is caught by the some of the greedy checks for OS/2 in libtool.
    In particular, the *os2* branches of switch statements that only want
    to match the OS setting end up matching all nios2 targets, which
    results in incorrect behavior.
    
    Switch to use $host_os instead of $host and tweak the patterns to
    match to avoid this problem for nios2.
    
    * build-aux/ltmain.in: Switch some $host checks to $host_os.
---
 build-aux/ltmain.in | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 9f4889f4..830b3982 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -518,10 +518,10 @@ libtool_validate_options ()
     # preserve --debug
     test : = "$debug_cmd" || func_append preserve_args " --debug"
 
-    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* | *windows* | *pw32* | *cegcc* | *solaris2* | *os2*)
+      cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*)
         # don't eliminate duplications in $postdeps and $predeps
         opt_duplicate_compiler_generated_deps=:
         ;;
@@ -6276,8 +6276,8 @@ func_mode_link ()
 	fi
 	if test -n "$library_names" &&
 	   { test no = "$use_static_libs" || test -z "$old_library"; }; then
-	  case $host in
-	  *cygwin* | *mingw* | *windows* | *cegcc* | *os2*)
+	  case $host_os in
+	  cygwin* | mingw* | windows* | cegcc* | os2*)
 	      # No point in relinking DLLs because paths are not encoded
 	      func_append notinst_deplibs " $lib"
 	      need_relink=no
@@ -6346,8 +6346,8 @@ func_mode_link ()
 	      soname=$dlname
 	    elif test -n "$soname_spec"; then
 	      # bleh windows
-	      case $host in
-	      *cygwin* | mingw* | *windows* | *cegcc* | *os2*)
+	      case $host_os in
+	      cygwin* | mingw* | windows* | cegcc* | os2*)
 	        func_arith $current - $age
 		major=$func_arith_result
 		versuffix=-$major
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.