Modifying gb_C(XX)FLAGS in solenv/gbuild/LINUX_*_GCC.mk?

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


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

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

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

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

(Also, moving the additions in the LINUX_*_GCC.mk files after including 
linux.mk 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 unxgcc.mk, 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_*_GCC.mk files after including linux.mk.  Similar problems 
may be present in other $(OS)_$(CPUNAME)_$(COM) files, too)

Or what am I missing?


More information about the LibreOffice mailing list