diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-cross.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index 5b0ca15d47..80b85fb054 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
@@ -2,8 +2,7 @@ inherit cross | |||
2 | 2 | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | 3 | INHIBIT_DEFAULT_DEPS = "1" |
4 | EXTRADEPENDS = "" | 4 | EXTRADEPENDS = "" |
5 | DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}" | 5 | DEPENDS = "virtual/cross-binutils ${EXTRADEPENDS} ${NATIVEDEPS}" |
6 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | ||
7 | python () { | 6 | python () { |
8 | if d.getVar("TARGET_OS").startswith("linux"): | 7 | if d.getVar("TARGET_OS").startswith("linux"): |
9 | d.setVar("EXTRADEPENDS", "linux-libc-headers") | 8 | d.setVar("EXTRADEPENDS", "linux-libc-headers") |
@@ -34,6 +33,7 @@ EXTRA_OECONF += "\ | |||
34 | EXTRA_OECONF:append:libc-baremetal = " --without-headers" | 33 | EXTRA_OECONF:append:libc-baremetal = " --without-headers" |
35 | EXTRA_OECONF:remove:libc-baremetal = "--enable-threads=posix" | 34 | EXTRA_OECONF:remove:libc-baremetal = "--enable-threads=posix" |
36 | EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix" | 35 | EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix" |
36 | EXTRA_OECONF:remove:libc-picolibc = "--enable-threads=posix" | ||
37 | 37 | ||
38 | EXTRA_OECONF_PATHS = "\ | 38 | EXTRA_OECONF_PATHS = "\ |
39 | --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \ | 39 | --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \ |
@@ -44,7 +44,6 @@ EXTRA_OECONF_PATHS = "\ | |||
44 | 44 | ||
45 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" | 45 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" |
46 | 46 | ||
47 | |||
48 | do_configure:prepend () { | 47 | do_configure:prepend () { |
49 | install -d ${RECIPE_SYSROOT}${target_includedir} | 48 | install -d ${RECIPE_SYSROOT}${target_includedir} |
50 | touch ${RECIPE_SYSROOT}${target_includedir}/limits.h | 49 | touch ${RECIPE_SYSROOT}${target_includedir}/limits.h |
@@ -62,19 +61,8 @@ do_compile () { | |||
62 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | 61 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" |
63 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | 62 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" |
64 | 63 | ||
65 | # Prevent native/host sysroot path from being used in configargs.h header, | 64 | remove_sysroot_paths_from_configargs '/host' |
66 | # as it will be rewritten when used by other sysroots preventing support | 65 | remove_sysroot_paths_from_checksum_options '${STAGING_DIR_HOST}' '/host' |
67 | # for gcc plugins | ||
68 | oe_runmake configure-gcc | ||
69 | sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h | ||
70 | sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h | ||
71 | |||
72 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
73 | # checksum-options is used to generate a checksum which is embedded into | ||
74 | # the output binary. | ||
75 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
76 | sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options | ||
77 | sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options | ||
78 | 66 | ||
79 | oe_runmake all-host configure-target-libgcc | 67 | oe_runmake all-host configure-target-libgcc |
80 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) | 68 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) |
@@ -105,7 +93,7 @@ do_install () { | |||
105 | # found. These need to be relative paths so they work in different locations. | 93 | # found. These need to be relative paths so they work in different locations. |
106 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | 94 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ |
107 | install -d $dest | 95 | install -d $dest |
108 | for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do | 96 | for t in ar as ld ld.bfd nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do |
109 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t | 97 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t |
110 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t | 98 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t |
111 | done | 99 | done |
@@ -120,7 +108,7 @@ do_install () { | |||
120 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 108 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
121 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 109 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
122 | 110 | ||
123 | find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f | 111 | cleanup_installed_include_fixed |
124 | 112 | ||
125 | # install LTO linker plugins where binutils tools can find it | 113 | # install LTO linker plugins where binutils tools can find it |
126 | install -d ${D}${libdir}/bfd-plugins | 114 | install -d ${D}${libdir}/bfd-plugins |