Google
  Web www.spinics.net

Re: generating 32-bit RPM's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Joshua Jensen <joshua@xxxxxxxx> writes:
> On Fri, Sep 09, 2005 at 11:52:20AM -0500, Jonathan Berry wrote:
>> 
>> I don't know about the "almost no RPMs do."  Almost all RPMs are built
>> for multiple architectures.
>
> You don't need multiple %ifarch statements to build a package for both 
> arches... so long as you are building them *natively on those 
> platforms*.  You need nothing special to get gcc to assume 64bits on a 
> 64 bit platform. You need lots of special considerations though to 
> recompile for a platform that *isn't* native.  I've worked with a ton of 
> packages (even recompiled every single RPM in RHEL3), and besides 
> openssl, the kernel, and the glibc packages, there is nothing there to 
> support --target.
>
>> > have to have a *cross compiler* installed on your x86_64 platform.  I
>> > don't know that -m32 does all that you need.
>> 
>> But, 32-bit and 64-bit are both x86.  It's not like he's trying to
>> compile for SPARC or PowerPC here, which *would* need a
>> cross-compiler.  See below.
>
> No they aren't.  A 32 bit binary is very very different than a 64bit 
> one.  Sure, the machine code from IA32 looks more similar to x86-64 code 
> than say 64bit PPC, but it isn't the same and they should be considered 
> completely seperate archs.

[ Sorry for the late reply.  I was off camping for a few days. -wsr ]

I see now I wasn't very clear in my question.  Sorry about that.

I am writing my own simple helloworld.spcc file and trying to build a
helloworld-0.1-1.i386.rpm and helloworld-0.1-1.x86_64.rpm RPM for both
architectures while running on a machine with x86_64 installed.

I was hoping that "rpmbuild --target i386" would take care of all the
"behind the scenes" work of throwing the right compiler and linker
switches and modifying whatever else needed a bit of tweaking.  I am
getting the impression that it isn't that simple and I need to throw
all those switches myself from inside the *.spec file.  I guess I need
to look at openssl and glibc to see what they do.  Is there a better
rpm spec file to use as a model?

-wolfgang
-- 
Wolfgang S. Rupprecht                http://www.wsrcc.com/wolfgang/


-- 

amd64-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/amd64-list

[Search]     [Home]     [Kernel List]     [Linux ia64]     [Linux X86_64]     [Red Hat Install]     [Red Hat Migration]     [Red Hat Development]     [Red Hat 9 Bible]     [Red Hat 9 Mailing List]     [Fedora Legacy]     [Yosemite News]