This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH COMMITTED] Fix pretty printer failures when CPPFLAGS is defined with optimizations.
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at gotplt dot org>, Martin Galvan <martin dot galvan at tallertechnologies dot com>
- Date: Tue, 27 Dec 2016 18:50:43 +0100
- Subject: Re: [PATCH COMMITTED] Fix pretty printer failures when CPPFLAGS is defined with optimizations.
- Authentication-results: sourceware.org; auth=none
- References: <1ca1a503-d571-2162-bf31-8059aae2564c@redhat.com>
On Dez 23 2016, Carlos O'Donell <carlos@redhat.com> wrote:
> In my build scripts I use:
>
> export CFLAGS="-g -O2 -Wl,--build-id=none"
> ...
> export CPPFLAGS="-g -O2 -Wl,--build-id=none"
>
> The CPPFLAGS end up _after_ the per-test CFLAGS.
Don't do that then.
> diff --git a/README.pretty-printers b/README.pretty-printers
> index 8662900..a2536ca 100644
> --- a/README.pretty-printers
> +++ b/README.pretty-printers
> @@ -126,11 +126,12 @@ You can use the existing unit tests as examples.
>
> 4. Add the names of the pretty printer tests to the 'tests-printers' variable
> in your submodule's Makefile (without extensions). In addition, for each test
> -program you must define a corresponding CFLAGS-* variable and set it to
> -$(CFLAGS-printers-tests) to ensure they're compiled correctly. For example,
> -test-foo-printer.c requires the following:
> +program you must define a corresponding CFLAGS-* and CPPFLAGS-* variable and
> +set it to $(CFLAGS-printers-tests) to ensure they're compiled correctly. For
> +example, test-foo-printer.c requires the following:
>
> CFLAGS-test-foo-printer.c := $(CFLAGS-printers-tests)
> +CPPFLAGS-test-foo-printer.c := $(CFLAGS-printers-tests)
CPPFLAGS should only use CPPFLAGS.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."