This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Error cross-compiling for ARM under x86 - x86 crti.o in ARM directory


I know I must be doing something stupid, but...:

I am trying to cross-compile binutils, gcc, and glibc for
TARGET=arm-linux-gnueabi and HOST=i686-linux-gnu. For some reason, when I
build glibc, it is putting an x86 crti.o into the ARM library directory,
which then makes things blow up when I do the second stage GCC compile.

I am using the following commands to build things:

---------
export PREFIX=/USER/tools/i686-linux-gnu/
export TARGET=arm-linux-gnueabi
export ROOTDIR_PREFIX=${PREFIX}/${TARGET}
export BUILD_PREFIX=/USER/src/arm-linux-gnueabi/build
export BASE_DIR=/USER/src/arm-linux-gnueabi/
cd $BASE_DIR
GCC=gcc-4.3.2
BINUTILS=binutils-2.19
GLIBC=glibc-2.7
HOST=i686-linux-gnu
rm -rf build
mkdir -p build/binutils
cd build/binutils
${BASE_DIR}/${BINUTILS}/configure --target=${TARGET} --host=${HOST}
--prefix=${PREFIX} --disable-nls
make all install || exit 1
export PATH=${PREFIX}/bin:${PATH}
cd $BASE_DIR
mkdir -p build/gcc
cd build/gcc
${BASE_DIR}/${GCC}/configure \
         --target=${TARGET} --host=${HOST} --prefix=${PREFIX} \
         --with-gnu-as --with-gnu-ld \
         --disable-multilib --disable-nls \
         --enable-threads=no \
         --enable-symvers=gnu --enable-__cxa_atexit \
         --disable-shared --enable-languages=c || exit 1
make all-gcc install-gcc || exit 1

mkdir -p build/glibc
cd build/glibc
${BASE_DIR}/${GLIBC}/configure \
         --target=${TARGET} --host=i686-linux-gnu
--prefix=${ROOTDIR_PREFIX}  || exit 2
make all install || exit 3
---------

At this point, the erroneous crti.o is in place.

OK, so, what compile-time flag or other trick am I missing here? - I've
not been able to find a good example online of what to do to get where I
want to be.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]