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

x86 32-bit build fails when -fcf-protection is passed in the compiler flags

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      x86
    • OS:
      linux

      Backports

        Description

        The latest GCC fails if -fcf-protection is used with an x86 target that doesn't support CMOV:

        https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/i386/i386-options.c;h=a70f6edf7b0bfa6994db372c2507dbacb5526646;hp=6819a04238965f0ad63b10323823caa2fb8b147c;hb=77d372abec0fbf2cfe922e3140ee3410248f979e;hpb=5ebdd53534db25401473db5f6a0ad30f41410241

        At least back to OpenJDK 11, the JDK build forces -march=i586 and the build fails with '-fcf-protection is not compatible with this target'

        I've successfully tested a patch which uses -march=i686 instead if -fcf-protection is detected in the compiler flags.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: