mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
tools: Detect A-profile ARM cores for hosted and sim builds
The only v7-a targets we have are built using the androidndk (with gcc
4.9) but it is possible to perform "self-hosted" builds for eg the
simulator or the sdlapp.
Where this gets messy is the considerable amount of inline arm
asm we have.
Native builds will need considerably more work to support
v7-a processors, but we have to start somewhere.
(Note that this contains parts of commit 508bfabe8, which had to
be reverted due to breakage)
Change-Id: Ia1c8e10d21a976c68fdaae58e4d776854b63186c
This commit is contained in:
parent
c26981a9c6
commit
fa164f89e0
2 changed files with 12 additions and 3 deletions
|
|
@ -720,8 +720,13 @@ Lyre prototype 1 */
|
||||||
# endif
|
# endif
|
||||||
# elif ARM_PROFILE == ARM_PROFILE_CLASSIC
|
# elif ARM_PROFILE == ARM_PROFILE_CLASSIC
|
||||||
# define CPU_ARM_CLASSIC
|
# define CPU_ARM_CLASSIC
|
||||||
|
# elif ARM_PROFILE == ARM_PROFILE_APPLICATION
|
||||||
|
# define CPU_ARM_APPLICATION
|
||||||
|
# if defined(__ARM_FEATURE_IDIV) // Some v7-a, all v8-a
|
||||||
|
# define ARM_HAVE_HW_DIV
|
||||||
# endif
|
# endif
|
||||||
# if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
# endif
|
||||||
|
# if (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(ARM_HAVE_HW_DIV)
|
||||||
# define ARM_NEED_DIV0
|
# define ARM_NEED_DIV0
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1100,7 +1105,7 @@ Lyre prototype 1 */
|
||||||
* Older versions of GCC emit assembly in divided syntax with no option
|
* Older versions of GCC emit assembly in divided syntax with no option
|
||||||
* to enable unified syntax.
|
* to enable unified syntax.
|
||||||
*/
|
*/
|
||||||
#if (__GNUC__ < 8) && defined(CPU_ARM_CLASSIC) || defined(CTRU)
|
#if (__GNUC__ < 8) && (defined(CPU_ARM_CLASSIC)||defined(CPU_ARM_APPLICATION))
|
||||||
#define BEGIN_ARM_ASM_SYNTAX_UNIFIED ".syntax unified\n"
|
#define BEGIN_ARM_ASM_SYNTAX_UNIFIED ".syntax unified\n"
|
||||||
#define END_ARM_ASM_SYNTAX_UNIFIED ".syntax divided\n"
|
#define END_ARM_ASM_SYNTAX_UNIFIED ".syntax divided\n"
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
6
tools/configure
vendored
6
tools/configure
vendored
|
|
@ -4735,7 +4735,10 @@ if [ -z "$arch" ]; then
|
||||||
GCCOPTS="$GCCOPTS -masm-syntax-unified"
|
GCCOPTS="$GCCOPTS -masm-syntax-unified"
|
||||||
fi
|
fi
|
||||||
case "$arch_profile" in
|
case "$arch_profile" in
|
||||||
77)
|
65) # Cortex-A
|
||||||
|
arch_profile=application
|
||||||
|
;;
|
||||||
|
77) # Cortex-M
|
||||||
arch_profile=micro
|
arch_profile=micro
|
||||||
|
|
||||||
# We have a lot of assembly written for ARM32, which won't
|
# We have a lot of assembly written for ARM32, which won't
|
||||||
|
|
@ -4857,6 +4860,7 @@ cat > autoconf.h.new <<EOF
|
||||||
|
|
||||||
#define ARM_PROFILE_CLASSIC 0 /* Classic ARM cores (<= ARMv6) */
|
#define ARM_PROFILE_CLASSIC 0 /* Classic ARM cores (<= ARMv6) */
|
||||||
#define ARM_PROFILE_MICRO 1 /* ARMv6/ARMv7+ M-profile cores */
|
#define ARM_PROFILE_MICRO 1 /* ARMv6/ARMv7+ M-profile cores */
|
||||||
|
#define ARM_PROFILE_APPLICATION 2 /* ARMv7+ A-profile cores */
|
||||||
|
|
||||||
/* Define target machine architecture */
|
/* Define target machine architecture */
|
||||||
${Darch}
|
${Darch}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue