diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-cross.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index 6fa8c274cd..a540fb2434 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
@@ -21,8 +21,8 @@ require gcc-configure-common.inc | |||
21 | # gnu) will hit a QA failure. | 21 | # gnu) will hit a QA failure. |
22 | LINKER_HASH_STYLE ?= "sysv" | 22 | LINKER_HASH_STYLE ?= "sysv" |
23 | 23 | ||
24 | EXTRA_OECONF += "--enable-poison-system-directories" | 24 | EXTRA_OECONF += "--enable-poison-system-directories=error" |
25 | EXTRA_OECONF_append_sh4 = " \ | 25 | EXTRA_OECONF:append:sh4 = " \ |
26 | --with-multilib-list= \ | 26 | --with-multilib-list= \ |
27 | --enable-incomplete-targets \ | 27 | --enable-incomplete-targets \ |
28 | " | 28 | " |
@@ -31,9 +31,9 @@ EXTRA_OECONF += "\ | |||
31 | --with-system-zlib \ | 31 | --with-system-zlib \ |
32 | " | 32 | " |
33 | 33 | ||
34 | EXTRA_OECONF_append_libc-baremetal = " --without-headers" | 34 | EXTRA_OECONF:append:libc-baremetal = " --without-headers" |
35 | EXTRA_OECONF_remove_libc-baremetal = "--enable-threads=posix" | 35 | EXTRA_OECONF:remove:libc-baremetal = "--enable-threads=posix" |
36 | EXTRA_OECONF_remove_libc-newlib = "--enable-threads=posix" | 36 | EXTRA_OECONF:remove:libc-newlib = "--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,7 @@ EXTRA_OECONF_PATHS = "\ | |||
44 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" | 44 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" |
45 | 45 | ||
46 | 46 | ||
47 | do_configure_prepend () { | 47 | do_configure:prepend () { |
48 | install -d ${RECIPE_SYSROOT}${target_includedir} | 48 | install -d ${RECIPE_SYSROOT}${target_includedir} |
49 | touch ${RECIPE_SYSROOT}${target_includedir}/limits.h | 49 | touch ${RECIPE_SYSROOT}${target_includedir}/limits.h |
50 | } | 50 | } |
@@ -83,6 +83,8 @@ INHIBIT_PACKAGE_STRIP = "1" | |||
83 | 83 | ||
84 | # Compute how to get from libexecdir to bindir in python (easier than shell) | 84 | # Compute how to get from libexecdir to bindir in python (easier than shell) |
85 | BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" | 85 | BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" |
86 | # linker plugin path | ||
87 | LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/bfd-plugins"))}" | ||
86 | 88 | ||
87 | do_install () { | 89 | do_install () { |
88 | ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) | 90 | ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) |
@@ -92,7 +94,7 @@ do_install () { | |||
92 | install -d ${D}${target_libdir} | 94 | install -d ${D}${target_libdir} |
93 | 95 | ||
94 | # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 | 96 | # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 |
95 | # gfortran is fully backwards compatible. This is a safe and practical solution. | 97 | # gfortran is fully backwards compatible. This is a safe and practical solution. |
96 | if [ -n "${@d.getVar('FORTRAN')}" ]; then | 98 | if [ -n "${@d.getVar('FORTRAN')}" ]; then |
97 | ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true | 99 | ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true |
98 | fortsymlinks="g77 gfortran" | 100 | fortsymlinks="g77 gfortran" |
@@ -118,6 +120,10 @@ do_install () { | |||
118 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 120 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
119 | 121 | ||
120 | 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 | 122 | 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 |
123 | |||
124 | # install LTO linker plugins where binutils tools can find it | ||
125 | install -d ${D}${libdir}/bfd-plugins | ||
126 | ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so | ||
121 | } | 127 | } |
122 | 128 | ||
123 | do_package[noexec] = "1" | 129 | do_package[noexec] = "1" |
@@ -143,6 +149,7 @@ do_gcc_stash_builddir () { | |||
143 | # Makefile does move-if-change which can end up with 'timestamp' as file contents so break links to those files | 149 | # Makefile does move-if-change which can end up with 'timestamp' as file contents so break links to those files |
144 | rm $dest/gcc/include/*.h | 150 | rm $dest/gcc/include/*.h |
145 | cp gcc/include/*.h $dest/gcc/include/ | 151 | cp gcc/include/*.h $dest/gcc/include/ |
152 | sysroot-relativelinks.py $dest | ||
146 | } | 153 | } |
147 | addtask do_gcc_stash_builddir after do_compile before do_install | 154 | addtask do_gcc_stash_builddir after do_compile before do_install |
148 | SSTATETASKS += "do_gcc_stash_builddir" | 155 | SSTATETASKS += "do_gcc_stash_builddir" |