[8u] RFR: 8219772: EXTRA_CFLAGS not being picked up for assembler files
Andrew John Hughes
gnu.andrew at redhat.com
Mon Mar 11 18:01:01 UTC 2019
On 11/03/2019 10:45, Severin Gehwolf wrote:
> Hi,
>
> Could somebody please review this one-liner change for the 8u (OpenJDK)
> build system? The issue at hand is that for assembler source files
> extra C flags are not being passed to the compiler (GCC in the Linux
> case). This is a problem for instrumented builds to facilitate checks
> on produced binaries in terms of optimization flags and other build-
> time invariants[1]. The patch doesn't affect builds without extra C-
> flags. Thus, risk should be minimal.
>
> This is an 8u-only change. The new build system in JDK 11 and up seems
> to handle these cases correctly.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8219772
> webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8219772/01/webrev/
>
> Testing: Compiling with extra cflags, inspecting build logs for
> assembler source files on Linux x86_64
>
> Thoughts?
>
> Thanks,
> Severin
>
> [1] https://developers.redhat.com/blog/2019/02/04/annocheck-examining-the-contents-of-binary-files/
>
Surely the correct way to do this is to add an --with-extra-asflags
option rather than abuse flags for the C compiler?
The 11 version in make/autoconf/flags-other.m4 states:
# Misuse EXTRA_CFLAGS to mimic old behavior
$2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
which suggests this might not be the best way to do this. I'm not sure
what old behaviour it is trying to emulate if 8u doesn't support this.
Either way, I think this is a change that should wait until 8u222 at
this point.
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list