Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8259949: x86 32-bit build fails when -fcf-protection is passed in the compiler flags #2153

Closed
wants to merge 1 commit into from

Conversation

gnu-andrew
Copy link
Member

@gnu-andrew gnu-andrew commented Jan 20, 2021

The latest GCC fails if -fcf-protection is used with an x86 (32-bit) 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'

This patch uses -march=i686 instead if -fcf-protection is detected in the compiler flags. It also makes it clear which is being set in the configure output, rather than silently setting the flag.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8259949: x86 32-bit build fails when -fcf-protection is passed in the compiler flags

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2153/head:pull/2153
$ git checkout pull/2153

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 20, 2021

👋 Welcome back andrew! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Jan 20, 2021
@openjdk
Copy link

openjdk bot commented Jan 20, 2021

@gnu-andrew The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build label Jan 20, 2021
@mlbridge
Copy link

mlbridge bot commented Jan 20, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Jan 20, 2021

@gnu-andrew This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

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

Use -march=i686 instead of -march=i586 if -fcf-protection is passed to the build as CMOV is required

Reviewed-by: erikj

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 8 new commits pushed to the master branch:

  • 5891509: 8259947: (fs) Optimize UnixPath.encode implementation
  • 69f90b5: 8259843: initialize dli_fname array before calling dll_address_to_library_name
  • 52ed2aa: 8259786: initialize last parameter of getpwuid_r
  • 70b5b31: 8257664: HTMLEditorKit: Wrong CSS relative font sizes
  • 0b01d69: 8260005: Shenandoah: Remove unused AlwaysTrueClosure in ShenandoahConcurrentRootScanner::roots_do()
  • 0529480: 8259867: Move encoding checks into ZipCoder
  • 7c32ffe: 8258383: vmTestbase/gc/g1/unloading/tests/unloading_compilation_level[1,2,3] time out without TieredCompilation
  • 9f21bb6: 8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jan 20, 2021
@gnu-andrew
Copy link
Member Author

gnu-andrew commented Jan 20, 2021

/summary Use -march=i686 instead of -march=i586 if -fcf-protection is passed to the build as CMOV is required

@openjdk
Copy link

openjdk bot commented Jan 20, 2021

@gnu-andrew Setting summary to Use -march=i686 instead of -march=i586 if -fcf-protection is passed to the build as CMOV is required

@gnu-andrew
Copy link
Member Author

gnu-andrew commented Jan 20, 2021

/integrate

@openjdk openjdk bot closed this Jan 20, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jan 20, 2021
@openjdk
Copy link

openjdk bot commented Jan 20, 2021

@gnu-andrew Since your change was applied there have been 8 commits pushed to the master branch:

  • 5891509: 8259947: (fs) Optimize UnixPath.encode implementation
  • 69f90b5: 8259843: initialize dli_fname array before calling dll_address_to_library_name
  • 52ed2aa: 8259786: initialize last parameter of getpwuid_r
  • 70b5b31: 8257664: HTMLEditorKit: Wrong CSS relative font sizes
  • 0b01d69: 8260005: Shenandoah: Remove unused AlwaysTrueClosure in ShenandoahConcurrentRootScanner::roots_do()
  • 0529480: 8259867: Move encoding checks into ZipCoder
  • 7c32ffe: 8258383: vmTestbase/gc/g1/unloading/tests/unloading_compilation_level[1,2,3] time out without TieredCompilation
  • 9f21bb6: 8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection

Your commit was automatically rebased without conflicts.

Pushed as commit 0785147.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@gnu-andrew gnu-andrew deleted the submit/JDK-8259949 branch Jan 20, 2021
@gnu-andrew
Copy link
Member Author

gnu-andrew commented Jan 25, 2021

/backport jdk13u-dev

@openjdk
Copy link

openjdk bot commented Jan 25, 2021

@gnu-andrew Unknown command backport - for a list of valid commands use /help.

@gnu-andrew
Copy link
Member Author

gnu-andrew commented Jan 25, 2021

/help

@openjdk
Copy link

openjdk bot commented Jan 25, 2021

@gnu-andrew Available commands:

  • covered - used when employer has signed the OCA
  • help - shows this text
  • signed - used after signing the OCA
  • test - used to run tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build integrated
2 participants