Toolchain

The major changes to the toolchain are as follows:

>GCCFMDIR is no longer required

>gnumake is now make, and you can now use the native system make

>C99 support

>additional function support

>the tool naming convention has changed

>some of the tools in the toolchain use newer versions

$GCCFMDIR No Longer Required

$GCCFMDIR is not required for building FMs on the ProtectServer PCIe HSM since the toolchain is non-relocatable.

NOTE   For best practice, ensure that $GCCFMDIR is not defined.

Builds Use make Instead of gnumake

In Release 5 (or higher), gnumake becomes simply make, and the host’s native make can be used. If the host’s native make is older than 3.82, make can also be used from the fm-toolchain from the following location:

/opt/safenet/fm-toolchain/fmsdk-ppc440e-1.0/sysroots/i686-fmsdk-linux/usr/bin/make

In previous releases, we provided GNU make (renamed to gnumake). The gnumake command was used to build FMs. This has changed as follows:

Linux The gnumake command is no longer available. If you use an automated build that calls gnumake you must update your build scripts to call make instead of gnumake.
Windows The gnumake command is provided in <fm_install_dir>/bin. It is simply a renamed version of the make command.

C99 Support

The FM SDK supports a subset of the ISO C 99 standard library as defined by ISO/IEC 9899:1999. In general, floating point math, multibyte characters, localization, and I/O APIs are not supported. printf and vprintf are exceptions, and are redirected to the logging channel.

In addition to the standard library, you can also use C99 language features not present in ANSI C (C89/90). C99 stdint.h types are now supported by the FM SDK toolchain, however sized types from the proprietary Integers.h remain used for FM SDK published APIs to maintain continuity and compatibly with pre-C99 versions.

Due to the change to C99, and the default C99 locale, the strftime %x result is a different format than in PPO3. It is now mm/dd/yy instead of Ddd Mmm dd yyy.

See the FM SDK Programming Guide for more information.

NOTE   For best practice, update your code to take advantage of the features offered by C99.

Functions added to the FM SDK in ProtectServer 2

The following functions have been added:

>ctype.c

isblank

>stdio.h

printf, vprintf, vsscanf

snprintf (moves from non-standard to C99 variant).

>stdlib.h

atoll, llabs, lldiv, strtoll, strtoull

Updated Tool Versions

Tool PPO 3.0 version FM SDK 5.0 version
gcc 2.95.3 4.6.1
gnu make 3.78.1 3.82
binutils 2.11.2 2.21.1
C standard C89 C99

New Tool Naming Convention

The tool naming convention changes from <toolname>-fm to <arch>-fm-<toolname>. For example gcc-fm becomes powerpc-fm-linux-gcc.