Bug 382256 - gz compiler flag test doesn't work for gold
Summary: gz compiler flag test doesn't work for gold
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Ivo Raisr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-11 21:54 UTC by Ross Burton
Modified: 2017-07-16 20:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix the configure test (850 bytes, patch)
2017-07-11 21:56 UTC, Ross Burton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2017-07-11 21:54:40 UTC
The compiler flag tests for -gz=zlib and -gz=zlib-gnu currently use AC_COMPILE_IFELSE, but as these are basically linker flags it appears this is just checking that the frontend supports them.

For example if binutils is configured so that gold is the default linker the tests pass:

checking if gcc accepts -g -gz=zlib... yes
checking if gcc accepts -g -gz=zlib-gnu... yes

but the actual use of them fails:

| x86_64-poky-linux-gcc: error: -gz=zlib is not supported in this configuration

Changing AC_COMPILE_IFELSE to AC_LINK_IFELSE means that configure detects that -gz=zlib doesn't work but zlib-gnu does, and the build works.
Comment 1 Ross Burton 2017-07-11 21:56:19 UTC
Created attachment 106565 [details]
Fix the configure test
Comment 2 Ivo Raisr 2017-07-16 20:13:10 UTC
Commited as SVN r16459.