aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-06-13 07:20:58 +1000
committerPaul Mackerras <paulus@samba.org>2008-06-16 15:00:54 +1000
commitda3de6df33f5f42ff9dc40093fbc884f524c9a49 (patch)
treeb0c5d209cde49e55bdd41b6125ae58918bd31ed5 /arch/powerpc/Makefile
parent143580ecfb7999147e546cc3814023e233e95fa5 (diff)
downloadkernel_samsung_espresso10-da3de6df33f5f42ff9dc40093fbc884f524c9a49.zip
kernel_samsung_espresso10-da3de6df33f5f42ff9dc40093fbc884f524c9a49.tar.gz
kernel_samsung_espresso10-da3de6df33f5f42ff9dc40093fbc884f524c9a49.tar.bz2
[POWERPC] Fix -Os kernel builds with newer gcc versions
GCC 4.4.x looks to be adding support for generating out-of-line register saves/restores based on: http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01678.html This breaks the kernel if we enable CONFIG_CC_OPTIMIZE_FOR_SIZE. To fix this we add the use the save/restore code from gcc and simplified it down for our needs (integer only). Additionally, we have to link this code into each module. The other solution was to add EXPORT_SYMBOL() which meant going through the trampoline which seemed nonsensical for these out-of-line routines. Finally, we add some checks to prom_init_check.sh to ignore the out-of-line save/restore functions. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 86096cc..b7d4c4c 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -96,6 +96,8 @@ endif
else
KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
endif
+else
+LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
endif
ifeq ($(CONFIG_TUNE_CELL),y)