Re: [PATCH 07/12] libtool: Fix support for NIOS2 processor

Mike Frysinger <[email protected]> Mon, 15 Jan 2024 16:51:17 -0500
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <ZaWo1Z_lBXfv8SQV@vapier>
On 25 Oct 2021 15:33, Richard Purdie wrote:
> 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.

i don't think this is the right approach.  this is adding another substring
search across the entire space (cpu/vendor/os).  we should fix the search so
it uses the right value only to match against.

> --- a/build-aux/ltmain.in
> +++ b/build-aux/ltmain.in
>
>      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*)

these should only match $host_os, and remove the leading glob at the same time.
same for the other changes in this patch.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmWlqNUACgkQQWM7n+g3
9YH4tBAAki/iJq/ytR3k3vgE8SSWcu3aWF1BXRvhaIpKKvGmzt0VgzuVKZon/33o
2uJLYId2vbL7jY2lPnrR0Mq5VAdN3Z/itjPzzv/Z/hxf2T4UWQ+doSqoxTT2iMhJ
hU8NaLUS+PLuUitu/OqFavsRdP4fdte3xajonZY5gVnDyyjxdIEMwXL7yZV2hBc0
tZq89YD9Uzg5pccx6r9OWH7/zf4AG56fo+dHxZUiWTkGS4zcaDxe+yiPQgbl7X41
C59OTT7JJWmJPFcxX7ULrY2frCG+OKs/UYL4YNs3K+6G9Xp5lPJm3wUqLB00vtc7
iidYWnddjWxzzifZojg5dU8f4Venv0X4+EETdOQJcm3zJifJN2XToGcmuBps7Aer
ZFIEBTyj4Y683r1YF4wEWVDwx7vvJcukZb6GwFmYTwiJntKM0tbbh50t10QEJ7mM
BiI983LabanTqTdINzaJDvcFKKmA9LNR94B0p7vH7OaGtYHpdONUnco08FYVaSht
s2I9+tQhhmunT2AGUV5OtK3uUcNrVqm29ulbmL4O5XnbT0oks9to41QKMlzUS49p
M2RGnwKj/BKhEZg16t2ZT1MMGSb9Rr+akeno6Y+fxfDbO26Q7x03dHTpkTwIZMU6
YrZ1y/qObz1nV4Mv22nIsCd1s54AEVxT7rAllKEJocd1KbPdl3E=
=7zZH
-----END PGP SIGNATURE-----