gb_COMPILERNOOPTFLAGS does not even obey the user passed CFLAGS

Lubos Lunak l.lunak at suse.cz
Thu Jan 10 07:46:04 PST 2013


On Thursday 10 of January 2013, Tomáš Chvátal wrote:
> 2013/1/10 Lubos Lunak <l.lunak at suse.cz>:
> >> 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?
>
> See how bridgetests are build,
>
> they fail on old systems because they just specify the -O0 and nothing
> else, not even march....
>
> So Petr used this patch in build service [1] but i think we should
> make this respected everywhere.

 Reading this patch, your change looks to me like putting the CXXFLAGS in some 
random place where it will incidentally work, but the moment somebody doesn't 
include gb_COMPILERNOOPTFLAGS in the flags passed to add_cxxobject, the 
problem is back again. If add_cxxobject doesn't include CXXFLAGS, why not fix 
it to ensure that (which possibly may need others like add_noexception_object 
to delegate to add_cxxobject_internal instead of add_cxxobject)?

> [1]
> https://build.opensuse.org/package/view_file?file=bridges-missing-cxxflags.
>diff&package=libreoffice&project=LibreOffice%3AUnstable&rev=157

-- 
 Lubos Lunak
 l.lunak at suse.cz


More information about the LibreOffice mailing list