From: Mike Frysinger Date: Thu, 13 Oct 2011 04:45:47 +0000 (-0400) Subject: sh: only add -mno-fdpic if the compiler supports it X-Git-Tag: v2011.12-rc1~103 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4cde1740d259eb3d1f6943e6eb131c33e7b9faf3;p=oweals%2Fu-boot.git sh: only add -mno-fdpic if the compiler supports it Not all SuperH toolchains support -mno-fdpic. Chances are good that if the flag doesn't work, it isn't defaulting to the FDPIC ABI, so the flag isn't needed. So only add it if it is actually supported. Signed-off-by: Mike Frysinger Signed-off-by: Nobuhiro Iwamatsu --- diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk index f46b38fa0f..bdd3315ee1 100644 --- a/arch/sh/cpu/sh2/config.mk +++ b/arch/sh/cpu/sh2/config.mk @@ -24,10 +24,11 @@ ENDIANNESS += -EB ifdef CONFIG_SH2A -PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb -mno-fdpic -ffreestanding +PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb -ffreestanding else # SH2 PLATFORM_CPPFLAGS += -m3e -mb endif +PLATFORM_CPPFLAGS += $(call cc-option,-mno-fdpic) PLATFORM_RELFLAGS += -ffixed-r13 PLATFORM_LDFLAGS += $(ENDIANNESS)