[PATCH] Use append attribution to CFLAGS in wcsmbs

Gabriel F. T. Gomes gftg@linux.vnet.ibm.com
Mon Mar 13 19:04:00 GMT 2017


On Mon, 13 Mar 2017 16:37:43 +0000
Joseph Myers <joseph@codesourcery.com> wrote:

> On Sat, 11 Mar 2017, Mike Frysinger wrote:
> 
> > On 08 Mar 2017 13:47, Gabriel F. T. Gomes wrote:  
> > > CFLAGS for several files in wcsmbs/Makefile are set without the append
> > > operator ("+="), thus ignoring other attributions.  This patch changes
> > > that so Makefiles in sysdeps can set extra compilation flags.  This is
> > > being done in preparation for future float128 patches.  
> > 
> > i'm not against this, but it seems like we should be doing this
> > everywhere ?  when i grep for CFLAGS-xxx.c, there's about 650
> > using = and 250 using +=.  
> 
> See the discussion starting at 
> <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html> (and 
> <https://sourceware.org/ml/libc-alpha/2013-01/msg00247.html>).  Given that 
> CFLAGS are the right way of handling a particular file (rather than 
> diagnostic pragmas, #define, etc., directly in the source code), I think 
> appending makes sense unless there is a specific reason for not doing so 
> in a particular case (and working out if any existing cases are 
> deliberately not appending may be tricky).
> 

In the discussion, there seems to be some consensus as to using
sysdep-CFLAGS-<filename> (and sysdep-CFLAGS += $(sysdep-CFLAGS-$(<F))),
instead of CFLAGS (as mentioned in the third item of [1]).  As well
as there seems to be consensus on using the append operator (as
mentioned in [2])

(Please, let me know if my perception of consensus is wrong here)

[1] https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html
[2] https://sourceware.org/ml/libc-alpha/2013-01/msg00338.html

I wasn't aware of sysdep-CFLAGS when I sent this patch.

With the use of sysdep-CFLAGS, there is no need to change the =
operator to += in wcsmbs/Makefile.

So, may I drop this patch, or is it still useful?



More information about the Libc-alpha mailing list