native compiler glibc: make install DESTDIR=xyz?

David Wuertele dave-gnus@bfnet.com
Wed Apr 26 22:00:00 GMT 2006


I'm working on a native compiler for my embedded mipsel system.  My
crosstool-0.42 based cross-compiler is working nicely.  I'm a little
confused about how I should cross-compile glibc for my native
toolchain.

For binutils and gcc, I did something like this:

  # target-native binutils
  tar xvzf binutils-2.16.1.tar.gz
  mkdir build-binutils
  cd build-binutils
  PATH=/path/to/gcc-3.3.3-glibc-2.3.2/mipsel-dave-linux-gnu/bin:$PATH ../binutils-2.16.1/configure --build=i386-linux --target=mipsel-dave-linux-gnu --host=mipsel-dave-linux-gnu --prefix=/usr
  PATH=/path/to/gcc-3.3.3-glibc-2.3.2/mipsel-dave-linux-gnu/bin:$PATH make
  PATH=/path/to/gcc-3.3.3-glibc-2.3.2/mipsel-dave-linux-gnu/bin:$PATH make install DESTDIR=/path/to/my/target/root

  # target-native gcc
  tar xvzf gcc-3.3.3.tar.gz
  mkdir build-gcc
  cd build-gcc
  PATH=/path/to/gcc-3.3.3-glibc-2.3.2/mipsel-dave-linux-gnu/bin:$PATH ../gcc-3.3.3/configure --build=i386-linux --target=mipsel-dave-linux-gnu --host=mipsel-dave-linux-gnu --prefix=/usr
  PATH=/path/to/gcc-3.3.3-glibc-2.3.2/mipsel-dave-linux-gnu/bin:$PATH make
  PATH=/path/to/gcc-3.3.3-glibc-2.3.2/mipsel-dave-linux-gnu/bin:$PATH make install DESTDIR=/path/to/my/target/root

I tried the same for glibc, but "make install" doesn't seem to
understand "DESTDIR=xyz".  If I configure with
"--prefix=/path/to/my/target/root", "make install" will install it
into the right place.  But when my target boots and
/path/to/my/target/root/usr is now /usr, will glibc (or gcc) get
confused?

Is there a way to create a target-native toolchain without rebuilding
glibc?  That is, can I copy it from my crosstool build of glibc?

Thanks,
Dave


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



More information about the crossgcc mailing list