diff options
author | Che-yu Wu <cheyuw@google.com> | 2017-07-18 17:28:53 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-07-19 22:10:53 -0700 |
commit | 9078f123949497b917a82899f5dff417f492459f (patch) | |
tree | 6ad26179c2f585ac4a3f58bca969203f04586fce /Makefile.toolchain | |
parent | 3a7a739b38b566bddb4f97755a699b3688a8744c (diff) | |
download | chrome-ec-9078f123949497b917a82899f5dff417f492459f.tar.gz |
core: Fix missing debug symbol when enabling LTO
Add "-g" to "LDFLAGS" for preserving debug symbol when enabling LTO.
BUG=chromium:742697
BRANCH=none
TEST=make BOARD=eve -j
arm-none-eabi-objdump -h build/eve/RW/ec.RW.elf | grep debug_loc
7 .debug_loc 00027bf0 00000000 00000000 0009a549 2**0
Change-Id: I6b2b00846ce71002262a10357fd4dccbe82b6e6f
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/575312
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r-- | Makefile.toolchain | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain index 1d1b458e3e..5a63ca066f 100644 --- a/Makefile.toolchain +++ b/Makefile.toolchain @@ -84,7 +84,7 @@ 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 -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) BUILD_LDFLAGS=$(LIBFTDI_LDLIBS) HOST_TEST_LDFLAGS=-T core/host/host_exe.lds -lrt -pthread -rdynamic -lm\ $(if $(TEST_COVERAGE),-fprofile-arcs,) |