gb_COMPILERNOOPTFLAGS does not even obey the user passed CFLAGS

Michael Stahl mstahl at redhat.com
Wed Jan 16 03:31:33 PST 2013


On 10/01/13 15:03, Lubos Lunak wrote:
> On Thursday 10 of January 2013, Tomáš Chvátal wrote:
>> Hi guys,
>>
>> As written in subject the variable is used on multiple targets and it
>> ignores the user defined cflags/cxxflags.
>> This should never happen and all our targets should take into effect the
>> user defined options too.
>>
>> I am not sure which variable I should append there, so could anyone check
>> if the diff in attachment is right?
> 
>  It doesn't look right. CXXFLAGS should always get used for building .cxx 
> sources, so this should have no effect, moreover gb_COMPILERNOOPTFLAGS is 
> simply the default noopt flag to use when doing debug build. And I don't 
> quite understand why you'd want this change, what problem are you trying to 
> solve?

there is an obvious issue here, because the main reason to use
gb_COMPILERNOOPTFLAGS is to explicitly disable optimizations for files
that are known to trigger compiler bugs.  hence appending CXXFLAGS
would, if they contained some -ON, override the -O0 that
gb_COMPILERNOOPTFLAGS wants to set.

also there are some files that must be compiled with
-fno-omit-frame-pointer, and similar problems could arise if CXXFLAGS
with -fomit-frame-pointer is appended at the wrong place.



More information about the LibreOffice mailing list