* [Buildroot] [PATCH 1/1] package/libdex: fix build without SSP
@ 2024-07-23 18:55 Fabrice Fontaine
2024-07-23 20:20 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-07-23 18:55 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Fabrice Fontaine
Fix the following build failure without stack-protector raised since the
addition of the package in commit
70319b47f646f74f407ed3355baf5b581a10518a:
/home/buildroot/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i686-buildroot-linux-uclibc/9.3.0/../../../../i686-buildroot-linux-uclibc/bin/ld: src/libdex-1.a.p/dex-async-pair.c.o: in function `dex_async_pair_ready_callback':
dex-async-pair.c:(.text+0x118): undefined reference to `__stack_chk_guard'
Fixes: 70319b47f646f74f407ed3355baf5b581a10518a
- http://autobuild.buildroot.org/results/f53768f654a9eddd95b583a366cd7386d9ddb285
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
.../0001-add-stack-protector-option.patch | 45 +++++++++++++++++++
package/libdex/libdex.mk | 1 +
2 files changed, 46 insertions(+)
create mode 100644 package/libdex/0001-add-stack-protector-option.patch
diff --git a/package/libdex/0001-add-stack-protector-option.patch b/package/libdex/0001-add-stack-protector-option.patch
new file mode 100644
index 0000000000..9021831a39
--- /dev/null
+++ b/package/libdex/0001-add-stack-protector-option.patch
@@ -0,0 +1,45 @@
+From 107efb2f1a014c4475e122677faddbe0dbef1000 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 23 Jul 2024 14:54:59 +0200
+Subject: [PATCH] add stack-protector option
+
+Allow the user to disable stack-protector as it is not supported by all
+toolchains
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://gitlab.gnome.org/GNOME/libdex/-/commit/a65d33aebbe43024a046b3f3cc4a1c6c533838d0
+---
+ meson.build | 2 +-
+ meson_options.txt | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index d0ca81d..2f7aac2 100644
+--- a/meson.build
++++ b/meson.build
+@@ -126,7 +126,7 @@ test_c_args = [
+ ['-Werror=format-security', '-Werror=format=2'],
+ '-FImsvc_recommended_pragmas.h',
+ ]
+-if get_option('buildtype') != 'plain'
++if get_option('buildtype') != 'plain' and get_option('stack-protector')
+ if host_machine.system() != 'windows'
+ test_c_args += '-fstack-protector-strong'
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 519cd97..9e3364a 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,6 +4,9 @@ option('docs',
+ option('examples',
+ type: 'boolean', value: true,
+ description: 'Build example programs')
++option('stack-protector',
++ type: 'boolean', value: true,
++ description: 'Enable stack-protector')
+ option('vapi',
+ type: 'boolean', value: true,
+ description: 'Generate vapi data (requires vapigen)')
+--
+GitLab
+
diff --git a/package/libdex/libdex.mk b/package/libdex/libdex.mk
index 530dfc2bab..7c652a0409 100644
--- a/package/libdex/libdex.mk
+++ b/package/libdex/libdex.mk
@@ -15,6 +15,7 @@ LIBDEX_DEPENDENCIES = libglib2
LIBDEX_CONF_OPTS = \
-Ddocs=false \
-Dexamples=false \
+ -Dstack-protector=false \
-Dsysprof=false \
-Dtests=false \
-Dvapi=false \
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libdex: fix build without SSP
2024-07-23 18:55 [Buildroot] [PATCH 1/1] package/libdex: fix build without SSP Fabrice Fontaine
@ 2024-07-23 20:20 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-23 20:20 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Adrian Perez de Castro, buildroot
On Tue, 23 Jul 2024 20:55:53 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following build failure without stack-protector raised since the
> addition of the package in commit
> 70319b47f646f74f407ed3355baf5b581a10518a:
>
> /home/buildroot/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i686-buildroot-linux-uclibc/9.3.0/../../../../i686-buildroot-linux-uclibc/bin/ld: src/libdex-1.a.p/dex-async-pair.c.o: in function `dex_async_pair_ready_callback':
> dex-async-pair.c:(.text+0x118): undefined reference to `__stack_chk_guard'
>
> Fixes: 70319b47f646f74f407ed3355baf5b581a10518a
> - http://autobuild.buildroot.org/results/f53768f654a9eddd95b583a366cd7386d9ddb285
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> .../0001-add-stack-protector-option.patch | 45 +++++++++++++++++++
> package/libdex/libdex.mk | 1 +
> 2 files changed, 46 insertions(+)
> create mode 100644 package/libdex/0001-add-stack-protector-option.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-23 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-23 18:55 [Buildroot] [PATCH 1/1] package/libdex: fix build without SSP Fabrice Fontaine
2024-07-23 20:20 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox