* [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS"
@ 2021-03-13 9:59 Fabrice Fontaine
2021-03-13 9:59 ` [Buildroot] [PATCH 2/3] package/janet: defaults to c99 for build.c_std Fabrice Fontaine
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2021-03-13 9:59 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/janet/janet.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/janet/janet.mk b/package/janet/janet.mk
index ea042221d8..7243d60c01 100644
--- a/package/janet/janet.mk
+++ b/package/janet/janet.mk
@@ -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
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/3] package/janet: defaults to c99 for build.c_std
2021-03-13 9:59 [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS" Fabrice Fontaine
@ 2021-03-13 9:59 ` Fabrice Fontaine
2021-03-13 9:59 ` [Buildroot] [PATCH 3/3] package/janet: fix static build Fabrice Fontaine
2021-03-14 13:04 ` [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS" Yann E. MORIN
2 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2021-03-13 9:59 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/d5e46e094b27f40e12b32624d1431bfeeb617be3
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...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
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
+
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 3/3] package/janet: fix static build
2021-03-13 9:59 [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS" Fabrice Fontaine
2021-03-13 9:59 ` [Buildroot] [PATCH 2/3] package/janet: defaults to c99 for build.c_std Fabrice Fontaine
@ 2021-03-13 9:59 ` Fabrice Fontaine
2021-03-14 13:04 ` [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS" Yann E. MORIN
2 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2021-03-13 9:59 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/a4f927f73a7b80e65408c992d7b6023609a1eacc
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
.../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
diff --git a/package/janet/0002-meson.build-fix-static-build.patch b/package/janet/0002-meson.build-fix-static-build.patch
new file mode 100644
index 0000000000..bd335cad90
--- /dev/null
+++ b/package/janet/0002-meson.build-fix-static-build.patch
@@ -0,0 +1,37 @@
+From b0f1a4967db9d8910e0091adff5e40a2a147323f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[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
+
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS"
2021-03-13 9:59 [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS" Fabrice Fontaine
2021-03-13 9:59 ` [Buildroot] [PATCH 2/3] package/janet: defaults to c99 for build.c_std Fabrice Fontaine
2021-03-13 9:59 ` [Buildroot] [PATCH 3/3] package/janet: fix static build Fabrice Fontaine
@ 2021-03-14 13:04 ` Yann E. MORIN
2 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-03-14 13:04 UTC (permalink / raw)
To: buildroot
Fabrice, All,
On 2021-03-13 10:59 +0100, Fabrice Fontaine spake thusly:
> 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.
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Series applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/janet/janet.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/janet/janet.mk b/package/janet/janet.mk
> index ea042221d8..7243d60c01 100644
> --- a/package/janet/janet.mk
> +++ b/package/janet/janet.mk
> @@ -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
> --
> 2.30.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-14 13:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-13 9:59 [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS" Fabrice Fontaine
2021-03-13 9:59 ` [Buildroot] [PATCH 2/3] package/janet: defaults to c99 for build.c_std Fabrice Fontaine
2021-03-13 9:59 ` [Buildroot] [PATCH 3/3] package/janet: fix static build Fabrice Fontaine
2021-03-14 13:04 ` [Buildroot] [PATCH 1/3] Revert "package/janet: add -std=c99 to CFLAGS" 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