From 93052c9900da497fd4caa7dc8d214797446bb93b Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 23 Jan 2015 08:44:17 -0800 Subject: adt-manual: Remaining mods to clarify xtoolchain env use Fixes [YOCTO #7133] Edits to add more clarification for use and role of the cross-toolchain environment variables established when a user runs the cross-toolchain environment setup script. (From yocto-docs rev: 2c3fa3a838a3a8970cd112935e903c96552ed06b) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/adt-manual/adt-command.xml | 38 +++++++++++++++++++------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'documentation/adt-manual/adt-command.xml') 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 @@ are also defined so that, for example, configure.sh can find pre-generated test results for tests that need target hardware on which to run. + You can see the + "Setting Up the Cross-Development Environment" + section for the list of cross-toolchain environment variables + established by the script. @@ -99,7 +103,7 @@ "poky-linux". Here is an example that sources a script from the default ADT installation directory that uses the - 32-bit Intel x86 Architecture and using the + 32-bit Intel x86 Architecture and the &DISTRO_NAME; Yocto Project release: $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux @@ -128,7 +132,11 @@ $ automake -a Cross-compile the project: - This command compiles the project using the cross-compiler: + This command compiles the project using the cross-compiler. + The + CONFIGURE_FLAGS + environment variable provides the minimal arguments for + GNU configure: $ ./configure ${CONFIGURE_FLAGS} @@ -174,16 +182,12 @@ is armv5te-poky-linux-gnueabi. You will notice that the name of the script is environment-setup-armv5te-poky-linux-gnueabi. - Thus, the following command works: + Thus, the following command works to update your project and + rebuild it using the appropriate cross-toolchain tools: $ ./configure --host=armv5te-poky-linux-gnueabi \ --with-libtool-sysroot=sysroot-dir - - - - This single command updates your project and rebuilds it using the appropriate - cross-toolchain tools. If the configure script results in problems recognizing the --with-libtool-sysroot=sysroot-dir option, @@ -206,14 +210,18 @@ Makefile-Based Projects - For a Makefile-based project, you use the cross-toolchain by making sure - the tools are used. - You can do this as follows: + For Makefile-based projects, you make sure your + Makefile has statements that ensure proper + use of the cross-toolchain. + For example, the following statements inside a + Makefile ensure the C compiler, linker, flags + passed to the C compiler, and flags passed to the C++ compiler are + specifically defined for the build: - CC=arm-poky-linux-gnueabi-gcc - LD=arm-poky-linux-gnueabi-ld - CFLAGS=”${CFLAGS} --sysroot=<sysroot-dir>” - CXXFLAGS=”${CXXFLAGS} --sysroot=<sysroot-dir>” + CC=arm-poky-linux-gnueabi-gcc + LD=arm-poky-linux-gnueabi-ld + CFLAGS=”${CFLAGS} --sysroot=<sysroot-dir>” + CXXFLAGS=”${CXXFLAGS} --sysroot=<sysroot-dir>” -- cgit v1.2.3-54-g00ecf