Skip to contentSkip to conversation

Build breakage on OpenSolaris: --warn-common

Qemu-devel Andreas Färber 2 participants 6 messages Oct 31, 2008 – Nov 1, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

The following addition to configure at r5241 causes linking to fail on OpenSolaris/amd64:

if ld --version 2>/dev/null | grep -q "GNU ld" ; then
LDFLAGS="$LDFLAGS -Wl,--warn-common"
fi

Contrary to Solaris 10, OpenSolaris does use GNU ld. Might --warn-common require an ld version newer than 2.15, or is this platform-dependent?

Previously I had also reported that Solaris 10's grep rejects -q. Could we use grep "GNU ld" >/dev/null 2>/dev/null instead?

Regards,
Andreas

#1 lore raw
Quoted 11 lines · Andreas Färber

Hello,

The following addition to configure at r5241 causes linking to fail on
OpenSolaris/amd64:

if ld --version 2>/dev/null | grep -q "GNU ld" ; then
LDFLAGS="$LDFLAGS -Wl,--warn-common"
fi

Contrary to Solaris 10, OpenSolaris does use GNU ld. Might --warn-common
require an ld version newer than 2.15, or is this platform-dependent?

According to binutils changelog, --warn-common was added in 1993, so maybe the platform breaks that. What does your ld print with ld --version?

Quoted 2 lines

Previously I had also reported that Solaris 10's grep rejects -q. Could we
use grep "GNU ld" >/dev/null 2>/dev/null instead?

Sure.

#2 lore raw

Am 31.10.2008 um 22:27 schrieb Blue Swirl:

Quoted 8 lines · Andreas Färber
Quoted 7 lines

The following addition to configure at r5241 causes linking to fail on OpenSolaris/amd64:

if ld --version 2>/dev/null | grep -q "GNU ld" ; then
LDFLAGS="$LDFLAGS -Wl,--warn-common"
fi

Quoted 6 lines
Quoted 2 lines

Contrary to Solaris 10, OpenSolaris does use GNU ld. Might --warn-common require an ld version newer than 2.15, or is this platform-dependent?

According to binutils changelog, --warn-common was added in 1993, so maybe the platform breaks that. What does your ld print with ld --version?

GNU ld version 2.15
Copyright 2002 Free Software Foundation, Inc.
This program is free software; [...]

So definitely past 1993. Any thoughts what to check for?

Quoted 5 lines
Quoted 3 lines

Previously I had also reported that Solaris 10's grep rejects -q. Could we use grep "GNU ld" >/dev/null 2>/dev/null instead?

Sure.

I'll prepare a patch for that part then.

Andreas

#3 lore raw
Quoted 32 lines · Andreas Färber

Am 31.10.2008 um 22:27 schrieb Blue Swirl:

Quoted 9 lines · Andreas Färber
Quoted 8 lines

The following addition to configure at r5241 causes linking to fail on OpenSolaris/amd64:

if ld --version 2>/dev/null | grep -q "GNU ld" ; then
LDFLAGS="$LDFLAGS -Wl,--warn-common"
fi

Quoted 8 lines
Quoted 3 lines

Contrary to Solaris 10, OpenSolaris does use GNU ld. Might --warn-common require an ld version newer than 2.15, or is this platform-dependent?

According to binutils changelog, --warn-common was added in 1993, so maybe the platform breaks that. What does your ld print with ld --version?

GNU ld version 2.15
Copyright 2002 Free Software Foundation, Inc.
This program is free software; [...]

So definitely past 1993. Any thoughts what to check for?

Quoted 3 lines
Quoted 3 lines

Previously I had also reported that Solaris 10's grep rejects -q. Could

Quoted 8 lines

we

Quoted 5 lines
Quoted 2 lines

use grep "GNU ld" >/dev/null 2>/dev/null instead?

Sure.

I'll prepare a patch for that part then.

Does this one work?

configure +5 -2
Index: qemu/configure
===================================================================
@@ -98,6 +98,7 @@
 vnc_tls="yes"
 bsd="no"
 linux="no"
+solaris="no"
 kqemu="no"
 profiler="no"
 cocoa="no"
@@ -368,8 +369,10 @@
 CFLAGS="$CFLAGS -Werror"
 fi
 
-if ld --version 2>/dev/null | grep -q "GNU ld" ; then
-    LDFLAGS="$LDFLAGS -Wl,--warn-common"
+if test "$solaris" = "no" ; then
+    if ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
+        LDFLAGS="$LDFLAGS -Wl,--warn-common"
+    fi
 fi
 
 #
#4 lore raw

Am 01.11.2008 um 15:03 schrieb Blue Swirl:

Quoted 37 lines · Andreas Färber
Quoted 36 lines

Am 31.10.2008 um 22:27 schrieb Blue Swirl:

Quoted 9 lines · Andreas Färber
Quoted 8 lines

The following addition to configure at r5241 causes linking to fail on OpenSolaris/amd64:

if ld --version 2>/dev/null | grep -q "GNU ld" ; then LDFLAGS="$LDFLAGS -Wl,--warn-common"
fi

Quoted 8 lines
Quoted 3 lines

Contrary to Solaris 10, OpenSolaris does use GNU ld. Might --warn-common require an ld version newer than 2.15, or is this platform-dependent?

According to binutils changelog, --warn-common was added in 1993, so maybe the platform breaks that. What does your ld print with ld --version?

GNU ld version 2.15
Copyright 2002 Free Software Foundation, Inc.
This program is free software; [...]

So definitely past 1993. Any thoughts what to check for?

Quoted 3 lines
Quoted 3 lines

Previously I had also reported that Solaris 10's grep rejects -q. Could

we

Quoted 3 lines
Quoted 2 lines

use grep "GNU ld" >/dev/null 2>/dev/null instead?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Sure.

I'll prepare a patch for that part then.

Does this one work?
<fix_solaris_warn_common.diff>

It does on OpenSolaris, thanks. Easier than I thought. Please commit.

Andreas

#5 lore raw
Quoted 62 lines · Andreas Färber

Am 01.11.2008 um 15:03 schrieb Blue Swirl:

Quoted 12 lines · Andreas Färber
Quoted 10 lines

Am 31.10.2008 um 22:27 schrieb Blue Swirl:

Quoted 4 lines · Andreas Färber
Quoted 3 lines

The following addition to configure at r5241 causes linking to fail

on

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

OpenSolaris/amd64:

if ld --version 2>/dev/null | grep -q "GNU ld" ; then LDFLAGS="$LDFLAGS -Wl,--warn-common"
fi

Contrary to Solaris 10, OpenSolaris does use GNU ld. Might

--warn-common

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

require an ld version newer than 2.15, or is this

platform-dependent?

Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 2 lines

According to binutils changelog, --warn-common was added in 1993, so maybe the platform breaks that. What does your ld print with ld --version?

GNU ld version 2.15
Copyright 2002 Free Software Foundation, Inc.
This program is free software; [...]

Quoted 8 lines
Quoted 8 lines

So definitely past 1993. Any thoughts what to check for?

Quoted 4 lines
Quoted 4 lines

Previously I had also reported that Solaris 10's grep rejects -q.

Could

Quoted 13 lines
Quoted 13 lines
Quoted 2 lines
Quoted 1 line

we

Quoted 8 lines
Quoted 4 lines

use grep "GNU ld" >/dev/null 2>/dev/null instead?

Sure.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

I'll prepare a patch for that part then.

Does this one work?
<fix_solaris_warn_common.diff>

It does on OpenSolaris, thanks. Easier than I thought. Please commit.

Committed as r5594, thanks.