Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1 | From: Marek Vasut <marex@denx.de> |
| 2 | Subject: [PATCH 07/12] libtool: Fix support for NIOS2 processor |
| 3 | |
| 4 | The name of the system contains the string "nios2". This string |
| 5 | is caught by the some of the greedy checks for OS/2 in libtool, |
| 6 | in particular the *os2* branches of switch statements match for |
| 7 | the nios2 string, which results in incorrect behavior of libtool. |
| 8 | |
| 9 | This patch adds an explicit check for *nios2* before the *os2* |
| 10 | checks to prevent the OS/2 check incorrectly trapping the nios2 |
| 11 | as well. |
| 12 | |
| 13 | Signed-off-by: Marek Vasut <marex@denx.de> |
| 14 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 15 | |
| 16 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00021.html] |
| 17 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 18 | diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 19 | index 6fb58ed2..606f17be 100644 |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 20 | --- a/build-aux/ltmain.in |
| 21 | +++ b/build-aux/ltmain.in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 22 | @@ -519,6 +519,12 @@ libtool_validate_options () |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 23 | test : = "$debug_cmd" || func_append preserve_args " --debug" |
| 24 | |
| 25 | case $host in |
| 26 | + # For NIOS2, we want to make sure that it's not caught by the |
| 27 | + # more general OS/2 check below. Otherwise, NIOS2 is the same |
| 28 | + # as the default option. |
| 29 | + *nios2*) |
| 30 | + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps |
| 31 | + ;; |
| 32 | # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 |
| 33 | # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 |
| 34 | *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 35 | @@ -6246,6 +6252,15 @@ func_mode_link () |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 36 | if test -n "$library_names" && |
| 37 | { test no = "$use_static_libs" || test -z "$old_library"; }; then |
| 38 | case $host in |
| 39 | + *nios2*) |
| 40 | + # For NIOS2, we want to make sure that it's not caught by the |
| 41 | + # more general OS/2 check below. Otherwise, NIOS2 is the same |
| 42 | + # as the default option. |
| 43 | + if test no = "$installed"; then |
| 44 | + func_append notinst_deplibs " $lib" |
| 45 | + need_relink=yes |
| 46 | + fi |
| 47 | + ;; |
| 48 | *cygwin* | *mingw* | *cegcc* | *os2*) |
| 49 | # No point in relinking DLLs because paths are not encoded |
| 50 | func_append notinst_deplibs " $lib" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 51 | @@ -6316,6 +6331,11 @@ func_mode_link () |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 52 | elif test -n "$soname_spec"; then |
| 53 | # bleh windows |
| 54 | case $host in |
| 55 | + *nios2*) |
| 56 | + # For NIOS2, we want to make sure that it's not caught by the |
| 57 | + # more general OS/2 check below. Otherwise, NIOS2 is the same |
| 58 | + # as the default option. |
| 59 | + ;; |
| 60 | *cygwin* | mingw* | *cegcc* | *os2*) |
| 61 | func_arith $current - $age |
| 62 | major=$func_arith_result |
| 63 | -- |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 64 | 2.25.1 |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 65 | |