linux/arch/parisc
Helge Deller 778e45d772 parisc: Enable -mlong-calls gcc option with CONFIG_COMPILE_TEST
The kernel test robot reported multiple linkage problems like this:

    hppa64-linux-ld: init/main.o(.init.text+0x56c): cannot reach printk
    init/main.o: in function `unknown_bootoption':
    (.init.text+0x56c): relocation truncated to fit: R_PARISC_PCREL22F against
	symbol `printk' defined in .text.unlikely section in kernel/printk/printk.o

There are two ways to solve it:
a) Enable the -mlong-call compiler option (CONFIG_MLONGCALLS),
b) Add long branch stub support in 64-bit linker.

While b) is the long-term solution, this patch works around the issue by
automatically enabling the CONFIG_MLONGCALLS option when
CONFIG_COMPILE_TEST is set, which indicates that a non-production kernel
(e.g. 0-day kernel) is built.

Signed-off-by: Helge Deller <deller@gmx.de>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 00e35f2b0e ("parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES")
Cc: stable@vger.kernel.org # v5.6+
2021-03-02 21:21:17 +01:00
..
boot vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG 2020-09-01 09:50:35 +02:00
configs module: remove EXPORT_UNUSED_SYMBOL* 2021-02-08 12:28:07 +01:00
include Rework of the X86 irq stack handling: 2021-02-24 16:32:23 -08:00
kernel io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
lib parisc: Mark pointers volatile in __xchg8(), __xchg32() and __xchg64() 2020-10-15 08:10:39 +02:00
math-emu Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang 2019-08-10 12:45:37 -07:00
mm parisc: Optimize per-pagetable spinlocks 2021-02-12 16:39:42 +01:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: Install vmlinuz instead of zImage file 2020-10-15 08:10:39 +02:00
Kconfig parisc: Enable -mlong-calls gcc option with CONFIG_COMPILE_TEST 2021-03-02 21:21:17 +01:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile arch: parisc: Remove CONFIG_OPROFILE support 2021-01-29 10:04:52 +05:30
nm