From 17e12f2ec12a447c308767a2dbb610ec3a45d15b Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 8 Apr 2003 08:28:26 +0000 Subject: [PATCH] New option --build-uclinux. --- scripts/ChangeLog | 4 ++++ scripts/autogen.sh | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/scripts/ChangeLog b/scripts/ChangeLog index a146a9854..1f1d6decb 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2003-04-08 Werner Koch + + * autogen.sh: New option --build-uclinux. + 2003-03-24 Werner Koch * autogen.sh: New option --build-coldfire 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') \