aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Build
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2014-08-26 21:18:59 +1000
committerDean Camera <dean@fourwalledcubicle.com>2014-08-26 21:18:59 +1000
commitd0a147f5bbcd59a9f01b7bedcf7c4be92f059b35 (patch)
treed2194a0fcbf8f40dfa280c94b2cc79c90b5b65c6 /LUFA/Build
parent0fd7b2cf09c9088646080a911f0840348e566577 (diff)
downloadlufa-d0a147f5bbcd59a9f01b7bedcf7c4be92f059b35.tar.gz
lufa-d0a147f5bbcd59a9f01b7bedcf7c4be92f059b35.tar.bz2
lufa-d0a147f5bbcd59a9f01b7bedcf7c4be92f059b35.zip
Patched the LUFA build system to work around a GCC code generation bug in newer toolchains when building for larger FLASH memory devices (thanks to demultiplexer)
Diffstat (limited to 'LUFA/Build')
-rw-r--r--LUFA/Build/lufa_build.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index 1bdfa1d72..b9b144aee 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -199,6 +199,12 @@ ifeq ($(LINKER_RELAXATIONS), Y)
BASE_CC_FLAGS += -mrelax
endif
+# This flag is required for bootloaders as GCC will emit invalid jump table
+# assembly code for devices with large amounts of flash; the jump table target
+# is extracted from FLASH without using the correct ELPM instruction, resulting
+# in a pseudo-random jump target.
+BASE_CC_FLAGS += -fno-jump-tables
+
# Additional language specific compiler flags
BASE_C_FLAGS := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes
BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD)