summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 10:04:03 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-23 16:20:13 +0100
commit5af02f216a4574fc8559c02ad17c8e82a18752e6 (patch)
tree6b932b03608fb18cab7601ef7fe6eaf306e939f7 /meta/recipes-devtools
parent8b855ad32d92f574e5781b89a7653009181cf3da (diff)
downloadpoky-5af02f216a4574fc8559c02ad17c8e82a18752e6.tar.gz
gcc-cross.inc: Clean up after merge
* Remove the duplicate EXTRA_OECONF_PATHS that is overwritten * Merge the do_compile and do_compile_prepend * Group dependency and configuration variables together (From OE-Core rev: 430b1d6fcbf60df35036fe5bbf8e55f7fb8f5341) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc48
1 files changed, 18 insertions, 30 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index bf22101807..a09fd54327 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -1,26 +1,38 @@
1inherit cross 1inherit cross
2 2
3INHIBIT_DEFAULT_DEPS = "1"
4EXTRADEPENDS = ""
3DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}" 5DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}"
4PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" 6PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
7python () {
8 if d.getVar("TARGET_OS", True).startswith("linux"):
9 d.setVar("EXTRADEPENDS", "linux-libc-headers")
10}
5 11
6require gcc-configure-common.inc 12require gcc-configure-common.inc
7 13
8EXTRA_OECONF += " --enable-poison-system-directories \ 14EXTRA_OECONF += " --enable-poison-system-directories"
9 " 15EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets "
10 16
11INHIBIT_DEFAULT_DEPS = "1" 17EXTRA_OECONF += "--disable-libunwind-exceptions \
18 --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
19 --with-system-zlib "
12 20
13EXTRA_OECONF_PATHS = " \ 21EXTRA_OECONF_PATHS = " \
14 --with-headers=${STAGING_DIR_TARGET}${SYSTEMHEADERS} \ 22 --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
15 --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
16 --with-sysroot=${STAGING_DIR_TARGET} \ 23 --with-sysroot=${STAGING_DIR_TARGET} \
17 --with-build-sysroot=${STAGING_DIR_TARGET}" 24 --with-build-sysroot=${STAGING_DIR_TARGET}"
18 25
26ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
27
28LIBGCCS_VAR = "-lgcc_s"
29LIBGCCS_VAR_avr32 = ""
30
19do_configure_prepend () { 31do_configure_prepend () {
20 sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure 32 sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure
21} 33}
22 34
23do_compile_prepend () { 35do_compile () {
24 export CC="${BUILD_CC}" 36 export CC="${BUILD_CC}"
25 export AR_FOR_TARGET="${TARGET_SYS}-ar" 37 export AR_FOR_TARGET="${TARGET_SYS}-ar"
26 export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib" 38 export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
@@ -31,18 +43,7 @@ do_compile_prepend () {
31 export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" 43 export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
32 export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" 44 export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
33 export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" 45 export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
34}
35
36LIBGCCS_VAR = "-lgcc_s"
37LIBGCCS_VAR_avr32 = ""
38 46
39EXTRADEPENDS = ""
40python () {
41 if d.getVar("TARGET_OS", True).startswith("linux"):
42 d.setVar("EXTRADEPENDS", "linux-libc-headers")
43}
44
45do_compile () {
46 oe_runmake all-host all-target-libgcc 47 oe_runmake all-host all-target-libgcc
47 # now generate script to drive testing 48 # now generate script to drive testing
48 echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc 49 echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc
@@ -137,19 +138,6 @@ STOP
137 138
138} 139}
139 140
140EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets "
141
142EXTRA_OECONF += "--disable-libunwind-exceptions \
143 --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
144 --with-system-zlib "
145
146EXTRA_OECONF_PATHS = " \
147 --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
148 --with-sysroot=${STAGING_DIR_TARGET} \
149 --with-build-sysroot=${STAGING_DIR_TARGET}"
150
151ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
152
153INHIBIT_PACKAGE_STRIP = "1" 141INHIBIT_PACKAGE_STRIP = "1"
154 142
155# Compute how to get from libexecdir to bindir in python (easier than shell) 143# Compute how to get from libexecdir to bindir in python (easier than shell)