Difference between revisions of "FPC New Features Trunk"

From Lazarus wiki
Jump to navigationJump to search
Line 41: Line 41:
 
* '''Overview''': Support has been added for the Linux/ppc64le target. This is a PowerPC64 little endian platform that uses a new ABI termed ELFv2.
 
* '''Overview''': Support has been added for the Linux/ppc64le target. This is a PowerPC64 little endian platform that uses a new ABI termed ELFv2.
 
* '''Notes''': It is not easy to build this target on a big endian Linux/ppc64 target, due to the fact that the build system does not yet contain support to deal with different ABIs/endianess.
 
* '''Notes''': It is not easy to build this target on a big endian Linux/ppc64 target, due to the fact that the build system does not yet contain support to deal with different ABIs/endianess.
* '''More information''': To cross-compile a ppc64le compiler, use CROSSOPT="-Cb- -Caelfv". Those options don't have to be specified when compiling on a ppc64le system using a native ppcppc64, as they will be set by default for that compiler.
+
* '''More information''': To cross-compile a ppc64le compiler, use CROSSOPT="-Cb- -Caelfv2". Those options don't have to be specified when compiling on a ppc64le system using a native ppcppc64, as they will be set by default for that compiler.
 
* '''svn''': r30228
 
* '''svn''': r30228
  

Revision as of 09:02, 26 May 2015

About this page

Below you can find a list of new features introduced since the previous release, along with some background information and examples. Note that since svn trunk is by definition still under development, some of the features here may still change before they end up in a release version.

A list of changes that may break existing code can be found here.

All systems

Language

Support for interfacing with C blocks functionality

  • Overview: Support has been added for interfacing with Apple's blocks C-extension.
  • Notes:
    • As C blocks are very similar to anonymous methods in Delphi, we use a similar syntax to declare block types (with an added cdecl to indicate the C nature). Note that the syntax to define the code executed in a block (inline, like with anonymous methods in Delphi, or in a separately defined function/method) and the functionality of a block (the ability to capture context and code to execute it at an arbitrary point in the future) are two separate things. At this time (r29594), only the code from a global function/procedure or from an Object Pascal instance/class method can be executed within the context of a block. In the future, support will be added for nested functions and later probably also for code that is defined inline, like in Delphi.
    • This functionality is currently only supported by FPC on Mac OS X 10.7 and later, and on iOS 4.0 and later. The reason it doesn't work on Mac OS X 10.6, is that we require functionality that was added to the blocks runtime in later versions.
    • The blocks functionality can be activated on supported platforms via {$modeswitch cblocks}
  • More information:
  • svn: r29517, r29594

(Mac) OS X/iOS

New iosxwstr unit

  • Overview: The new unit called iosxwstr can be used to install a widestring manager on (Mac) OS X and iOS.
  • Notes: The cwstring unit fulfils the same purpose, but is no longer able to provide full functionality on iOS 7 and newer due to Apple no longer shipping the locale and codepage information this unit depends on. The iosxwstr unit gets its locale information for upper/lowercase conversions from the System Preferences. Adding both cwstring and iosxwstr to the uses clause will cause the second in line to override the settings from the first one.
  • More information: Adding this unit to the uses clause is enough to use its functionality.
  • svn: r29828

New compiler targets

Support for the AArch64 target

  • Overview: Support has been added for the AArch64 architecture. Both Darwin (iOS) and Linux supported.
  • Notes: Apple's A7 CPU (and potentially other AArch64 CPUs too) does not support raising a signal when a floating point exception occurs.
  • More information: http://lists.freepascal.org/pipermail/fpc-devel/2015-February/035397.html
  • svn: r29986 (Darwin/iOS), r30897 (Linux)

Support for the Linux/ppc64le target

  • Overview: Support has been added for the Linux/ppc64le target. This is a PowerPC64 little endian platform that uses a new ABI termed ELFv2.
  • Notes: It is not easy to build this target on a big endian Linux/ppc64 target, due to the fact that the build system does not yet contain support to deal with different ABIs/endianess.
  • More information: To cross-compile a ppc64le compiler, use CROSSOPT="-Cb- -Caelfv2". Those options don't have to be specified when compiling on a ppc64le system using a native ppcppc64, as they will be set by default for that compiler.
  • svn: r30228

New Features from other versions