diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc index 45985c384..1e184a60d 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc @@ -57,6 +57,7 @@ do_compile () { export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" oe_runmake all-host configure-target-libgcc + (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) # now generate script to drive testing echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc set >> ${B}/${TARGET_PREFIX}testgcc @@ -155,22 +156,24 @@ INHIBIT_PACKAGE_STRIP = "1" BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" do_install () { - ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h ) + ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) oe_runmake 'DESTDIR=${D}' install-host install -d ${D}${target_base_libdir} install -d ${D}${target_libdir} - + # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 # gfortran is fully backwards compatible. This is a safe and practical solution. - ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true + if [ -n "${@d.getVar('FORTRAN')}" ]; then + ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true + fortsymlinks="g77 gfortran" + fi - # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are # found. These need to be relative paths so they work in different locations. dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ install -d $dest - for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do + for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t done |