[Buildroot] [git commit] package/libvirt: disable stack-protector

From: Yann E. MORIN <hidden>
Date: 2021-08-07 21:20:15
Subsystem: the rest · Maintainer: Linus Torvalds

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

Set warning_level to 1 instead of the default value of 2 to disable
stack-protector and avoid the following build failure since the addition
of the package in commit ccfc90e1010e42e6529afae3a5ea8bf7226dabc1:

/tmp/instance-5/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i686-buildroot-linux-uclibc/9.3.0/../../../../i686-buildroot-linux-uclibc/bin/ld: tests/commandhelper.p/commandhelper.c.o: in function `printInput':
commandhelper.c:(.text+0xad): undefined reference to `__stack_chk_guard'

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

Signed-off-by: Fabrice Fontaine <redacted>
[yann.morin.1998@free.fr:
  - move to a separate assignment
  - add a big fat comment to explain it
]
Signed-off-by: Yann E. MORIN <redacted>
---
 package/libvirt/libvirt.mk | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/package/libvirt/libvirt.mk b/package/libvirt/libvirt.mk
index a0fd5af951..cd037a6b02 100644
--- a/package/libvirt/libvirt.mk
+++ b/package/libvirt/libvirt.mk
@@ -53,6 +53,13 @@ LIBVIRT_CONF_OPTS = \
 	-Dudev=enabled \
 	-Dwireshark_dissector=disabled
 
+# warning_level should only drive the level of warnings during the
+# compilation of C code. However, libvirt misuses that to also
+# enable SSP when warning_level == 2
+# Force warning_level=1 to disable SSP, and let our toolchain wrapper
+# handle it.
+LIBVIRT_CONF_OPTS += -Dwarning_level=1
+
 ifeq ($(BR2_PACKAGE_ATTR),y)
 LIBVIRT_CONF_OPTS += -Dattr=enabled
 LIBVIRT_DEPENDENCIES += attr
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help