43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
|
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
|
||
|
|