Commit b157399f authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

configure: Don't assume Gnu linker on Solaris

Compl Yue noticed that the linker was dumping the link map on SmartOS. This is
because Smartos uses the Solaris linker, which uses the `-64` flag, not
`-m64` like Gnu ld, to indicate that it should link for 64-bits. Fix the
configure script to handle the Solaris linker correctly.
parent aba51b65
......@@ -647,6 +647,7 @@ AC_DEFUN([FP_SET_CFLAGS_C99],
# $5 is the name of the CPP flags variable
AC_MSG_CHECKING([Setting up $2, $3, $4 and $5])
case $$1 in
......@@ -663,10 +664,20 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
$2="$$2 -march=i686"
# Solaris is a multi-lib platform, providing both 32- and 64-bit
# user-land. It appears to default to 32-bit builds but we of course want to
# compile for 64-bits on x86-64.
# On OpenSolaris uses gnu ld whereas SmartOS appears to use the Solaris
# implementation, which rather uses the -64 flag.
$2="$$2 -m64"
$3="$$3 -m64"
$4="$$4 -m64"
$5="$$5 -m64"
if test "$fp_cv_gnu_ld" = "yes"; then
$4="$$4 -m64"
$4="$$4 -64"
# For now, to suppress the gcc warning "call-clobbered
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment