Re: Release build fails
Re: Release build fails
- Subject: Re: Release build fails
- From: Michael McLaughlin <email@hidden>
- Date: Wed, 10 Oct 2007 08:24:51 -0400
- Thread-topic: Release build fails
1. I built the library in Xcode (Altivec optimizations on), starting with
the supplied static lib template.
2. I built a test project in Xcode (Altivec optimizations on) and in CW
(Mach-O + Altivec optons + SIOUX), both using the library built in Xcode.
3. The CW app executed in 14 seconds; the Xcode app (standard tool) took 59
seconds when run from Terminal.
I have *no idea* why this should be. The essential code is in the library.
The test is just a big calling loop. The answer came out the same in both
cases so, presumably, the library was OK in CW.
I think this is probably worth pursuing so I'll do some investigating.
There must be something amiss somewhere. It's hard to believe that there
could be that much difference.
On 10/10/07 5:45 AM, "Kyle Sluder" <email@hidden> wrote:
> You mean the library you built with CodeWarrior executed faster? Did
> you remember to turn on optimizations in Xcode?
>
> --Kyle Sluder
>
> On 10/9/07, Michael McLaughlin <email@hidden> wrote:
>> Greg Guerin's reply (below) is correct, as I discovered minutes prior to
>> seeing it.
>>
>> The Release build of an Altivec-specific library failed because the Release
>> architecture included i386 as well as ppc. With deletion of the former, the
>> build was successful.
>>
>> I created parallel projects in Xcode and CodeWarrior to test the library.
>> Sadly, CW executed four times *faster* than Xcode on the same G5 platform.
>> Both were set up to use Altivec so the difference is a mystery -- so far.
>> Perhaps it has to do with the SIOUX (console) interface I added in the CW
>> version. Still, the output was negligible (just one line).
>>
>> Michael McLaughlin wrote:
>>
>>> union W128_T {
>>> vector unsigned int s; <-- error: parse error before vector
>>> uint32_t u[4];
>>> };
>>>
>>> The most relevant configuration settings are C99 and Enable Altivec
>>> Extensions, the same in both builds.
>>>
>>> Could anyone suggest where I might start looking?
>>>
>>> Note: I am using Xcode 2.4.1 and OS X 10.4.10.
>>
>> What CPU arch are you compiling on? My guess: ppc.
>>
>> A Debug build defaults to native arch only (e.g. ppc). AltiVec is PPC-only
>> technology.
>>
>> A Release build defaults to ppc and i386 archs. I suspect the i386 compile
>> doesn't like the AltiVec type 'vector'.
>>
>> Changing the Architectures setting for the Release build to only compile
>> for ppc would solve this problem. Converting the source to not be
>> AltiVec-specific would also solve it, assuming 'vector' is AltiVec-specific.
>>
>> If I'm wrong, please post a detailed build transcript, or at least the part
>> right before the error occurs. A telltale clue would be a CompileC step
>> having -arch i386 as the point of failure.
>>
>> -- GG
>>
>> --
>> Mike McLaughlin
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Xcode-users mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
--
Mike McLaughlin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden