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 | |
| 18 | --- |
| 19 | build-aux/ltmain.in | 20 ++++++++++++++++++++ |
| 20 | 1 file changed, 20 insertions(+) |
| 21 | |
| 22 | diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in |
| 23 | index d5cf07a..4164284 100644 |
| 24 | --- a/build-aux/ltmain.in |
| 25 | +++ b/build-aux/ltmain.in |
| 26 | @@ -504,6 +504,12 @@ libtool_validate_options () |
| 27 | test : = "$debug_cmd" || func_append preserve_args " --debug" |
| 28 | |
| 29 | case $host in |
| 30 | + # For NIOS2, we want to make sure that it's not caught by the |
| 31 | + # more general OS/2 check below. Otherwise, NIOS2 is the same |
| 32 | + # as the default option. |
| 33 | + *nios2*) |
| 34 | + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps |
| 35 | + ;; |
| 36 | # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 |
| 37 | # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 |
| 38 | *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) |
| 39 | @@ -6220,6 +6226,15 @@ func_mode_link () |
| 40 | if test -n "$library_names" && |
| 41 | { test no = "$use_static_libs" || test -z "$old_library"; }; then |
| 42 | case $host in |
| 43 | + *nios2*) |
| 44 | + # For NIOS2, we want to make sure that it's not caught by the |
| 45 | + # more general OS/2 check below. Otherwise, NIOS2 is the same |
| 46 | + # as the default option. |
| 47 | + if test no = "$installed"; then |
| 48 | + func_append notinst_deplibs " $lib" |
| 49 | + need_relink=yes |
| 50 | + fi |
| 51 | + ;; |
| 52 | *cygwin* | *mingw* | *cegcc* | *os2*) |
| 53 | # No point in relinking DLLs because paths are not encoded |
| 54 | func_append notinst_deplibs " $lib" |
| 55 | @@ -6290,6 +6305,11 @@ func_mode_link () |
| 56 | elif test -n "$soname_spec"; then |
| 57 | # bleh windows |
| 58 | case $host in |
| 59 | + *nios2*) |
| 60 | + # For NIOS2, we want to make sure that it's not caught by the |
| 61 | + # more general OS/2 check below. Otherwise, NIOS2 is the same |
| 62 | + # as the default option. |
| 63 | + ;; |
| 64 | *cygwin* | mingw* | *cegcc* | *os2*) |
| 65 | func_arith $current - $age |
| 66 | major=$func_arith_result |
| 67 | -- |
| 68 | 2.5.1 |
| 69 | |