Fwd: !(fun) with tls

Niklaus niklaus@gmail.com
Thu Jun 22 16:02:00 GMT 2006


---------- Forwarded message ----------
From: Niklaus <niklaus@gmail.com>
Date: Jun 22, 2006 10:02 PM
Subject: Re: !(fun) with tls
To: NZG <ngustavson@emacinc.com>


no gcc couldn't find libc.
your sysroot directory doesn't have a file label libc.so* and libc.a
in lib or /usr/lib/

For the taget mips-deb-linux my directories look like this. So you
will have to copy them or softlink them.

pro@deb:~/crossenv/mips-deb-linux/lib$ ls
ld-2.3.4.so               libcrypt.so.1    libnss_compat-2.3.4.so
libnss_nisplus.so.2  libstdc++.so.6
ld.so.1                   libdl-2.3.4.so   libnss_compat.so.2
libpcprofile.so      libstdc++.so.6.0.3
ldscripts                 libdl.so.2       libnss_dns-2.3.4.so
libpthread-0.10.so   libsupc++.a
libBrokenLocale-2.3.4.so  libgcc_s.so      libnss_dns.so.2
libpthread.so.0      libsupc++.la
libBrokenLocale.so.1      libgcc_s.so.1    libnss_files-2.3.4.so
libresolv-2.3.4.so   libthread_db-1.0.so
libSegFault.so            libiberty.a      libnss_files.so.2
libresolv.so.2       libthread_db.so.1
libanl-2.3.4.so           libm-2.3.4.so    libnss_hesiod-2.3.4.so
librt-2.3.4.so       libutil-2.3.4.so
libanl.so.1               libm.so.6        libnss_hesiod.so.2
librt.so.1           libutil.so.1
libc-2.3.4.so             libmemusage.so   libnss_nis-2.3.4.so      libstdc++.a
libc.so.6                 libnsl-2.3.4.so  libnss_nis.so.2          libstdc++.la
libcrypt-2.3.4.so         libnsl.so.1      libnss_nisplus-2.3.4.so  libstdc++.so
pro@deb:~/crossenv/mips-deb-linux/lib$ ls libc*
libc-2.3.4.so  libc.so.6  libcrypt-2.3.4.so  libcrypt.so.1
pro@deb:~/crossenv/mips-deb-linux/lib$ cd ..
pro@deb:~/crossenv/mips-deb-linux$ ls
bin  etc  include  lib  sbin  usr
pro@deb:~/crossenv/mips-deb-linux$ cd usr/lib
pro@deb:~/crossenv/mips-deb-linux/usr/lib$ ls
Mcrt1.o  gcrt1.o             libc.a            libdl.so     libnsl.a
       libnss_nis.so           libresolv.so
Scrt1.o  libBrokenLocale.a   libc.so           libg.a       libnsl.so
       libnss_nisplus.so       librt.a
crt1.o   libBrokenLocale.so  libc_nonshared.a  libieee.a
libnss_compat.so  libpthread.a            librt.so
crti.o   libanl.a            libcrypt.a        libm.a
libnss_dns.so     libpthread.so           libthread_db.so
crtn.o   libanl.so           libcrypt.so       libm.so
libnss_files.so   libpthread_nonshared.a  libutil.a
gconv    libbsd-compat.a     libdl.a           libmcheck.a
libnss_hesiod.so  libresolv.a             libutil.so
pro@deb:~/crossenv/mips-deb-linux/usr/lib$


On 6/22/06, NZG <ngustavson@emacinc.com> wrote:
> On Thursday 22 June 2006 10:17 am, Niklaus wrote:
> > export PATH=$prefix/bin:$PATH
> Aha! thx, got past
> > make[2]: i486-linux-ar: Command not found
>
> Now I get the
> /home/nathan/workspace-new/SIB2.0-SDK/gcc-3.3.6-SIB//i486-linux/bin/ld: cannot
> find -lc
>
> error, which I'm guessing is happening because the libc it needs is not in
> SEARCH_DIR .
>
> My thinking was that
> --with-sysroot=$SYSROOT \
> should add SYSROOT to binutils SEARCH_DIR, but it doesn't appear to.
> Is there something else I should be doing?
>
> thx,
> NZG
>
> > 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
> >
> >
>
>

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



More information about the crossgcc mailing list