pkarashchenko commented on a change in pull request #5662:
URL: https://github.com/apache/incubator-nuttx/pull/5662#discussion_r817845453



##########
File path: arch/arm/src/armv7-a/Toolchain.defs
##########
@@ -56,23 +56,46 @@ endif
 #
 
 ifeq ($(CONFIG_ARM_THUMB),y)
-ARCHCPUFLAGS += -mthumb
-endif
-
-ifeq ($(CONFIG_ARCH_FPU),y)
-ARCHCPUFLAGS += -mfloat-abi=hard
+  ARCHCPUFLAGS += -mthumb
 endif
 
 ifeq ($(CONFIG_ARCH_CORTEXA5),y)
-ARCHCPUFLAGS += -mcpu=cortex-a5
+  ARCHCPUFLAGS += -mcpu=cortex-a5
 else ifeq ($(CONFIG_ARCH_CORTEXA7),y)
-ARCHCPUFLAGS += -mcpu=cortex-a7
+  ARCHCPUFLAGS += -mcpu=cortex-a7
 else ifeq ($(CONFIG_ARCH_CORTEXA8),y)
-ARCHCPUFLAGS += -mcpu=cortex-a8
+  ARCHCPUFLAGS += -mcpu=cortex-a8
 else ifeq ($(CONFIG_ARCH_CORTEXA9),y)
-ARCHCPUFLAGS += -mcpu=cortex-a9
+  ARCHCPUFLAGS += -mcpu=cortex-a9
 endif
 
+ifeq ($(CONFIG_ARM_HAVE_FPU_D32),)
+  ARCHFPUD32FLAGS = -d16
+endif
+
+ifeq ($(CONFIG_ARM_FP_NEON),y)
+  ARCHNEONFLAGS = neon-
+endif
+
+ifeq ($(CONFIG_ARCH_FPU),y)
+  ifeq ($(CONFIG_ARM_FP_ABI_SOFT),y)
+    ARCHCPUFLAGS += -mfloat-abi=softfp
+  else
+    ARCHCPUFLAGS += -mfloat-abi=hard
+  endif
+
+  ifeq ($(CONFIG_ARCH_CORTEXA8),y)
+    ARCHFPUVERSION = vfpv3
+  else ifeq ($(CONFIG_ARCH_CORTEXA9),y)
+    ARCHFPUVERSION = vfpv3
+  else
+    ARCHFPUVERSION = vfpv4
+  endif
+
+  ARCHCPUFLAGS += -mfpu=$(ARCHNEONFLAGS)$(ARCHFPUVERSION)$(ARCHFPUD32FLAGS)

Review comment:
       ![Screenshot from 2022-03-02 
17-02-12](https://user-images.githubusercontent.com/17704713/156399624-e98e2828-e434-4ac3-a551-1e7e214c05ed.png)
   
   I think here in case of CORTEXA8 + NEON we will get `-mfpu=neon-vfpv3` that 
seems to be invalid option.




-- 
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


Reply via email to