aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/autogen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/autogen.sh')
-rwxr-xr-xscripts/autogen.sh41
1 files changed, 40 insertions, 1 deletions
diff --git a/scripts/autogen.sh b/scripts/autogen.sh
index f962abdbd..d01e1c856 100755
--- a/scripts/autogen.sh
+++ b/scripts/autogen.sh
@@ -108,7 +108,8 @@ if test "$1" = "--build-coldfire"; then
CFLAGS="$CFLAGS -m5307 -DCONFIG_COLDFIRE"
CFLAGS="$CFLAGS -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED"
CFLAGS="$CFLAGS -fno-builtin -msep-data"
- LDFLAGS="-Wl,-elf2flt -Wl,-move-rodata"
+ LDFLAGS="-Wl,-elf2flt -Wl,-move-rodata -nostartfiles"
+ LDFLAGS="$LDFLAGS ${crossdir}/m68k-elf/lib/crt0.o"
LIBS="-lc"
disable_foo_tests=""
@@ -144,6 +145,44 @@ if test "$1" = "--build-coldfire"; then
fi
+# This is the special case to build on a ColdFire platform under
+# the uClinux kernel with uClinux-dist. Tested on a MCF4249C3 board.
+if test "$1" = "--build-uclinux"; then
+ tmp=`dirname $0`
+ tsdir=`cd "$tmp"; cd ..; pwd`
+ shift
+
+ if [ ! -f $tsdir/scripts/config.guess ]; then
+ echo "$tsdir/scripts/config.guess not found" >&2
+ exit 1
+ fi
+ build=`$tsdir/scripts/config.guess`
+ host=m68k-elf
+
+ if [ -f "$tsdir/config.log" ]; then
+ if ! head $tsdir/config.log | grep m68k-elf >/dev/null; then
+ echo "Please run a 'make distclean' first" >&2
+ exit 1
+ fi
+ fi
+
+ $tsdir/configure --build=${build} --host=${host} \
+ ${disable_foo_tests} \
+ --disable-dynload \
+ --disable-exec \
+ --disable-photo-viewers \
+ --disable-keyserver-helpers \
+ --disable-ldap \
+ --disable-mailto \
+ --disable-largefile \
+ --disable-asm \
+ --disable-nls $* \
+ CC="$CC" CPP="$CPP" AR="$AR" RANLIB="$RANLIB" \
+ CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" LIBS="$LDLIBS"
+ exit $?
+fi
+
+
if (autoconf --version) < /dev/null > /dev/null 2>&1 ; then
if (autoconf --version | awk 'NR==1 { if( $3 >= '$autoconf_vers') \