[Patch] m32 powerpc-darwin should default to fragile ObjC ABI.

Iain Sandoe iain at codesourcery.com
Wed Jan 22 11:32:50 PST 2014


Hi David,

thanks for looking at this!

On 22 Jan 2014, at 19:23, David Fang wrote:

> I noticed that the existing RUN test cases all kept x86_64-apple-darwin10 even in the case of i386.

perhaps there's a rationale for this and someone will shout up as to what.

>  I can't claim to understand why, I merely (unintelligently) followed the pattern with minimal changes.
> I rather liked the simple commands we tested offline yesterday:
> 
> e.g.:
> clang -### -target powerpc-apple-darwin8 foo.m -o foo.o

but, in the absence of a reason to the contrary, for this particular test I think you could get away with minimally:
clang -### -target powerpc-apple-darwin{8,9} foo.m -E

Iain

> 
> as that was sufficient to see the difference in -fobjc-runtime=.
> Feel free to amend/append the test as you see fit.
> 
> David
> 
>> Hi David,
>> 
>> On 22 Jan 2014, at 08:00, David Fang wrote:
>> 
>>> How about this addition to an existing testcase?  (attached)
>> 
>> +// ppc
>> +
>> +// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
>> +// RUN:   -arch ppc -mmacosx-version-min=10.4 2> %t
>> +// RUN: FileCheck --check-prefix CHECK-CHECK-PPC_OSX10_4 < %t %s
>> 
>> It's somewhat confusing to declare the target as x86_64- and then the arch as ppc.
>> 
>> Would there be some reason that " -target powerpc-apple-darwin8 " without the -arch and -mmacosx-version-min is not going to work here?
>> (after all we are only testing that the driver translates c/l args properly - there is no need to invoke a back end).
>> 
>> +// CHECK-CHECK-PPC_OSX10_4: "-cc1"
>> +// CHECK-CHECK-PPC_OSX10_4: -fobjc-runtime=macosx-fragile-10.4
>> +// CHECK-CHECK-PPC_OSX10_4-NOT: -fobjc-dispatch-method
>> +// CHECK-CHECK-PPC_OSX10_4: darwin-objc-defaults
>> +
>> +// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
>> +// RUN:   -arch ppc -mmacosx-version-min=10.5 2> %t
>> +// RUN: FileCheck --check-prefix CHECK-CHECK-PPC_OSX10_5 < %t %s
>> 
>> likewise " -target powerpc-apple-darwin9 "
>> 
>> +
>> +// CHECK-CHECK-PPC_OSX10_5: "-cc1"
>> +// CHECK-CHECK-PPC_OSX10_5: -fobjc-runtime=macosx-fragile-10.5
>> +// CHECK-CHECK-PPC_OSX10_5-NOT: -fobjc-dispatch-method
>> +// CHECK-CHECK-PPC_OSX10_5: darwin-objc-defaults
>> 
>> Iain
>> 
>>>> On 8 January 2014 12:10, Iain Sandoe <iain at codesourcery.com> wrote:
>>>>> bump?
>>>> 
>>>> Needs a testcase.
>>>> 
>>>> I know nothing about objc ABIs, but you and David Fang own darwin-ppc
>>>> these days, so LGTM with the test.
>>>> 
>>>> Cheers,
>>>> Rafael
>>>> _______________________________________________
>>>> cfe-commits mailing list
>>>> cfe-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>> 
>>> 
>>> --
>>> David Fang
>>> http://www.csl.cornell.edu/~fang/
>>> <objc-ABI.patch>
>> 
> 
> -- 
> David Fang
> http://www.csl.cornell.edu/~fang/
> 





More information about the cfe-commits mailing list