confusion in base regarding [option os.arch] and ${os.arch}

Anders F Björklund afb at macports.org
Thu Oct 8 03:07:49 PDT 2009


Ryan Schmidt wrote:

> On Oct 8, 2009, at 03:41, Joshua Root wrote:
>
>> That's another point; when a port is built universal, the archive  
>> needs
>> to be tagged with the list of universal_archs instead of the  
>> build_arch.
>
> I would tag it with both, just to be on the safe side. A poorly- 
> written configure script could easily build a different universal  
> binary on a PowerPC Mac than it would on an Intel Mac. It doesn't  
> hurt to always record the arch of the machine that did the build,  
> and might at some point prove useful.

It currently builds the universal packages with `rpmbuild --target=fat`.
But that's just a hack anyway (disables arch checking, much like noarch)

     set rpmbuildarch ""
     if {[variant_isset "universal"]} {
         set rpmbuildarch "--target fat"
     }
     if {false} {
         set rpmbuildarch "--target noarch"
     }

It "works" for some trivial -arch ppc -arch i386 builds, but after that
all bets are off. It would be better to build one package for each arch.


As for the archives, it already records the +universal variant in the
name of the archive so I don't think it has to do anything more than  
that.

It would still sort under "ppc" if built on a PowerPC Mac and "i386"
if built on an Intel Mac, so the arch of the build machine *is* kept.

--anders



More information about the macports-dev mailing list