6.2. Build Variables

#### Cross-Compiled Linux From Scratch - Version 1.0.0rc1-PowerPC64-Multilib

### Chapter 6. Constructing a Temporary System

- Prev

  Constructing a Temporary System

- Next

  Binutils-2.17

- Up.
- Home

# 6.2. Build Variables

Setup target-specific variables for the compiler and linkers:

    export CC="${LFS_TARGET}-gcc"
    export CXX="${LFS_TARGET}-g++"
    export AR="${LFS_TARGET}-ar"
    export AS="${LFS_TARGET}-as"
    export RANLIB="${LFS_TARGET}-ranlib"
    export LD="${LFS_TARGET}-ld"
    export STRIP="${LFS_TARGET}-strip"

Then add the build variables to `~/.bashrc` to prevent issues if you stop and come back later:

    echo export CC=\""${CC}\"" >> ~/.bashrc
    echo export CXX=\""${CXX}\"" >> ~/.bashrc
    echo export AR=\""${AR}\"" >> ~/.bashrc
    echo export AS=\""${AS}\"" >> ~/.bashrc
    echo export RANLIB=\""${RANLIB}\"" >> ~/.bashrc
    echo export LD=\""${LD}\"" >> ~/.bashrc
    echo export STRIP=\""${STRIP}\"" >> ~/.bashrc

- Prev

  Constructing a Temporary System

- Next

  Binutils-2.17

- Up.
- Home.