summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2018-05-16 14:49:44 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-05-18 10:05:12 -0700
commite5f3ee270a0e6d7ef8bc9965dad27b11cffda367 (patch)
treee9d61eed0a033acfec92734a685ec02be8ec2571 /Makefile.toolchain
parent030d643efef27a8bd3926d570c9cd268c5040160 (diff)
downloadchrome-ec-e5f3ee270a0e6d7ef8bc9965dad27b11cffda367.tar.gz
Tell linker about the arch and CPU it's linking for
GCC 8.1's linker tries to rewrite the code to match the lowest common denominator, reintroducing references to __aeabi_idivmod and friends even on ARM revisions that don't need them. Tell it what it's linking for to keep it harmless. BUG=b:65441143 BRANCH=none TEST=make buildall works with gcc 8.1 Change-Id: I7296aa80f587aa4f004fb20958714766793ab2b5 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/1061693 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@google.com>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 001910d87c..37100780d1 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -86,7 +86,8 @@ LIBFTDI_LDLIBS=$(shell $(PKG_CONFIG) --libs lib${LIBFTDI_NAME})
BUILD_CFLAGS= $(LIBFTDI_CFLAGS) $(BUILD_CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
HOST_CFLAGS=$(HOST_CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN) -DHOST_TOOLS_BUILD
-LDFLAGS=-nostdlib -g -Wl,-X -Wl,--gc-sections -Wl,--build-id=none $(LDFLAGS_EXTRA)
+LDFLAGS=-nostdlib -g -Wl,-X -Wl,--gc-sections -Wl,--build-id=none \
+ $(LDFLAGS_EXTRA) $(CFLAGS_CPU)
BUILD_LDFLAGS=$(LIBFTDI_LDLIBS)
HOST_TEST_LDFLAGS=-T core/host/host_exe.lds -lrt -pthread -rdynamic -lm\
$(if $(TEST_COVERAGE),-fprofile-arcs,)