From: Erik M. <er...@us...> - 2002-01-12 01:46:00
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv15720 Modified Files: configure.in Log Message: Split up startup code in machine dependent (start-sa11x0.S) and machine independent part (start.S). Not yet finished, proof of concept that actually works. Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- configure.in 2002/01/07 20:27:46 1.35 +++ configure.in 2002/01/12 01:45:57 1.36 @@ -221,29 +221,36 @@ ;; *) AC_MSG_RESULT(unknown) - AC_MSG_ERROR([Unknown board name, bailing out]) + AC_MSG_ERROR([Unknown board name \"$board_name\", bailing out]) ;; esac -dnl define board name in configuration +dnl define board name and CPU in configuration AC_MSG_RESULT("${board_name}") AC_DEFINE_UNQUOTED(BOARD_NAME, "${board_name}") +AC_DEFINE_UNQUOTED(CPU, "${use_cpu}") -if test "x$use_cpu" = "xsa1100" ; then +dnl Select correct startup code and other platform dependent object files +case "$use_cpu" in + sa1100) dnl SA1100 CPU: EDORAM memory setup code + STARTCODE="start-sa11x0.o" MEMSETUP="memsetup-sa1100.o" -elif test "x$use_cpu" = "xsa1110" ; then + ;; + sa1110) dnl SA1110 CPU: SDRAM memory setup code + STARTCODE="start-sa11x0.o" MEMSETUP="memsetup-sa1110.o" -else - AC_MSG_WARN([No CPU defined!]); - use_cpu="(none)" - MEMSETUP="" -fi + ;; + *) + AC_MSG_ERROR([Unknown CPU name \"$use_cpu\", bailing out]); + ;; +esac +dnl Define in configuration +AC_SUBST(STARTCODE) AC_SUBST(MEMSETUP) -AC_DEFINE_UNQUOTED(CPU, "${use_cpu}") @@ -422,13 +429,26 @@ dnl Change the "-O2" flag in "-Os" CFLAGS=`echo $CFLAGS | sed 's/-O2/-Os/'` -dnl Add some StrongARM specific flags -CFLAGS=`echo $CFLAGS -march=armv4 -mtune=strongarm1100 -fomit-frame-pointer -fno-builtin -mapcs-32 -nostdinc` + +dnl Figure out CPU specific CFLAGS to help optimisation +case "$use_cpu" in + sa11?0) + cpu_cflags="-march=armv4 -mtune=strongarm1100" + ;; + *) + cpu_cflags="" + ;; +esac + + +dnl define compiler and linker flags +CFLAGS=`echo $CFLAGS $cpu_cflags -mapcs-32 -fomit-frame-pointer -fno-builtin -nostdinc` LDFLAGS=`echo $LDFLAGS -static -nostdlib` OCFLAGS="-O binary -R .note -R .comment -S" AC_SUBST(OCFLAGS) +dnl Generate output files AC_OUTPUT(Makefile doc/Makefile include/Makefile @@ -444,10 +464,12 @@ utils/mkparamblock/Makefile) +dnl Tell the user about the configuration echo "" echo "Configuration" echo "------------------------------------------------------------------------" echo "Target board ${board_name}" +echo "Target CPU ${use_cpu}" echo "C compiler ${CC}" echo "C flags ${CFLAGS}" echo "Linker flags ${LDFLAGS}" |