8.7. Build Flags

We will need to setup target specific flags for the compiler and linkers.

export BUILD32="[BUILD32 entries]"
export BUILD64="[BUILD64 entries]"

You will need to set your host target triplet for 32 bit:

export CLFS_TARGET32="sparcv9-unknown-linux-gnu"

To prevent errors when you come back to your build, we will export these variables to prevent any build issues in the future:

cat >> ${CLFS}/root/.bash_profile << EOF
export BUILD32="${BUILD32}"
export BUILD64="${BUILD64}"
export CLFS_TARGET32="${CLFS_TARGET32}"
EOF

The following table gives the entries for different Sparc 64 capable processors. Pick the processor that matches your system. Note: GCC settings are only needed in the early sections of the book, and will not be used in the final-system builds.

Table 8.1. List of 32-Bit settings, 64-Bit Build settings, and GCC setting

Processor BUILD32 BUILD64 GCCTARGET
Ultrasparc and Ultrasparc2 -m32 -mcpu=ultrasparc -mtune=ultrasparc -m64 -mcpu=ultrasparc -mtune=ultrasparc -mcpu=ultrasparc -mtune=ultrasparc
Ultrasparc3 -m32 -mcpu=ultrasparc3 -mtune=ultrasparc3 -m64 -mcpu=ultrasparc3 -mtune=ultrasparc3 -mcpu=ultrasparc3 -mtune=ultrasparc3