summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-11-12 11:53:48 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-11-12 11:53:50 +0100
commit3b8b70bfd743c303349f67c892631cb04c2b3c68 (patch)
treec85625638b9936a4ce11ae353404a52fdf544c29
parent0c7c5c210746f7c9ce63761907a88d7f32b5d104 (diff)
downloadbarebox-3b8b70bfd743c303349f67c892631cb04c2b3c68.tar.gz
barebox-3b8b70bfd743c303349f67c892631cb04c2b3c68.tar.xz
ARM: am335x: Fix am335x_sdram_size() not running at link address
am335x_sdram_size() may be called when we are not running at the address we are linked at. This means tree switch conversions and jump tables will not work. Disable these in the CFLAGS for this file. This fixes a crash in am335x_sdram_size() with newer gcc versions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-omap/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile
index 36b2aa090e..06cd191f95 100644
--- a/arch/arm/mach-omap/Makefile
+++ b/arch/arm/mach-omap/Makefile
@@ -22,6 +22,8 @@ pbl-$(CONFIG_ARCH_OMAP3) += omap3_generic.o auxcr.o
obj-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o
pbl-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o
obj-pbl-$(CONFIG_ARCH_AM33XX) += am33xx_generic.o am33xx_clock.o am33xx_mux.o am3xxx.o
+CFLAGS_pbl-am33xx_generic.o := -fno-tree-switch-conversion -fno-jump-tables
+CFLAGS_am33xx_generic.o := -fno-tree-switch-conversion -fno-jump-tables
obj-pbl-$(CONFIG_ARCH_AM35XX) += am3xxx.o am35xx_emif4.o
obj-$(CONFIG_ARCH_AM33XX) += am33xx_scrm.o
obj-$(CONFIG_ARCH_OMAP3) += omap3_clock.o