During the building of the cross-compile tools you will need to set a few variables that will be dependent on your particular needs. You will need to set the target triplet for the target architecture. You can do this by running the same command as above, just running it on the target machine. If you can't run the command on the target machine, you can use the table at the bottom of this page. Set the command using the method listed below:
export CLFS_HOST="${MACHTYPE}"
export CLFS_TARGET="{target triplet}"Now we will setup out default architecture needed we need to build:
export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/')Now we will setup out default endian needed we need to build and set the one we don't need:
export CLFS_ENDIAN=LITTLE export CLFS_NOT_ENDIAN=BIG
Now we will add this to ~/.bashrc, just in
case you have to exit and restart building later:
echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc
echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc
echo export CLFS_NOT_ENDIAN=\""${CLFS_NOT_ENDIAN}\"" >> ~/.bashrcTable 6.2. Processor Type and Target Triplets
| Processor | Target Triplet |
|---|---|
| 486 Compatibles | i486-pc-linux-uclibc |
| Pentium, K6, 586 Compatibles | i586-pc-linux-uclibc |
| Pentium II, Pentium III, Pentium 4 | i686-pc-linux-uclibc |
| Athlon, Duron | i686-pc-linux-uclibc |
| x86_64 | x86_64-unknown-linux-uclibc |