[build] Only support -gstabs on Mac OS X if assember supports it (PR target/67973)
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Dec 15 13:35:00 GMT 2015
Mike Stump <mikestump@comcast.net> writes:
> On Dec 14, 2015, at 2:40 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
>> As described in PR PR target/67973, newer assemblers on Mac OS X, which
>> are based on LLVM instead of gas, don't support .stab* directives any
>> longer. The following patch detects this situation and tries to fall
>> back to the older gas-based as if it is still accessible via as -Q.
>>
>> Tested on x86_64-apple-darwin15.2.0 and as expected the -gstabs* tests
>> now pass.
>>
>> However, I'm not really comfortable with this solution.
>
> When I proposed automagically adding -Q, it sounded like a good idea. :-(
>
> Yeah, hard to disagree with your intuition. If a future assembler had or
> added stabs that had or added all these features, it would come first on
> the path, and it all work just work out nicely with just a configure check
> to disable stabs if it didn’t work. That simple check should be reliable
> and work well.
Right: I'm effectively keeping just the first configure test for .stabs
support in the assembler to enable or disable
DBX_DEBUG/DBX_DEBUGGING_INFO. I'll post it later since ...
>> Initially, I
>> forgot to wrap the -Q option to as in %{gstabs*:...}, which lead to a
>> bootstrap failure: the gas- and LLVM-based assemblers differ in a
>> number of other ways
>
> Yeah, having the feature set be a dynamic property when our software
> decides on static basis is bound to hurt. Seem that the most likely patch
> would be to just turn off stabs in a way that the test suite disables the
> tests by itself, or to just quite the tests suite.
... testing revealed another instance of static assumptions which hurts
us now: while support for -gstabs* is checked for dynamically in
lib/gcc-dg.exp and lib/gfortran-dg.exp for the debug.exp tests, there
are a couple of testcases that use -gstabs* unconditionally, but have a
hardcoded list of targets that support those options. I'll introduce a
new effective-target keyword (simply checking if -gstabs is accepted
should be enough) to also perform this test dynamically and repost once
it's tested.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Gcc-patches
mailing list