Release Notes for the Advance Toolchain 5.0 Version 5.0-1
| Features | Previous Releases | Support | Installation | Usage | Limitations |
Features in 5.0-1
- 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.6.2-ibm-r177830 [C,C++ (g++), fortran]
- GNU Binutils-2.21.53.20110802
- GLIBC-2.13-ibm
- LIBDFP 1.0.7-r14715
- GDB-7.3 with Python scripting
- Releases of the following packages in support of the Advance Toolchain:
- Valgrind-3.6.0
- OProfile-0.9.7 with Java (1.5 or later) support
- GMP-4.3.2
- MPFR-3.0.0
- MPC-0.8.2
- PPL-0.11
- CLOOG-PPL-0.15.10
- LIBELF-0.8.12
- Libhugetlbfs 2.9
- Zlib 1.2.5
- Libauxv 0.1.0
- Libexpat 2.0.1
- Python 2.6.6
- 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:
- Libauxv 0.1.0 is now built with --enable-static. A libauxv.a static archive is now available.
- GCC includes the following fixes:
- r177629 - in /branches/ibm/gcc-4_6-branch/gcc - Fix for -flto -fwhole-program -fuse-linker-plugin linker error.
- r177723 - in /branches/ibm/gcc-4_6-branch/gcc - Apply force_reg to addr.
- r177830 - in /branches/ibm/gcc-4_6-branch/gcc - Correctly set BV_LOST_PRIMARY.
- GLIBC includes the following fixes:
- Trigonometric optimizations for POWER cpus.
- Strncmp throughput boost on power7 ppc64.
- Check for finite/infinity parms in IBM Long Double 128 fmal ().
- Fix profiling on powerpc32 secure-plt shared libs and PIEs.
- Valgrind POWER7 patch to with complete support for POWER7 # (minus DFP support)
- Update oprofile from 0.9.7-rc4 to 0.9.7 GA
Previous releases
New features in 5.0-0
- Newly designed Release Notes file
- New script for automatic generation of config files for XLC 10.1/11.1 and XLF 12.1/13.1
- GLIBC is now built with experimental-malloc support.
- CPU-tuned GCC libraries.
- Libexpat is now shipped.
- GCC includes the following fixes:
- PR49749 fix
- PR48258 fix
- PR48226 fix
- POWER7 fix: Allow the compiler to generate 4-operand FMA where the outptut does not overlap with the inputs for scalar double and vector float operations.
- New switch: -mno-pointers-to-nested-functions: tells the compiler that it is safe to eliminate loading up the static chain register when calling functions via pointers. It cannot be used if the function that is being called is a nested function in GNU C or was compiled with a language that expects to use the static chain.
- New parameter: --param case-values-threshold=n: changes the cutoff point for when the compiler chooses to use a series of if statements to implement a switch statement or to use table jump.
- The -m32 -msoft-float libraries are no longer built.
- Bugs fixed in handling medium code model
- GLIBC includes the following fixes:
- Optimize the memcpy aligned copy for power7 with vector-scalar insns.
- Remove pthread_attr_setstacksize from __aio_create_helper_thread.
- Trigonometric optimizations for POWER CPUs.
- Prevent Altivec and VSX instructions on PowerPC64 when no FPRs or VRs are available.
- Add AT_PLATFORM env variable to ld.so to override auxv AT_PLATFORM.
- Static TLS memory leak fix (DTV case).
- Prevent erroneous inline optimization of initfini.s on PowerPC64.
- GDB includes the following fix:
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/at5.0.repo
and add the following content:
# Begin of configuration file
[at5.0]
name=Advance Toolchain Unicamp FTP
baseurl=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/at5.0/redhat/RHEL5
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/at5.0/redhat/RHEL5/gpg-pubkey-3052930d-5175955a
# End of configuration file
To install execute yum install as root:
yum install advance-toolchain-at5.0-runtime
yum install advance-toolchain-at5.0-devel
yum install advance-toolchain-at5.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-at5.0-runtime-5.0-1
advance-toolchain-at5.0-devel-5.0-1
advance-toolchain-at5.0-perf-5.0-1
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-at5.0-runtime-5.0-1.ppc64.rpm advance-toolchain-at00-devel-0.0-0.ppc64.rpm advance-toolchain-at00-perf-0.0-0.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 /opt/at5.0/share/zoneinfo to /opt/at5.0/etc/localtime
- advance-toolchain-at5.0-runtime-compat-5.0-1: 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-at5.0-runtime-compat-5.0-1 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-at5.0-cross-5.0-1 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="/opt/at5.0/share/man:`manpath`"
man <topic>
Or the user may override the current environment MANPATH as demonstrated in the following example:
MANPATH="/opt/at5.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 /opt/at5.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 /opt/at5.0/etc/ld.so.cache, e.g.
sudo /opt/at5.0/sbin/ldconfig
The loader uses /opt/at5.0/etc/ld.so.cache to find the libraries the application was linked against.
- Re-link using the Advance Toolchain's compiler:
/opt/at5.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.
/opt/at5.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.
/opt/at5.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 /opt/at5.0/etc/ld.so.conf and rerun /opt/at5.0/sbin/ldconfig The Advance Toolchain's loader needs to know where to find the libraries and uses the generated /opt/at00/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
/opt/at5.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/at5.0/sbin/ldconfig in order populate /opt/at00/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="/opt/at5.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 /opt/at5.0/scripts/createldhuge.sh script is provided which copies /opt/at5.0/bin/ld to /opt/at00/bin/ld.orig and creates a wrapper script in /opt/at00/bin/ld. You only need to run this if you want the Advance Toolchain to work with libhugetlbfs.
The new /opt/at5.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/at5.0at00/bin/ld.orig and invokes the system's ld.hugetlbfs, e.g.
LD="/opt/at5.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 /opt/at5.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 /opt/at5.0/bin/ld /opt/at5.0/bin/ld.backup
The scripts in /opt/at5.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 /opt/at5.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 /opt/at5.0/bin/ld directly. You can use the GCC invocation you've always used, e.g.
/opt/at5.0/bin/gcc temp.c -v -o temp -B/usr/share/libhugetlbfs/ -Wl,--hugetlbfs-link=BDT
Note, if you invoke /opt/at5.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 /opt/at5.0/scripts. You need to run:
/opt/at5.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
|