diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-11-19 22:47:14 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-11-19 22:47:14 +0000 |
commit | 45fc5bac2461ac31e4bc5a3a650dde4977e7c6f8 (patch) | |
tree | dff087df39a46c42f5f439694c2e9a0cedae9a2e /tools/configure | |
parent | c28752b1aff96e342d033e7af63ae65d27589234 (diff) | |
download | rockbox-45fc5bac2461ac31e4bc5a3a650dde4977e7c6f8.tar.gz rockbox-45fc5bac2461ac31e4bc5a3a650dde4977e7c6f8.zip |
Add --eabi to let configure prefer the arm-elf-eabi-* toolchain. Add --no-eabi to achieve the current behavior (which is still default).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23669 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/configure')
-rwxr-xr-x | tools/configure | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/tools/configure b/tools/configure index dc21789532..d96642f683 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -38,6 +38,16 @@ prefixtools () { | |||
38 | OC=${prefix}objcopy | 38 | OC=${prefix}objcopy |
39 | } | 39 | } |
40 | 40 | ||
41 | findarmgcc() { | ||
42 | if [ "$ARG_ARM_EABI" = "1" ]; then | ||
43 | prefixtools arm-elf-eabi- | ||
44 | gccchoice="4.4.2" | ||
45 | else | ||
46 | prefixtools arm-elf- | ||
47 | gccchoice="4.0.3" | ||
48 | fi | ||
49 | } | ||
50 | |||
41 | # scan the $PATH for the given command | 51 | # scan the $PATH for the given command |
42 | findtool(){ | 52 | findtool(){ |
43 | file="$1" | 53 | file="$1" |
@@ -241,76 +251,68 @@ coldfirecc () { | |||
241 | } | 251 | } |
242 | 252 | ||
243 | arm7tdmicc () { | 253 | arm7tdmicc () { |
244 | prefixtools arm-elf- | 254 | findarmgcc |
245 | GCCOPTS="$CCOPTS -mcpu=arm7tdmi" | 255 | GCCOPTS="$CCOPTS -mcpu=arm7tdmi" |
246 | if test "X$1" != "Xshort"; then | 256 | if test "X$1" != "Xshort"; then |
247 | GCCOPTS="$GCCOPTS -mlong-calls" | 257 | GCCOPTS="$GCCOPTS -mlong-calls" |
248 | fi | 258 | fi |
249 | GCCOPTIMIZE="-fomit-frame-pointer" | 259 | GCCOPTIMIZE="-fomit-frame-pointer" |
250 | endian="little" | 260 | endian="little" |
251 | gccchoice="4.0.3" | ||
252 | } | 261 | } |
253 | 262 | ||
254 | arm9tdmicc () { | 263 | arm9tdmicc () { |
255 | prefixtools arm-elf- | 264 | findarmgcc |
256 | GCCOPTS="$CCOPTS -mcpu=arm9tdmi" | 265 | GCCOPTS="$CCOPTS -mcpu=arm9tdmi" |
257 | if test "$modelname" != "gigabeatf" -a "$t_manufacturer" != "as3525"; then | 266 | if test "$modelname" != "gigabeatf" -a "$t_manufacturer" != "as3525"; then |
258 | GCCOPTS="$GCCOPTS -mlong-calls" | 267 | GCCOPTS="$GCCOPTS -mlong-calls" |
259 | fi | 268 | fi |
260 | GCCOPTIMIZE="-fomit-frame-pointer" | 269 | GCCOPTIMIZE="-fomit-frame-pointer" |
261 | endian="little" | 270 | endian="little" |
262 | gccchoice="4.0.3" | ||
263 | } | 271 | } |
264 | 272 | ||
265 | arm940tbecc () { | 273 | arm940tbecc () { |
266 | prefixtools arm-elf- | 274 | findarmgcc |
267 | GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls" | 275 | GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls" |
268 | GCCOPTIMIZE="-fomit-frame-pointer" | 276 | GCCOPTIMIZE="-fomit-frame-pointer" |
269 | endian="big" | 277 | endian="big" |
270 | gccchoice="4.0.3" | ||
271 | } | 278 | } |
272 | 279 | ||
273 | arm940tcc () { | 280 | arm940tcc () { |
274 | prefixtools arm-elf- | 281 | findarmgcc |
275 | GCCOPTS="$CCOPTS -mcpu=arm940t -mlong-calls" | 282 | GCCOPTS="$CCOPTS -mcpu=arm940t -mlong-calls" |
276 | GCCOPTIMIZE="-fomit-frame-pointer" | 283 | GCCOPTIMIZE="-fomit-frame-pointer" |
277 | endian="little" | 284 | endian="little" |
278 | gccchoice="4.0.3" | ||
279 | } | 285 | } |
280 | 286 | ||
281 | arm946cc () { | 287 | arm946cc () { |
282 | prefixtools arm-elf- | 288 | findarmgcc |
283 | GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls" | 289 | GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls" |
284 | GCCOPTIMIZE="-fomit-frame-pointer" | 290 | GCCOPTIMIZE="-fomit-frame-pointer" |
285 | endian="little" | 291 | endian="little" |
286 | gccchoice="4.0.3" | ||
287 | } | 292 | } |
288 | 293 | ||
289 | arm926ejscc () { | 294 | arm926ejscc () { |
290 | prefixtools arm-elf- | 295 | findarmgcc |
291 | GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls" | 296 | GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls" |
292 | GCCOPTIMIZE="-fomit-frame-pointer" | 297 | GCCOPTIMIZE="-fomit-frame-pointer" |
293 | endian="little" | 298 | endian="little" |
294 | gccchoice="4.0.3" | ||
295 | } | 299 | } |
296 | 300 | ||
297 | arm1136jfscc () { | 301 | arm1136jfscc () { |
298 | prefixtools arm-elf- | 302 | findarmgcc |
299 | GCCOPTS="$CCOPTS -mcpu=arm1136jf-s" | 303 | GCCOPTS="$CCOPTS -mcpu=arm1136jf-s" |
300 | if test "$modelname" != "gigabeats"; then | 304 | if test "$modelname" != "gigabeats"; then |
301 | GCCOPTS="$GCCOPTS -mlong-calls" | 305 | GCCOPTS="$GCCOPTS -mlong-calls" |
302 | fi | 306 | fi |
303 | GCCOPTIMIZE="-fomit-frame-pointer" | 307 | GCCOPTIMIZE="-fomit-frame-pointer" |
304 | endian="little" | 308 | endian="little" |
305 | gccchoice="4.0.3" | ||
306 | } | 309 | } |
307 | 310 | ||
308 | arm1176jzscc () { | 311 | arm1176jzscc () { |
309 | prefixtools arm-elf- | 312 | findarmgcc |
310 | GCCOPTS="$CCOPTS -mcpu=arm1176jz-s -mlong-calls" | 313 | GCCOPTS="$CCOPTS -mcpu=arm1176jz-s -mlong-calls" |
311 | GCCOPTIMIZE="-fomit-frame-pointer" | 314 | GCCOPTIMIZE="-fomit-frame-pointer" |
312 | endian="little" | 315 | endian="little" |
313 | gccchoice="4.0.3" | ||
314 | } | 316 | } |
315 | 317 | ||
316 | mipselcc () { | 318 | mipselcc () { |
@@ -756,6 +758,10 @@ help() { | |||
756 | 758 | ||
757 | --ccache Enable ccache use (done by default these days) | 759 | --ccache Enable ccache use (done by default these days) |
758 | --no-ccache Disable ccache use | 760 | --no-ccache Disable ccache use |
761 | |||
762 | --eabi Make configure prefer toolchains that are able to compile | ||
763 | for the new ARM standard abi EABI | ||
764 | --no-eabi The opposite of --eabi (prefer old non-eabi toolchains) | ||
759 | --help Shows this message (must not be used with other options) | 765 | --help Shows this message (must not be used with other options) |
760 | 766 | ||
761 | EOF | 767 | EOF |
@@ -773,13 +779,14 @@ ARG_TTS= | |||
773 | ARG_TTSOPTS= | 779 | ARG_TTSOPTS= |
774 | ARG_TYPE= | 780 | ARG_TYPE= |
775 | ARG_VOICE= | 781 | ARG_VOICE= |
782 | ARG_ARM_EABI= | ||
776 | err= | 783 | err= |
777 | for arg in "$@"; do | 784 | for arg in "$@"; do |
778 | case "$arg" in | 785 | case "$arg" in |
779 | --ccache) ARG_CCACHE=1;; | 786 | --ccache) ARG_CCACHE=1;; |
787 | --no-ccache) ARG_CCACHE=0;; | ||
780 | --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;; | 788 | --encopts=*) ARG_ENCOPTS=`echo "$arg" | cut -d = -f 2`;; |
781 | --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;; | 789 | --language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;; |
782 | --no-ccache) ARG_CCACHE=0;; | ||
783 | --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;; | 790 | --ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;; |
784 | --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;; | 791 | --rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;; |
785 | --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;; | 792 | --target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;; |
@@ -787,6 +794,8 @@ for arg in "$@"; do | |||
787 | --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;; | 794 | --ttsopts=*) ARG_TTSOPTS=`echo "$arg" | cut -d = -f 2`;; |
788 | --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;; | 795 | --type=*) ARG_TYPE=`echo "$arg" | cut -d = -f 2`;; |
789 | --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;; | 796 | --voice=*) ARG_VOICE=`echo "$arg" | cut -d = -f 2`;; |
797 | --eabi) ARG_ARM_EABI=1;; | ||
798 | --no-eabi) ARG_ARM_EABI=0;; | ||
790 | --help) help;; | 799 | --help) help;; |
791 | *) err=1; echo "[ERROR] Option '$arg' unsupported";; | 800 | *) err=1; echo "[ERROR] Option '$arg' unsupported";; |
792 | esac | 801 | esac |