Meego Wiki
Views

SDK/Toolchains/ToolchainChangeProposal

From MeeGo wiki
Jump to: navigation, search

Contents

Change Proposal: Toolchain upgrade in MeeGo Release 1.2

This page describes proposal to upgrade MeeGo toolchain in MeeGo Release 1.2. Current toolchain is based on gcc-4.5.0 and it is proposed to be upgraded to gcc-4.5.1 based in the Rel 1.2. Also full support of FPU (Floating Point Unit) in ARM processor architecture is proposed to be taken into use in the toolchain.

Introduction and Background

Responsibility area of Nokia is to take care of ARM processor architecture support in MeeGo toolchain. Current toolchain setup in MeeGo Release 1.1 only partially supports the use of FPU in ARM architecture.

Gcc compiler provides three options to support floating points in -mfloat-abi [1]:

  • soft - Full software implementation of floating point. Fits to those processors without FPU. All FPU operations are emulated by the compiler.
  • softfp - FPU unit is used, but the code is compatible to full software float code. Floating Point operations are passed to FPU in integer registers.
  • hard - Floating Point arguments are passed directly in FPU registers. No compatibility to options soft and softfp.

Linaro (http://www.linaro.org) is providing ARM support to gcc. Linaro provides ARM patches to gcc upstream. Support of -mfloat-abi=hard option is available in gcc-4.5.1.

Performance tests comparing options -mfloat-abi=softp and -mfloat-abi=hardfp are done using Linaro 2010.11 (http://lists.linaro.org/pipermail/linaro-toolchain/2010-November/000414.html) toolchain. E.g. in PythonBench16 the improvement is 60 %.

Change Proposal

Nokia propose to upgrade gcc-4.5.1 with -mfloat-abi=hard option support. This change applies in MeeGo Release 1.2.

Together with gcc update, binutils is updated to version 2.20 or newer and (e)glibc to version 2.10 or newer.

Reason to update is that gcc-4.5.1 contains numbers of ARM patches (submitted by Linaro) that are important for Nokia and other device vendors that develop ARM based devices.

Architecture name is also thought by Debian [2]. Debian considered "armv7hf" to be used to indicate if the hard floating point architecture is used. The name "armel" indicates that the hard floating point architecture is not used (-mfloat-abi=softfp). Since it is useful to also indicate that little endian mode is used, the new architecture name is proposed to be "armv7hl". The sub-architecture name "armv7nhl" is used to indicate NEON optimized binary.

Current softfp support (-mfloat-abi=softfp) is not allowed in MeeGo Release 1.2 and onwards.

In the same architecture the two sets of toolchain setups is proposed to be published as in follows:

  • Default set (RPM architecture name "armv7hl")
  * ARMv7 architecture (-march=armv7-a) 
  * VFPv3-D16 (-mfpu=vfpv3-d16)
  • NEON optimized set (RPM architecture name "armv7nhl" which is the sub-architecture of "armv7hl)"
  * ARMv7 architecture (-march=armv7-a)
  * NEON (-mfpu=neon)

Applications using the optimized set are provided as dedicated binaries that optimized for each HW platform.

Impact

Following impacts can be foreseen if the Toolchain is changed or not changed.

Toolchain changed:

  • Important ARM patches available to vendors using the latest ARM architecture.
  • Tremendous improvement in terms of performance in floating point operations. Performance improvement can be seen e.g. in scaling and zooming operations in the device screen and other applications that are using lots of floating points (e.g. map and navigation applications)
  • Upgrade to gcc-4.5.1 with -mfloat-abi=hard option means the binary break between MeeGo Release 1.1 and Release 1.2.
  • Possible implications to RPM package manager (under investigations).

Toolchain NOT changed:

  • If the toolchain remains gcc-4.5.0 based and without full support of FPU, the performance improvements provided by the FPU is not utilized and sooner or later there will be pressure to utilize it anyway.
  • No binary break between Release 1.1 and Release 1.2.

Analysis of impacts:

  • Release 1.2 is the final point when this kind of change (i.e. binary break) can be done
  • Implications are not yet markable since there are not devices using MeeGo Release 1.1 in the markets. Situation is different when the Release 1.2 has been published. Later on this kind of change would cause more serious consequences.
  • Nokia is investigating currently implications to RPM Package Manager.

Timeline

Toolchain version must be agreed during 11/2010 and it must be available to testing in OBS at the beginning of 12/2010.

Summary

Toolchain change in MeeGo Release 1.2 as follows:

  • gcc-4.5.1
  • glibc-2.10 (or newer)
  • binutils-2.20 (or newer)
  • Support of -mfloat-abi=hard as gcc option
  • New ARM architecture name "armv7hl" indicating the use of -mfloat-abi=hard and sub-architecture name "armv7nhl" to indicate that NEON is used
  • Two sets of compiler options: Default set (armv7hl) and NEON optimized set (armv7nhl)

References

[1] http://wiki.debian.org/ArmHardFloatPort/VfpComparison#DetailsonGCCfloating-pointoptions

[2] http://wiki.debian.org/ArmHardFloatPort/#Nameoftheport

Personal tools