[8u] RFR: 8219772: EXTRA_CFLAGS not being picked up for assembler files

Severin Gehwolf sgehwolf at redhat.com
Fri Sep 27 15:52:20 UTC 2019


On Mon, 2019-03-11 at 20:58 +0100, Severin Gehwolf wrote:
> 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.

Proposed this for review now (it's in jdk/jdk and jdk 11.0.6):
http://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-September/010393.html

Thanks,
Severin



More information about the jdk8u-dev mailing list