You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/21 13:51:28 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request, #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

anchao opened a new pull request, #7154:
URL: https://github.com/apache/incubator-nuttx/pull/7154

   ## Summary
   
   arch/arm: fallback to common toolchain if armeb(endian big) is unavailable
   
   Signed-off-by: chao an <an...@xiaomi.com>
   
   ## Impact
   
   N/A
   
   ## Testing
   
   armeb


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7154:
URL: https://github.com/apache/incubator-nuttx/pull/7154#discussion_r976543655


##########
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:
   call wildcard?



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7154:
URL: https://github.com/apache/incubator-nuttx/pull/7154#discussion_r976676895


##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -87,30 +87,34 @@ endif
 
 # NuttX buildroot under Linux or Cygwin
 
-ifeq ($(CONFIG_ENDIAN_BIG),y)

Review Comment:
   can we always build two toolchain variables
   CROSSDEVLE and ARCHCPUFLAGSLE
   CROSSDEVBE and ARCHCPUFLAGSBE
   and then try CROSSDEVBE if it's good set CROSSDEV to CROSSDEVBE and ARCHCPUFLAGS to ARCHCPUFLAGSBE
   otherwise set CROSSDEV to CROSSDEVLE and ARCHCPUFLAGS to ARCHCPUFLAGSLE
   This process is more simpler I think.



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7154:
URL: https://github.com/apache/incubator-nuttx/pull/7154#discussion_r976676895


##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -87,30 +87,34 @@ endif
 
 # NuttX buildroot under Linux or Cygwin
 
-ifeq ($(CONFIG_ENDIAN_BIG),y)

Review Comment:
   can we always build two toolchain variables
   CROSSDEVLE and ARCHCPUFLAGSLE
   CROSSDEVBE and ARCHCPUFLAGSBE
   and then try CROSSDEVBE if it's good set CROSSDEV to CROSSDEVBE and ARCHCPUFLAGS to ARCHCPUFLAGSBE
   otherwise set CROSSDEV to CROSSDEVLE and ARCHCPUFLAGS to ARCHCPUFLAGSLE
   



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7154:
URL: https://github.com/apache/incubator-nuttx/pull/7154


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7154:
URL: https://github.com/apache/incubator-nuttx/pull/7154#discussion_r977488707


##########
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),)

Review Comment:
   Done



##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -87,30 +87,34 @@ endif
 
 # NuttX buildroot under Linux or Cygwin
 
-ifeq ($(CONFIG_ENDIAN_BIG),y)

Review Comment:
   Done



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

Posted by GitBox <gi...@apache.org>.
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7154: arch/arm: fallback to common toolchain if armeb(endian big) is unavailable

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7154:
URL: https://github.com/apache/incubator-nuttx/pull/7154#discussion_r977471432


##########
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),)

Review Comment:
   TARGET_INFIX->TARGET_TOOL



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org