LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Glibc cross compile for ARM fails (https://www.linuxquestions.org/questions/linux-newbie-8/glibc-cross-compile-for-arm-fails-925352/)

alirezan1 01-23-2012 07:19 PM

Glibc cross compile for ARM fails
 
Hello

I am trying to build my toolchain for ARM on my CentOS 6 64bit and I'm having issue compiling glibc.

Here is the instructions I'm following to build my toolchain:
http://frank.harvard.edu/~coldwell/toolchain/

I am trying to build:
Kernel: linux-2.6.25
glibc-2.14
binutils-2.22
gcc-core-4.6.2

When I get to stage 4 (glibc headers) and I try to do "configure" I get the following:

Quote:

# ../../glibc-2.14/configure --prefix=/usr --host=${TARGET} --enable-add-ons=linuxthreads --with-headers=${SYSROOT}/usr/include 2>&1 | tee configure.outconfigure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for arm-unknown-linux-gnu-gcc... no
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for arm-unknown-linux-gnu-g++... no
checking for arm-unknown-linux-gnu-c++... no
checking for arm-unknown-linux-gnu-gpp... no
checking for arm-unknown-linux-gnu-aCC... no
checking for arm-unknown-linux-gnu-CC... no
checking for arm-unknown-linux-gnu-cxx... no
checking for arm-unknown-linux-gnu-cc++... no
checking for arm-unknown-linux-gnu-cl.exe... no
checking for arm-unknown-linux-gnu-FCC... no
checking for arm-unknown-linux-gnu-KCC... no
checking for arm-unknown-linux-gnu-RCC... no
checking for arm-unknown-linux-gnu-xlC_r... no
checking for arm-unknown-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: running configure fragment for add-on linuxthreads
configure: error: fragment must set $libc_add_on_canonical
it says arm-unknown-linux-.. wasn't found...and at the end it barfs and quits the process.
I am not sure but I don't have the glibc-linuxthreads package. Because there's none for glibc-2.14.

Anybody can help me figure this thing out please?

Thanks

eeekster 01-23-2012 07:44 PM

Have you tried it without the "--enable-add-ons=linuxthreads" argument?

alirezan1 01-24-2012 12:06 PM

Quote:

Originally Posted by eeekster (Post 4582641)
Have you tried it without the "--enable-add-ons=linuxthreads" argument?

Here's what I get without that argument:

Quote:

# ../../glibc-2.14/configure --prefix=/usr --host=${TARGET} --with-headers=${SYSROOT}/usr/include 2>&1 | tee configure.out
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for arm-unknown-linux-gnu-gcc... no
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for arm-unknown-linux-gnu-g++... no
checking for arm-unknown-linux-gnu-c++... no
checking for arm-unknown-linux-gnu-gpp... no
checking for arm-unknown-linux-gnu-aCC... no
checking for arm-unknown-linux-gnu-CC... no
checking for arm-unknown-linux-gnu-cxx... no
checking for arm-unknown-linux-gnu-cc++... no
checking for arm-unknown-linux-gnu-cl.exe... no
checking for arm-unknown-linux-gnu-FCC... no
checking for arm-unknown-linux-gnu-KCC... no
checking for arm-unknown-linux-gnu-RCC... no
checking for arm-unknown-linux-gnu-xlC_r... no
checking for arm-unknown-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: running configure fragment for add-on libidn
configure: running configure fragment for add-on linuxthreads
linuxthreads disabled because nptl add-on is also in use
configure: running configure fragment for add-on nptl
checking for assembler gnu_indirect_function symbol type support... yes
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for assembler .type directive prefix... @
checking sysdep dirs... configure: error: The arm is not supported.

eeekster 01-24-2012 03:19 PM

Quote:

checking for arm-unknown-linux-gnu-gcc... no
Looks like it didn't find a cross compiler.

knudfl 01-25-2012 04:02 AM

The recommended cross compiler is "crosstool-ng" http://crosstool-ng.org/
... which is also the best maintained tool. Last update = 23 Jan 2012.


! Cross compilation cannot be done without a dedicated cross compiler !
And : Please do not try to build a cross compiler yourself.


Note : Please use the "Report button" to ask for your "Arm threads"
to be moved to the 'Embedded Forum'
http://www.linuxquestions.org/questi...x-embedded-78/
That's the right place for getting answers from the arm experts.

.


All times are GMT -5. The time now is 07:09 AM.