This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [build] Handle gas/gld --compress-debug-sections=type

>From my point of view this should be backported to the active branches.
Building GCC 5 and GCC 6 with binutils >=2.26 now results in

$ gcc -c -gz foo.c
gcc: error: -gz is not supported in this configuration

building these GCC version with binutils 2.25 recognizes this option.

On 30.05.2016 13:32, Rainer Orth wrote:
> * When I removed the default in the gcc_cv_ld_compress test, the outcome
>   always was 0, irrespective of the linker tested.  Before, it would
>   almost always have been 1 if testing GNU ld.  It turns out that in
>   this (and numerous other) cases the nesting of tests using ld_date was
>   wrong.  I believe most if not all of those ld_date tests can go, being
>   only relevant for truly prehistoric versions of GNU ld not in use
>   anymore.  I'll probably submit a followup to remove them, simplifying
>   several ld tests.
> Bootstrapped without regressions on i386-pc-solaris2.1[02] with various
> as/ld combinations and checking that the tests yielded the expected
> results:
> 			gcc_cv_as_compress_debug/gcc_cv_ld_compress_debug
> as/ld 2.10		0/0
> as/ld 2.12		0/3
> gas 2.26/ld 2.10	2/0
> gas 2.26/ld 2.12	2/3
> gas 2.26/gld 2.26	2/3

the GNU case now reads

  if test "$ld_vers_major" -lt 2 \
     || test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 21; then
  elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 26; then
  if test $ld_is_gold = yes; then

so you end up with different values depending on the linker default. Is this

LINK_COMPRESS_DEBUG_SPEC in gcc.c is defined in terms of the linker used at
build time, so currently you get the wrong specs when using the non-default
linker when selecting the linker at runtime using -fuse-ld=...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]