!(fun) with tls
NZG
ngustavson@emacinc.com
Thu Jun 22 15:13:00 GMT 2006
WHAT I'M DOING:
I'm building binutils into a local directory, like crosstool does but
bypassing building glibc and using sysroot to link to a pre-created one.
WHY I"M DOING IT:
I'm doing this to create a cross compiler for
target=Debian stable i486
host=Debian testing i686
Debian uses a patched glibc that doesn't appear to build well without using
the Debian packaging system on the actual target itself(which defeats the
purpose of the cross compiler) :
WHATS FAILING:
binutils can't find ar, seems like a simple enough newbie problem but I can't
find any documentation for it.
HOW I"M GOING ABOUT IT:
#!/bin/sh
SYSROOT=$HOME/workspace-new/SIB2.0-SDK/sysroot/
PREFIX=$HOME/workspace-new/SIB2.0-SDK/gcc-3.3.6-SIB/
mkdir -p binutils-2.15
cd binutils-2.15
../../binutils-2.15/configure \
--host=i686-linux \
--target=i486-linux \
--with-sysroot=$SYSROOT \
--prefix=$PREFIX \
--with-local-prefix=$SYSROOT \
--enable-languages=c,c++,objc \
--enable-shared \
--enable-_cxz_atexit \
--with-system-zlib \
--enable-nls \
--without-included-gettext \
--enable-clocal=gnu \
--enable-debug
make all
make install
I'm then building gcc into the same directory with the same flags.
It builds but then complains that ld can't find the correct ar.
make[2]: i486-linux-ar: Command not found
make[2]: *** [libgcc.a] Error 127
i486-linux-ar does exist in
$(PREFIX)/bin/i486-linux-ar
The linker scripts don't seem to know this for some reason though:
grep -r SEARCH_DIR .
./elf_i386.x:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
./elf_i386.xbn:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
./elf_i386.xc:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
./elf_i386.xd:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
./elf_i386.xdc:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
./elf_i386.xn:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
./elf_i386.xs:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
./elf_i386.xsc:SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
Am I missing some vital step or flag?
thx,
NZG
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list