https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #181 from Peter Bisroev <peter.bisroev at groundlabs dot com> ---
(In reply to Peter Bisroev from comment #179)
> (In reply to dave.anglin from comment #178)
> > The configure test didn't find support for COMDAT groups even though aCC and
> > HP ld
> > support them.  So, there's likely something incompatible with the default
> > support for COMDAT
> > groups.
> > 
> > Could you look at configure test and see why it fails?
> 
> Looking at configure in 4.9.4, there are two COMDAT related tests.
> 
> First test "checking assembler for .nsubspa comdat" fails when it tries to
> assemble:
> ----------
>   .SPACE $TEXT$
>   .NSUBSPA $CODE$,COMDAT
> ----------
> The errors are:
> ----------
> conftest.s:2: Error: unknown pseudo-op: `.nsubspa'
> conftest.s:1: Error: .space specifies non-absolute value
> ----------
> Looking through gas manual it looks like '.nsubspa' and that variation of
> '.space' are only supported for HPPA.
> 
> The second test "checking assembler for COMDAT group support (GNU as)"
> passes when it tries to assemble:
> ----------
>   .section .text,"axG",@progbits,.foo,comdat
> ----------
> 
> However just below this check, configure looks for GNU linker, and if one
> not found, disables COMDAT group support even though the second test passed.
> 
> However `--enable-comdat` configure flag seems to override this behavior. I
> will try to recompile 4.7.4 with it to see what happens.
> 
> Thanks!

So we made some progress here. I have rebuilt 4.7.4 with --enable-comdat. 3
stage bootstrap went fine (running 'make check' now). Using that tried to
bootstrap 4.9.4 again. We are getting a lot less PCREL21B relocation issues
when linking cc1plus. For example:

With --enable-comdat:
ld: The value 0xfffffffffdfd38c0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x92 in section index 139 of file
libbackend.a[gcse.o]
ld: The value 0xfffffffffdfea070 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 402 of file
libbackend.a[gimple.o]


Without --enable-comdat:
ld: The value 0xfffffffffdf6d810 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x102 in section index 74 of file
libbackend.a[function.o]
ld: The value 0xfffffffffdeeb8b0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x102 in section index 79 of file
libbackend.a[function.o]
ld: The value 0xfffffffffdfd81f0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x102 in section index 60 of file
libbackend.a[gimple.o]
ld: The value 0xfffffffffdf562a0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x102 in section index 65 of file
libbackend.a[gimple.o]
ld: The value 0xfffffffffde4c890 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 207 of file
libbackend.a[gimple.o]
ld: The value 0xfffffffffde4ae90 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 212 of file
libbackend.a[gimple.o]
ld: The value 0xfffffffffdf81640 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x102 in section index 59 of file
libbackend.a[gimple-expr.o]
ld: The value 0xfffffffffde83ea0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 21 of file
libbackend.a[gimple-iterator.o]
ld: The value 0xfffffffffde82940 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 26 of file
libbackend.a[gimple-iterator.o]
ld: The value 0xfffffffffdf96310 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x102 in section index 85 of file
libbackend.a[gimple-fold.o]
ld: The value 0xfffffffffde8cde0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 106 of file
libbackend.a[gimple-fold.o]
ld: The value 0xfffffffffde8b440 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 111 of file
libbackend.a[gimple-fold.o]
ld: The value 0xfffffffffdec46b0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x22 in section index 172 of file
libbackend.a[gimple-pretty-print.o]
ld: The value 0xfffffffffdff2690 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0xc2 in section index 91 of file
libbackend.a[ipa-inline-analysis.o]
ld: The value 0xfffffffffdfed180 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x172 in section index 96 of file
libbackend.a[ipa-inline-analysis.o]
ld: The value 0xfffffffffdfec950 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x842 in section index 96 of file
libbackend.a[ipa-inline-analysis.o]
ld: The value 0xfffffffffdfec8b0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x8e2 in section index 96 of file
libbackend.a[ipa-inline-analysis.o]
ld: The value 0xfffffffffdfec6a0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0xaf2 in section index 96 of file
libbackend.a[ipa-inline-analysis.o]
ld: The value 0xfffffffffdfe9bd0 does not fit when applying the relocation
PCREL21B for symbol ".text" at offset 0x62 in section index 20 of file
libbackend.a[ira-color.o]

Reply via email to