mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-03 08:27:43 +00:00
toolchain: Add the possibility to have a mcpu option with wrapper
Permit to define the mcpu of the external toolchain wrapper, based on BR2_GCC_TARGET_CPU. Signed-off-by: Stany MARCEL <stanypub@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
d64c4ed3f7
commit
3fb6010dca
@ -127,6 +127,7 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = \
|
|||||||
-DBR_SYSROOT='"$(STAGING_DIR)"'
|
-DBR_SYSROOT='"$(STAGING_DIR)"'
|
||||||
|
|
||||||
CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
|
CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
|
||||||
|
CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
|
||||||
CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
|
CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
|
||||||
CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))
|
CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))
|
||||||
|
|
||||||
@ -140,6 +141,10 @@ ifneq ($(CC_TARGET_ARCH_),)
|
|||||||
TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_)
|
TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_)
|
||||||
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"'
|
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"'
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(CC_TARGET_CPU_),)
|
||||||
|
TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
|
||||||
|
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
|
||||||
|
endif
|
||||||
ifneq ($(CC_TARGET_ABI_),)
|
ifneq ($(CC_TARGET_ABI_),)
|
||||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
|
TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
|
||||||
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
|
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
|
||||||
|
@ -28,6 +28,9 @@ static char *predef_args[] = {
|
|||||||
#ifdef BR_TUNE
|
#ifdef BR_TUNE
|
||||||
"-mtune=" BR_TUNE,
|
"-mtune=" BR_TUNE,
|
||||||
#endif /* BR_TUNE */
|
#endif /* BR_TUNE */
|
||||||
|
#ifdef BR_CPU
|
||||||
|
"-mcpu=" BR_CPU,
|
||||||
|
#endif
|
||||||
#ifdef BR_ABI
|
#ifdef BR_ABI
|
||||||
"-mabi=" BR_ABI,
|
"-mabi=" BR_ABI,
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user