anchao commented on code in PR #7154: URL: https://github.com/apache/incubator-nuttx/pull/7154#discussion_r976590105
########## arch/arm/src/common/Toolchain.defs: ########## @@ -87,30 +87,34 @@ endif # NuttX buildroot under Linux or Cygwin -ifeq ($(CONFIG_ENDIAN_BIG),y) - ARCHCPUFLAGS += -mbig-endian - TARGET_ARCH := armeb -else - ARCHCPUFLAGS += -mlittle-endian - TARGET_ARCH := arm -endif - -ARCHCPUFLAGS += $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MTUNE) $(TOOLCHAIN_MFLOAT) - ifeq ($(CONFIG_ARM_TOOLCHAIN_BUILDROOT),y) - CROSSDEV ?= $(TARGET_ARCH)-nuttx-eabi- + TARGET_INFIX := -nuttx-eabi- +else ifeq ($(CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI),y) + TARGET_INFIX := -nuttx-elf- +else ifeq ($(CONFIG_ARM_TOOLCHAIN_GNU_EABI),y) + TARGET_INFIX := -none-eabi- endif -ifeq ($(CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI),y) - CROSSDEV ?= $(TARGET_ARCH)-nuttx-elf- -endif +ifneq ($(TARGET_INFIX),) + ifeq ($(CONFIG_ENDIAN_BIG),y) + ARCHCPUFLAGS += -mbig-endian + TARGET_ARCH := armeb -# Generic GNU EABI toolchain + # Fallback to common toolchain if "armeb" is unavailable -ifeq ($(CONFIG_ARM_TOOLCHAIN_GNU_EABI),y) - CROSSDEV ?= $(TARGET_ARCH)-none-eabi- + ifeq ($(shell command -v $(TARGET_ARCH)$(TARGET_INFIX)gcc 2> /dev/null),) Review Comment: wildcard may unable to verify the command reliability -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org