diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-22 10:04:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-23 16:20:13 +0100 |
commit | 5af02f216a4574fc8559c02ad17c8e82a18752e6 (patch) | |
tree | 6b932b03608fb18cab7601ef7fe6eaf306e939f7 /meta/recipes-devtools | |
parent | 8b855ad32d92f574e5781b89a7653009181cf3da (diff) | |
download | poky-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.inc | 48 |
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 @@ | |||
1 | inherit cross | 1 | inherit cross |
2 | 2 | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | ||
4 | EXTRADEPENDS = "" | ||
3 | DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}" | 5 | DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}" |
4 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | 6 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" |
7 | python () { | ||
8 | if d.getVar("TARGET_OS", True).startswith("linux"): | ||
9 | d.setVar("EXTRADEPENDS", "linux-libc-headers") | ||
10 | } | ||
5 | 11 | ||
6 | require gcc-configure-common.inc | 12 | require gcc-configure-common.inc |
7 | 13 | ||
8 | EXTRA_OECONF += " --enable-poison-system-directories \ | 14 | EXTRA_OECONF += " --enable-poison-system-directories" |
9 | " | 15 | EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets " |
10 | 16 | ||
11 | INHIBIT_DEFAULT_DEPS = "1" | 17 | EXTRA_OECONF += "--disable-libunwind-exceptions \ |
18 | --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \ | ||
19 | --with-system-zlib " | ||
12 | 20 | ||
13 | EXTRA_OECONF_PATHS = " \ | 21 | EXTRA_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 | ||
26 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" | ||
27 | |||
28 | LIBGCCS_VAR = "-lgcc_s" | ||
29 | LIBGCCS_VAR_avr32 = "" | ||
30 | |||
19 | do_configure_prepend () { | 31 | do_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 | ||
23 | do_compile_prepend () { | 35 | do_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 | |||
36 | LIBGCCS_VAR = "-lgcc_s" | ||
37 | LIBGCCS_VAR_avr32 = "" | ||
38 | 46 | ||
39 | EXTRADEPENDS = "" | ||
40 | python () { | ||
41 | if d.getVar("TARGET_OS", True).startswith("linux"): | ||
42 | d.setVar("EXTRADEPENDS", "linux-libc-headers") | ||
43 | } | ||
44 | |||
45 | do_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 | ||
140 | EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets " | ||
141 | |||
142 | EXTRA_OECONF += "--disable-libunwind-exceptions \ | ||
143 | --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \ | ||
144 | --with-system-zlib " | ||
145 | |||
146 | EXTRA_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 | |||
151 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" | ||
152 | |||
153 | INHIBIT_PACKAGE_STRIP = "1" | 141 | INHIBIT_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) |