[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib:test-stdalign failing on powerpc-darwin8, gcc-4.0

From: David Fang
Subject: Re: gnulib:test-stdalign failing on powerpc-darwin8, gcc-4.0
Date: Thu, 18 Dec 2014 00:14:18 -0500 (EST)

Some more details:

On powerpc-darwin8, where the test fails, gcc is:
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /var/tmp/gcc/gcc-5370~2/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5370)
(test fails with and without your patch to stdalign.in.h)

On powerpc-darwin9, where the test passes, gcc is:
sing built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --program-prefix= --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5493)

Slightly different build numbers between darwin8 and 9.

I also tested Apple's gcc-4.2 on powerpc-darwin9:
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-checking --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix= --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5577)

This too passes.

I'm pretty certain that powerpc-darwin8 and darwin9 have the same ABI struct-layout and alignment rules. Something must be going wrong with the stdalign macros, specific to darwin8's compiler.

At this point, I have to consider trying other compilers on darwin8,
like one that supports and includes stdalign.h with built-in align macros.


Hi Paul,
I tried applying the patch (just the stdalign.in.h bit) to the powerpc-darwin8 build, but I still see (when changing the assert to printf):

static_char_alignas 5
static_char_Alignas 4
static_short_alignas 2
static_short_Alignas 0
static_int_alignas 4
static_int_Alignas 0
static_long_alignas 4
static_long_Alignas 0
static_int64_t_alignas 0
static_int64_t_Alignas 0
static_float_alignas 4
static_float_Alignas 0
static_double_alignas 0
static_double_Alignas 0
static_struct1_alignas 5
static_struct1_Alignas 4
static_struct2_alignas 0
static_struct2_Alignas 6
static_struct3_alignas 0
static_struct3_Alignas 4
static_struct4_alignas 0
static_struct4_Alignas 4

I also happened to test GNTLS-3.3.9 (containing gnulib) on powerpc-darwin9, also using apple-gcc-4.0, before patching, and it passed all tests.

I'm not entirely sure what is different between them.
If you have any suggestions, I can try them tonight.


 David Fang wrote:
>   Does this mean that it falls back to the distributed copy in
>   gl/stdalign.h?

 Yes, actually, it's basically a copy of gl/stdalign.in.h.

>   I don't see any evidence of the replacement stdalign.h being tested in
>   config.log.

 The replacement is not tested, because its runtime behavior can't easily
 be tested with cross-compilation.

 Do you observe the same problem with Apple's GCC 4.2?

 Do the attached patches work around the problem for you?  The second one's
 for HP compilers and you can ignore it if you like.

David Fang

reply via email to

[Prev in Thread] Current Thread [Next in Thread]