4e4f5c7
From b0b46a5b622fdbe69207675c5d50b77cb8ae43b7 Mon Sep 17 00:00:00 2001
4e4f5c7
From: Heiko Carstens <heiko.carstens@de.ibm.com>
4e4f5c7
Date: Tue, 5 Feb 2019 13:43:49 +0100
a20edb3
Subject: [PATCH] s390/jump_label: Correct asm contraint
a20edb3
4e4f5c7
On Tue, Jan 29, 2019 at 08:25:58AM +0100, Laura Abbott wrote:
4e4f5c7
> On 1/23/19 5:24 AM, Heiko Carstens wrote:
4e4f5c7
> >On Wed, Jan 23, 2019 at 01:55:13PM +0100, Laura Abbott wrote:
4e4f5c7
> >>There's a build failure with gcc9:
4e4f5c7
> >>
4e4f5c7
> >>  ./arch/s390/include/asm/jump_label.h: Assembler messages:
4e4f5c7
> >>  ./arch/s390/include/asm/jump_label.h:23: Error: bad expression
4e4f5c7
> >>  ./arch/s390/include/asm/jump_label.h:23: Error: junk at end of line, first unrecognized character is `r'
4e4f5c7
> >>  make[1]: *** [scripts/Makefile.build:277: init/main.o] Error 1
4e4f5c7
...
4e4f5c7
> I've had to turn off s390 in Fedora until this gets fixed :(
a20edb3
4e4f5c7
Laura, the patch below should fix this (temporarily). If possible,
4e4f5c7
could you give it a try? It seems to work for me.
a20edb3
4e4f5c7
rom 4067027c2ccc8d3f1dc3bb19fe2d00da0c65bcd8 Mon Sep 17 00:00:00 2001
4e4f5c7
From: Heiko Carstens <heiko.carstens@de.ibm.com>
4e4f5c7
Date: Tue, 5 Feb 2019 13:21:56 +0100
4e4f5c7
Subject: [PATCH] s390: disable section anchors
a20edb3
4e4f5c7
Disable section anchors to allow to compile with the current gcc 9
4e4f5c7
experimental version. The section anchors is a new feature for s390
4e4f5c7
with gcc 9, however it breaks our current usage of the 'X' constraint
4e4f5c7
within the asm goto construct within our jump label implementation.
4e4f5c7
4e4f5c7
Fixing this seems to be non-trivial, therefore (hopefully) temporarily
4e4f5c7
disable section anchors. We will hopefully have a better solution
4e4f5c7
before gcc 9 is released, so that this can be removed again.
4e4f5c7
4e4f5c7
Reported-by: Laura Abbott <labbott@redhat.com>
4e4f5c7
Suggested-by: Ilya Leoshkevich <iii@linux.ibm.com>
4e4f5c7
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
a20edb3
---
4e4f5c7
 arch/s390/Makefile | 8 ++++++++
4e4f5c7
 1 file changed, 8 insertions(+)
4e4f5c7
4e4f5c7
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
4e4f5c7
index e21053e5e0da..1eac75bc3a29 100644
4e4f5c7
--- a/arch/s390/Makefile
4e4f5c7
+++ b/arch/s390/Makefile
4e4f5c7
@@ -62,6 +62,14 @@ cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include
4e4f5c7
 #
4e4f5c7
 cflags-$(CONFIG_FRAME_POINTER) += -fno-optimize-sibling-calls
4e4f5c7
 
4e4f5c7
+#
4e4f5c7
+# Disable section anchors. This gcc 9 feature currently breaks the 'X'
4e4f5c7
+# constraint like it is used in the asm goto construct.
4e4f5c7
+#
4e4f5c7
+ifeq ($(call cc-option-yn,-fno-section-anchors),y)
4e4f5c7
+cflags-y += -fno-section-anchors
4e4f5c7
+endif
4e4f5c7
+
4e4f5c7
 ifeq ($(call cc-option-yn,-mpacked-stack),y)
4e4f5c7
 cflags-$(CONFIG_PACK_STACK)  += -mpacked-stack -D__PACK_STACK
4e4f5c7
 aflags-$(CONFIG_PACK_STACK)  += -D__PACK_STACK
a20edb3
-- 
a20edb3
2.20.1
a20edb3