Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Configure and multiple OS X archs




On 21-Dec-07, at 18:32 , Daniel J. Luke wrote:

On Dec 21, 2007, at 6:27 PM, Andre-John Mas wrote:
I am trying to modify a configure script so that it supports generating
of a universal binary (PPC & ix86). What I want to do is ensure that
a universal binary is created, when the necessary SDK is available
and the user had not explicitly stated they don't want a universal
binary. Does this look right:


#fix_mac_groups
#fix_parameters $JPATH/lib/javax.comm.properties
if test "x$enable_universal" != xno; then
if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then
echo "library os.arch... universal (i386 ppc)"
CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk - arch i386 -arch ppc"
LDFLAGS="-arch i386 -arch ppc"
else
echo "Warning: no universal SDK, will not build universal"
echo "library os.arch... "${OS_ARCH}
fi
else
echo "User disabled building of universal library"
echo "library os.arch... "${OS_ARCH}
fi

keep in mind that with 10.5 you can have SDKs installed somewhere other than /Developer :(


I have something like this:

AC_PATH_PROG(XCODE_SELECT,xcode-select,no)
if test $XCODE_SELECT = no; then
	SDKPATH="/Developer"
else
	SDKPATH=`$XCODE_SELECT -print-path`
fi
SDK="$SDKPATH/SDKs/MacOSX10.4u.sdk"

You may also want/need --mmacosx-version-min=10.4 added to you cflags

Is this to locate the xcode directory automatically or to have the user specify the location for xcode? Sorry I'm fairly new to configure files, as a developer.



Additionally, will a 32-bit x86 library run on a 64-bit Mac,

yes

or should
I be adding support for x86_64?

you might want to (if you want the enhanced performance from extra registers, or if people might want to link a 64bit application against your library)

I just want to be sure that this won't fail on a PPC based system, when doing a build.


Andre

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Configure and multiple OS X archs (From: Andre-John Mas <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.