Changeset 1dfe239 in clfs-embedded for BOOK/cross-tools/common


Ignore:
Timestamp:
Apr 14, 2017, 3:07:36 AM (8 years ago)
Author:
Andrew Bradford <andrew@…>
Branches:
master
Children:
4d9350d
Parents:
a3957dd
Message:

cross-tools/toolchain: Use --sysroot= for CC, CXX, and LD

This allows the compiler and linker to use the targetfs directory
structure as the sysroot for compiling but will mean that we have to
build musl one more time in the final-system chapter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/cross-tools/common/toolchain.xml

    ra3957dd r1dfe239  
    1111  <title>ToolChain Variables</title>
    1212
    13   <para>Setup target-specific variables for the compiler
    14   and linkers. This time we keep them:</para>
     13  <para>Setup target-specific variables for the compiler, linker, and other
     14    compile-time tools.  For the compiler and linker, use the target file system
     15    directory as a sysroot rather than the sysroot we setup before for the
     16    cross-tools. This time we write them to <filename>~/.bashrc</filename> so
     17    that they persist even if the clfs user logs out:</para>
    1518
    16 <screen><userinput>echo <literal>export CC=\""${CLFS_TARGET}-gcc\""</literal> &gt;&gt; ~/.bashrc
    17 echo <literal>export CXX=\""${CLFS_TARGET}-g++\""</literal> &gt;&gt; ~/.bashrc
     19<screen><userinput>echo <literal>export CC=\""${CLFS_TARGET}-gcc --sysroot=${CLFS}/targetfs\""</literal> &gt;&gt; ~/.bashrc
     20echo <literal>export CXX=\""${CLFS_TARGET}-g++ --sysroot=${CLFS}/targetfs\""</literal> &gt;&gt; ~/.bashrc
    1821echo <literal>export AR=\""${CLFS_TARGET}-ar\""</literal> &gt;&gt; ~/.bashrc
    1922echo <literal>export AS=\""${CLFS_TARGET}-as\""</literal> &gt;&gt; ~/.bashrc
    20 echo <literal>export LD=\""${CLFS_TARGET}-ld\""</literal> &gt;&gt; ~/.bashrc
     23echo <literal>export LD=\""${CLFS_TARGET}-ld --sysroot=${CLFS}/targetfs\""</literal> &gt;&gt; ~/.bashrc
    2124echo <literal>export RANLIB=\""${CLFS_TARGET}-ranlib\""</literal> &gt;&gt; ~/.bashrc
    2225echo <literal>export READELF=\""${CLFS_TARGET}-readelf\""</literal> &gt;&gt; ~/.bashrc
Note: See TracChangeset for help on using the changeset viewer.