summaryrefslogtreecommitdiffstats
path: root/documentation/adt-manual/adt-command.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/adt-manual/adt-command.xml')
-rw-r--r--documentation/adt-manual/adt-command.xml38
1 files changed, 23 insertions, 15 deletions
diff --git a/documentation/adt-manual/adt-command.xml b/documentation/adt-manual/adt-command.xml
index 164b1efbff..0faa05fa6c 100644
--- a/documentation/adt-manual/adt-command.xml
+++ b/documentation/adt-manual/adt-command.xml
@@ -24,6 +24,10 @@
24 are also defined so that, for example, <filename>configure.sh</filename> 24 are also defined so that, for example, <filename>configure.sh</filename>
25 can find pre-generated test results for tests that need target hardware 25 can find pre-generated test results for tests that need target hardware
26 on which to run. 26 on which to run.
27 You can see the
28 "<link linkend='setting-up-the-cross-development-environment'>Setting Up the Cross-Development Environment</link>"
29 section for the list of cross-toolchain environment variables
30 established by the script.
27 </para> 31 </para>
28 32
29 <para> 33 <para>
@@ -99,7 +103,7 @@
99 "poky-linux". 103 "poky-linux".
100 Here is an example that sources a script from the 104 Here is an example that sources a script from the
101 default ADT installation directory that uses the 105 default ADT installation directory that uses the
102 32-bit Intel x86 Architecture and using the 106 32-bit Intel x86 Architecture and the
103 &DISTRO_NAME; Yocto Project release: 107 &DISTRO_NAME; Yocto Project release:
104 <literallayout class='monospaced'> 108 <literallayout class='monospaced'>
105 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux 109 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
@@ -128,7 +132,11 @@
128 $ automake -a 132 $ automake -a
129 </literallayout></para></listitem> 133 </literallayout></para></listitem>
130 <listitem><para><emphasis>Cross-compile the project:</emphasis> 134 <listitem><para><emphasis>Cross-compile the project:</emphasis>
131 This command compiles the project using the cross-compiler: 135 This command compiles the project using the cross-compiler.
136 The
137 <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink>
138 environment variable provides the minimal arguments for
139 GNU configure:
132 <literallayout class='monospaced'> 140 <literallayout class='monospaced'>
133 $ ./configure ${CONFIGURE_FLAGS} 141 $ ./configure ${CONFIGURE_FLAGS}
134 </literallayout></para></listitem> 142 </literallayout></para></listitem>
@@ -174,16 +182,12 @@
174 is <filename>armv5te-poky-linux-gnueabi</filename>. 182 is <filename>armv5te-poky-linux-gnueabi</filename>.
175 You will notice that the name of the script is 183 You will notice that the name of the script is
176 <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>. 184 <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
177 Thus, the following command works: 185 Thus, the following command works to update your project and
186 rebuild it using the appropriate cross-toolchain tools:
178 <literallayout class='monospaced'> 187 <literallayout class='monospaced'>
179 $ ./configure --host=armv5te-poky-linux-gnueabi \ 188 $ ./configure --host=armv5te-poky-linux-gnueabi \
180 --with-libtool-sysroot=<replaceable>sysroot-dir</replaceable> 189 --with-libtool-sysroot=<replaceable>sysroot-dir</replaceable>
181 </literallayout> 190 </literallayout>
182 </para>
183
184 <para>
185 This single command updates your project and rebuilds it using the appropriate
186 cross-toolchain tools.
187 <note> 191 <note>
188 If the <filename>configure</filename> script results in problems recognizing the 192 If the <filename>configure</filename> script results in problems recognizing the
189 <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable> option, 193 <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable> option,
@@ -206,14 +210,18 @@
206<title>Makefile-Based Projects</title> 210<title>Makefile-Based Projects</title>
207 211
208 <para> 212 <para>
209 For a Makefile-based project, you use the cross-toolchain by making sure 213 For Makefile-based projects, you make sure your
210 the tools are used. 214 <filename>Makefile</filename> has statements that ensure proper
211 You can do this as follows: 215 use of the cross-toolchain.
216 For example, the following statements inside a
217 <filename>Makefile</filename> ensure the C compiler, linker, flags
218 passed to the C compiler, and flags passed to the C++ compiler are
219 specifically defined for the build:
212 <literallayout class='monospaced'> 220 <literallayout class='monospaced'>
213 CC=arm-poky-linux-gnueabi-gcc 221 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'>CC</ulink>=arm-poky-linux-gnueabi-gcc
214 LD=arm-poky-linux-gnueabi-ld 222 <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'>LD</ulink>=arm-poky-linux-gnueabi-ld
215 CFLAGS=”${CFLAGS} --sysroot=&lt;sysroot-dir&gt;” 223 <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'>CFLAGS</ulink>=”${CFLAGS} --sysroot=&lt;sysroot-dir&gt;”
216 CXXFLAGS=”${CXXFLAGS} --sysroot=&lt;sysroot-dir&gt;” 224 <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'>CXXFLAGS</ulink>=”${CXXFLAGS} --sysroot=&lt;sysroot-dir&gt;”
217 </literallayout> 225 </literallayout>
218 </para> 226 </para>
219</section> 227</section>