summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2018-05-16 14:49:44 +0200
committerCommit Bot <commit-bot@chromium.org>2019-10-24 21:14:37 +0000
commitba0210344947aa1d33ec32695dfb9901b7493550 (patch)
treef2687b6ae858fffde59a3e0762c254cbdb8c2bb3
parent47e733bc29b389545f93da7baadb53bff071ac45 (diff)
downloadchrome-ec-ba0210344947aa1d33ec32695dfb9901b7493550.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 Conflicts: Makefile.toolchain: add flag at proper place. 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> Change-Id: I7296aa80f587aa4f004fb20958714766793ab2b5 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1874633 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Commit-Queue: Stefan Reinauer <reinauer@google.com> Tested-by: Stefan Reinauer <reinauer@google.com>
-rw-r--r--Makefile.toolchain3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 9b317c89e3..32b8519e38 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -56,7 +56,8 @@ LIBFTDI_LDLIBS=$(shell $(PKG_CONFIG) --libs lib${LIBFTDI_NAME})
BUILD_CFLAGS= $(LIBFTDI_CFLAGS) $(CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
HOST_CFLAGS=$(CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN) -DHOST_TOOLS_BUILD
-LDFLAGS=-nostdlib -Wl,-X -Wl,--gc-sections -Wl,--build-id=none $(LDFLAGS_EXTRA)
+LDFLAGS=-nostdlib -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,)