Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 121336

Summary: ccache doesn't notice when split-specs compilers are switched
Product: Gentoo Linux Reporter: Kevin F. Quinn (RETIRED) <kevquinn>
Component: [OLD] DevelopmentAssignee: Lisa Seelye (RETIRED) <lisa>
Status: RESOLVED UPSTREAM    
Severity: normal CC: solar, toolchain
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 128810    
Bug Blocks:    
Attachments: Adds contents of specs files listed in GCC_SPECS to the hash.
add output of '<compiler> -v' to the hash

Description Kevin F. Quinn (RETIRED) gentoo-dev 2006-02-02 11:38:35 UTC
For example, changing from hardened to vanilla specs while using the same main version.

Although ccache checks for options "--specs", it doesn't check GCC_SPECS, our Gentoo-specific patch to support compiler specs switching.

Patch to follow to add specs files listed in GCC_SPECS.
Comment 1 Kevin F. Quinn (RETIRED) gentoo-dev 2006-02-02 11:39:46 UTC
Created attachment 78744 [details, diff]
Adds contents of specs files listed in GCC_SPECS to the hash.
Comment 2 Kevin F. Quinn (RETIRED) gentoo-dev 2006-02-02 13:33:53 UTC
hmm; occurs to me this isn't good enough, as we set GCC_SPECS in the gcc wrapper, in which case ccache won't see it.

I think to be complete, we'd need to some or all of:

1) output of 'gcc -v'
2) output of 'gcc -dumpspecs'
3) contents of spec files listed by 'gcc -v'

in practice it might be enough just (1).
Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2006-02-02 14:07:45 UTC
Created attachment 78754 [details, diff]
add output of '<compiler> -v' to the hash

Ok; this is a simple enough patch to add the output of '<compiler> -v' to the hash.

I think this is enough to capture changes in compiler driven by our specs trickery.  It doesn't actually hash the specs themselves, but I don't think that's necessary.
Comment 4 Lisa Seelye (RETIRED) gentoo-dev 2006-02-05 06:01:25 UTC
You should submit the patch upstream to the ccache mail list, 
http://lists.samba.org/mailman/listinfo/ccache/

Comment 5 Lisa Seelye (RETIRED) gentoo-dev 2006-03-20 08:11:33 UTC
This should have been closed UPSTREAM as it is an upstream improvement request.
Comment 6 Kevin F. Quinn (RETIRED) gentoo-dev 2006-03-20 09:28:12 UTC
Well, as I said before, the problem is caused by the GCC_SPECS patch we apply to our compilers to support switching specs in the environment.  Without that patch there's no need to hash the output of 'gcc -v'.  This means that as far as upstream are concerned, it's not relevant - unless they maintain distribution-specific variations (which I think they don't).  Also I'm not sure they would be keen on adding a separate invocation of the compiler driver to every ccache call.

Perhaps "WONTFIX" might be a better resolution.