public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld
@ 2006-01-31 22:29 gcc-bugzilla at gcc dot gnu dot org
2006-01-31 22:42 ` [Bug bootstrap/26053] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2006-01-31 22:29 UTC (permalink / raw)
To: gcc-bugs
When configuring the 4.1 branch (I haven't tried this on mainline yet since
I only recently found a workaround for PR target/24334) on IRIX 6.5 with
GNU as 2.16.1 and the SGI MIPSpro ld, libstdc++.so fails to link:
ld32: FATAL 2 : Internal: at ../../ld/section_type.c In load_info() unknown
section type
collect2: ld returned 1 exit status
make[5]: *** [libstdc++.la] Error 1
While the error message could be clearer ;-), this is obviously due to e.g.
allocator-inst.o:
**** SECTION HEADER TABLE ****
[No] Type Addr Offset Size Name
Link Info Adralgn Entsize Flags
[1] 0x11 0 0x34 0x8 .group
43 0x25 0x4 0x4 0x00000000
(excerpt of elfdump -h output): Section Type 0x11 (obviously unknown to
elfdump) is SHT_GROUP. While the version of GNU as used obviously supports
COMDAT group, the native ld does not.
It turns out that the test in gcc/configure.ac for COMDAT group support is
wrong if using GNU as with a non-GNU ld:
if test $in_tree_ld != yes && test x"$ld_vers" != x; then
comdat_group=yes
if test 0"$ld_date" -lt 20050308; then
if test -n "$ld_date"; then
# If there was date string, but was earlier than 2005-03-08, fail
comdat_group=no
elif test "$ld_vers_major" -lt 2; then
comdat_group=no
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
comdat_group=no
fi
fi
if test $comdat_group = no; then
gcc_cv_as_comdat_group=no
gcc_cv_as_comdat_group_percent=no
fi
fi
For non-in_tree_ld and non-GNU ld (i.e. $ld_vers empty), only
gcc_cv_as_comdat_group* results from above this section are used, but
instead for non-GNU ld, no COMDAT group support should be assumed.
It may be that e.g. the Solaris 10+ ld does support this, but we either
need a configure check for this or statically define this in configure.ac
if it is hard/impossible to check at configure time.
This triggers only with GNU as 2.16.1, since 2.15 on IRIX 6 SEGVs with
gas COMDAT group tests, thus GNU as isn't known to support COMDAT group in
2.15.
Environment:
System: IRIX sculptor 6.5 10060437 IP32
host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-4.1-branch-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.16.1 --enable-libgcj --disable-multilib
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada
How-To-Repeat:
Bootstrap the 4.1 branch (mainline is almost certainly affected as well) as
described above.
------- Comment #1 from ro at techfak dot uni-bielefeld dot de 2006-01-31 22:29 -------
Fix:
The following patch allowed a bootstrap on the 4.1 branch to finish
successfully:
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (revision 110450)
+++ gcc/configure.ac (working copy)
@@ -2175,10 +2175,13 @@ if test $in_tree_ld != yes && test x"$ld
comdat_group=no
fi
fi
- if test $comdat_group = no; then
- gcc_cv_as_comdat_group=no
- gcc_cv_as_comdat_group_percent=no
- fi
+else
+ # assume linkers other than GNU ld don't support COMDAT group
+ comdat_group=no
+fi
+if test $comdat_group = no; then
+ gcc_cv_as_comdat_group=no
+ gcc_cv_as_comdat_group_percent=no
fi
AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP,
[`if test $gcc_cv_as_comdat_group = yes || test
$gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`],
I need to test this on mainline and properly submit to gcc-patches.
--
Summary: Misdetection of COMDAT group support with GNU as and
non-GNU ld
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
GCC build triplet: mips-sgi-irix6.5
GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
@ 2006-01-31 22:42 ` pinskia at gcc dot gnu dot org
2006-02-01 1:38 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-31 22:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-31 22:42 -------
This is at least a 4.1/4.2 regression, I forgot when comdat support was added.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |build
Summary|Misdetection of COMDAT group|[4.1/4.2 Regression]
|support with GNU as and non-|Misdetection of COMDAT group
|GNU ld |support with GNU as and non-
| |GNU ld
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
2006-01-31 22:42 ` [Bug bootstrap/26053] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-02-01 1:38 ` pinskia at gcc dot gnu dot org
2006-02-01 3:26 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-01 1:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-02-01 01:38 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-02-01 01:38:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
2006-01-31 22:42 ` [Bug bootstrap/26053] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-02-01 1:38 ` pinskia at gcc dot gnu dot org
@ 2006-02-01 3:26 ` mmitchel at gcc dot gnu dot org
2006-02-02 12:32 ` ro at techfak dot uni-bielefeld dot de
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-01 3:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2006-02-01 03:26 -------
I agree that the configure test is broken.
We could have a --enable-comdat option, or, as you say, we could have something
in the target configuration file. I think your patch is the right idea, but I
do think we need a --enable-comdat option, if we go that route, so that we can
specifically indicate that a particular linker *does* support COMDAT.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-02-01 3:26 ` mmitchel at gcc dot gnu dot org
@ 2006-02-02 12:32 ` ro at techfak dot uni-bielefeld dot de
2006-02-14 16:46 ` ro at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2006-02-02 12:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ro at techfak dot uni-bielefeld dot de 2006-02-02 12:32 -------
Subject: Re: [4.1/4.2 Regression] Misdetection of COMDAT group support with
GNU as and non-GNU ld
mmitchel at gcc dot gnu dot org writes:
> We could have a --enable-comdat option, or, as you say, we could have something
> in the target configuration file. I think your patch is the right idea, but I
> do think we need a --enable-comdat option, if we go that route, so that we can
> specifically indicate that a particular linker *does* support COMDAT.
Would you be ok with applying the current patch (mainline testing is in
progress, but as expected it correctly detected non COMDAT support on IRIX
6.5 with gas 2.16.1 and the MIPSpro ld) to mainline and the 4.1 branch now
(since it fixes a bootstrap failure) and implementing --enable-comdat in a
follow-up patch?
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-02-02 12:32 ` ro at techfak dot uni-bielefeld dot de
@ 2006-02-14 16:46 ` ro at gcc dot gnu dot org
2006-02-14 16:50 ` ro at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu dot org @ 2006-02-14 16:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ro at gcc dot gnu dot org 2006-02-14 16:46 -------
Subject: Bug 26053
Author: ro
Date: Tue Feb 14 16:46:04 2006
New Revision: 110985
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110985
Log:
PR bootstrap/26053
* configure.ac (HAVE_COMDAT_GROUP): Don't assume non-GNU linkers
support COMDAT group.
* configure: Regenerate.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/configure
trunk/gcc/configure.ac
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-02-14 16:46 ` ro at gcc dot gnu dot org
@ 2006-02-14 16:50 ` ro at gcc dot gnu dot org
2006-02-14 16:55 ` ro at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu dot org @ 2006-02-14 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ro at gcc dot gnu dot org 2006-02-14 16:50 -------
Subject: Bug 26053
Author: ro
Date: Tue Feb 14 16:50:45 2006
New Revision: 110986
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110986
Log:
PR bootstrap/26053
* configure.ac (HAVE_COMDAT_GROUP): Don't assume non-GNU linkers
support COMDAT group.
* configure: Regenerate.
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/configure
branches/gcc-4_1-branch/gcc/configure.ac
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-02-14 16:50 ` ro at gcc dot gnu dot org
@ 2006-02-14 16:55 ` ro at gcc dot gnu dot org
2006-02-14 16:57 ` ro at gcc dot gnu dot org
2006-03-02 14:15 ` ebotcazou at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu dot org @ 2006-02-14 16:55 UTC (permalink / raw)
To: gcc-bugs
--
ro at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ro at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2006-02-01 01:38:23 |2006-02-14 16:55:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-02-14 16:55 ` ro at gcc dot gnu dot org
@ 2006-02-14 16:57 ` ro at gcc dot gnu dot org
2006-03-02 14:15 ` ebotcazou at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: ro at gcc dot gnu dot org @ 2006-02-14 16:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from ro at gcc dot gnu dot org 2006-02-14 16:57 -------
Fixed for 4.1 and on mainline.
--
ro at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2006-
| |02/msg00770.html
Status|ASSIGNED |RESOLVED
Keywords|build |patch
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug bootstrap/26053] [4.1/4.2 Regression] Misdetection of COMDAT group support with GNU as and non-GNU ld
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-02-14 16:57 ` ro at gcc dot gnu dot org
@ 2006-03-02 14:15 ` ebotcazou at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-03-02 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ebotcazou at gcc dot gnu dot org 2006-03-02 14:15 -------
*** Bug 24345 has been marked as a duplicate of this bug. ***
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla-gcc at
| |thewrittenword dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26053
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-03-02 14:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-31 22:29 [Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld gcc-bugzilla at gcc dot gnu dot org
2006-01-31 22:42 ` [Bug bootstrap/26053] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-02-01 1:38 ` pinskia at gcc dot gnu dot org
2006-02-01 3:26 ` mmitchel at gcc dot gnu dot org
2006-02-02 12:32 ` ro at techfak dot uni-bielefeld dot de
2006-02-14 16:46 ` ro at gcc dot gnu dot org
2006-02-14 16:50 ` ro at gcc dot gnu dot org
2006-02-14 16:55 ` ro at gcc dot gnu dot org
2006-02-14 16:57 ` ro at gcc dot gnu dot org
2006-03-02 14:15 ` ebotcazou at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).