diff options
author | Bruno Haible <bruno@clisp.org> | 2017-10-26 21:45:33 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-10-26 21:45:33 +0200 |
commit | 1f5f7fd77471a853855cc5808f6022fc52b3533e (patch) | |
tree | 20c91f43c6c54b93651364513a4c8e3e042732c4 | |
parent | 6803dda53781f7da920f568a31610d41e5c3a351 (diff) | |
download | gnulib-1f5f7fd77471a853855cc5808f6022fc52b3533e.tar.gz |
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'.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | m4/lib-ld.m4 | 16 |
2 files changed, 21 insertions, 1 deletions
@@ -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 diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index 8b8a26e8d5..cffa0ef913 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" |