bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

havelib: fix value of LD for 32-bit compilation on NetBSD/sparc64


From: Bruno Haible
Subject: havelib: fix value of LD for 32-bit compilation on NetBSD/sparc64
Date: Thu, 26 Oct 2017 21:46:05 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-96-generic; KDE/5.18.0; x86_64; ; )

2017-10-26  Bruno Haible  <address@hidden>

        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'.

diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index 8b8a26e..cffa0ef 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -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"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]