You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/09/10 03:09:27 UTC
[incubator-nuttx-apps] branch master updated (75673fed7 -> 5d972ba6d)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
from 75673fed7 quickjs: add qjs tool configuration item
new 0d5804c52 examples/hello_zig: Fix unused return value
new 5d972ba6d Application.mk: Fix Zig build break
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Application.mk | 7 ++++---
examples/hello_zig/hello_zig_main.zig | 3 ++-
2 files changed, 6 insertions(+), 4 deletions(-)
[incubator-nuttx-apps] 01/02: examples/hello_zig: Fix unused return value
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 0d5804c527e513878050ff8724fdc4cfe35f5275
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Fri Sep 9 10:11:19 2022 +0000
examples/hello_zig: Fix unused return value
Zig don't allow unused return value, so let's discard it explicitly.
Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
examples/hello_zig/hello_zig_main.zig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/hello_zig/hello_zig_main.zig b/examples/hello_zig/hello_zig_main.zig
index 1baef3fb2..146e2668a 100644
--- a/examples/hello_zig/hello_zig_main.zig
+++ b/examples/hello_zig/hello_zig_main.zig
@@ -35,5 +35,6 @@ pub extern fn printf(_format: [*:0]const u8) c_int;
pub export fn hello_zig_main(_argc: c_int, _argv: [*]const [*]const u8) c_int {
_ = _argc;
_ = _argv;
- printf("Hello, Zig!\n");
+ _ = printf("Hello, Zig!\n");
+ return 0;
}
[incubator-nuttx-apps] 02/02: Application.mk: Fix Zig build break
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 5d972ba6d5afb1b837bf32ae11b8d45e15490a34
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Fri Sep 9 10:12:47 2022 +0000
Application.mk: Fix Zig build break
Correct wrong make variable name for Zig main source,
and update compile command for latest compiler.
Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
Application.mk | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Application.mk b/Application.mk
index 57b7eedc4..a8f6b4523 100644
--- a/Application.mk
+++ b/Application.mk
@@ -91,7 +91,7 @@ SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(MAINSRC)
OBJS = $(RAOBJS) $(CAOBJS) $(COBJS) $(CXXOBJS) $(RUSTOBJS) $(ZIGOBJS)
ifneq ($(BUILD_MODULE),y)
- OBJS += $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJS)
+ OBJS += $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ)
endif
DEPPATH += --dep-path .
@@ -126,8 +126,9 @@ define ELFCOMPILERUST
endef
define ELFCOMPILEZIG
- @echo "ZIG: $1"
- $(Q) $(ZIG) build-obj $(ZIGELFFLAGS) $($(strip $1)_ZIGELFFLAGS) $1 --name $2
+ @echo "ZIG: $1"
+ # Remove target suffix here since zig compiler add .o automatically
+ $(Q) $(ZIG) build-obj $(ZIGELFFLAGS) $($(strip $1)_ZIGELFFLAGS) --name $(basename $2) $1
endef
define ELFLD