提交 6afe32dd 编写于 作者: D dholmes

8002040: Allow Full Debug Symbols when cross-compiling

Reviewed-by: dcubed, erikj, tbell
上级 1fb61883
...@@ -111,21 +111,18 @@ _JUNK_ := $(shell \ ...@@ -111,21 +111,18 @@ _JUNK_ := $(shell \
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# Default OBJCOPY comes from GNU Binutils on Linux: ifndef CROSS_COMPILE_ARCH
DEF_OBJCOPY=/usr/bin/objcopy # Default OBJCOPY comes from GNU Binutils on Linux:
ifdef CROSS_COMPILE_ARCH DEF_OBJCOPY=/usr/bin/objcopy
# don't try to generate .debuginfo files when cross compiling
_JUNK_ := $(shell \
echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
"skipping .debuginfo generation.")
OBJCOPY=
else else
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) # Assume objcopy is part of the cross-compilation toolkit
ifneq ($(ALT_OBJCOPY),) DEF_OBJCOPY=$(COMPILER_PATH)/objcopy
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") endif
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) ifneq ($(ALT_OBJCOPY),)
endif _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif endif
# Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
...@@ -137,7 +134,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ...@@ -137,7 +134,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \ _JUNK_ := $(shell \
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")
ENABLE_FULL_DEBUG_SYMBOLS=0 ENABLE_FULL_DEBUG_SYMBOLS=0
else else
_JUNK_ := $(shell \ _JUNK_ := $(shell \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册