1# SPDX-License-Identifier: Apache-2.0 2if(DEFINED GCC_M_CPU) 3 list(APPEND TOOLCHAIN_C_FLAGS -mcpu=${GCC_M_CPU}) 4 list(APPEND TOOLCHAIN_LD_FLAGS -mcpu=${GCC_M_CPU}) 5endif() 6 7if(DEFINED GCC_M_ARCH) 8 list(APPEND TOOLCHAIN_C_FLAGS -march=${GCC_M_ARCH}) 9 list(APPEND TOOLCHAIN_LD_FLAGS -march=${GCC_M_ARCH}) 10endif() 11 12if(DEFINED GCC_M_TUNE) 13 list(APPEND TOOLCHAIN_C_FLAGS -mtune=${GCC_M_TUNE}) 14 list(APPEND TOOLCHAIN_LD_FLAGS -mtune=${GCC_M_TUNE}) 15endif() 16 17list(APPEND TOOLCHAIN_C_FLAGS -mabi=lp64) 18list(APPEND TOOLCHAIN_LD_FLAGS -mabi=lp64) 19 20set(LLEXT_REMOVE_FLAGS 21 -fno-pic 22 -fno-pie 23 -ffunction-sections 24 -fdata-sections 25 -g.* 26 -Os 27) 28 29list(APPEND LLEXT_EDK_REMOVE_FLAGS 30 --sysroot=.* 31 -fmacro-prefix-map=.* 32) 33 34list(APPEND LLEXT_EDK_APPEND_FLAGS 35 -nodefaultlibs 36) 37