Buildroot Archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/janet: defaults to c99 for build.c_std
@ 2021-03-14 13:03 Yann E. MORIN
  0 siblings, 0 replies; only message in thread
From: Yann E. MORIN @ 2021-03-14 13:03 UTC (permalink / raw
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=0c72aec98afe871e31381e16c714c48affd30238
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes:
 - http://autobuild.buildroot.org/results/d5e46e094b27f40e12b32624d1431bfeeb617be3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 ...son.build-defaults-to-c99-for-build.c_std.patch | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/package/janet/0001-meson.build-defaults-to-c99-for-build.c_std.patch b/package/janet/0001-meson.build-defaults-to-c99-for-build.c_std.patch
new file mode 100644
index 0000000000..607fc2ee86
--- /dev/null
+++ b/package/janet/0001-meson.build-defaults-to-c99-for-build.c_std.patch
@@ -0,0 +1,42 @@
+From 546437d799f4cbc1dd86a015eac3b9ab405130c6 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 10 Mar 2021 07:57:53 +0100
+Subject: [PATCH] meson.build: defaults to c99 for "build.c_std"
+
+Since Meson 0.51, there are special build options for "native:true"
+builds, prefixed with "build.".  This change breaks cross builds
+because `janet-boot/src_core_asm.c` is no longer built with `-std=c99`:
+
+FAILED: janet-boot.p/src_core_asm.c.o
+/usr/bin/gcc -Ijanet-boot.p -I. -I.. -I../src/include -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -pthread -DJANET_BOOTSTRAP -MD -MQ janet-boot.p/src_core_asm.c.o -MF janet-boot.p/src_core_asm.c.o.d -o janet-boot.p/src_core_asm.c.o -c ../src/core/asm.c
+../src/core/asm.c: In function 'janet_disasm_bytecode':
+../src/core/asm.c:866:5: error: 'for' loop initial declarations are only allowed in C99 mode
+     for (int32_t i = 0; i < def->bytecode_length; i++) {
+     ^
+
+Fixes:
+ - http://autobuild.buildroot.net/results/355e0992338a8d132050517f83a3884606b00529
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved (and backported) from:
+https://github.com/janet-lang/janet/commit/546437d799f4cbc1dd86a015eac3b9ab405130c6]
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1b326111..d3a2d399 100644
+--- a/meson.build
++++ b/meson.build
+@@ -19,7 +19,7 @@
+ # IN THE SOFTWARE.
+ 
+ project('janet', 'c',
+-  default_options : ['c_std=c99', 'b_lundef=false', 'default_library=both'],
++  default_options : ['c_std=c99', 'build.c_std=c99', 'b_lundef=false', 'default_library=both'],
+   version : '1.15.0')
+ 
+ # Global settings
+-- 
+2.30.0
+

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-14 13:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-14 13:03 [Buildroot] [git commit] package/janet: defaults to c99 for build.c_std Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).