Last change
on this file since 83a31c3 was 1dfe239, checked in by Andrew Bradford <andrew@…>, 8 years ago |
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.
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[8520e58] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[bd48e48] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[8520e58] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-toolchain">
|
---|
| 9 | <?dbhtml filename="toolchain.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>ToolChain Variables</title>
|
---|
| 12 |
|
---|
[1dfe239] | 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>
|
---|
[8520e58] | 18 |
|
---|
[1dfe239] | 19 | <screen><userinput>echo <literal>export CC=\""${CLFS_TARGET}-gcc --sysroot=${CLFS}/targetfs\""</literal> >> ~/.bashrc
|
---|
| 20 | echo <literal>export CXX=\""${CLFS_TARGET}-g++ --sysroot=${CLFS}/targetfs\""</literal> >> ~/.bashrc
|
---|
[3ca2208] | 21 | echo <literal>export AR=\""${CLFS_TARGET}-ar\""</literal> >> ~/.bashrc
|
---|
| 22 | echo <literal>export AS=\""${CLFS_TARGET}-as\""</literal> >> ~/.bashrc
|
---|
[1dfe239] | 23 | echo <literal>export LD=\""${CLFS_TARGET}-ld --sysroot=${CLFS}/targetfs\""</literal> >> ~/.bashrc
|
---|
[3ca2208] | 24 | echo <literal>export RANLIB=\""${CLFS_TARGET}-ranlib\""</literal> >> ~/.bashrc
|
---|
| 25 | echo <literal>export READELF=\""${CLFS_TARGET}-readelf\""</literal> >> ~/.bashrc
|
---|
| 26 | echo <literal>export STRIP=\""${CLFS_TARGET}-strip\""</literal> >> ~/.bashrc
|
---|
| 27 | source ~/.bashrc</userinput></screen>
|
---|
[8520e58] | 28 |
|
---|
| 29 | </sect1>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.