Re: amd64 questions



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"



Relevant Pages

  • Re: Quo vadis, -CURRENT? (recent changes to cc & compatibility)
    ... > Steve Kargl wrote: ... And the cvs tag can and has in the past been slid forward or ... mkdir gcc ...
    (freebsd-current)
  • Re: [RFC] Removal of Fortran from the base system
    ... :Steve Kargl wrote: ... :> In a recent email to freebsd-current, ... :> Alexander Kabaev stated that the import of GCC 4.1.1 is coming soon. ... :> I propose that Fortran support in the base system be removed ...
    (freebsd-current)
  • Re: "make buildkernel" busted
    ... On Wed, 23 May 2007, Steve Kargl wrote: ... The new version of gcc accepts different flags than the old one, so you'll need to either do a full buildworld, or just kernel-buildchain in oder to do a buildkernel. ... University of Cambridge ...
    (freebsd-current)
  • Re: [RFC] Removal of Fortran from the base system
    ... :Steve Kargl wrote: ... :> In a recent email to freebsd-current, ... :> Alexander Kabaev stated that the import of GCC 4.1.1 is coming soon. ... :> I propose that Fortran support in the base system be removed ...
    (freebsd-current)
  • Re: Lets use gcc-4.2, not 4.1 -- OpenMP
    ... Steve Kargl wrote: ... into thinking that the FSF will support GCC 4.2 a day after they release ... You can search the gcc mail listings for extensive comparison ...
    (freebsd-current)