linux/debian/patches/bugfix/parisc/hppa-arch-fast-indirect.patch

32 lines
1.2 KiB
Diff

From: Helge Deller <deller@gmx.de>
Date: Sun, 21 Sep 2014 20:53:39 +0200
Subject: hppa-arch-fast-indirect.patch
Bug-Debian: https://bugs.debian.org/762390
Currently the 64bit hppa kernel gets miscompiled by gcc-4.8 and as such
it will not boot.
The attached patch fixes one of the problems. Latest changes in gcc-4.8
made changes to the -mfast-indirect-calls option which now produces wrong code
when compiling for 64bit. The problem is being worked on in upstream gcc-4.8,
and we don't know yet if we will implement -mfast-indirect-calls for 64bit
(which might introduce side-effects) or not. That's the reason why I don't want
to push attached patch upstream yet.
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -48,7 +48,12 @@ cflags-y := -pipe
# These flags should be implied by an hppa-linux configuration, but they
# are not in gcc 3.2.
-cflags-y += -mno-space-regs -mfast-indirect-calls
+cflags-y += -mno-space-regs
+
+# -mfast-indirect-calls is only relevant for 32-bit kernels.
+ifndef CONFIG_64BIT
+cflags-y += -mfast-indirect-calls
+endif
# Currently we save and restore fpregs on all kernel entry/interruption paths.
# If that gets optimized, we might need to disable the use of fpregs in the