diff native-compiler.sh @ 1207:4021fb1183d7

Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
author Rob Landley <rob@landley.net>
date Mon, 16 Aug 2010 15:00:35 -0500
parents c222ae88733a
children 42bcb67165b4
line wrap: on
line diff
--- a/native-compiler.sh	Fri Aug 13 17:19:28 2010 -0500
+++ b/native-compiler.sh	Mon Aug 16 15:00:35 2010 -0500
@@ -13,16 +13,8 @@
 check_for_base_arch || exit 0
 
 check_prerequisite "${ARCH}-cc"
-if [ -z "$HOST_ARCH" ]
-then
-  # Build unprefixed native compiler
-  HOST_ARCH="$ARCH"
-else
-  # Build prefixed cross compiler via canadian cross.  Needs a host compiler
-  # to build the executables and a target compiler to build the libraries.
-  PROGRAM_PREFIX="$ARCH-"
-  check_prerequisite "${HOST_ARCH}-cc"
-fi
+
+[ -z "$HOST_ARCH" ] && HOST_ARCH="$ARCH" || check_prerequisite "${HOST_ARCH}-cc"
 
 mkdir -p "$STAGE_DIR/bin" || dienow