aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gcc/gcc-configure-cross.inc
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-03-29 19:36:57 +0200
committerKoen Kooi <koen@openembedded.org>2010-03-30 17:30:23 +0200
commitcdff13c73dbf704a7c1904f4c245aa3ac4ff4932 (patch)
tree36dc5f504eca36576893ac71710993fdaacc7be6 /recipes/gcc/gcc-configure-cross.inc
parentbc81e417ed196435e43ee540d4a743f8931ae19b (diff)
downloadopenembedded-cdff13c73dbf704a7c1904f4c245aa3ac4ff4932.tar.gz
gcc-cross: fix gfortran -> g77 linking logic
Acked-by: Tom Rini <tom_rini@mentor.com> Signed-off-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'recipes/gcc/gcc-configure-cross.inc')
-rw-r--r--recipes/gcc/gcc-configure-cross.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/recipes/gcc/gcc-configure-cross.inc b/recipes/gcc/gcc-configure-cross.inc
index 1c37de8b4a..7dde9de064 100644
--- a/recipes/gcc/gcc-configure-cross.inc
+++ b/recipes/gcc/gcc-configure-cross.inc
@@ -51,5 +51,18 @@ do_stage_append () {
sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libsupc++.la || true
sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libstdc++.la || true
done
+
+ # 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.
+ if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
+ currdir="$PWD"
+ cd ${CROSS_DIR}/bin/
+ ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
+ if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then
+ cd ${CROSS_DIR}/${TARGET_SYS}/bin/
+ ln -sf gfortran g77 || true
+ fi
+ cd $currdir
+ fi
}