Skip to content

Commit

Permalink
package/kvm-unit-tests: fix build with SSP
Browse files Browse the repository at this point in the history
Add a patch to correct a typo in the Makefile, so -fno-stack-protector /
-fno-stack-protector-all are really used.  With this applied, kvm-unit-tests
will always be built without SSP as intented by upstream.  This will fix the
build on ppc64 with SSP that started to fail for an unknown reason since
November 27th.

Moreover, the Arch Linux workaround could also be removed in a follow-up
patch.

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

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
  • Loading branch information
ffontaine authored and jacmet committed Feb 25, 2020
1 parent 2ce4eb9 commit 0788e92
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 9bf9155804652c0b3a94af9723c79b6de430187b Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <[email protected]>
Date: Mon, 24 Feb 2020 00:04:06 +0100
Subject: [PATCH] Makefile: fix stack-protector tests

Rename fnostack_protector into fno_stack_protector and
fnostack_protector_all into fnostack_protector_all otherwise build will
fail if -fstack-protector is passed by the toolchain

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

Signed-off-by: Fabrice Fontaine <[email protected]>
[Upstream status: sent to [email protected]]
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 767b6c6..754ed65 100644
--- a/Makefile
+++ b/Makefile
@@ -55,8 +55,8 @@ COMMON_CFLAGS += -Wignored-qualifiers -Werror

frame-pointer-flag=-f$(if $(KEEP_FRAME_POINTER),no-,)omit-frame-pointer
fomit_frame_pointer := $(call cc-option, $(frame-pointer-flag), "")
-fnostack_protector := $(call cc-option, -fno-stack-protector, "")
-fnostack_protector_all := $(call cc-option, -fno-stack-protector-all, "")
+fno_stack_protector := $(call cc-option, -fno-stack-protector, "")
+fno_stack_protector_all := $(call cc-option, -fno-stack-protector-all, "")
wno_frame_address := $(call cc-option, -Wno-frame-address, "")
fno_pic := $(call cc-option, -fno-pic, "")
no_pie := $(call cc-option, -no-pie, "")
--
2.25.0

0 comments on commit 0788e92

Please sign in to comment.