* [Buildroot] [PATCH] package/kvm-unit-tests: disable SSP
@ 2021-08-20 13:32 Matthew Weber via buildroot
2021-08-20 21:22 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Weber via buildroot @ 2021-08-20 13:32 UTC (permalink / raw)
To: buildroot; +Cc: Matthew Weber
kvm-unit-tests shouldn't use stack-protector as the test suite is
building free standing binaries to test QEMU. There is no guarantee
that GCC has set a spec to filter out stack protector enabling with
-ffreestanding so disabling explicitly to prevent a series of build
failures.
Fixes:
http://autobuild.buildroot.net/results/780/780c8c70ea7015113714cbd3841d96b08bd2f2aa/
Signed-off-by: Matthew Weber <matthew.weber@collins.com>
---
package/kvm-unit-tests/kvm-unit-tests.mk | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/package/kvm-unit-tests/kvm-unit-tests.mk b/package/kvm-unit-tests/kvm-unit-tests.mk
index 2637066701..23241b453a 100644
--- a/package/kvm-unit-tests/kvm-unit-tests.mk
+++ b/package/kvm-unit-tests/kvm-unit-tests.mk
@@ -35,15 +35,14 @@ KVM_UNIT_TESTS_CONF_OPTS =\
# compiler. However, for x86-64, we use the host compiler, as
# kvm-unit-tests builds 32 bit code, which Buildroot toolchains for
# x86-64 cannot do.
-ifeq ($(BR2_x86_64),y)
-# Arch Linux adds -fstack-protector even when building with -ffreestanding, but
-# it doesn't link with the stack-protector library when -nostdlib is passed,
-# which leads to a link error. Therefore, disable it explicitly to work around
-# this bug in Arch Linux. https://bugs.archlinux.org/task/64270
-KVM_UNIT_TESTS_MAKE_OPTS += EXTRA_CFLAGS=-fno-stack-protector
-else
+ifneq ($(BR2_x86_64),y)
KVM_UNIT_TESTS_CONF_OPTS += --cross-prefix="$(TARGET_CROSS)"
endif
+# kvm-unit-tests shouldn't use stack-protector as the test suite is building
+# free standing binaries to test QEMU. There is no guarantee that GCC has
+# set a spec to filter out stack protector enabling with -ffreestanding so
+# disabling explicitly to prevent a series of build failures.
+KVM_UNIT_TESTS_MAKE_OPTS += EXTRA_CFLAGS=-fno-stack-protector
define KVM_UNIT_TESTS_CONFIGURE_CMDS
cd $(@D) && ./configure $(KVM_UNIT_TESTS_CONF_OPTS)
--
2.17.1
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/kvm-unit-tests: disable SSP
2021-08-20 13:32 [Buildroot] [PATCH] package/kvm-unit-tests: disable SSP Matthew Weber via buildroot
@ 2021-08-20 21:22 ` Thomas Petazzoni
2021-08-20 22:04 ` Fabrice Fontaine
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2021-08-20 21:22 UTC (permalink / raw)
To: Matthew Weber via buildroot; +Cc: Fabrice Fontaine, Matthew Weber, buildroot
Hello Matt,
On Fri, 20 Aug 2021 08:32:32 -0500
Matthew Weber via buildroot <buildroot@busybox.net> wrote:
> kvm-unit-tests shouldn't use stack-protector as the test suite is
> building free standing binaries to test QEMU. There is no guarantee
> that GCC has set a spec to filter out stack protector enabling with
> -ffreestanding so disabling explicitly to prevent a series of build
> failures.
>
> Fixes:
> http://autobuild.buildroot.net/results/780/780c8c70ea7015113714cbd3841d96b08bd2f2aa/
>
> Signed-off-by: Matthew Weber <matthew.weber@collins.com>
> ---
> package/kvm-unit-tests/kvm-unit-tests.mk | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
Thanks, but your patch doesn't apply to the master branch, and it makes
me think we're piling up work-arounds on work-arounds.
Indeed, the passing of -fno-stack-protector in EXTRA_CFLAGS has been
removed in master as of commit
d183146b5c7a1a8d1a3c828bd3b6d0660d97efc0, which itself says it is no
longer needed since commit 0788e921f961e36a50a94f8bb98f7eb75b312245.
However, it seems like despite
0788e921f961e36a50a94f8bb98f7eb75b312245, SSP is still being used.
Matt, Fabrice, could you review the situation and see what is the
correct fix moving forward ?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/kvm-unit-tests: disable SSP
2021-08-20 21:22 ` Thomas Petazzoni
@ 2021-08-20 22:04 ` Fabrice Fontaine
0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-08-20 22:04 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Matthew Weber via buildroot, Matthew Weber,
Buildroot Mailing List
Hello,
Le ven. 20 août 2021 à 23:23, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a écrit :
>
> Hello Matt,
>
> On Fri, 20 Aug 2021 08:32:32 -0500
> Matthew Weber via buildroot <buildroot@busybox.net> wrote:
>
> > kvm-unit-tests shouldn't use stack-protector as the test suite is
> > building free standing binaries to test QEMU. There is no guarantee
> > that GCC has set a spec to filter out stack protector enabling with
> > -ffreestanding so disabling explicitly to prevent a series of build
> > failures.
> >
> > Fixes:
> > http://autobuild.buildroot.net/results/780/780c8c70ea7015113714cbd3841d96b08bd2f2aa/
> >
> > Signed-off-by: Matthew Weber <matthew.weber@collins.com>
> > ---
> > package/kvm-unit-tests/kvm-unit-tests.mk | 13 ++++++-------
> > 1 file changed, 6 insertions(+), 7 deletions(-)
>
> Thanks, but your patch doesn't apply to the master branch, and it makes
> me think we're piling up work-arounds on work-arounds.
>
> Indeed, the passing of -fno-stack-protector in EXTRA_CFLAGS has been
> removed in master as of commit
> d183146b5c7a1a8d1a3c828bd3b6d0660d97efc0, which itself says it is no
> longer needed since commit 0788e921f961e36a50a94f8bb98f7eb75b312245.
>
> However, it seems like despite
> 0788e921f961e36a50a94f8bb98f7eb75b312245, SSP is still being used.
>
> Matt, Fabrice, could you review the situation and see what is the
> correct fix moving forward ?
The link on the autobuilder failure is from February 2020 and I'm not
able to find a build failure due to SSP in the latest days so I assume
that this patch is not needed.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,
Fabrice
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-20 22:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-20 13:32 [Buildroot] [PATCH] package/kvm-unit-tests: disable SSP Matthew Weber via buildroot
2021-08-20 21:22 ` Thomas Petazzoni
2021-08-20 22:04 ` Fabrice Fontaine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox