I've submitted Bug 206588 from which the below is quoted (but is not all the 
text). First I list my later comment then the beginning of the description.

> This is likely more an issue of not having a proper set of headers to use 
> with powerpc64-gcc when cross compiling from other architectures, such as 
> little endian ones.
> 
> It is still a cross compiler usage difficulty that is not handled or 
> documented.


> I used the following program and compiler command line options to dump macro 
> definitions from devel/powerpc64-gcc and discovered some nasty ones: 
> LITTLE_ENDIAN usage on amd64 despite targeting a big endian powerpc64. 
> Differing __NO_STRICT_ALIGNMENT status and __GCC_HAVE_DWARF2_CFI_ASM status 
> as well. The details follow.
> 
> # more with_libc++__config.cpp 
> #include <__config>
> int main(void)
> { return 0; }
> 
> used via:
> 
> /usr/local/bin/powerpc64-portbld-freebsd11.0-g++ -std=c++11 -I/usr/include 
> -I/usr/include/c++/v1/ -dM -E func.cpp | sort > ~/powerpc64-gcc_52_macros.txt
> 
> on a native powerpc64 (Powermac G5) context and on a amd64 context (inside 
> Virtual Box on Mac OS X). The "<"'s below are from the G5 context and the ">" 
> below are from the amd64 context.
> 
> There is also a related __NO_STRICT_ALIGNMENT difference and a 
> __GCC_HAVE_DWARF2_CFI_ASM difference.
> 
> # diff /media/root/powerpc64_gcc_52_macros.txt ~/powerpc64_gcc_52_macros.txt 
> | more
> 16c16
> < #define _BYTE_ORDER _BIG_ENDIAN
> ---
> 
> > #define _BYTE_ORDER _LITTLE_ENDIAN
> 
> 27c27
> < #define _LIBCPP_BIG_ENDIAN 1
> ---
> 
> > #define _LIBCPP_BIG_ENDIAN 0
> 
> 60c60
> < #define _LIBCPP_LITTLE_ENDIAN 0
> ---
> 
> > #define _LIBCPP_LITTLE_ENDIAN 1
> 
> 84,85c84,85
> < #define _QUAD_HIGHWORD 0
> < #define _QUAD_LOWWORD 1
> ---
> 
> > #define _QUAD_HIGHWORD 1
> > #define _QUAD_LOWWORD 0
> 
> 
> 200d199
> < #define __GCC_HAVE_DWARF2_CFI_ASM 1
> 289a289
> 
> > #define __NO_STRICT_ALIGNMENT 
. . .

===
Mark Millard
markmi at dsl-only.net

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "[email protected]"

Reply via email to