JDK-8036003: Add variable not to separate debug information.

Yasumasa Suenaga yasu at ysfactory.dip.jp
Fri Feb 28 01:18:10 PST 2014


Hi all,


Currently, configure script can accept --disable-debug-symbols and
--disable-zip-debug-info as controlling to generate debug information.
However, current makefiles cannot build ELF binaries which is contained
debug information with "images" target.

Some Linux distros use RPM as package manager.
RPM is built by rpmbuild command, it strips symbols and debug information
during to generate rpm packages.
https://fedoraproject.org/wiki/Packaging:Debuginfo

For example, OpenJDK8 in Fedora20 ships libjvm.so and libjvm.debuginfo .
libjvm.debuginfo is generated in OpenJDK's makefiles, however it does not
contain debug information. Actual debug information is shipped by OpenJDK
debuginfo package.
This packaging is important when we have to debug JVM/JNI libraries.
If we want to use debugging tools (GDB, SystemTap, etc...), they may requires
debuginfo package. Debuggee (e.g. libjvm.so) points libjvm.so.debug which is
located at sub directory in /usr/lib/debug . It is defined in ELF section
(.note.gnu.build-id) of libjvm.so . However libjvm.so.debug does not contain
valid debug information. We need to access libjvm.debuginfo.debug at same location.


When we think to build OpenJDK rpm packages, we have to build ELF binaries
which contain all debug information. we should not to separate debug information.


Thus I want to add a variable "SEPARATED_DEBUGINFO_FILES" .
If we pass "SEPARATED_DEBUGINFO_FILES=false" to make command, "make" does not
execute objcopy command for generating debuginfo binaries.

If we build rpm packages, we also have to add "STRIP_POLICY=no_strip" to arguments
of make command. Or ELF binaries will be stripped.


I've uploaded webrev for this enhancement.
This is separated 3-part: top of forest, hotspot, jdk
http://cr.openjdk.java.net/~ysuenaga/JDK-8036003/

Please review it and sponsoring!


Thanks,

Yasumasa


P.S.
  I tried to add SEPARATED_DEBUGINFO_FILES as a configure option like
  "--disable-separated-debug-info" .
  I ran configure which is located at jdk9/dev directory after I ran autoconf
  and common/autoconf/autogen.sh. However it failed.

  I guess this is caused by changeset as below.
     JDK-8035495: Improvements in autoconf integration
     http://hg.openjdk.java.net/jdk9/dev/rev/6e29cd9ac2b4

  This changes add "CHECKME" option to configure script. However, this changes
  affects "configure" only. It should change "configure.ac" .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140228/cdc4899d/attachment.html 


More information about the distro-pkg-dev mailing list