discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tutorials enhancement proposal : First Steps in GNUstep GUI Programm


From: David Chisnall
Subject: Re: Tutorials enhancement proposal : First Steps in GNUstep GUI Programming (2) : NSWindow, NSButton
Date: Fri, 12 Jun 2020 11:05:22 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

Hi,

I'm not sure where you get that from. The only comment about 64-bit on that page is in reference to Apple's implementation, stating that the new ABI is the only option on 64-bit Apple platforms (Apple supported the old and new ABIs on 32-bit x86, only the new one on 64-bit Macs and only the new one on any iOS devices).

That said, the page is quite out of date. The new runtime supports three ABIs:

- The old GCC one. Basically, don't use this, it doesn't support any post-2005 Objective-C features. - The GNUstep v1 ABI, which tried to be backwards compatible with the GCC runtime so you could mix code compiled with GCC. This didn't work particularly well and, in hindsight, was a bad idea. This is the minimum for using features like ARC. - The GNUstep v2 ABI, which is designed to use modern linker features. This supports all modern Objective-C features. This depends on some features specific to the binary format and so is supported on ELF and COFF platforms (not currently Mach-O or Wasm, though I'd be interested in adding them at some point).

ARC's memory model intrinsically requires an ABI with non-fragile instance variables (i.e. the generated code does not hard-code the offsets of instance variables, instead it looks the offsets up in a variable initialised by the runtime).

You control the runtime with the -fobjc-runtime= flag to clang. The format is:

-fobjc-runtime={runtime name}-{version}

The options are:

gcc, any version, targets the old GCC ABI.

gnustep-1.{0-8} targets the GNUstep 1.x ABI, restricting itself to features supported by the corresponding runtime release, for example not using property accessor helpers that weren't added or only using objc_msgSend on architectures that have the right implementation.

gnustep-2.0 (currently the only 2.x version, any point release value is ignored). This switches to the new ABI. This should give smaller binaries and faster code, but is incompatible with code compiled with GCC.

ARMv7 has all of the assembly fast paths, so should work well with the new ABI, though I think there may still be a few corner cases in C++ exception interop that don't work with the ARM EH ABI. Please try using libobjc2 trunk and file bug reports on GitHub as you find them!

David

On 11/06/2020 20:01, Patrick Cardona wrote:
Hi David,

I looked around to better understand how to use ARC and the new ABI as you 
suggested.
But according to your article on the wiki (1), I understood that only 64bits 
systems could be able to use the new ABI : is it right ?

And the RPI 3B+ I am using now is only 32 bits :
description: ARMv7 Processor rev 4 (v7l)
     product: Raspberry Pi 3 Model B Plus Rev 1.3
     ...
     bits: 32 bits


(1) The Wiki source :
  http://wiki.gnustep.org/index.php/ObjC2_FAQ,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]