Re: [xml] Apple/Darwin Multiple Architecture OS-X
- From: "Eric S. Eberhard" <flash vicspdi com>
- To: Bjorn Reese <breese mail1 stofanet dk>, xml gnome org
- Cc:
- Subject: Re: [xml] Apple/Darwin Multiple Architecture OS-X
- Date: Thu, 11 Aug 2005 19:42:44 -0700
For those that care I did find a solution ...
I slightly modified the Makefile to allow an architecture to be
set. I then made a script to set the environment to "-arch i386" and
compil and copy the .a to another name, then compil again using
"-arch ppc" and copy the .a to another name, then use lipo and ranlib
to put it all back together. Works great -- script is:
rm
.libs_i386/*
rm
.libs_ppc/*
rm
.libs/*
(export ARCH=i386 ; make clean ;
make)
mv .libs/*
.libs_i386
(export ARCH=ppc ; make clean ;
make)
mv .libs/*
.libs_ppc
cp .libs_i386/libxml2.a
.libs/i386.a
cp .libs_ppc/libxml2.a
.libs/ppc.a
(cd .libs ; lipo i386.a ppc.a -create -output ese.a ; ranlib ese.a ;
libtool ese.a -o libxml2.a)
and change to Makefile is one line -- add ARCH to CFLAGS for example:
CFLAGS = -arch $(ARCH) -O2 -Wall
It does seem to work on both platforms with my application just
find. I also had to add "-dead_strip" to LDFLAGS for example:
libxml2_la_LDFLAGS = -dead_strip -version-info 7:11:5
This flag keeps unused name references from causing trouble.
It would seem appropriate to have configure somehow handle this but I
don't really know how to do this. Any volunteers?
At 08:29 AM 8/10/2005, Bjorn Reese wrote:
Eric S. Eberhard wrote:
And I get the following error when trying to link:
gcc: -E, -S, -save-temps and -M options are not allowed with
multiple -arch flags
This would seem simple enough ... remove those flags. Yet they are
not in my compil/link! See the actual gcc line it is using:
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include
-D_REENTRANT -g -O2 -Wall -arch i386 -arch ppc -c SAX.c -MT SAX.lo
-MD -MP -MF .deps/SAX.TPlo -fno-common -DPIC -o .libs/SAX.lo
I would venture to guess that the compiler is complaining about the -MT,
-MD, -MP, and -MF options (which it regards as members of the -M
family as they all are used to build dependencies).
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
Eric S. Eberhard
(928) 567-3727 Voice
(928) 567-6122 Fax
(800) 569-1122 Denver Office (I am never there, you can
leave a message)
928-301-7537 -- you may call any time day or night, I turn it off
when I sleep :-) Please try to use a land line first (reception often poor).
http://www.vicspdi.com
Completely updated web site of personal pictures with many new
pictures! Includes horses, dogs, Corvairs, and more.
http://www.vicspdi.com/ourpics/index.html
NEW Corvair pictures including the Judson setup on our 62 Sedan and
lots of pictures of Cheryl's 62 Monza Wagon (with Kelsey-Hayes wire wheels).
http://www.vicspdi.com/ourpics/corvairs.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]