[patch, make machinery, plugins] enable plugins for powerpc-apple-darwin
IainS
developer@sandoe-acoustics.co.uk
Thu May 13 14:51:00 GMT 2010
On 13 May 2010, at 15:22, Richard Guenther wrote:
> On Thu, May 13, 2010 at 3:57 PM, IainS <developer@sandoe-acoustics.co.uk
> > wrote:
>> Since we use "-mdynamic-no-pic" by default when building gcc on
>> darwin, and
>> this conflicts with fPIC (needed for plugins), we need different
>> flags when
>> building (and testing for ability to build) plugins.
>>
>> the change to gcc/configure.ac deals with this for the test phase
>> (and
>> actually ensures that fPIC is passed in CFLAGS for other targets
>> too).
>
> Why do you need to do that change?
without this the test fails (mdynamic-no-pic conflicts with fPIC
producing a warning) and plugin support is disabled after stage1.
mdynamic-no-pic is added to BOOT_CFLAGS in config/mh-ppc-darwin with
the comment that it produces 3..5% improvement in compile performance,
thus I am loath to remove it completely.
If you mean why add fPIC to CFLAGS for other targets? - just for
tidiness sake (I meant to remove it from LDFLAGS too).
iain.
>> I've put a filter in config/x-darwin to remove the "-mdynamic-no-
>> pic" from
>> PLUGINCFLAGS since, at present, there is no mechanism to specify
>> these
>> separately - since they are substituted from:
>> PLUGINCFLAGS = @CFLAGS@
>>
>> (I wonder if the latter was really intended)
>>
>> ===
>>
>> With this patch all the gcc plugins pass..
>> ... unfortunately, some of the g++ ones do not - although AFAICT
>> those fails
>> are not due to build issues (they fail at runtime rather than build-
>> time).
>>
>> [all the plugins pass for powerpc64-apple-darwin, if that provides
>> additional clues...].
>>
>> (to run the plugins also requires :
>> http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00872.html )
>>
>> ===
>>
>> OK for trunk ?
>>
>> Iain
>>
>> gcc/Changelog:
>>
>> * configure.ac: Strip "-mdynamic-no-pic" from CFLAGS when
>> testing for
>> plugin capability on Darwin.
>> * configure: Regenerated.
>> * config/x-darwin: Strip "-mdynamic-no-pic" from
>> PLUGINCFLAGS.
>>
>>
>>
>>
>>
More information about the Gcc-patches
mailing list