Re: amd64 questions
- From: "M. Warner Losh" <imp@xxxxxxxxxx>
- Date: Mon, 28 Aug 2006 00:01:30 -0600 (MDT)
In message: <20060826212607.GA82729@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Steve Kargl <sgk@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
: On Sat, Aug 26, 2006 at 03:43:26PM -0400, Mike Meyer wrote:
: > In <20060826192418.GA82155@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Steve Kargl <sgk@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> typed:
: >> On Sat, Aug 26, 2006 at 02:40:24PM -0400, Mike Meyer wrote:
: >>> I'm not sure what you're saying is false - that the compiler can
: >>> generate i386 binaries, or that the rest of the toolchain doesn't do
: >>> the right thing.
: >>> I can build i386 binaries with the system cc. However, if I just
: >>> specify '-m32', it dies during the link because it tries to link with
: >>> amd64 object files. I've managed to get some simple things to build by
: >>> passing the appropriate command line to cc.
: >>> Would rebuilding the compiler with multilibs fix that problem? Or does
: >>> it assume a library structure that isn't in place on FreeBSD?
: >> I believe it is a library structure problem. You need at least
: >> a 32-bit and 64-bit libgcc.so. When you use -m32 the compiler
: >> goes looking for an appropriate libgcc.so and only finds a 64-bit
: >> version.
: >
: > Yup. If you tell it -L/usr/lib32 (which gets installed if you build the
: > world with WITH_LIB32 defined), it'll find that. Then complain because
: > /lib/crt1.o is the 64 bit one. If I use the command line arguments:
: >
: > -m32 -nostartfiles /usr/lib32/crt1.o /usr/lib32/crti.o \
: > /usr/lib32/crtbegin.o /usr/lib32/crtend.o /usr/lib32/crtn.o -L/usr/lib32
: >
: > simple programs build and run properly.
:
: If gcc is built with multilib, it's my understanding that you
: don't need to do all of this commandline mangling.
You also don't need it if you build gcc and binutils with a tools
prefix :-)
Warner
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- References:
- Re: amd64 questions
- From: Steve Kargl
- Re: amd64 questions
- From: Mike Meyer
- Re: amd64 questions
- From: Steve Kargl
- Re: amd64 questions
- Prev by Date: Re: A handy utility (at least for me)
- Next by Date: Re: How to change kernel version tag?
- Previous by thread: Re: amd64 questions
- Next by thread: Re: amd64 questions
- Index(es):
Relevant Pages
|
|