8.7. Build Flags

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

export BUILD32="-mabi=32"
export BUILDN32="-mabi=n32"
export BUILD64="-mabi=64"

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

export CLFS_TARGET32="$(echo ${MACH_TYPE}| sed -e 's/64//g')"

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 BUILDN32="${BUILDN32}"
export BUILD64="${BUILD64}"
export CLFS_TARGET32="${CLFS_TARGET32}"
EOF