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

7071904 broke the DEBUG_BINARIES option on Linux

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b07
    • Introduced In Version:
    • Resolved In Build:
      b21
    • CPU:
      generic
    • OS:
      linux

      Backports

        Description

        I posted the following response:

        On 7/31/12 7:26 AM, Andrew Hughes wrote:
        > ----- Original Message -----
        >> I would love for stabs to go away for linux 32 bit. I think there
        >> was
        >> a size issue once with that platform and was filling up our disk. I
        >> think I changed this recently and noticed that the issue is gone.
        > That's what's noted in the comments. However, there's also a regression here:
        >
        > 1. Prior to 7071904, '-gstabs' was only added for debug builds and fastdebug/opt
        > builds did not have debugging information.
        > 2. After 7071904, '-gstabs' is added to all builds except on arm, ppc, x86_64 and
        > ia64.
        >
        > This conflicts with the DEBUG_BINARIES option we use for building that adds '-g' to
        > all builds. It means that, with the change in 7071904, our builds now get '-g -gstabs'
        > on x86, whereas before they just got '-g'.

        This answers my question about DEBUG_BINARIES. Looks like
        my changes for 7071904 broke that option.


        > Maybe the following would work without affecting your builds:
        >
        > --- a/make/linux/makefiles/gcc.make
        > +++ b/make/linux/makefiles/gcc.make
        > @@ -274,6 +274,8 @@
        > # DEBUG_BINARIES overrides everything, use full -g debug information
        > ifeq ($(DEBUG_BINARIES), true)
        > DEBUG_CFLAGS = -g
        > + OPT_CFLAGS = -g
        > + FASTDEBUG_CFLAGS = -g
        > CFLAGS += $(DEBUG_CFLAGS)
        > endif
        >
        > The CFLAGS line may be able to be dropped as well.

        Actually the CFLAGS line is the only way to be sure that the '-g'
        gets into all build configs. At one point, there was more than
        "debug", "fastdebug" and "opt"...

        I think the right fix for DEBUG_BINARIES is:

         # DEBUG_BINARIES overrides everything, use full -g debug information
         ifeq ($(DEBUG_BINARIES), true)
        ! DEBUG_CFLAGS =
        + OPT_CFLAGS =
        + FASTDEBUG_CFLAGS =
           CFLAGS += -g
         endif



        >> I'll
        >> file a bug (if there isn't one already) and remove stabs for linux.
        > Thanks :-)

        I think we need two bugs here. One for the DEBUG_BINARIES breakage
        and one for possibly changing to DWARF from STABS on Linux X86.
        Andrew Hughes @ RedHat reported the following issue:

        ----- Original Message -----
        > >
        > > I would love for stabs to go away for linux 32 bit. I think there
        > > was
        > > a size issue once with that platform and was filling up our disk. I
        > > think I changed this recently and noticed that the issue is gone.
        That's what's noted in the comments. However, there's also a regression here:

        1. Prior to 7071904, '-gstabs' was only added for debug builds and fastdebug/opt
        builds did not have debugging information.
        2. After 7071904, '-gstabs' is added to all builds except on arm, ppc, x86_64 and
        ia64.

        This conflicts with the DEBUG_BINARIES option we use for building that adds '-g' to
        all builds. It means that, with the change in 7071904, our builds now get '-g -gstabs'
        on x86, whereas before they just got '-g'.

        Maybe the following would work without affecting your builds:

        --- a/make/linux/makefiles/gcc.make
        +++ b/make/linux/makefiles/gcc.make
        @@ -274,6 +274,8 @@
         # DEBUG_BINARIES overrides everything, use full -g debug information
         ifeq ($(DEBUG_BINARIES), true)
           DEBUG_CFLAGS = -g
        + OPT_CFLAGS = -g
        + FASTDEBUG_CFLAGS = -g
           CFLAGS += $(DEBUG_CFLAGS)
         endif

        The CFLAGS line may be able to be dropped as well.

        > > I'll
        > > file a bug (if there isn't one already) and remove stabs for linux.
        Thanks :-)

        > > Stabs still work better for solaris.
        We have no plans to change the Solaris build :-)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dcubed Daniel Daugherty
                Reporter:
                dcubed Daniel Daugherty
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: