diff mbox series

[RFC,05/12] toolchain/toolchain-external: skip "-march=" for hexagon

Message ID 20241025140714.2395033-6-bcain@quicinc.com
State New
Headers show
Series add hexagon architecture | expand

Commit Message

Brian Cain Oct. 25, 2024, 2:07 p.m. UTC
For hexagon targets, clang rejects "-march" with:

    hexagon-unknown-linux-musl-clang: error: unsupported option '-march=' for target 'hexagon-unknown-linux-musl'

Signed-off-by: Brian Cain <bcain@quicinc.com>
---
 toolchain/toolchain-external/pkg-toolchain-external.mk | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index 3948ad1107..8a7c4a5c1e 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -210,9 +210,11 @@  TOOLCHAIN_EXTERNAL_CFLAGS += -m64
 TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_64
 endif
 ifneq ($(GCC_TARGET_ARCH),)
+ifneq ($(BR2_hexagon),y)
 TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(GCC_TARGET_ARCH)
 TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARCH='"$(GCC_TARGET_ARCH)"'
 endif
+endif
 ifneq ($(GCC_TARGET_CPU),)
 TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(GCC_TARGET_CPU)
 TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_CPU='"$(GCC_TARGET_CPU)"'