Release Notes for the Advance Toolchain 4.0 Version 4.0-5
| Features | Previous Releases | Support | Installation | Usage | Limitations |
Features in 4.0-5
- The Advance Toolchain is a self contained toolchain which isn't reliant on the base system toolchain.
- Decimal Floating Point support in the following packages:
- GCC-4.5-ibm-r179810 [C,C++ (g++), fortran]
- GNU Binutils-2.21.20120111
- GLIBC-2.12-ibm
- LIBDFP
- GDB- with Python scripting
- Releases of the following packages in support of the Advance Toolchain:
- Valgrind-
- OProfile- with Java (1.5 or later) support
- GMP-4.3.2
- MPFR-3.0.0
- MPC-0.8.2
- PPL-0.11
- CLOOG-PPL-CLOOG0.11
- LIBELF-0.8.12
- Libhugetlbfs
- Zlib
- Libauxv
- Libexpat
- Python
- Power6 enablement.
- Power6 Optimized scheduler.
- Power6 Native DFP instruction support.
- Power6 VMX enablement with auto-vector.
- Power7 enablement.
- Power7 Optimized scheduler.
- Power7 Native DFP instruction support.
- Power7 VMX/VSX enablement with auto-vector.
- ppc970,POWER4,POWER5,POWER5+,POWER6, POWER6x and POWER7 optimized system libraries.
Apart from package versions listed above:
- GLIBC includes the following fixes:
- Fix stacksize for AIO worker threads to account for TLS usage.
- Add __have_pipe2 to fix popen() bug.
- Optimization for str[n]casecmp.
- Optimization for nearbyint[f].
- Fix a wrong constant in powerpc hypot implementation.
- Arithmetic function optimizations for POWER.
- Optimize libm wrapper functions.
- Fix PLT uses in libm.
- Libdfp includes the following fixes:
- Per ISO/IEC JTC1 SC22 WG21 N2732, added dfp/decimal/decimal
header with ostream<< and ostream>> support.
- Per ISO/IEC JTC1 SC22 WG21 N2732, added dfp/float.h to add
_Decimal[32|64|128] compatibility types when __cplusplus is defined.
- Fixed expd[32|64]() to handle negative input values.
- Added missing hard-dfp implementations for __dpd_extend* and __dpd_trunc*
functions.
- Fixed dfp/stdlib.h and dfp/wchar.h to include missing
<features.h>.
Previous releases
New features in 4.0-4
- GCC includes the following fixes:
New features in 4.0-3
- GCC includes the following fixes:
- GLIBC includes the following fixes:
- Trigonometric optimizations for POWER cpus.
- Set stacksize in __aio_create_helper_thread to default for AIO with TLS.
- Static TLS memory leak fix (DTV case).
- Remove pthread_attr_setstacksize from __aio_create_helper_thread.
- Valgrind POWER7 patch to with complete support for POWER7 # (minus DFP support)
- Update oprofile from 0.9.7-rc4 to 0.9.7 GA
- Fix sample counts for OProfile XML output.
New features in 4.0-2
- GLIBC includes the following fixes:
- Set stacksize in __aio_create_helper_thread to default for AIO with TLS.
- Trigonometric optimizations for POWER CPUs.
- Enhanced POWER7 support in Valgrind.
New features in 4.0-1
- Updated configuration scripts for XLC 10.1/11.1 and XLF 12.1/13.1.
- Libauxv is now shipped.
- Zlib is now shipped.
- GCC includes the following fixes:
- PowerPC64 PR47935 fix
- Harden rs6000 offsettable_ok_by_alignment
- build_function_call and TREE_ADDRESSABLE
- PowerPC64 non-delegitimized UNSPEC fix
- PR45844 Fix, gfortran.dg/vect/pr45714-b.f ICE on power7
- Enhance conditional store sinking
- PowerPC PR47755 VSX re-fix
- Refix 48053, do not abort in loading 0 into VSX register under 32-bit
- PR47862 fix, caller-save spill of vectors on PowerPC
- PR47862 fix, caller-save vector spill on PowerPC
- Fix backport of PR 47862 to 4.5 branch
- PR48053 fix, ICEs in SPEC benchmarks
- PATCH for c++/48029 (ICE-on-valid with templates and * arrays)
- Fix for FSF Bug 47272: vec_ld and vec_store return to their original implementation to ONLY use Altivec memory load/store, and people targeting VSX should use vec_vsx_ld and vec_vsx_st
- Fixes for the following FSF Bugs: 48053, 48067, 44707, 48032, 47755, 47862, 70276, 47935, 47755, 46030, 47525, 47385.
- Binutils includes the following fixes:
- GLIBC includes the following fixes:
- Libdfp includes the following fixes:
- Valgrind now supports the subset of POWER7 instructions that are used by the POWER7-tuned GLIBC libraries, so applications that link to these libraries can now be run under Valgrind.
New features in 4.0-0
- Libhugetlbfs 2.9 is now shipped.
- MPC 0.8.2 is now shipped.
- PPL 0.11 is now shipped.
- CLOOG-PPL 0.15.10 is now shipped.
- LIBELF 0.8.12 is now shipped.
- Python 2.6.6 is now shipped.
- Large TOC with -mcmodel=medium and -mcmodel=medium -fPIE optimizations.
- XL MASS library enablement for vectorizing math functions.
- Graphite loop optimizations.
- Link Time Optimizations.
- GDB updated to 7.2, featuring Python scripting support.
What's new in 3.0-1
- Cross-compiler available for x86 32-bit as a separate download.
- Compatibility runtime RPM for older Linux distributions (SLES9 and RHEL4).
- Large TOC fixes for GCC and Binutils.
- Valgrind-itrace now supports dynamically linked 32-bit and 64-bit executables, as well as statically linked executables.
- Bug fixes for Valgrind and vgi2qt tool.
- The 64-bit Stack is now marked non-executable.
New features in 3.0-0
- Binaries are all 64-bit.
- The compiler now defaults to 64-bit.
- Better Thread Local Storage support.
- Several POWER7-specific optimizations for GCC and GLIBC.
Documentation for each component can be found here:
Support
Customer support for the Advance Toolchain (AT) is provided in one of three ways:
- If you are using AT as directed by an IBM product team (ex.: IBM XL Compiler or PowerVM Lx86) please report suspected AT problems to IBM Support using that product name and entitlement.
- IBM's Support Line for Linux Offering in the United States now provides support for AT as well. If you have a contract with a U.S. Support Line for Linux contract, place a call to IBM Support:
- Dial 1-800-426-IBM-SERV
- Option #2 (Other business products or solutions)
- Option #2 (Software)
- Option #7 (Other OS/Linux)
- All other users can use an electronic forum that is monitored Monday through Friday. For questions regarding the use of or to report a suspected defect in AT, click here.
- Open the Advance Toolchain topic.
- Select 'Post a New Reply'.
- Enter and submit your question or problem.
- An initial response will be attempted within 2 business days.
Installation
The gpg public key gpg-pubkey-3052930d-5175955a will be provided in the repository where these release notes were found. This pubkey can be used to verify the authenticity of both the Advance Toolchain rpms and the repository contents.
Download this gpg-pubkey and import it into your rpm database using the following:
rpm --import gpg-pubkey-3052930d-5175955a
Note: on RHEL5, please install the ncurses package (64-bit) before installing the Advance Toolchain.
Using YUM
First, if you have never created an Advance Toolchain repository configuration file, you need to do so. Create the following file using the text editor of your choice as root:
/etc/yum.repos.d/at4.0.repo
and add the following content:
# Begin of configuration file
[at4.0]
name=Advance Toolchain Unicamp FTP
baseurl=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL5
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL5/gpg-pubkey-3052930d-5175955a
# End of configuration file
To install execute yum install as root:
yum install advance-toolchain-at4.0-runtime
yum install advance-toolchain-at4.0-devel
yum install advance-toolchain-at4.0-perf
Answer y when YUM prompts for confirmation.
Manual installation
If you are installing the rpms manually you will need to install the rpms in the following order (due to prerequisites):
advance-toolchain-at4.0-runtime-4.0-5
advance-toolchain-at4.0-devel-4.0-5
advance-toolchain-at4.0-perf-4.0-5
If you are updating a previous installation, you need to update as a batch, so rpm can solve the dependencies, i.e.:
rpm -Uvh advance-toolchain-at4.0-runtime-4.0-5.ppc64.rpm advance-toolchain-at4.0-devel-4.0-5.ppc64.rpm advance-toolchain-at4.0-perf-4.0-5.ppc64.rpm
The rpm command should always be run as root. Failure to do so will result in an error similar to this:
error: can't create transaction lock on /var/lib/rpm/__db.000
Important notes
- Timezone files: If you need to use something different than Factory, then you should copy the timezone file you want from g/opt/at4.0/share/zoneinfo to /opt/at4.0/etc/localtime
- advance-toolchain-at4.0-runtime-compat-4.0-5: DO NOT INSTALL it on SLES10 and beyond or RHEL5 and beyond. These are intended for runtime compatibility on SLES9 and RHEL4 only (see below).
Installation on SLES9 and RHEL4 - Runtime compatibility
Users running applications on SLES9 or RHEL4 may install the compatibility rpm advance-toolchain-at4.0-runtime-compat-4.0-5 in order to get the Advance Toolchain optimized runtime libraries. Optimized libraries are available for:
- PPC970
- POWER4
- POWER5
- POWER5+
Installation of the cross-compiler (Intel x86)
You can download advance-toolchain-at4.0-cross-4.0-5 and install in a x86 machine to build Power binaries on it. Binaries generated by the cross-compiler will run on a Power system with the same version of the Advance Toolchain installed.
Usage
Manual Pages
In order for the system man application to pick up Advance Toolchain installed man pages, the user must export the location of the AT man pages in the MANPATH variable prior to invoking man. This is best accomplished with the following commands:
unset MANPATH
export MANPATH="g/opt/at4.0/share/man:`manpath`"
man <topic>
Or the user may override the current environment MANPATH as demonstrated in the following example:
MANPATH="g/opt/at4.0/share/man:`manpath`" man lsauxv
Optimization Selection
Directing GCC to build an application for a particular cpu can take advantage of processor specific instruction selection. In some cases it case significantly improve performance. Building without selecting a particular cpu simply causes GCC to select the default (lowest common denominator) instruction set.
-mcpu=power4
-mcpu=970
-mcpu=power5
-mcpu=power5+
-mcpu=power6
-mcpu=power6x
-mcpu=power7
Note: when using -mcpu=power7', DO NOT disable Altivec (i.e. -mno-altivec) without also disabling VSX (i.e. -mno-vsx). The following combination is illegal:
-mcpu=power7 -mno-altivec
Platform and Hardware Capabilities Determination
The Advance Toolchain includes libauxv and lsauxv, a system library and application, respectively, which provide a mechanism for querying the system platform information from the kernel's auxiliary vector. The system hardware capabilities (hwcap) may be queried through the auxiliary vector as well. For example, the platform can be queried dynamically with the following function:
char * platform = (char *) query_auxv (AT_PLATFORM);
Information from the hwcap can be queried in the following manner:
unsigned long int hwcap_mask = (unsigned long int) query_auxv (AT_HWCAP);
if (hwcap_mask & PPC_FEATURE_HAS_FPU)
printf(" HAS_FPU\n");
Further information on using libauxv and/or lsauxv can be found in the 'auxv' and 'lsauxv' manual pages provided by the Advance Toolchain (See 'Manual Pages' above).
Relinking a pre-built application with the Advance Toolchain
- Locate all of the application's .o files. You can also link .a files to pick them all up at once. These will be needed for the relink.
- Locate the paths to all of the necessary linked shared-object files, e.g.
/usr/X11R6/lib for libXrender
/opt/gnome/lib for libgtk-x11-2.0
- Edit g/opt/at4.0/etc/ld.so.conf and add the directories to all of the shared object files to the end of this file. Don't forget 'lib64' for the 64-bit equivalent libraries if applicable, e.g.
/opt/gnome/lib/
/opt/gnome/lib64/
/usr/X11R6/lib
/usr/X11R6/lib64/
- Run the Advance Toolchain's ldconfig application to regenerate g/opt/at4.0/etc/ld.so.cache, e.g.
sudo g/opt/at4.0/sbin/ldconfig
The loader uses g/opt/at4.0/etc/ld.so.cache to find the libraries the application was linked against.
- Re-link using the Advance Toolchain's compiler:
g/opt/at4.0/bin/gcc -g -O2 -o <application_name> <list_of_dot_o_files> \
<list_of_dot_a_files> -L<path_to_libraries> \
-l<one_for_each_library_needed_for_the_link>
e.g.
g/opt/at4.0/bin/gcc -g -O2 -o mandelbrot callbacks.o interface.o \
main.o quadmand.o support.o mandel_internals.a \
-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/opt/gnome/lib -lgtk-x11-2.0
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 \
-lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl \
-lglib-2.0 -lfreetype -lfontconfig \
-lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm -lstdc++ -lpthread \
-lgthread-2.0
- If ld gives an error like the following then you're missing the path to that library in the link stage. Add it with -L<path to library>, e.g.
g/opt/at4.0/bin/ld: cannot find -lgtk-x11-2.0
Add -L/opt/gnome/lib/ to the gnome compilation line. You need to tell the linker where to find all of the libraries.
- When running the re-linked application if you get an error like the following:
./mandelbrot: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory.
You need to add the path to the library in question to g/opt/at4.0/etc/ld.so.conf and rerun /opt/at4.0/sbin/ldconfig The Advance Toolchain's loader needs to know where to find the libraries and uses the generated /opt/at4.0/etc/ld.so.cache to find them.
- You can verify that the Advance Toolchain libraries were picked up by running the application prefaced with LD_DEBUG=libs, e.g.
LD_DEBUG=all ./mandelbrot
WARNING: do NOT use LD_LIBRARY_PATH to point to the Advance Toolchain libraries if your applications are not relinked with the Advance Toolchain. Doing so can result in ld.so and libc.so version mismatch and cause runtime failures.
Library search paths
g/opt/at4.0/etc/ld.so.conf already contains include /etc/ld.so.conf in the search order but may you may need to re-run /opt/at4.0/sbin/ldconfig in order populate /opt/at4.0/etc/ld.so.cache with the specialized search paths you've added to /etc/ld.so.conf.
Using the AT with Libhugetlbfs 2.0 (and later)
AT 4.0 and later now have support for 32-bit and 64-bit
libhugetlbfs 2.0 (and later). Please refer to the Advance Toolchain's libhugetlbfs man page for more information on using libhugetlbfs 2.0:
unset MANPATH
export MANPATH="g/opt/at4.0/share/man:`manpath`"
man libhugetlbfs
Using the AT with Libhugetlbfs 1.x
(Note: Libhugetlbfs 1.x is deprecated on SLES11 and RHEL6. Please use Libhugetlbfs 2.0. This information is preserved for compatibility with older applications.)
The Advance Toolchain will work with the default system libhugetlbfs 1.x link editor wrapper and linker scripts.
The g/opt/at4.0/scripts/createldhuge.sh script is provided which copies /opt/at4.0/bin/ld to /opt/at4.0/bin/ld.orig and creates a wrapper script in /opt/at4.0/bin/ld. You only need to run this if you want the Advance Toolchain to work with libhugetlbfs.
The new g/opt/at4.0/bin/ld is a wrapper script which detects whether the --hugetlbfs-link or --hugetlbsf-align switches have been passed to the linker. If so then it sets a script-local LD environment variable to /opt/at4.0/bin/ld.orig and invokes the system's ld.hugetlbfs, e.g.
LD="g/opt/at4.0/bin/ld.orig" /usr/share/libhugetlbfs/ld.hugetlbfs *switches*
If it doesn't detect the hugetlbfs-link/hugetlbfs-align switch then it simply forwards the linker invocation to g/opt/at4.0/bin/ld.orig directly.
If libhugetlbfs support is desired, the first thing to do is backup the original Advance Toolchain linker just-in-case there are problems and you need to restore it manually.
cp -p g/opt/at4.0/bin/ld /opt/at4.0/bin/ld.backup
The scripts in g/opt/at4.0/scripts/ will do the rest of the work for you:
createldhuge.sh
restoreld.sh
Invoke createldhuge.sh to create the wrapper ld:
sudo sh createldhuge.sh /usr/share/libhugetlbfs/ld.hugetlbfs g/opt/at4.0
This MUST be executed as sudo (or root) for the ld wrapper script to be created properly.
When/If you want to restore the original Advance Toolchain linker, simply run:
sudo sh restoreld.sh.
The Advance Toolchain GCC always ignores the -B/usr/share/libhugetlbfs directive because it has been built to always invoke g/opt/at4.0/bin/ld directly. You can use the GCC invocation you've always used, e.g.
g/opt/at4.0/bin/gcc temp.c -v -o temp -B/usr/share/libhugetlbfs/ -Wl,--hugetlbfs-link=BDT
Note, if you invoke g/opt/at4.0/bin/ld --hugetlbfs-link=BDT directly, you'll need to supply a -m* flag which is normally provided by GCC directly ('man ld' for supported emulations).
Using AT with XLC and XLF
When compiling binaries using XLC or XLF, the user must add the "-F path_to_cfg_file" option to the compiler command line. The Advance Toolchain provides a script that creates those files in g/opt/at4.0/scripts. This script is automatically run during installation. If you need to re-run it later (i.e. you installed XLC/XLF after the Advance Toolchain installation), execute the following command:
g/opt/at4.0/scripts/at-create-ibmcmp-cfg.sh
Please notice the absolute path when calling the script. DO NOT call it using a relative path.
Debugging
GDB can be asked to output _Decimal[32|64|128] formatted floating point registers by default, using GDB's printf command.
When using 'objdump' to inspect POWER6 code, make sure to use the -Mpower6 flag:
objdump -d -Mpower6 your_file
The same applies to POWER7 code.
Advance Toolchain Limitations
|