提交 11dea856 编写于 作者: S sgehwolf

8207402: Stray *.debuginfo files when not stripping debug info

Summary: Only produce those files if STRIP_POLICY != no_strip
Reviewed-by: erikj
上级 606bd419
......@@ -239,10 +239,12 @@ EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
# client and server subdirectories have symbolic links to ../libjsig.so
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
else
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
else
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
endif
endif
endif
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
......@@ -253,10 +255,12 @@ ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
else
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
else
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
endif
endif
endif
endif
......@@ -265,10 +269,12 @@ ifeq ($(JVM_VARIANT_CLIENT),true)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
else
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
else
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
endif
endif
endif
endif
......@@ -278,10 +284,12 @@ ifeq ($(JVM_VARIANT_MINIMAL1),true)
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz
else
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz
else
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo
endif
endif
endif
endif
......@@ -293,12 +301,14 @@ ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
$(EXPORT_LIB_DIR)/sa-jdi.jar
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
else
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
else
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
endif
endif
endif
ADD_SA_BINARIES/ppc =
......
......@@ -56,20 +56,23 @@ $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
else
ifeq ($(STRIP_POLICY),min_strip)
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
$(QUIETLY) $(STRIP) -g $@
endif
# implied else here is no stripping at all
endif
ifeq ($(ZIP_DEBUGINFO_FILES),1)
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
$(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO)
$(RM) $(LIBJSIG_DEBUGINFO)
endif
endif
endif
......
......@@ -99,20 +99,23 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
-o $@ \
-lthread_db
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
else
ifeq ($(STRIP_POLICY),min_strip)
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
$(QUIETLY) $(STRIP) -g $@
endif
# implied else here is no stripping at all
endif
ifeq ($(ZIP_DEBUGINFO_FILES),1)
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
$(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO)
$(RM) $(LIBSAPROC_DEBUGINFO)
endif
endif
endif
......
......@@ -357,20 +357,23 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
}
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
else
ifeq ($(STRIP_POLICY),min_strip)
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
$(QUIETLY) $(STRIP) -g $@
endif
# implied else here is no stripping at all
endif
ifeq ($(ZIP_DEBUGINFO_FILES),1)
ifneq ($(STRIP_POLICY),no_strip)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
$(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
$(RM) $(LIBJVM_DEBUGINFO)
endif
endif
endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册