From a68d78f26120819778adb3eb3e086cd4acb604c4 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Wed, 25 Jul 2012 18:13:44 +0530 Subject: [PATCH] ARC: SMP resurrect #24: Makefile fix for relo errors Signed-off-by: Vineet Gupta --- arch/arc/Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arc/Makefile b/arch/arc/Makefile index 0f1e21e27a002a..4f175222f9adfc 100755 --- a/arch/arc/Makefile +++ b/arch/arc/Makefile @@ -107,9 +107,16 @@ bootpImage uImage: vmlinux archclean: $(Q)$(MAKE) $(clean)=$(boot) -# vineetg Feb 2010: -# We switched OFF -mlong-calls for overall kernel build +# Hacks to enable final link due to absence of link-time branch relexation +# and gcc choosing optimal(shorter) branches at -O3 +# +# vineetg Feb 2010: -mlong-calls switched off for overall kernel build # However lib/decompress_inflate.o (.init.text) calls -# zlib_inflate_workspacethere (.text) causing relocation error. +# zlib_inflate_workspacesize (.text) causing relocation errors. # Thus forcing all exten calls in this file to be long calls export CFLAGS_decompress_inflate.o = -mlong-calls + +# some debug printk getting out of range from sched code +ifdef CONFIG_SMP +export CFLAGS_sched.o = -mmedium-calls +endif