Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8281814

Debuginfo.diz contains redundant build path after backport JDK-8025936

XMLWordPrintable

    • b01

      $ bash configure
      $ make images
      $ cd build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64

      Except libjsig.diz, libjvm.diz, libsaproc.diz, the rest of lib*.diz decompression contains the compilation path, as follows:
      $ unzip libzip.diz
      Archive: libzip.diz
        inflating: home/hedongbo/myprojects/github/temp/jdk8u-dev/build/linux-x86_64-normal-server-release/jdk/objs/libzip/libzip.debuginfo

      https://hg.openjdk.java.net/jdk8u/jdk8u-dev/rev/baa748ba7946#l1.99 $1_DEBUGINFO_FILES includes the build path.
      JDK9 fixes this issue with the following patch:
      1. https://github.com/openjdk/jdk9u/commit/ffbb7125b25a88f4495d94c9c8fb25af89af1856#diff-805224b793cfe47bf6bebf62286f34adb363f0352a9dac3689825b823886e534 removed the path with notdir
      2. https://github.com/openjdk/jdk9u/commit/a350f3bda730bc3276e060c80dc3c3a6a36e4f72#diff-805224b793cfe47bf6bebf62286f34adb363f0352a9dac3689825b823886e534L887 replaced notdir with subst

      Suggested fixes:
      diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
      --- a/make/common/NativeCompilation.gmk
      +++ b/make/common/NativeCompilation.gmk
      @@ -530,7 +530,7 @@
                   # to be rebuilt properly.
                   $$($1_DEBUGINFO_ZIP): $$($1_DEBUGINFO_FILES) $$($1_TARGET)
        $(CD) $$($1_OBJECT_DIR) \
      - && $(ZIP) -q $$@ $$($1_DEBUGINFO_FILES)
      + && $(ZIP) -q $$@ $$(subst $$($1_OBJECT_DIR)/,,$$($1_DEBUGINFO_FILES))
                 endif
               else
                 ifneq ($$($1_STRIP_POLICY), no_strip)

            dongbohe Dongbo He
            dongbohe Dongbo He
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: