Making CrossTool Build Static ToolChain

Kristoffer Ericson kristoffer_e1@hotmail.com
Thu Jul 21 18:14:00 GMT 2005


Greetings,

In short:
BINUTILS:
Had no luck supplying the BINUTILS_EXTRA_CONFIG in configure script with the 
"LDFLAGS=-all-static" it just ment that it used that option for the first 
configure scripts but left it out in all the others.

So I removed that option from the configure script and first made it make 
all configure scripts with "make configure-host", and after that supplied it 
with the BINUTILS_EXTRA_CONFIG in the make line.

GCC:
I just removed the GCC_EXTRA_CONFIG from the configure script and put it 
after the
make line instead, otherwise it still kept doing dynamic.

Havent tried this on any other platforms than the SH3 but im guessing it 
should fit atleast a few platforms.

Dan,  Perhaps using BINUTILS_EXTRA_CONFIG & GCC_EXTRA_CONFIG isnt the best 
way to enable static. Perhaps a BINUTILS_EXTRA_MAKE & GCC_EXTRA_MAKE? That 
way a user could enable static toolchain by adding :

#Unrem to make static
#BINUTILS_EXTRA_MAKE = "LDFLAGS=-all-static"
#GCC_EXTRA_MAKE = "LDFLAGS=-static"

Best wishes
Kristoffer Ericson
www.jlime.com

--- crosstool.sh	2005-07-10 02:47:29.000000000 +0200
+++ /work/downloads/crosstool-0.37/crosstool.sh	2005-07-17 
22:21:17.000000000 +0200
@@ -347,10 +347,11 @@
mkdir -p build-binutils; cd build-binutils

if test '!' -f Makefile; then
-    ${BINUTILS_DIR}/configure $CANADIAN_BUILD --target=$TARGET 
--host=$GCC_HOST --prefix=$PREFIX --disable-nls ${BINUTILS_EXTRA_CONFIG} 
$BINUTILS_SYSROOT_ARG
+    ${BINUTILS_DIR}/configure $CANADIAN_BUILD --target=$TARGET 
--host=$GCC_HOST --prefix=$PREFIX --disable-nls $BINUTILS_SYSROOT_ARG
fi

-make $PARALLELMFLAGS all
+make configure-host
+make ${BINUTILS_EXTRA_CONF} $PARALLELMFLAGS all
make install

if test x"$CORE_PREFIX" != x"$PREFIX"; then
@@ -457,7 +458,6 @@
         --with-local-prefix=${SYSROOT} \
         --disable-multilib \
         --with-newlib \
-        ${GCC_EXTRA_CONFIG} \
         ${GCC_SYSROOT_ARG_CORE} \
         --disable-nls \
         --enable-threads=no \
@@ -468,7 +468,7 @@
fi

test "$CANADIAN_BUILD" = "" || make $PARALLELMFLAGS all-build-libiberty || 
true
-make $PARALLELMFLAGS all-gcc
+make ${GCC_EXTRA_CONFIG} $PARALLELMFLAGS all-gcc
make install-gcc

cd ..
@@ -577,7 +577,6 @@
     # --disable-nls to work around crash bug on ppc405, but also because 
embedded
     # systems don't really need message catalogs...
     ${GCC_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST 
--prefix=$PREFIX \
-        ${GCC_EXTRA_CONFIG} \
         $GCC_SYSROOT_ARG \
         --with-local-prefix=${SYSROOT} \
         --disable-nls \
@@ -618,7 +617,7 @@
     ;;
esac

-make $PARALLELMFLAGS all
+make ${GCC_EXTRA_CONFIG} $PARALLELMFLAGS all
make install

# FIXME: shouldn't people who want this just --disable-multilib in final gcc 
and be done with it?



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list