This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] tests: move -D_FORTIFY_SOURCE to CPPFLAGS


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

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]