arch: arm: aarch64: Force LP64 ABI
This commit adds the GCC `-mabi=lp64` flag to force the LP64 (64-bit long and pointer) ABI, which is mandatory for running the Zephyr AArch64 architecture port. Note that this flag is, strictly speaking, not necessary in most cases because the AArch64 GCC defaults to using the LP64 ABI. This flag is required, however, if compiling Zephyr with a GCC that is configured with `--with-abi=ilp32`, which makes ILP32 the default ABI. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
parent
e5d9291d1a
commit
df4fdeed97
1 changed files with 5 additions and 6 deletions
|
@ -1,11 +1,10 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
if(CONFIG_ARM64)
|
||||
list(APPEND TOOLCHAIN_C_FLAGS
|
||||
-mcpu=${GCC_M_CPU}
|
||||
)
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS
|
||||
-mcpu=${GCC_M_CPU}
|
||||
)
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -mcpu=${GCC_M_CPU})
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS -mcpu=${GCC_M_CPU})
|
||||
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -mabi=lp64)
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS -mabi=lp64)
|
||||
else()
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -mcpu=${GCC_M_CPU})
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS -mcpu=${GCC_M_CPU})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue