Compiling front end for ARM target

I am trying to compile llvm-gcc for an ARm target. I usine the following
configure options:

/home/tony/llvm/llvm-gcc/configure
--prefix=/home/tony/llvm/llvm-gcc-install/ --program-prefix=llvm-arm-
--enable-llvm=/home/tony/llvm/llvm-install/ --enable-pic --disable-bootstrap
--target=arm-none-linux-gnueabi --enable-languages=c,c++

Then I try to make:

make ENABLE_PROFILING=1 ENABLE_OPTIMIZED=1

However I encounter a no such file error for crti.o when linking. crti.o
exists in /usr/lib/ and /usr/lib64/ as well as
/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/lib/ which
is in my path.

Anybody know how to solve this? Or have better instructions on how to build
llvm on x86_64 for an ARM target?

I am trying to compile llvm-gcc for an ARm target. I usine the following
configure options:

/home/tony/llvm/llvm-gcc/configure
--prefix=/home/tony/llvm/llvm-gcc-install/ --program-prefix=llvm-arm-
--enable-llvm=/home/tony/llvm/llvm-install/ --enable-pic --disable-bootstrap
--target=arm-none-linux-gnueabi --enable-languages=c,c++

Then I try to make:

make ENABLE_PROFILING=1 ENABLE_OPTIMIZED=1

However I encounter a no such file error for crti.o when linking. crti.o
exists in /usr/lib/ and /usr/lib64/ as well as
/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/lib/ which
is in my path.

What's it linking when it fails? If it's the libgcc files, then the cross-compiler just build is having trouble locating the runtime libraries for your ARM target. You may need to specify --with-sysroot to the compiler configure to tell it where to find them.

-Jim

Yes it does occur when linking the libgcc files. I tried configuring with

--with-build-sysroot=/home/tony/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/

But now I get a slew of other errors related to libiberty/regex.c and I
don't even know if it solved my original problem or it died before it gets
to that point.

Jim Grosbach wrote: