diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2023-05-24 09:37:20 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-05-08 21:45:42 -0400 |
commit | 8c86fb6da0b9c068ee4b4220dee11171e322f67f (patch) | |
tree | 35d458f5d8015f659593fb57df67b5e99afb5462 /firmware/export/config.h | |
parent | 0a89d1d4df0d24f2b73888fe3c457679acfb48aa (diff) | |
download | rockbox-8c86fb6da0b9c068ee4b4220dee11171e322f67f.tar.gz rockbox-8c86fb6da0b9c068ee4b4220dee11171e322f67f.zip |
arm: Use -masm-syntax-unified when compiling with gcc8 or newer
Annoyingly, this makes all of the '.S' files we compile get treated as
divided syntax, so we need to make the syntax in them explicit.
Change-Id: I56a3916b7b24c84a1214a5d6bc4ed4d651f002cf
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r-- | firmware/export/config.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h index 80d59ea836..9812db9161 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -1018,14 +1018,19 @@ Lyre prototype 1 */ | |||
1018 | * These macros are for switching on unified syntax in inline assembly. | 1018 | * These macros are for switching on unified syntax in inline assembly. |
1019 | * Older versions of GCC emit assembly in divided syntax with no option | 1019 | * Older versions of GCC emit assembly in divided syntax with no option |
1020 | * to enable unified syntax. | 1020 | * to enable unified syntax. |
1021 | * | ||
1022 | * FIXME: This needs to be looked at after the toolchain bump | ||
1023 | */ | 1021 | */ |
1022 | #if (__GNUC__ < 8) | ||
1024 | #define BEGIN_ARM_ASM_SYNTAX_UNIFIED ".syntax unified\n" | 1023 | #define BEGIN_ARM_ASM_SYNTAX_UNIFIED ".syntax unified\n" |
1025 | #define END_ARM_ASM_SYNTAX_UNIFIED ".syntax divided\n" | 1024 | #define END_ARM_ASM_SYNTAX_UNIFIED ".syntax divided\n" |
1025 | #else | ||
1026 | #define BEGIN_ARM_ASM_SYNTAX_UNIFIED | ||
1027 | #define END_ARM_ASM_SYNTAX_UNIFIED | ||
1028 | #endif | ||
1026 | 1029 | ||
1027 | #if defined(CPU_ARM) && defined(__ASSEMBLER__) | 1030 | #if defined(CPU_ARM) && defined(__ASSEMBLER__) |
1031 | #if (__GNUC__ < 8) | ||
1028 | .syntax unified | 1032 | .syntax unified |
1033 | #endif | ||
1029 | /* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */ | 1034 | /* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */ |
1030 | .macro ldmpc cond="", order="ia", regs | 1035 | .macro ldmpc cond="", order="ia", regs |
1031 | #if ARM_ARCH == 4 && defined(USE_THUMB) | 1036 | #if ARM_ARCH == 4 && defined(USE_THUMB) |
@@ -1043,6 +1048,9 @@ Lyre prototype 1 */ | |||
1043 | ldr\cond pc, [sp], #4 | 1048 | ldr\cond pc, [sp], #4 |
1044 | #endif | 1049 | #endif |
1045 | .endm | 1050 | .endm |
1051 | #if (__GNUC__ < 8) | ||
1052 | .syntax divided | ||
1053 | #endif | ||
1046 | #endif | 1054 | #endif |
1047 | 1055 | ||
1048 | #if defined(CPU_COLDFIRE) && defined(__ASSEMBLER__) | 1056 | #if defined(CPU_COLDFIRE) && defined(__ASSEMBLER__) |