arm-none-linux-gnueabi finishes in an infinite glibc configure loop

Valentin Longchamp valentin.longchamp@epfl.ch
Tue Sep 19 12:06:00 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I'm trying to build a toolchain for Freescale i.MX31 ADS I'm woking on.
I have a working toolchain that is given by Freescale, but I want to be
able to build it myself for future usage.

I've found a crosstool "config" file in the RPM toolchain given by
Freescale which looks like that:

> [arm-none-linux-gnueabi]> pwd
> /opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi
> [valentin@lsa1pc7][13:55:44]
> [arm-none-linux-gnueabi]> cat arm-none-linux-gnueabi.crosstoolconfig.txt
> AR=
> BINUTILS_DIR=binutils-2.16.92
> BINUTILS_EXTRA_CONFIG=
> BUILD=i686-pc-linux-gnu
> BUILD_DIR=/usr/src/redhat/BUILD/crosstool/build/arm-none-linux-gnueabi/gcc-4.1.1-glibc-2.4-nptl-2
> CC=
> DEJAGNU=
> EXTRA_TARGET_CFLAGS=-mabi=aapcs-linux
> GCC_BUILD=
> GCC_CORE_DIR=gcc-4.1.1
> GCC_DIR=gcc-4.1.1
> GCC_EXTRA_CONFIG=--disable-libunwind-exceptions
> GCC_HOST=
> GCC_LANGUAGES=c,c++
> GDB_DIR=
> GLIBC_ADDON_OPTIONS==nptl,../glibc-2.4/ports,
> GLIBC_DIR=glibc-2.4
> GLIBC_EXTRA_CC_ARGS=
> GLIBC_EXTRA_CONFIG=--with-tls --with-__thread --enable-kernel=2.6.4 --with-abi=aapcs-linux
> GLIBC_EXTRA_ENV=
> JUST_DOWNLOAD=
> KERNELCONFIG=/usr/src/redhat/BUILD/crosstool/crosstool-0.42_fsl/armeabi.config
> LINUX_DIR=linux-2.6.17.1
> LINUX_SANITIZED_HEADER_DIR=
> NO_DOWNLOAD=
> PREFIX=/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi
> PTXDIST_DIR=
> SHARED_MODE=--enable-shared
> SRC_DIR=/usr/src/redhat/BUILD/crosstool/source
> TARBALLS_DIR=/opt/freescale/pkgs
> TARGET=arm-none-linux-gnueabi
> TARGET_CFLAGS=-O
> TOP_DIR=/usr/src/redhat/BUIL

First question: what is this crosstool-0.42_fsl ? What does the fsl
stand for ? Anyone knows that ?

Now, I have done my own file to use with my local crosstool version:

> [valentin@lsa1pc7][13:50:31]
> [crosstool-0.42]> cat imx31.sh
> #!/bin/sh
> set -ex
> TARBALLS_DIR=$HOME/downloads
> RESULT_TOP=/opt/crosstool
> export TARBALLS_DIR RESULT_TOP
> 
> # Really, you should do the mkdir before running this,
> # and chown /opt/crosstool to yourself so you don't need to run as root.
> mkdir -p $RESULT_TOP
> 
> BINUTILS_DIR=binutils-2.16.92
> export BINUTILS_DIR
> 
> BUILD=i686-pc-linux-gnu
> export BUILD
> BUILD_DIR=$HOME/EPFL/diplome_ASL/toolchain/crosstool-0.42/build/arm-none-linux-gnueabi/gcc-4.1.1-glibc-2.4-nptl-2
> export BUILD_DIR
> 
> EXTRA_TARGET_CFLAGS=-mabi=aapcs-linux
> export EXTRA_TARGET_CFLAGS
> 
> GCC_CORE_DIR=gcc-4.1.1
> export GCC_CORE_DIR
> GCC_DIR=gcc-4.1.1
> export GCC_DIR
> GCC_EXTRA_CONFIG=--disable-libunwind-exceptions
> export GCC_EXTRAG_CONFIG
> GCC_LANGUAGES=c,c++
> export GCC_LANGUAGES
> 
> GLIBC_ADDON_OPTIONS=nptl,../glibc-2.4/ports,
> export GLIBC_ADDON_OPTIONS
> GLIBC_DIR=glibc-2.4
> export GLIBC_DIR
> GLIBC_EXTRA_CONFIG="--with-tls --with-__thread --enable-kernel=2.6.4 /
> --with-abi=aapcs-linux"
> 
> export GLIBC_EXTRA_CONFIG
> KERNELCONFIG=$HOME/EPFL/diplome_ASL/toolchain/crosstool-0.42/armeabi.config
> export KERNELCONFIG
> LINUX_DIR=linux-2.6.17.1
> export LINUX_DIR
> 
> PREFIX=/opt/crosstool/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi
> export PREFIX
> SHARED_MODE=--enable-shared
> export SHARED_MODE
> 
> SRC_DIR=$HOME/downloads
> export SRC_DIR
> TARBALLS_DIR=/home/valentin/downloads
> export TARBALLS_DIR
> 
> TARGET=arm-none-linux-gnueabi
> export TARGET
> TARGET_CFLAGS=-O
> export TARGET_CFLAGS
> 
> TOP_DIR=$HOME/EPFL/diplome_ASL/toolchain/crosstool-0.42
> export TOP_DIR
> 
> sh all.sh --notest
> 

But when I run this script, I finish in a state where I have an infinite
loop on the glibc configure script:

...
> + libc_cv_ppc_machine=yes
> + CC=gcc
> + /home/valentin/downloads/glibc-2.4/configure --prefix=/usr --build=i686-pc-linux-gnu --host=arm-none-linux-gnueabi --without-cvs --disable-sanity-checks --with-headers=/opt/crosstool/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/include --enable-hacker-mode
> checking build system type... i686-pc-linux-gnu
> checking host system type... arm-none-linux-gnueabi
> configure: running configure fragment for add-on glibc-2.4
> checking build system type... (cached) i686-pc-linux-gnu
> checking host system type... (cached) arm-none-linux-gnueabi
> configure: running configure fragment for add-on glibc-2.4
> checking build system type... (cached) i686-pc-linux-gnu
> checking host system type... (cached) arm-none-linux-gnueabi
> configure: running configure fragment for add-on glibc-2.4
> checking build system type... (cached) i686-pc-linux-gnu
> checking host system type... (cached) arm-none-linux-gnueabi
> configure: running configure fragment for add-on glibc-2.4
> checking build system type... (cached) i686-pc-linux-gnu
> checking host system type... (cached) arm-none-linux-gnueabi
> configure: running configure fragment for add-on glibc-2.4
...

This is from what I've seen caused by the
GLIBC_ADDON_OPTIONS=nptl,../glibc-2.4/ports, that I've changed and event
commented out, but it doesn't change anything
. Anyone has an idea ?

Now seeing that Mike Frysinger is browsing this list and I'm using
gentoo, I've thought about using crossdev to build this toolchain. Here
is what I've launched (still waiting, my laptop is slow):

> lsa1pc7 ~ # crossdev -t arm-none-linux-gnueabi
> --------------------------------------------------------------------------------
>  * Host Portage ARCH:     x86
>  * Target Portage ARCH:   arm
>  * Target System:         arm-none-linux-gnueabi
>  * Stage:                 4 (C/C++ compiler)
> 
>  * binutils:              binutils-[latest]
>  * gcc:                   gcc-[latest]
>  * headers:               linux-headers-[latest]
>  * libc:                  glibc-[latest]
> 
>  * PORTDIR_OVERLAY:       /usr/local/portage
>  * PORT_LOGDIR:           /var/log/portage
>  * PKGDIR:                /usr/portage/packages/cross/arm-none-linux-gnueabi
>  * PORTAGE_TMPDIR:        /var/tmp/cross/arm-none-linux-gnueabi

What should I do to use crossdev to be with a gcc whose options look
like the one given by Freescale which looks like this ?

> [crosstool-0.42]> /opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc -v
> Using built-in specs.
> Target: arm-none-linux-gnueabi
> Configured with: /usr/src/redhat/BUILD/crosstool/source/gcc-4.1.1/configure --target=arm-none-linux-gnueabi --host=i686-host_pc-linux-gnu --prefix=/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi --disable-libunwind-exceptions --with-headers=/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/include --with-local-prefix=/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
> Thread model: posix
> gcc version 4.1.1

Thank you for helping me, regards,

Valentin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFD91lCGmesagzEtoRAgMXAJ4wVuz/e8G4zNmEyV7FgIqVxUefbgCgu0hY
jaSMV9wizzEmVs4dTJ11yZQ=
=SoP7
-----END PGP SIGNATURE-----

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list