You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "no1wudi (via GitHub)" <gi...@apache.org> on 2023/01/31 13:27:28 UTC
[GitHub] [nuttx] no1wudi opened a new pull request, #8381: tools: Make zig available for arm/riscv/sim
no1wudi opened a new pull request, #8381:
URL: https://github.com/apache/nuttx/pull/8381
## Summary
Add essential compile flags to make zig available out of box.
## Impact
Zig only
## Testing
Local machine
--
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] [nuttx] pkarashchenko commented on a diff in pull request #8381: tools: Make zig available for arm/riscv/sim
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8381:
URL: https://github.com/apache/nuttx/pull/8381#discussion_r1091954930
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -229,6 +229,10 @@ else
endif
endif
+# Zig compiler
+
+ZIG = zig
Review Comment:
```suggestion
ZIG := zig
```
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -258,6 +262,20 @@ else
LDFLAGS += -nostdlib
endif
+ifeq ($(CONFIG_ARM_THUMB),y)
+ ZARCH = thumb
+else
+ ZARCH = arm
Review Comment:
```suggestion
ZARCH := thumb
else
ZARCH := arm
```
##########
arch/arm/src/armv6-m/Toolchain.defs:
##########
@@ -23,6 +23,8 @@
TOOLCHAIN_MTUNE := -mcpu=cortex-m0 -mthumb
TOOLCHAIN_MFLOAT := -mfloat-abi=soft
+ZARCHCPUFLAGS = -mcpu=cortex_m0
Review Comment:
```suggestion
ZARCHCPUFLAGS := -mcpu=cortex_m0
```
in case if we do not expect late expansion. And same in other places
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -258,6 +262,20 @@ else
LDFLAGS += -nostdlib
endif
+ifeq ($(CONFIG_ARM_THUMB),y)
+ ZARCH = thumb
+else
+ ZARCH = arm
+endif
+
+ifeq ($(CONFIG_ARCH_FPU),y)
+ ZEABI = gnueabihf
+else
+ ZEABI = gnueabi
Review Comment:
```suggestion
ZEABI := gnueabihf
else
ZEABI := gnueabi
```
--
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] [nuttx] xiaoxiang781216 commented on a diff in pull request #8381: tools: Make zig available for arm/riscv/sim
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8381:
URL: https://github.com/apache/nuttx/pull/8381#discussion_r1092129405
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -258,6 +262,20 @@ else
LDFLAGS += -nostdlib
endif
+ifeq ($(CONFIG_ARM_THUMB),y)
+ ZARCH := thumb
+else
+ ZARCH := arm
+endif
+
+ifeq ($(CONFIG_ARCH_FPU),y)
+ ZEABI := gnueabihf
+else
+ ZEABI := gnueabi
+endif
+
+ZIGFLAGS = -target $(ZARCH)-freestanding-$(ZEABI)
Review Comment:
why not use ZFLAGS?
--
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] [nuttx] no1wudi commented on a diff in pull request #8381: tools: Make zig available for arm/riscv/sim
Posted by "no1wudi (via GitHub)" <gi...@apache.org>.
no1wudi commented on code in PR #8381:
URL: https://github.com/apache/nuttx/pull/8381#discussion_r1092655456
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -258,6 +262,20 @@ else
LDFLAGS += -nostdlib
endif
+ifeq ($(CONFIG_ARM_THUMB),y)
+ ZARCH := thumb
+else
+ ZARCH := arm
+endif
+
+ifeq ($(CONFIG_ARCH_FPU),y)
+ ZEABI := gnueabihf
+else
+ ZEABI := gnueabi
+endif
+
+ZIGFLAGS = -target $(ZARCH)-freestanding-$(ZEABI)
Review Comment:
For keeping same style with current rust/zig flags.
--
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] [nuttx] xiaoxiang781216 merged pull request #8381: tools: Make zig available for arm/riscv/sim
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #8381:
URL: https://github.com/apache/nuttx/pull/8381
--
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