summaryrefslogtreecommitdiff
path: root/packages/gcc/gcc-package-cross.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2008-12-10 12:05:30 -0800
committerKhem Raj <raj.khem@gmail.com>2008-12-10 12:05:30 -0800
commitfca5cadc1e2012f01afcdd67d9482a4c52aa52d1 (patch)
tree19617c6e63af57cc2c2b3de4d849e38c99e407ea /packages/gcc/gcc-package-cross.inc
parentb7040d5e843b3172a040f119ed1f047a1c880aa8 (diff)
gcc-package-cross: Creative relative symbolic link to fortran and only if fortran is available
* This patch adds the symbolic link only if fortran is enabled in gcc and secondly it creates them relative and not absolute as they are right now.
Diffstat (limited to 'packages/gcc/gcc-package-cross.inc')
-rw-r--r--packages/gcc/gcc-package-cross.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/gcc/gcc-package-cross.inc b/packages/gcc/gcc-package-cross.inc
index b95ef88e6f..a16f21a105 100644
--- a/packages/gcc/gcc-package-cross.inc
+++ b/packages/gcc/gcc-package-cross.inc
@@ -63,7 +63,13 @@ do_install () {
fi
# 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 ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true
- ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true
+ # 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
+ cd ${CROSS_DIR}/${TARGET_SYS}/bin/
+ ln -sf gfortran g77 || true
+ cd $currdir
+ fi
}