summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-04-14 17:21:19 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2019-04-23 11:32:27 +0200
commitb0baa61afb087d17118082ba04742cadb174436e (patch)
treef98edd46e915302f3536f086d8dff3930669e714 /arch
parent53241aec68a7fc0ce3d56727a2b0ad140ec84ea5 (diff)
downloadbarebox-b0baa61afb087d17118082ba04742cadb174436e.tar.gz
barebox-b0baa61afb087d17118082ba04742cadb174436e.tar.xz
ARM: zii-vf610-dev: Use -fno-tree-switch-conversion -fno-jump-tables
Original and very poor workaround no longer works against GCC8, so drop it and replace with a proper solution that should've been used in the first place - specifying -fno-tree-switch-conversion -fno-jump-tables as CFLAGS when building lowlevel.c Tested to work with: - GCC 8.2.1 (arm-none-eabi) - GCC 7.1.0 (arm-none-eabi) - GCC 4.8.4 (armv7l-timesys-linux-gnueabihf) Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Heiner Kallweit <hkallweit1@gmail.com> Cc: Chris Healy <cphealy@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/zii-vf610-dev/Makefile1
-rw-r--r--arch/arm/boards/zii-vf610-dev/lowlevel.c17
2 files changed, 1 insertions, 17 deletions
diff --git a/arch/arm/boards/zii-vf610-dev/Makefile b/arch/arm/boards/zii-vf610-dev/Makefile
index 1297d815e3..3c3a3f2387 100644
--- a/arch/arm/boards/zii-vf610-dev/Makefile
+++ b/arch/arm/boards/zii-vf610-dev/Makefile
@@ -1,3 +1,4 @@
obj-y += board.o
+CFLAGS_pbl-lowlevel.o := -fno-tree-switch-conversion -fno-jump-tables
lwl-y += lowlevel.o
bbenv-y += defaultenv-zii-vf610-dev
diff --git a/arch/arm/boards/zii-vf610-dev/lowlevel.c b/arch/arm/boards/zii-vf610-dev/lowlevel.c
index 79588ac381..0db6459319 100644
--- a/arch/arm/boards/zii-vf610-dev/lowlevel.c
+++ b/arch/arm/boards/zii-vf610-dev/lowlevel.c
@@ -93,23 +93,6 @@ ENTRY_FUNCTION(start_zii_vf610_dev, r0, r1, r2)
switch (system_type) {
default:
- /*
- * GCC can be smart enough to, when DEBUG_LL is
- * disabled, reduce this switch statement to a LUT
- * fetch. Unfortunately here, this early in the boot
- * process before any relocation/address fixups could
- * happen, the address of that LUT used by the code is
- * incorrect and any access to it would result in
- * bogus values.
- *
- * Adding the following barrier() statement seem to
- * force the compiler to always translate this block
- * to a sequence of consecutive checks and jumps with
- * relative fetches, which should work with or without
- * relocation/fixups.
- */
- barrier();
-
if (IS_ENABLED(CONFIG_DEBUG_LL)) {
relocate_to_current_adr();
setup_c();