diff --git a/meta/uninstalled-env.in b/meta/uninstalled-env.in index 2276b4aed..24a05f92a 100644 --- a/meta/uninstalled-env.in +++ b/meta/uninstalled-env.in @@ -71,22 +71,27 @@ else fi export GUILE_LOAD_PATH -if [ x"$GUILE_LOAD_COMPILED_PATH" = x ] +# When cross-compiling, let $GUILE_FOR_BUILD use its own .go files since +# the ones that are being built may be incompatible. +if test "@cross_compiling@" = "no" then - GUILE_LOAD_COMPILED_PATH="${top_builddir}/module:${top_builddir}/guile-readline:${top_builddir}" -else - for d in "/module" "/guile-readline" "" - do - # This hair prevents double inclusion. - # The ":" prevents prefix aliasing. - case x"$GUILE_LOAD_COMPILED_PATH" in - x*${top_builddir}${d}:*) ;; - x*${top_builddir}${d}) ;; - *) GUILE_LOAD_COMPILED_PATH="${top_builddir}${d}:$GUILE_LOAD_COMPILED_PATH" ;; - esac - done + if test "x$GUILE_LOAD_COMPILED_PATH" = "x" + then + GUILE_LOAD_COMPILED_PATH="${top_builddir}/module:${top_builddir}/guile-readline:${top_builddir}" + else + for d in "/module" "/guile-readline" "" + do + # This hair prevents double inclusion. + # The ":" prevents prefix aliasing. + case x"$GUILE_LOAD_COMPILED_PATH" in + x*${top_builddir}${d}:*) ;; + x*${top_builddir}${d}) ;; + *) GUILE_LOAD_COMPILED_PATH="${top_builddir}${d}:$GUILE_LOAD_COMPILED_PATH" ;; + esac + done + fi + export GUILE_LOAD_COMPILED_PATH fi -export GUILE_LOAD_COMPILED_PATH # Don't look in installed dirs for guile modules if ( env | grep -v '^GUILE_SYSTEM_PATH=' > /dev/null ); then