Patchwork [1/2] gcc-cross-canadian: do not create symlinks to non-existent binaries

login
register
mail settings
Submitter Laurentiu Palcu
Date March 15, 2013, 4:01 p.m.
Message ID <1363363314-12326-2-git-send-email-laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/46261/
State Accepted
Commit c5c135bc5e71a6f9b14f249358bf5d217050ee55
Headers show

Comments

Laurentiu Palcu - March 15, 2013, 4:01 p.m.
If fortran is not built, soft links to gfortran and g77 are created
even though the fortran compiler doesn't exist...

[YOCTO #4023]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/recipes-devtools/gcc/gcc-package-sdk.inc |    4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-package-sdk.inc b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
index f32e95f..bb6dfde 100644
--- a/meta/recipes-devtools/gcc/gcc-package-sdk.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
@@ -60,6 +60,10 @@  do_install () {
 	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
+		if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t ]; then
+			continue
+		fi
+
 		ln -sf ${bindir}/${TARGET_PREFIX}$t $dest$t
 	done