[parisc-linux] Get rid of %r8 linker stubs

Alan Modra alan@linuxcare.com.au
Fri, 23 Jun 2000 20:34:43 +1000 (EST)


Hi Paul,
   I nearly forgot to follow up with the results of my kernel build.  It
was "ld -r" that caused the failure, and the following patch to the kernel
Makefile cures the build problem for me.  Not tested as I don't have any
hp hardware.

Regards, Alan
-- 
Linuxcare.  Support for the Revolution.

Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux-2.3/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile	2000/05/31 18:50:18	1.17
+++ Makefile	2000/06/23 10:11:16
@@ -95,6 +95,11 @@ AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
 # use '-fno-strict-aliasing', but only if the compiler can take it
 CFLAGS += $(shell if $(CC) -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-fno-strict-aliasing"; fi)
 
+# Same for -ffunction-sections
+# This is needed for the new binutils as otherwise "ld -r" results in .text
+# sections that are too big (> 0x40000) for branches to reach stubs.
+CFLAGS += $(shell if $(CC) -ffunction-sections -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-ffunction-sections"; fi)
+
 export	CPPFLAGS CFLAGS AFLAGS
 
 #