Modifying gb_C(XX)FLAGS in solenv/gbuild/LINUX_*

Stephan Bergmann sbergman at
Fri Sep 16 13:55:58 UTC 2016

Various of the solenv/gbuild/LINUX_* (namely ARM, AXP, M86K, 
POWERPC64, S390, S390X) have lines

   gb_CFLAGS += ...
   gb_CXXFLAGS += ...

to add additional flags before including  However, these 
additions appear to not be effective, as (included from unconditionally resets those variables via

   gb_CFLAGS := ...
   gb_CXXFLAGS := ...

(Also, moving the additions in the LINUX_* files after including wouldn't appear to help, either, as the ultimate use of these 
two variables is in

   gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
   gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)

in, so the latter variables would still not get the additions. 
  The only correct way appears to be to have

   gb_LinkTarget_CFLAGS += ...
   gb_LinkTarget_CXXFLAGS += ...

in the LINUX_* files after including  Similar problems 
may be present in other $(OS)_$(CPUNAME)_$(COM) files, too)

Or what am I missing?

More information about the LibreOffice mailing list