Bug while cross compiling for powerpc

Clement.FOUCHER@unice.fr Clement.FOUCHER@unice.fr
Thu Jan 14 16:21:00 GMT 2010


Hi everybody,

I'm trying to compile glibc for a powerpc board using eldk configured for
powerpc 4XX.

I configure glibc using the following:

foucher@gentiane:~/Bureau/sources/glibc-build$ ../glibc-2.9-20090518/configure
--prefix=/opt/glibc --build=x86_64-linux --host=powerpc-linux

With that result, that seems positive to me:

checking build system type... x86_64-pc-linux-gnu
checking host system type... powerpc-unknown-linux-gnu
configure: running configure fragment for add-on libidn
configure: running configure fragment for add-on nptl
checking sysdep dirs... sysdeps/powerpc/powerpc32/elf sysdeps/powerpc/elf
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu sysdeps/powerpc/powerpc32/fpu
nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32
sysdeps/unix/sysv/linux/powerpc/powerpc32 nptl/sysdeps/unix/sysv/linux/powerpc
sysdeps/unix/sysv/linux/powerpc sysdeps/ieee754/ldbl-128ibm
sysdeps/ieee754/ldbl-opt nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread
sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common
sysdeps/unix/mman sysdeps/unix/inet nptl/sysdeps/unix/sysv sysdeps/unix/sysv
sysdeps/unix/powerpc nptl/sysdeps/unix sysdeps/unix sysdeps/posix
sysdeps/powerpc/powerpc32 sysdeps/wordsize-32 sysdeps/powerpc/fpu
nptl/sysdeps/powerpc sysdeps/powerpc sysdeps/ieee754/dbl-64
sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for powerpc-linux-gcc... powerpc-linux-gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether powerpc-linux-gcc accepts -g... yes
checking for powerpc-linux-gcc option to accept ISO C89... none needed
checking for gcc... gcc
checking how to run the C preprocessor... powerpc-linux-gcc -E
checking for powerpc-linux-g++... powerpc-linux-g++
checking whether we are using the GNU C++ compiler... yes
checking whether powerpc-linux-g++ accepts -g... yes
checking whether
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/as is
GNU as... yes
checking whether
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld is
GNU ld... yes
checking for
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/as...
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/as
checking version of
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/as...
2.17.50.0.12, ok
checking for
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld...
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld
checking version of
/opt/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/../../../../powerpc-linux/bin/ld...
2.17.50.0.12, ok
checking for pwd... /bin/pwd
checking for powerpc-linux-gcc... (cached) powerpc-linux-gcc
checking version of powerpc-linux-gcc... 4.2.2, ok
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.81, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... no
checking for makeinfo... makeinfo
checking version of makeinfo... 4.8, ok
checking for sed... sed
checking version of sed... 4.2.1, ok
checking for autoconf... autoconf
checking whether autoconf works... no
configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: msgfmt
*** some features will be disabled.
*** Check the INSTALL file for required versions.
checking whether ranlib is necessary... no
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/bash
checking for gawk... gawk
checking for perl... /usr/bin/perl
checking for install-info... /usr/sbin/install-info
checking for bison... /opt/eldk/usr/bin/bison
checking for signed size_t type... no
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for .set assembler directive... yes
checking for assembler .type directive prefix... @
checking for .symver assembler directive... yes
checking for ld --version-script... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... yes
checking for .preinit_array/.init_array/.fini_array support... yes
checking for libunwind-support in compiler... no
checking for -z nodelete option... yes
checking for -z nodlopen option... yes
checking for -z initfirst option... yes
checking for -z relro option... yes
checking for -Bgroup option... yes
checking for libgcc_s suffix... 
checking for --as-needed option... yes
checking whether --noexecstack is desirable for .S files... yes
checking for -z combreloc... yes
checking for -z execstack... yes
checking for -fpie... yes
checking for --hash-style option... yes
checking for -fno-toplevel-reorder -fno-section-anchors... yes
checking for -fstack-protector... yes
checking for -fgnu89-inline... yes
checking whether cc puts quotes around section names... no
checking for assembler .weak directive... yes
checking whether CFI directives are supported... yes
checking for ld --no-whole-archive... yes
checking for gcc -fexceptions... yes
checking whether clobbering cr0 causes problems... no
checking for __builtin_expect... yes
checking for __builtin_memset... no
checking for redirection of built-in functions... yes
checking for __thread... yes
checking for tls_model attribute... yes
checking for libgd... no
checking for is_selinux_enabled in -lselinux... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long double... yes
checking size of long double... 8
running configure fragment for sysdeps/powerpc/powerpc32/elf
checking for powerpc32 TLS support... yes
running configure fragment for sysdeps/unix/sysv/linux/powerpc
checking whether powerpc-linux-gcc -g -O2 -mlong-double-128 uses IBM extended
format... yes
running configure fragment for sysdeps/ieee754/ldbl-opt
checking whether powerpc-linux-gcc -g -O2 supports -mlong-double-128... yes
running configure fragment for nptl/sysdeps/pthread
checking for forced unwind support... yes
checking for C cleanup handling... yes
running configure fragment for sysdeps/pthread
running configure fragment for sysdeps/unix/sysv/linux
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for egrep... (cached) /bin/grep -E
checking installed Linux kernel header files... 2.0.10 or later
running configure fragment for sysdeps/powerpc/powerpc32
checking for R_PPC_REL16 gas support... yes
checking for -msecure-plt by default... no
running configure fragment for sysdeps/powerpc
checking for .machine support... yes
checking for old glibc 2.0.x headers... no
checking whether -fPIC is default... no
configure: creating ./config.status
config.status: creating config.make
config.status: creating Makefile
config.status: creating config.h
config.status: executing default commands

But after a few minutes, the 'make' command stops on that file :
glibc-2.9-20090518/sysdeps/powerpc/fpu/fclrexcpt.c, with asm errors:

../sysdeps/powerpc/fpu/fclrexcpt.c: In function '__feclearexcept':
../sysdeps/powerpc/fpu/fclrexcpt.c:29: error: impossible constraint in 'asm'
../sysdeps/powerpc/fpu/fclrexcpt.c:36: error: impossible constraint in 'asm'

I try disable the fpu unit by adding '--without-fp' to the configure command,
but then, the compile fails on another file, because it does not find the file
fenv_libc.h. It seems that this file is contained in the fpu directory, and
though it is disabled, it is not found by the Make...


So, is my configure command right? Does I forget something?


Please help.



Regards,

         Clement, PhD student



More information about the Libc-help mailing list