Integrated: JDK-8259949: x86 32-bit build fails when -fcf-protection is passed in the compiler flags
Andrew John Hughes
andrew at openjdk.java.net
Wed Jan 20 16:16:58 UTC 2021
On Wed, 20 Jan 2021 04:29:52 GMT, Andrew John Hughes <andrew at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 07851474
Author: Andrew John Hughes <andrew at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/07851474
Stats: 14 lines in 1 file changed: 12 ins; 0 del; 2 mod
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
-------------
PR: https://git.openjdk.java.net/jdk/pull/2153
More information about the build-dev
mailing list