changeset 1085:2e03f846b21e

Build ccwrap static unless BUILD_STATIC=none or we're doing the simple cross compiler.
author Rob Landley <rob@landley.net>
date Sun, 16 May 2010 18:36:07 -0500
parents b52ba5df878d
children 59281941172b
files sources/sections/ccwrap.sh
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/sources/sections/ccwrap.sh	Sun May 16 18:25:39 2010 -0500
+++ b/sources/sections/ccwrap.sh	Sun May 16 18:36:07 2010 -0500
@@ -1,9 +1,15 @@
 # build and install gcc wrapper script.
 
-# Which compiler do we build the wrapper with?
+# Which compiler do we build the wrapper with, and should it be static?
 
-TEMP="${FROM_ARCH}-cc"
-[ -z "$FROM_ARCH" ] && TEMP="$CC"
+if [ -z "$FROM_ARCH" ] || [ "$BUILD_STATIC" == none ]
+then
+  TEMP="$CC"
+  STATIC_FLAGS=
+else
+  TEMP="${FROM_ARCH}-cc"
+  STATIC_FLAGS=--static
+fi
 
 # Copy compiler binaries (if not already present)