[darwinbuild-dev] -arch ppc
William Siegrist
wsiegrist at apple.com
Fri Aug 1 09:12:05 PDT 2008
On Aug 1, 2008, at 4:43 AM, Charles Darwin wrote:
>
> On 1-Aug-08, at 12:35 AM, William Siegrist wrote:
>
>> On Jul 31, 2008, at 6:50 PM, Charles Darwin wrote:
>>
>>> How do I build for ppc only?
>>>
>>
>> The overall idea is to set the RC_ARCHS environment variable. But
>> you cant just export it, because its specified in the build plists.
>> So here's 2 ways to do it:
>>
>> 1. The maintainable/proper way.... Make a new plist that has an
>> environment key and a RC_ARCHS value. See 9A581.plist for an
>> example of the environment variables. You only need to specify what
>> you need to override, so you dont need keys for projects, macosx,
>> darwin, whatever. You should just need the build, inherits, and
>> environment keys. Use "darwinxref loadIndex path/to/new.plist" to
>> load it. Use "darwinbuild -build=<build> <project>" to build. You
>> can see the value of RC_ARCHS scroll by during the build process.
>
> I am going with this one.
> Did this first:
> $ curl -O http://svn.macosforge.org/repository/darwinbuild/trunk/plists/9A581.plist
>
> Changed this line:
> RC_ARCHS=ppc # at the top (`grep i386 9A581.plist' returns 132
> results though but I pretend not to see, or should I? My
> understanding is that's why we are doing it this way and not the
> quick/dirty way(?))
>
> <http://svn.macosforge.org/repository/darwinbuild/trunk/README> says
> something about RC_ppc but I can't find it.
>
> I found some other interesting stuff here too:
> What would happen if I removed individual projects from 9A581.plist?
> Can I finally get rid of AppleTalk and Chess? How about AppleRAID?
> (and where is bluetooth?)
>
> What if I changed source_sites from
> http://src.macosforge.org/Projects/
> to
> http://www.opensource.apple.com/darwinsource/Current/
> Would then darwinbuild do what it's supposed to do but build from
> Current source? How about binary_sites?
You dont need to get the plist manually. Try the following in a new
directory:
$ darwinbuild -init 9A581 # this makes some directories and
downloads the plists
$ ls .build # you should see a plist
and the database here
Then create a file at .build/ppc_only.plist (dont forget the leading
period) and put this in it:
// !$*UTF8*$!
{
build = ppc_only;
darwin = "Darwin 9.0";
inherits = 9A581;
environment = {
INSTALLED_PRODUCT_ASIDES = YES;
MACOSX_DEPLOYMENT_TARGET = 10.5;
NEXT_ROOT = "";
RC_ARCHS = "ppc";
RC_JASPER = YES;
RC_NONARCH_CFLAGS = "-pipe -no-cpp-precomp";
RC_OS = macos;
RC_PRIVATE = /private;
RC_RELEASE = Leopard;
RC_XBS = YES;
SEPARATE_STRIP = YES;
UNAME_RELEASE = 9.0;
UNAME_SYSNAME = Darwin;
};
macosx = "Mac OS X 10.5.0";
}
Then load the plist and build stuff....
$ darwinxref loadIndex .build/ppc_only.plist # populates db
with your custom build
$ darwinbuild -build=ppc_only grep # builds
grep for ppc only, for example
You can make your plist inherit from whatever build you want. For
example, lets say you want to build 9E17 projects with only ppc . And
lets say you want to build zlib, and that specifies 4 architectures
normally (see .build/5A581.plist), you would have a plist like this to
override that:
// !$*UTF8*$!
{
build = ppc_only;
darwin = "Darwin 9.4";
inherits = 9E17;
environment = {
INSTALLED_PRODUCT_ASIDES = YES;
MACOSX_DEPLOYMENT_TARGET = 10.5;
NEXT_ROOT = "";
RC_ARCHS = "ppc";
RC_JASPER = YES;
RC_NONARCH_CFLAGS = "-pipe -no-cpp-precomp";
RC_OS = macos;
RC_PRIVATE = /private;
RC_RELEASE = Leopard;
RC_XBS = YES;
SEPARATE_STRIP = YES;
UNAME_RELEASE = 9.0;
UNAME_SYSNAME = Darwin;
};
macosx = "Mac OS X 10.5.4";
projects = {
zlib = {
environment = {
RC_ARCHS = "ppc";
};
};
};
}
Remember to reload your plist if you make changes to it with the
loadIndex command above. The RC_ppc variable is set automatically
based on RC_ARCHS, so you shouldnt have to worry about it. As for
src.macosforge.org versus opensource.apple.com, I run both servers and
put the source on both at the same time. If something is missing, let
me know since its probably just an error on my part. The binary_sites
URL is used for downloading Roots and BinaryDrivers. If you have a
specially built root hosted somewhere, you could use those keys to
"darwinbuild -load <project>" and populate your build tree with your
root.
-Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2421 bytes
Desc: not available
Url : http://lists.macosforge.org/pipermail/darwinbuild-dev/attachments/20080801/22aed32b/attachment.bin
More information about the darwinbuild-dev
mailing list