This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix build error for tst-printf-bz18872 on arm/aarch64 and s390
- From: Florian Weimer <fweimer at redhat dot com>
- To: ppluzhnikov at google dot com
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 7 Oct 2015 09:50:51 +0200
- Subject: Re: [patch] Fix build error for tst-printf-bz18872 on arm/aarch64 and s390
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobN6U4bEXMB3UdW7=6OuH0mJW+iA7+xE8+AiZtVGg3knAw at mail dot gmail dot com>
On 10/07/2015 07:54 AM, Paul Pluzhnikov wrote:
> Greetings,
>
> Some targets do not support "#pragma GCC push_options", and disabling
> optimization in stdio-common/tst-printf-bz18872.c is only known to be
> necessary on x86_64 and ix86.
>
> Attached patch should fix build problems reported here:
> https://sourceware.org/ml/libc-alpha/2015-09/msg00484.html
> https://sourceware.org/ml/libc-alpha/2015-10/msg00063.html
At one point, we need to stop working around compiler bugs.
Another way would be to specify -O0, either as a function attribute
(which GCC 4.6 already supports), or in Makefile. (The aarch64 etc.
failures are in target option restoring, which the “optimize“ shouldn't
have to do.)
> 2015-10-06 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * stdio-common/tst-printf-bz18872.sh: Make disabling
> optimization conditional on x86_64 or i386.
This needs proper wrapping
> diff --git a/stdio-common/tst-printf-bz18872.sh b/stdio-common/tst-printf-bz18872.sh
> index 0127e73..1e5f80b 100644
> --- a/stdio-common/tst-printf-bz18872.sh
> +++ b/stdio-common/tst-printf-bz18872.sh
> @@ -27,11 +27,19 @@ cat <<'EOF'
> #include <stdio.h>
> #include <mcheck.h>
>
> +#if defined(__x86_64__) || defined(__i386__)
> /*
> Compile do_test without optimization: GCC 4.9/5.0/6.0 takes a long time
> to build this source. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67396 */
> +# define DISABLE_OPTIMIZATION 1
> +#else
> +# define D
Nothing in the patch or changelog says why this is conditional on
__x86_64__ and __i386__.
Florian