make thumb build a configure option (--thumb)

Put the USE_THUMB define in extradefines (Makefile), not in autoconf.h

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26764 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-06-11 11:19:00 +00:00
parent a784938b78
commit 5928862e61

15
tools/configure vendored
View file

@ -369,7 +369,7 @@ whichadvanced () {
interact=1
echo ""
echo "Enter your developer options (press enter when done)"
printf "(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile, (T)est plugins, T(H)umb"
printf "(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile, (T)est plugins"
if [ "$memory" = "2" ]; then
printf ", (8)MB MOD"
fi
@ -414,10 +414,6 @@ whichadvanced () {
echo "Including test plugins"
extradefines="$extradefines -DHAVE_TEST_PLUGINS"
;;
[Hh])
echo "Building with thumb"
config_thumb="#define USE_THUMB"
;;
[Cc])
echo "bootchart enabled (logf also enabled)"
bootchart="yes"
@ -801,6 +797,7 @@ help() {
--eabi Make configure prefer toolchains that are able to compile
for the new ARM standard abi EABI
--no-eabi The opposite of --eabi (prefer old non-eabi toolchains)
--thumb Build with -mthumb (for ARM builds)
--help Shows this message (must not be used with other options)
EOF
@ -835,6 +832,7 @@ for arg in "$@"; do
--voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;;
--eabi) ARG_ARM_EABI=1;;
--no-eabi) ARG_ARM_EABI=0;;
--thumb) ARG_ARM_THUMB=1;;
--help) help;;
*) err=1; echo "[ERROR] Option '$arg' unsupported";;
esac
@ -2927,7 +2925,8 @@ DLLTOOL=`findtool ${DLLTOOL} --lit`
DLLWRAP=`findtool ${DLLWRAP} --lit`
RANLIB=`findtool ${RANLIB} --lit`
if test -n "$config_thumb"; then
if test "$ARG_ARM_THUMB" = "1"; then
extradefines="$extradefines -DUSE_THUMB"
CC="$toolsdir/thumb-cc.py $CC"
fi
@ -2956,7 +2955,6 @@ sed > autoconf.h \
-e "s,@have_backlight@,$have_backlight,g" \
-e "s,@have_fmradio_in@,$have_fmradio_in,g" \
-e "s,@have_ata_poweroff@,$have_ata_poweroff,g" \
-e "s,@config_thumb@,$config_thumb,g" \
<<EOF
/* This header was made by configure */
#ifndef __BUILD_AUTOCONF_H
@ -2980,9 +2978,6 @@ sed > autoconf.h \
/* optional define for ATA poweroff on Player */
@have_ata_poweroff@
/* optional define for ARM thumb builds */
@config_thumb@
/* optional defines for RTC mod for h1x0 */
@config_rtc@
@have_rtc_alarm@