AW: Building RPMs for i386

Carsten Boehlke cb at bo-mc.de
Fri Dec 31 12:54:48 UTC 2004


It is the same wether I use "--define 'RPM_OPT_FLAGS=-O2 -g -m32' --target
i386" or "CC="gcc -m32" rpmbuild ..." 
In both cases I get errors:

C compiler cannot create executables
or
cc1: CPU you selected does not support x86-64 instruction set

Does I use a wrong compiler? What was my mistake???

Carsten.




> -----Ursprüngliche Nachricht-----
> Von: Joshua Jensen [mailto:joshua at iwsp.com] 
> Gesendet: Freitag, 31. Dezember 2004 06:07
> An: Carsten Boehlke
> Cc: amd64-list at redhat.com
> Betreff: Re: Building RPMs for i386
> 
> I've been able to add -m32 to my compiles by using this:
> 
> --define 'RPM_OPT_FLAGS=-O2 -g -m32' --target i386
> 
> But beware, the binary size is often incorrect when compared 
> to "natively" compiled 32bit binaries.  Not sure why really.
> 
> Joshua
> 
> 
> 
> On Thu, Dec 30, 2004 at 04:11:25PM +0100, Carsten Boehlke wrote:
> > Hm... It works for some RPMs but not for all.
> > Is it generally possible to build i386 RPMs on a amd64 machine?
> > 
> > Carsten.
> > 
> > 
> > 
> > > On Thu, 2004-12-30 at 14:38 +0100, Carsten Boehlke wrote:
> > >> Hi.
> > >>
> > >> I've tried your tip "rpmbuild --ba vsftpd.spec --target=i386"
> > >>
> > >> but I get this error:
> > >>
> > >> "cc1: CPU you selected does not support x86-64 instruction set"
> > >>
> > >> What is my mistake?
> > >
> > > if the rpm in question doesn't use the RPM CFLAGS but 
> invents it's 
> > > own, then it misses the -m32 compiler option needed.
> > > you might be able to do
> > > CC="gcc -m32" rpmbuild .....
> > >
> > > but at that point it's pure luck
> > >
> > 
> > --
> > amd64-list mailing list
> > amd64-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/amd64-list
> 
> --
> Joshua Jensen
> joshua at iwsp.com
> "If God didn't want us to eat animals, why did he make them 
> out of meat?"
> 





More information about the amd64-list mailing list