diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-03-28 22:57:13 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-03-28 23:02:39 +0200 |
commit | 7b1a369cf7801f98139189ade463f3a460f78d85 (patch) | |
tree | 27f7fb3628f5692f508c1e3e439fa9d657869c77 /firmware/export/config.h | |
parent | c56950ea3a9e0244461ce445f25bd7a80c8f7199 (diff) | |
download | rockbox-7b1a369cf7801f98139189ade463f3a460f78d85.tar.gz rockbox-7b1a369cf7801f98139189ade463f3a460f78d85.zip |
build system: completely autodetect target cpu architecture.
The existing ARCH Makefile variable is exported to the C code as well.
Additionally the version (arm-only for now) is detected as well. This
allows to for complete autodetection, i.e. that optimized ASM is picked up
if determined by preprocessor (CPU_ARM, etc).
Building a sim/raaa on a arm host will now automatically generate a arm
optmized build like we have for native targets.
Change-Id: I0b35393f8fb3ebd20beaa9e7371fa57bf3782107
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r-- | firmware/export/config.h | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h index 80bd83d61d..254128c844 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -526,12 +526,12 @@ Lyre prototype 1 */ | |||
526 | #ifndef __PCTOOL__ | 526 | #ifndef __PCTOOL__ |
527 | 527 | ||
528 | /* define for all cpus from SH family */ | 528 | /* define for all cpus from SH family */ |
529 | #if (CONFIG_CPU == SH7034) | 529 | #if (ARCH == ARCH_SH) && (CONFIG_CPU == SH7034) |
530 | #define CPU_SH | 530 | #define CPU_SH |
531 | #endif | 531 | #endif |
532 | 532 | ||
533 | /* define for all cpus from coldfire family */ | 533 | /* define for all cpus from coldfire family */ |
534 | #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250) | 534 | #if (ARCH == ARCH_M68K) && ((CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)) |
535 | #define CPU_COLDFIRE | 535 | #define CPU_COLDFIRE |
536 | #endif | 536 | #endif |
537 | 537 | ||
@@ -565,31 +565,13 @@ Lyre prototype 1 */ | |||
565 | #endif | 565 | #endif |
566 | 566 | ||
567 | /* define for all cpus from ARM family */ | 567 | /* define for all cpus from ARM family */ |
568 | #if ((CONFIG_PLATFORM & PLATFORM_MAEMO5) && defined(MAEMO_ARM_BUILD)) \ | 568 | #if ARCH == ARCH_ARM |
569 | || (CONFIG_PLATFORM & PLATFORM_PANDORA) | ||
570 | #define CPU_ARM | 569 | #define CPU_ARM |
571 | #define ARM_ARCH 7 /* ARMv7 */ | 570 | #define ARM_ARCH ARCH_VERSION /* ARMv{4,5,6,7} */ |
572 | |||
573 | #elif (CONFIG_CPU == IMX31L) || defined(SAMSUNG_YPR0) \ | ||
574 | || ((CONFIG_PLATFORM & PLATFORM_MAEMO4) && defined(MAEMO_ARM_BUILD)) | ||
575 | #define CPU_ARM | ||
576 | #define ARM_ARCH 6 /* ARMv6 */ | ||
577 | |||
578 | #elif defined(CPU_TCC77X) || defined(CPU_TCC780X) || (CONFIG_CPU == DM320) \ | ||
579 | || (CONFIG_CPU == AT91SAM9260) || (CONFIG_CPU == AS3525v2) \ | ||
580 | || (CONFIG_CPU == S5L8702) || (CONFIG_CPU == IMX233) \ | ||
581 | || (CONFIG_CPU == RK27XX) ||(CONFIG_PLATFORM & PLATFORM_ANDROID) | ||
582 | #define CPU_ARM | ||
583 | #define ARM_ARCH 5 /* ARMv5 */ | ||
584 | |||
585 | #elif defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \ | ||
586 | || (CONFIG_CPU == DSC25) || defined(CPU_S5L870X) || (CONFIG_CPU == AS3525) | ||
587 | #define CPU_ARM | ||
588 | #define ARM_ARCH 4 /* ARMv4 */ | ||
589 | #endif | 571 | #endif |
590 | 572 | ||
591 | #if (CONFIG_CPU == JZ4732) | 573 | #if ARCH == ARCH_MIPS |
592 | #define CPU_MIPS 32 | 574 | #define CPU_MIPS ARCH_VERSION /* 32, 64 */ |
593 | #endif | 575 | #endif |
594 | 576 | ||
595 | #endif /*__PCTOOL__*/ | 577 | #endif /*__PCTOOL__*/ |