Le 30 juin 2011 à 19:09, David Chisnall a écrit :

> On 30 Jun 2011, at 18:06, Quentin Mathé wrote:
> 
>> Le 30 juin 2011 à 14:24, David Chisnall a écrit :
>> 
>>> On 30 Jun 2011, at 13:21, Quentin Mathé wrote:
>>> 
>>>> EtoileThread builds just fine when I invoke make in the parent directory 
>>>> (EF main directory), but reports various errors 'ivars may not be placed 
>>>> in class extension' for ETObjectPipe, when 'make' is invoked directly in 
>>>> the EtoileThread directory. I'm not even sure to understand the purpose 
>>>> behind this Clang message…  Is it expected to report identically named 
>>>> ivars declared in superclasses or in @interface? Could this be a bug in 
>>>> Clang?
>>> 
>>> Ivars in a class extension require the non-fragile ABI.  This is probably 
>>> set in EF and imported in the subdirectory, but omitted in the 
>>> subdirectory's makefile.
>> 
>> Indeed, that's the issue.
>> 
>> We have in EtoileFoundation/GNUmakefile:
>> ifeq ($CC, clang)
>> ADDITIONAL_OBJCFLAGS += -fobjc-nonfragile-abi -fblocks
>> endif
>> 
>> I suppose we always want to pass the flags every time we compile a project 
>> with Clang, right?
> 
> My latest changes now require the non-fragile ABI, so won't build with the 
> fragile ABI.  If you want to support legacy compilers, then you'll need to 
> move the ivars into the headers, but that's pretty ugly.

Only EtoileThread is using ivars in class extensions. 
So let's say that only EtoileXML and EtoileFoundation supports GCC 4.6.

On Mac OS X, the EtoileFoundation Xcode project doesn't currently build 
EtoileThread and we use LLVM/Clang 1.5 (some custom 2.x LLVM release Apple 
shipped with Xcode). So your latest changes shouldn't give us troubles on Mac 
OS X.

We could add EtoileThread to the Xcode project, and check whether the compiler 
is recent enough. However do you know whether it's possible to deploy ObjC code 
that uses ivars in class extensions on 10.5 or 10.6?

Quentin.
_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev

Reply via email to