[darwinbuild-dev] -arch ppc

William Siegrist wsiegrist at apple.com
Mon Aug 11 12:19:44 PDT 2008


On Aug 1, 2008, at 11:09 AM, Charles Darwin wrote:

>
> On 1-Aug-08, at 12:12 PM, William Siegrist wrote:
>
>>
>> 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";
>> 			};
>> 		};
>> 	};
>> }
>>
>
> I'm using this one. So I copies this part and then:
>
> root# pbpaste > .build/ppc_only.plist
>
> <ppc_only.plist>
>
>
>> 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
>>
>>
>
> root# darwinbuild -build=ppc_only xnu
>>> mv _WKdmDecompress.o ./WKdmDecompress.o
> g++ -nostdlib  -static -r  -arch ppc  -force_cpusubtype_ALL  -o  
> iokit.o ./WKdmCompress.o ./WKdmDecompress.o ./IOHibernateIO.cpo ./ 
> IOHibernateRestoreKernel.o ./IOLib.cpo ./IOLocks.cpo ./ 
> IOConditionLock.cpo ./IOSyncer.cpo ./IOStartIOKit.cpo ./ 
> IODeviceTreeSupport.cpo ./IORegistryEntry.cpo ./IOService.cpo ./ 
> IOServicePM.cpo ./IOPMinformee.cpo ./IOPMinformeeList.cpo ./ 
> IOPMPowerStateQueue.cpo ./IOCatalogue.cpo ./IOPMPowerSource.cpo ./ 
> IOPMPowerSourceList.cpo ./IOWorkLoop.cpo ./IOEventSource.cpo ./ 
> IOInterruptEventSource.cpo ./IOCommandGate.cpo ./IOCommand.cpo ./ 
> IOCommandPool.cpo ./IOCommandQueue.cpo ./IODMAEventSource.cpo ./ 
> IOFilterInterruptEventSource.cpo ./IOTimerEventSource.cpo ./ 
> IOBufferMemoryDescriptor.cpo ./IODMACommand.cpo ./ 
> IODeviceMemory.cpo ./IOInterleavedMemoryDescriptor.cpo ./ 
> IOMapper.cpo ./IOCopyMapper.cpo ./IOMemoryCursor.cpo ./ 
> IOMemoryDescriptor.cpo ./IOMultiMemoryDescriptor.cpo ./ 
> IORangeAllocator.cpo ./IOPlatformExpert.cpo ./IOCPU.cpo ./ 
> IONVRAM.cpo ./IODMAController.cpo ./IOInterruptController.cpo ./ 
> IOUserClient.cpo ./IOKitDebug.cpo ./IODataQueue.cpo ./ 
> IOSharedDataQueue.cpo ./IOStringFuncs.o ./KernelConfigTables.cpo ./ 
> IOKitBSDInit.cpo ./DINetBootHook.cpo ./RootDomainUserClient.cpo ./ 
> IOPowerConnection.cpo ./IOWatchDogTimer.cpo ./IOAsmSupport.o ./ 
> IODBDMA.cpo ./IOSharedLock.o ./IONVRAMController.cpo ./ 
> AppleNVRAM.cpo ./ApplePlatformExpert.cpo ./AppleCPU.cpo ./ 
> IOPMrootDomain.cpo ./AppleMacIO.cpo ./AppleNMI.cpo
> g++: Internal error: Bus error (program ld)
> Please submit a full bug report.
> See <URL:http://developer.apple.com/bugreporter> for instructions.
> make[6]: *** [iokit.o] Error 1
> make[5]: *** [build_all] Error 2
> make[4]: *** [do_all] Error 2
> make[3]: *** [build_all] Error 2
> make[2]: *** [build_all] Error 2
> make[1]: *** [build_all] Error 2
> make: *** [all] Error 2
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
> +++++++++++
> BUILD TIME: 0h 12m 44s
> EXIT STATUS: 2
>
>
> Your thoughts please.
>


Building 9E17's xnu with your ppc_only plist on a 9E17 PPC host works  
for me. What hardware and OS version are you trying to build on?

-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/20080811/57e591ef/attachment.bin 


More information about the darwinbuild-dev mailing list