Subject: glibc again

From: Guido Guenther <[email-masked]>
Date: Sat, 9 Sep 2000 00:07:36 +0200

Hi,
with latest cvs I've been able to crossbuild glibc. When trying 
to crosscompile programs against it I ended up with
lots of unresolved symbols. This all changed when I edited
/usr/local/mips-linux/lib/libc.so from 
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a ) to 
GROUP ( libc.so.6 libc_nonshared.a )
Should I consider this a bug in a) my "setup", b) glibc c) to be
intended behavior?
Regards,
 -- Guido

---

From: Keith M Wesolowski <[email-masked]>
Date: Fri, 8 Sep 2000 19:16:12 -0700

> Should I consider this a bug in a) my "setup", b) glibc c) to be

I'm astonished it only complained about unresolved symbols. If you
leave it as is, it tries to link in your build system's libraries. I
always replace the two with full paths to the mips libraries. I'm
fairly sure this is also in my cross-build faq.

>From make-cross.sh:

        # *sigh* This is the fun part. We need to fix up libc.so so that
        # it points to files in our filesystem, not the mythical /usr dirs
        # we would have if this were native.
        echo "Fixing up libc.so locations"
        sed -e s%/lib/libc.so.6%"${_destdir}/$TARGET/lib/libc.so.6"%g \
            -e s%/usr/lib/%"${_destdir}/$TARGET/lib/"%g \
          < "${_destdir}/$TARGET/lib/libc.so" \
          > "${_destdir}/$TARGET/lib/.new.libc.so" || exit 1
        mv -f "${_destdir}/$TARGET/lib/.new.libc.so" \
          "${_destdir}/$TARGET/lib/libc.so" || exit 1

Finding a nicer way is left as an exercise...

-- 
Keith M Wesolowski			[email-masked]
University of Nevada			http://www.chem.unr.edu
Chemistry Department Systems and Network Administrator

---

From: Guido Guenther <[email-masked]>
Date: Sat, 9 Sep 2000 13:02:19 +0200

> fairly sure this is also in my cross-build faq.
Acutally it really first tried to link in the glibc in /lib, which I
overrided with LDFLAGS=-L/u/l/mips-linux/...
I couldn't find anything about it in the cross-mips faq. But IMHO it
would be worth a note(maybe also in the mips-howto?).
Regards,
 -- Guido 

-- 
GPG-Public Key: finger [email-masked]

---

From: Ralf Baechle <[email-masked]>
Date: Mon, 11 Sep 2000 19:34:02 +0200

> would be worth a note(maybe also in the mips-howto?).

If the crosscompiler ever tries to link in something from /lib, /usr/lib
or other directories with native binaries then either the compiler
was missconfigured when built or the makefiles pass bogus -L arguments.

  Ralf