Skip to contentSkip to conversation

Use -fPIC instead of -mrelocatable-lib

PATCH New Paul Mackerras 1 participant 1 message Jun 3, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use -fPIC instead of -mrelocatable-lib

The ppc32 boot code has a couple of files that are executed very early on before the kernel is mapped at the address it is linked at. We have been using -mrelocatable-lib to compile these files, but apparently -mrelocatable-lib is deprecated and the gcc developers are threatening to remove it. In fact the -fPIC flag does what we need. This patch changes -mrelocatable-lib to -fPIC.

arch/ppc/syslib/Makefile +2 -2
diff -urN linux-2.5/arch/ppc/syslib/Makefile pmac-2.5/arch/ppc/syslib/Makefile
@@ -9,8 +9,8 @@
 EXTRA_AFLAGS		:= -Wa,-m405
 endif
 
-CFLAGS_prom_init.o      += -mrelocatable-lib
-CFLAGS_btext.o          += -mrelocatable-lib
+CFLAGS_prom_init.o      += -fPIC
+CFLAGS_btext.o          += -fPIC
 
 obj-$(CONFIG_PPCBUG_NVRAM)	+= prep_nvram.o
 obj-$(CONFIG_PPC_OCP)		+= ocp.o