Bug 382256

Summary: gz compiler flag test doesn't work for gold
Product: [Developer tools] valgrind Reporter: Ross Burton <ross>
Component: generalAssignee: Ivo Raisr <ivosh>
Status: RESOLVED FIXED    
Severity: normal CC: ivosh
Priority: NOR    
Version: 3.12.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Fix the configure test

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.