Re: [AD] universal binary of 4.2?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thursday 31 August 2006 3:06 pm, Peter Hull wrote:
> The jargon is that a 'fat' file contains versions for more than one
> architecture (PPC, Intel, PPC 64 bit and Intel 64 bit) You can create
> a fat .o file by specifying more than one -arch flag to gcc or by
> combining two 'thin' .o files using the tool called lipo
> Likewise you can create a library by linking fat object files* or
> combining two thin libraries, and the same for exes.
>
> So one option is to make a little script that builds a ppc version,
> renames it, builds the i386 version, renames that, then combines the
> two with lipo.
>
> Apple have a lot of info on their website, it's well worth a read
> first to get the general idea.
>
> Universal binaries are indeed twice the size, and you need to make
> sure your data loaders are not architecture-dependent or you'll have
> to double up on the data too!
>
> Pete
> * but you should use libtool instead of ar (see man libtool for why)

I hope thats only for mac. As for linux/unix, drop it like a stone. Its a pain 
in the but, and hey, other people are doing it ;) (kde project dropped 
libtool for kde4)

> On 8/31/06, Kirk Black <runesabre@xxxxxxxxxx> wrote:
> > Hi Peter,
> >
> > I eventually want to create a universal binary out of my Mac Allegro
> > game. I've got a networking library and zlib/libpng that will also need
> > converted to a universal binary format.
> >
> > I'm unfamiliar with universal binaries.  I'm still undecided if I should
> > simply build separate PPC and Intel Mac applications and distribute them
> > separately or strive to create a universal binary out of them so I
> > essentially only have one Mac package to maintain.
> >
> > Can any project that already compiles successfully be built as a
> > universal binary with the addition of some cflag options such that I
> > could take all the existing libraries I need to run my application and
> > create my own universal binaries?  Or will I have to track down and wait
> > for ub support in every library I'm using from their maintainers?
> >
> > Are universal binaries twice the size of a regular binary?
> >
> > Kirk Black
> > President / Owner
> > Family Time! Interactive, L.L.C.
> > Mobile: 512.771.5762
> > Email: runesabre@xxxxxxxxxx
> >
> > -----Original Message-----
> > From: alleg-developers-bounces@xxxxxxxxxx
> > [mailto:alleg-developers-bounces@xxxxxxxxxx] On Behalf Of
> > Peter Hull
> > Sent: Thursday, August 31, 2006 5:04 AM
> > To: Coordination of admins/developers of the game programming library
> > Allegro
> > Subject: Re: [AD] universal binary of 4.2?
> >
> > Or in other words can you try adding
> > -isysroot /Developer/SDKs/MacOSX10.4u.sdk  to CFLAGS (makefile.osx line
> > 144) and
> > -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk to LFLAGS
> > (makefile.osx line 145)
> > and see if that works?
> >
> > Thanks
> >
> > Pete
> >
> > On 8/30/06, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> > > You should
> > > ./fix.sh macosx-universal
> > > make
> > > - that works for me but on PPC you might need to define the location
> > > of your Universal SDK
> > > Have a look at this
> > > http://developer.apple.com/technotes/tn2005/tn2137.html
> > >
> > > We might need to add some -isysroot options into the flags
> > >
> > > Pete
> > >
> > > On 8/30/06, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
> > > > How do I go about making a universal dylib( osx ) of 4.2? I see in
> > > > makefile.osx stuff about ifdef UB; CFLAGS += -arch ppc -arch i386;
> > > > but when I define UB I get the following error
> > > >
> > > > gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD  -Wall -Wno-unused
> > > > -Wno-long-double  -O2 -funroll-loops -ffast-math -fomit-frame-pointer
> > > > -fno-common -pipe -dynamic -arch ppc -arch i386 -DALLEGRO_NO_ASM
> > > > -Ilibpng -I. -I./include -o obj/macosx/alleg/allegro.o -c
> > > > src/allegro.c gcc: installation problem, cannot exec
> > > > 'i686-apple-darwin8-gcc-4.0.0': No such file or directory
> > > > lipo: can't figure out the architecture type of:
> > > > /var/tmp//ccbpYPmx.out make: *** [obj/macosx/alleg/allegro.o] Error
> > > > 255
> >
> > -------------------------------------------------------------------------
> >
> > > > Using Tomcat but need to do more? Need to support web services,
> >
> > security?
> >
> > > > Get stuff done quickly with pre-integrated technology to make your
> > > > job
> >
> > easier
> >
> > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >
> > Geronimo
> >
> > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121
> > > >642 --
> > > > https://lists.sourceforge.net/lists/listinfo/alleg-developers
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > --
> > https://lists.sourceforge.net/lists/listinfo/alleg-developers
> >
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > --
> > https://lists.sourceforge.net/lists/listinfo/alleg-developers
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/