[PATCH] tests: move -D_FORTIFY_SOURCE to CPPFLAGS

Mike Frysinger vapier@gentoo.org
Mon May 7 04:54:00 GMT 2012


On Sunday 06 May 2012 19:53:53 Carlos O'Donell wrote:
> On Sun, May 6, 2012 at 6:51 PM, Mike Frysinger wrote:
> > The -D_FORTIFY_SOURCE flags are being added to the test-specific CFLAGS
> > values when they should be the test-specific CPPFLAGS values.  Otherwise
> > the values don't override the user-specified CPPFLAGS and might end up
> > breaking the tests.
> 
> Is this because the tests in question are being compiled with g++?

no.  the current compile order is:
	$(CC) $(CFLAGS) $(CPPFLAGS) ...

and CFLAGS expands into:
	$(CFLAGS-config) ... $($(subdir)-CFLAGS) ... $(CFLAGS-$(<F)) ...

and CPPFLAGS expands into:
	$(CPPFLAGS-config) ... $($(subdir)-CPPFLAGS) ... $(CPPFLAGS-$(<F)) ...

so the user's settings are in CPPFLAGS-config, but the test-specific overrides 
are in CFLAGS-xxx, so the -D flags we want to use don't override the user's 
settings.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120507/87b61eeb/attachment.sig>


More information about the Libc-alpha mailing list