]> Savannah Git Hosting - gnulib.git/commitdiff
havelib: Fix value of LD for 32-bit compilation on NetBSD/sparc64.
authorBruno Haible <bruno@clisp.org>
Thu, 26 Oct 2017 19:45:33 +0000 (21:45 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 26 Oct 2017 19:45:33 +0000 (21:45 +0200)
* m4/lib-ld.m4 (AC_LIB_PROG_LD): On NetBSD/sparc64 with CC="gcc -m32",
set LD to '/usr/bin/ld -m elf32_sparc', not '/usr/bin/ld'.

ChangeLog
m4/lib-ld.m4

index 23b8c0e8e28839efebff03d11bfa3eb0449b2ec7..7ce63c22f7e174136694d75ecf0e1f74004c1aec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-10-26  Bruno Haible  <bruno@clisp.org>
+
+       havelib: Fix value of LD for 32-bit compilation on NetBSD/sparc64.
+       * m4/lib-ld.m4 (AC_LIB_PROG_LD): On NetBSD/sparc64 with CC="gcc -m32",
+       set LD to '/usr/bin/ld -m elf32_sparc', not '/usr/bin/ld'.
+
 2017-10-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        glob: fix another heap buffer overflow
index 8b8a26e8d57717bdf7312ba577e6d32311f53386..cffa0ef913f8d5baadbddb5555f8edbaeed4d675 100644 (file)
@@ -1,4 +1,4 @@
-# lib-ld.m4 serial 7
+# lib-ld.m4 serial 8
 dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -133,6 +133,20 @@ else
            esac
           ], [])
         ;;
+      sparc64-*-netbsd*)
+        AC_EGREP_CPP([yes],
+          [#if defined __sparcv9 || defined __arch64__
+           yes
+           #endif],
+          [],
+          [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
+           # so that the linker groks 32-bit object files.
+           case "$acl_cv_path_LD " in
+             *" -m elf32_sparc "*) ;;
+             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+           esac
+          ])
+        ;;
     esac
   ])
   LD="$acl_cv_path_LD"