summary refs log tree commit diff
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-04 09:10:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-04 09:10:39 -0800
commita517af52cb57f972cee2378765e1c5dd10141f0d (patch)
treed63f622f31bfc8804af9b6dd4b0b39265d8d86a0 /arch/parisc
parentadac0753c25217a2365b132c87cb2540b51fa89b (diff)
parent1e8249b8a4e960018e4baca6b523b8a4500af600 (diff)
downloadlinux-a517af52cb57f972cee2378765e1c5dd10141f0d.tar.gz
Merge branch 'parisc-4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fix from Helge Deller:
 "On parisc, use -ffunction-sections compiler option when building
  32-bit kernel modules to avoid sysfs-warnings when loading such
  modules.

  This got broken with kernel v4.18"

* 'parisc-4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Enable -ffunction-sections for modules on 32-bit kernel
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index d047a09d660f..1085385e1f06 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -71,6 +71,13 @@ ifdef CONFIG_MLONGCALLS
 KBUILD_CFLAGS_KERNEL += -mlong-calls
 endif
 
+# Without this, "ld -r" results in .text sections that are too big (> 0x40000)
+# for branches to reach stubs. And multiple .text sections trigger a warning
+# when creating the sysfs module information section.
+ifndef CONFIG_64BIT
+KBUILD_CFLAGS_MODULE += -ffunction-sections
+endif
+
 # select which processor to optimise for
 cflags-$(CONFIG_PA7000)		+= -march=1.1 -mschedule=7100
 cflags-$(CONFIG_PA7200)		+= -march=1.1 -mschedule=7200