Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2001 13:02:05 -0800
From:      Marcel Moolenaar <marcel@cup.hp.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Larry Rosenman <ler@lerctr.org>, qa@FreeBSD.org, marcel@FreeBSD.org
Subject:   Re: cputype=486
Message-ID:  <3AAD394D.49597B93@cup.hp.com>
References:  <XFMail.010312124506.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> 
> On 12-Mar-01 Marcel Moolenaar wrote:
> > John Baldwin wrote:
> >>
> >> It looks like strip is linked against /usr/lib/libc.a.
> >>
> >> Marcel,
> >>
> >> It looks like there may be a bug in buildworld.  It seems that static
> >> binaries
> >> are being linked against /usr/lib/libc.a rather than
> >> /usr/obj/usr/src/i386/lib/libc/libc.a.
> >
> > In what stage?
> 
> The final strip binary that will live in /usr/bin/strip on the target machine.

Which is the one in:

	/usr/obj/usr/src/gnu/usr.bin/binutils/strip

and not the one in:

	/usr/obj/usr/src/i386/usr/src/gnu/usr.bin/binutils/strip

Are we still talking about the same strip(1)?

> > In short: Do not not build on Pentium with -march=pentiumsomething and
> > then later install on non-pentiums!
> 
> Uh, how can cross-builds _possibly_ work then????  If I do a i386 -> alpha
> cross build does the alpha /usr/bin/strip get linked against the i386
> /usr/lib/libc.a on the host machine??

Of course not. The one that's being built as part of the cross-tools is
however.

> Or is libc treated magically by the
> compiler?

No.

> For that matter, what if a static binary uses a new function added
> to libc, how in the world will that link if we all our binaries against the
> old libc during the world?  That's just wrong.

No, that's not wrong. Just think about it for a moment. You need to
build cross tools first. Those must run on the build machine. You
therefore build those exactly as you build anything else: you use the
libraries on that machine. After you have built your cross tools, you
can start building non-native libraries, against which you link the
final non-native binaries.

-- 
Marcel Moolenaar
  mail: marcel@cup.hp.com / marcel@FreeBSD.org
  tel:  (408) 447-4222

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-qa" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AAD394D.49597B93>