[PATCH COMMITTED] Fix pretty printer failures when CPPFLAGS is defined with optimizations.
Andreas Schwab
schwab@linux-m68k.org
Tue Dec 27 17:50:00 GMT 2016
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."
More information about the Libc-alpha
mailing list