[8u] RFR: 8219772: EXTRA_CFLAGS not being picked up for assembler files
Severin Gehwolf
sgehwolf at redhat.com
Mon Mar 11 19:58:42 UTC 2019
On Mon, 2019-03-11 at 18:01 +0000, Andrew John Hughes wrote:
>
> 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?
Fair enough. It would require for this option to go into jdk/jdk first,
which seems reasonable.
> 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.
Sure. It can wait.
Thanks,
Severin
More information about the jdk8u-dev
mailing list