Revert "package/janet: add -std=c99 to CFLAGS"
PATCH 1/3 Revert "package/janet: add -std=c99 to CFLAGS"
This reverts commit b5e8f1c1475b46c8d9b7159aafe983e72d329d29. Indeed, this commit does not fix the build failure as c_std=c99 is already set in default_options in meson.build.
The issue is that this parameter is not used for native executables since meson 0.51.
--- package/janet/janet.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/janet/janet.mk +1 -1
@@ -8,8 +8,8 @@ JANET_VERSION = 1.15.0 JANET_SITE = $(call github,janet-lang,janet,v$(JANET_VERSION)) JANET_LICENSE = MIT JANET_LICENSE_FILES = LICENSE + JANET_INSTALL_STAGING = YES -JANET_CFLAGS = $(TARGET_CFLAGS) -std=c99 ifeq ($(BR2_STATIC_LIBS),y) JANET_CONF_OPTS += -Ddynamic_modules=false
Signature · 1 line
2.30.0
PATCH 2/3 package/janet: defaults to c99 for build.c_std
Fixes:
- http://autobuild.buildroot.org/results/d5e46e094b27f40e12b32624d1431bfeeb617be3
--- ...uild-defaults-to-c99-for-build.c_std.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package/janet/0001-meson.build-defaults-to-c99-for-build.c_std.patch
package/janet/0001-meson.build-defaults-to-c99-for-build.c_std.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 546437d799f4cbc1dd86a015eac3b9ab405130c6 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +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 <[email protected]> +[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 +
Signature · 1 line
2.30.0
PATCH 3/3 package/janet: fix static build
In reply to Fabrice FontaineFixes:
- http://autobuild.buildroot.org/results/a4f927f73a7b80e65408c992d7b6023609a1eacc
--- .../0002-meson.build-fix-static-build.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/janet/0002-meson.build-fix-static-build.patch
package/janet/0002-meson.build-fix-static-build.patch new file +37 -0
@@ -0,0 +1,37 @@ +From b0f1a4967db9d8910e0091adff5e40a2a147323f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 12 Mar 2021 08:46:05 +0100 +Subject: [PATCH] meson.build: fix static build + +Don't enforce -rdynamic when building statically to avoid the following +build failure: + +/home/giuliobenetti/autobuild/run/instance-2/output-1/host/bin/arm-linux-gcc -o janet janet.p/meson-generated_.._janet.c.o janet.p/src_mainclient_shell.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,-O1 -rdynamic -Wl,-elf2flt -static -Wl,--start-group -lm -ldl -Wl,--end-group -pthread +arm-linux-gcc.br_real: error: unrecognized command line option '-rdynamic' + +Fixes: + - http://autobuild.buildroot.org/results/a4f927f73a7b80e65408c992d7b6023609a1eacc + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Retrieved from: +https://github.com/janet-lang/janet/commit/b0f1a4967db9d8910e0091adff5e40a2a147323f] +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index d3a2d399..a8a0a054 100644 +--- a/meson.build ++++ b/meson.build +@@ -33,7 +33,7 @@ dl_dep = cc.find_library('dl', required : false) + thread_dep = dependency('threads') + + # Link options +-if build_machine.system() != 'windows' ++if get_option('default_library') != 'static' and build_machine.system() != 'windows' + add_project_link_arguments('-rdynamic', language : 'c') + endif + +-- +2.30.0 +
Signature · 1 line
2.30.0
PATCH 1/3 Revert "package/janet: add -std=c99 to CFLAGS"
In reply to Fabrice FontaineFabrice, All,
On 2021-03-13 10:59 +0100, Fabrice Fontaine spake thusly:
Quoted 8 lines
This reverts commit
b5e8f1c1475b46c8d9b7159aafe983e72d329d29. Indeed, this commit does not fix the build failure as c_std=c99 is already set indefault_optionsin meson.build.The issue is that this parameter is not used for native executables since meson 0.51.
Signed-off-by Fabrice Fontaine <[email protected]>
Series applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 25 lines
--- package/janet/janet.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/janet/janet.mk +1
-1@@ -8,8 +8,8 @@ JANET_VERSION = 1.15.0 JANET_SITE = $(call github,janet-lang,janet,v$(JANET_VERSION)) JANET_LICENSE = MIT JANET_LICENSE_FILES = LICENSE + JANET_INSTALL_STAGING = YES -JANET_CFLAGS = $(TARGET_CFLAGS) -std=c99 ifeq ($(BR2_STATIC_LIBS),y) JANET_CONF_OPTS += -Ddynamic_modules=falseSignature · 6 lines
2.30.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'