22.12.2012 Views

z/TPF Program Management - IBM

z/TPF Program Management - IBM

z/TPF Program Management - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

Unpack the GNU compiler collection for the z/<strong>TPF</strong> system<br />

You can unpack a binary package as an alternative to building the GNU compiler<br />

collection (GCC).<br />

Complete the following steps to unpack the GCC executable and linking format<br />

(ELF)-compatible compiler, which is also known as a cross-compiler.<br />

1. Set up a directory structure for unpacking the ELF-compatible compiler. For<br />

example, enter the following commands to create a base directory for the tar<br />

files of the compiler, and a subdirectory to use for building and unpacking the<br />

ELF-compatible compiler:<br />

mkdir /ztpf/tpfcross<br />

mkdir /ztpf/tpfcross/build<br />

2. Unpack the binary package:<br />

a. See your <strong>IBM</strong> service representative for information about how to get the<br />

compiler tar file. Put the tar file in the /ztpf/tpfcross directory.<br />

v /s390x-linux-gnu-x-s390x-ibm-tpf.tar.bz2<br />

b. Go to http://www.ibm.com/software/htp/tpf/maint/toolsztpf.html to get the <strong>IBM</strong><br />

sysroot file that corresponds to the version of the compiler that you are<br />

using:<br />

tpf-sysroot-ibm.version.tar.bz2<br />

c. Unpack the binary files to the build directory. Enter the following commands:<br />

cd /ztpf/tpfcross/build<br />

tar -xjf ../s390x-linux-gnu-x-s390x-ibm-tpf.tar.bz2<br />

The gpl-include sysroot files are included in these tar files. After you<br />

complete this step successfully, the /ztpf/tpfcross/build directory contains<br />

the pre-built ELF-compatible compiler.<br />

3. Enter the following command to unpack the sysroot files into, for example, a<br />

directory called /home/downloads:<br />

tar -xjf /home/downloads/tpf-sysroot-ibm.version.tar.bz2<br />

You then have a directory that is called /ztpf/tpfcross/build/sys-root/ for the<br />

<strong>IBM</strong> sysroot files.<br />

4. Enter one of the following commands to copy the <strong>IBM</strong> sysroot files to the<br />

ELF-compatible compiler directory.<br />

v For GCC 4.1.2:<br />

/ztpf/tpfcross/build/tpf-06r1-13/H-s390x-linux-gnu/bin/refix<br />

v For GCC 4.6.3:<br />

/ztpf/tpfcross/build/tpf-11r1-8/H-s390x-linux-gnu/bin/refix<br />

You are prompted to enter the location of the <strong>IBM</strong> sysroot, for example:<br />

/ztpf/tpfcross/build/sys-root. The fully populated sysroot is ready to use.<br />

5. Complete setup and verification:<br />

a. Update (or create) the path variable and environment variables <strong>TPF</strong>_X_GCC<br />

and <strong>TPF</strong>_X_LIBS by using an editor to update a profile file (such as<br />

.bash_profile or /etc/profile.local) or by using the command prompt.<br />

For example, enter the following commands if you are using the GCC 4.1.2<br />

ELF-compatible compiler:<br />

export PATH=/ztpf/tpfcross/build/tpf-06r1-13/H-s390x-linux-gnu/bin:${PATH}<br />

export <strong>TPF</strong>_X_GCC=/ztpf/tpfcross/build/tpf-06r1-13/include/c++/4.1.2<br />

© Copyright <strong>IBM</strong> Corp. 2005, 2012 49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!