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

Build needs additional flags to compile with GCC 6

    Details

    • Subcomponent:
    • Resolved In Build:
      b112
    • CPU:
      generic
    • OS:
      linux

      Backports

        Description

        A number of additional flags need to be passed to the C and C++ compiler for OpenJDK to compile with GCC 6:

        1. The C++ standard needs to be explicitly lowered to the old default of gnu++98. With the new GCC default of C++14, the build fails, due to the way C++ is used in HotSpot and the JDK native code. Long term, it might be good to fix the code itself, in OpenJDK 9 or 10, but we need an interim solution to make OpenJDK buildable and one we can backport to existing supported version (6, 7 and 8).
        2. A number of optimisations in GCC 6 lead to a broken JVM. We need to add -fno-delete-null-pointer-checks and -fno-lifetime-dse to get a working JVM.

          Issue Links

            Activity

            Hide
            andrew Andrew Hughes added a comment -
            Patch written and about to be posted to mailing list.
            Show
            andrew Andrew Hughes added a comment - Patch written and about to be posted to mailing list.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/rev/9d77f922d694
            User: andrew
            Date: 2016-03-19 01:31:06 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/rev/9d77f922d694 User: andrew Date: 2016-03-19 01:31:06 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/rev/9d77f922d694
            User: lana
            Date: 2016-03-30 18:37:56 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/rev/9d77f922d694 User: lana Date: 2016-03-30 18:37:56 +0000
            Hide
            andrew Andrew Hughes added a comment -
            Can someone please explain why this and a number of other requested CPU fixes are being rejected?

            This fix has been pushed over a year ago and is necessary to actually allow us to build the latest updates on systems with GCC 6.
            Show
            andrew Andrew Hughes added a comment - Can someone please explain why this and a number of other requested CPU fixes are being rejected? This fix has been pushed over a year ago and is necessary to actually allow us to build the latest updates on systems with GCC 6.
            Hide
            dholmes David Holmes added a comment - - edited
            Andrew, this issue is marked as P4 which suggests it is not at all critical and so not a candidate for a CPU release. If it is more critical then please adjust the priority with suitable explanation.

            http://openjdk.java.net/projects/jdk8u/criticalcpufixes.html

            Rule 2

            Such bug fix requests should only be made for critical fixes. A guideline is

                P1 bug, or
                A serious regression which needs fixing ASAP

            ---

            But also note that this process is for getting fixes into Oracle's CPU binary releases. I'm unclear, given this fix has been pushed to jdk8u/dev, why it needs to be included in a binary release ??
            Show
            dholmes David Holmes added a comment - - edited Andrew, this issue is marked as P4 which suggests it is not at all critical and so not a candidate for a CPU release. If it is more critical then please adjust the priority with suitable explanation. http://openjdk.java.net/projects/jdk8u/criticalcpufixes.html Rule 2 Such bug fix requests should only be made for critical fixes. A guideline is     P1 bug, or     A serious regression which needs fixing ASAP --- But also note that this process is for getting fixes into Oracle's CPU binary releases. I'm unclear, given this fix has been pushed to jdk8u/dev, why it needs to be included in a binary release ??
            Hide
            andrew Andrew Hughes added a comment -
            I tagged a number of bugs we've been carrying as local patches as "8u-CPU-critical-request", following the process outlined in [0]. This is not just a process for Oracle binary releases, but for "for OpenJDK 8u Authors, Committers and Reviewers to flag critical fixes...for inclusion into a CPU release ahead of the release being worked on in jdk8u-dev". These CPU releases appear in the OpenJDK repositories just as the PSU releases do. They've also taken on greater importance lately, as we've not had a PSU release since October 2016 [1] and so there's been no way of getting fixes out in an OpenJDK 8u release.

            Thankfully, the issue is now largely moot, as a new PSU release, 8u152, is finally on the horizon [2].

            [0] http://openjdk.java.net/projects/jdk8u/criticalcpufixes.html
            [1] http://mail.openjdk.java.net/pipermail/jdk8u-dev/2016-December/006245.html
            [2] http://mail.openjdk.java.net/pipermail/jdk8u-dev/2017-June/006722.html
            Show
            andrew Andrew Hughes added a comment - I tagged a number of bugs we've been carrying as local patches as "8u-CPU-critical-request", following the process outlined in [0]. This is not just a process for Oracle binary releases, but for "for OpenJDK 8u Authors, Committers and Reviewers to flag critical fixes...for inclusion into a CPU release ahead of the release being worked on in jdk8u-dev". These CPU releases appear in the OpenJDK repositories just as the PSU releases do. They've also taken on greater importance lately, as we've not had a PSU release since October 2016 [1] and so there's been no way of getting fixes out in an OpenJDK 8u release. Thankfully, the issue is now largely moot, as a new PSU release, 8u152, is finally on the horizon [2]. [0] http://openjdk.java.net/projects/jdk8u/criticalcpufixes.html [1] http://mail.openjdk.java.net/pipermail/jdk8u-dev/2016-December/006245.html [2] http://mail.openjdk.java.net/pipermail/jdk8u-dev/2017-June/006722.html

              People

              • Assignee:
                andrew Andrew Hughes
                Reporter:
                andrew Andrew Hughes
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: