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

Tue, 17 Jul 2018 17:07:44 +0200

author
sgehwolf
date
Tue, 17 Jul 2018 17:07:44 +0200
changeset 9357
0ef29304c2b4
parent 9355
792ccf73293a
child 9358
6a4a6c499e89

8207402: Stray *.debuginfo files when not stripping debug info
Summary: Only produce those files if STRIP_POLICY != no_strip
Reviewed-by: erikj

make/linux/makefiles/defs.make file | annotate | diff | comparison | revisions
make/linux/makefiles/jsig.make file | annotate | diff | comparison | revisions
make/linux/makefiles/saproc.make file | annotate | diff | comparison | revisions
make/linux/makefiles/vm.make file | annotate | diff | comparison | revisions
     1.1 --- a/make/linux/makefiles/defs.make	Mon Jul 16 17:06:05 2018 +0100
     1.2 +++ b/make/linux/makefiles/defs.make	Tue Jul 17 17:07:44 2018 +0200
     1.3 @@ -239,10 +239,12 @@
     1.4  # client and server subdirectories have symbolic links to ../libjsig.so
     1.5  EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
     1.6  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
     1.7 -  ifeq ($(ZIP_DEBUGINFO_FILES),1)
     1.8 -    EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
     1.9 -  else
    1.10 -    EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
    1.11 +  ifneq ($(STRIP_POLICY),no_strip)
    1.12 +    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.13 +      EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
    1.14 +    else
    1.15 +      EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
    1.16 +    endif
    1.17    endif
    1.18  endif
    1.19  EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
    1.20 @@ -253,10 +255,12 @@
    1.21    EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
    1.22    EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
    1.23    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
    1.24 -    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.25 -      EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
    1.26 -    else
    1.27 -      EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
    1.28 +    ifneq ($(STRIP_POLICY),no_strip)
    1.29 +      ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.30 +        EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
    1.31 +      else
    1.32 +        EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
    1.33 +      endif
    1.34      endif
    1.35    endif
    1.36  endif
    1.37 @@ -265,10 +269,12 @@
    1.38    EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
    1.39    EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
    1.40    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
    1.41 -    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.42 -      EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
    1.43 -    else
    1.44 -      EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
    1.45 +    ifneq ($(STRIP_POLICY),no_strip)
    1.46 +      ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.47 +        EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
    1.48 +      else
    1.49 +        EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
    1.50 +      endif
    1.51      endif
    1.52    endif
    1.53  endif
    1.54 @@ -278,10 +284,12 @@
    1.55    EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)
    1.56  
    1.57    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
    1.58 -    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.59 -	EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz
    1.60 -    else
    1.61 -	EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo
    1.62 +    ifneq ($(STRIP_POLICY),no_strip)
    1.63 +      ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.64 +          EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz
    1.65 +      else
    1.66 +          EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo
    1.67 +      endif
    1.68      endif
    1.69    endif
    1.70  endif
    1.71 @@ -293,12 +301,14 @@
    1.72  ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
    1.73                          $(EXPORT_LIB_DIR)/sa-jdi.jar
    1.74  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
    1.75 -  ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.76 -    ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
    1.77 -    ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
    1.78 -  else
    1.79 -    ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
    1.80 -    ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
    1.81 +  ifneq ($(STRIP_POLICY),no_strip)
    1.82 +    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    1.83 +      ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
    1.84 +      ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
    1.85 +    else
    1.86 +      ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
    1.87 +      ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
    1.88 +    endif
    1.89    endif
    1.90  endif
    1.91  ADD_SA_BINARIES/ppc   =
     2.1 --- a/make/linux/makefiles/jsig.make	Mon Jul 16 17:06:05 2018 +0100
     2.2 +++ b/make/linux/makefiles/jsig.make	Tue Jul 17 17:07:44 2018 +0200
     2.3 @@ -56,20 +56,23 @@
     2.4  	$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
     2.5                           $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
     2.6  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
     2.7 +  ifneq ($(STRIP_POLICY),no_strip)
     2.8  	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
     2.9 +	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
    2.10 +  endif
    2.11    ifeq ($(STRIP_POLICY),all_strip)
    2.12 -	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
    2.13  	$(QUIETLY) $(STRIP) $@
    2.14    else
    2.15      ifeq ($(STRIP_POLICY),min_strip)
    2.16 -	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
    2.17  	$(QUIETLY) $(STRIP) -g $@
    2.18      endif
    2.19      # implied else here is no stripping at all
    2.20    endif
    2.21 -  ifeq ($(ZIP_DEBUGINFO_FILES),1)
    2.22 +  ifneq ($(STRIP_POLICY),no_strip)
    2.23 +    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    2.24  	$(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO)
    2.25  	$(RM) $(LIBJSIG_DEBUGINFO)
    2.26 +    endif
    2.27    endif
    2.28  endif
    2.29  
     3.1 --- a/make/linux/makefiles/saproc.make	Mon Jul 16 17:06:05 2018 +0100
     3.2 +++ b/make/linux/makefiles/saproc.make	Tue Jul 17 17:07:44 2018 +0200
     3.3 @@ -99,20 +99,23 @@
     3.4  	           -o $@                                                \
     3.5  	           -lthread_db
     3.6  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
     3.7 +  ifneq ($(STRIP_POLICY),no_strip)
     3.8  	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
     3.9 +	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
    3.10 +  endif
    3.11    ifeq ($(STRIP_POLICY),all_strip)
    3.12 -	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
    3.13  	$(QUIETLY) $(STRIP) $@
    3.14    else
    3.15      ifeq ($(STRIP_POLICY),min_strip)
    3.16 -	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
    3.17  	$(QUIETLY) $(STRIP) -g $@
    3.18      endif
    3.19      # implied else here is no stripping at all
    3.20    endif
    3.21 -  ifeq ($(ZIP_DEBUGINFO_FILES),1)
    3.22 +  ifneq ($(STRIP_POLICY),no_strip)
    3.23 +    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    3.24  	$(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO)
    3.25  	$(RM) $(LIBSAPROC_DEBUGINFO)
    3.26 +    endif
    3.27    endif
    3.28  endif
    3.29  
     4.1 --- a/make/linux/makefiles/vm.make	Mon Jul 16 17:06:05 2018 +0100
     4.2 +++ b/make/linux/makefiles/vm.make	Tue Jul 17 17:07:44 2018 +0200
     4.3 @@ -357,20 +357,23 @@
     4.4  	}
     4.5  
     4.6  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
     4.7 +  ifneq ($(STRIP_POLICY),no_strip)
     4.8  	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
     4.9 +	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
    4.10 +  endif
    4.11    ifeq ($(STRIP_POLICY),all_strip)
    4.12 -	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
    4.13  	$(QUIETLY) $(STRIP) $@
    4.14    else
    4.15      ifeq ($(STRIP_POLICY),min_strip)
    4.16 -	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
    4.17  	$(QUIETLY) $(STRIP) -g $@
    4.18      endif
    4.19      # implied else here is no stripping at all
    4.20    endif
    4.21 -  ifeq ($(ZIP_DEBUGINFO_FILES),1)
    4.22 +  ifneq ($(STRIP_POLICY),no_strip)
    4.23 +    ifeq ($(ZIP_DEBUGINFO_FILES),1)
    4.24  	$(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
    4.25  	$(RM) $(LIBJVM_DEBUGINFO)
    4.26 +    endif
    4.27    endif
    4.28  endif
    4.29  

mercurial