RFR: JDK-8163102: Fix headless only configuration option

David Holmes david.holmes at oracle.com
Wed Aug 3 20:37:50 UTC 2016


Hi Erik,

On 4/08/2016 1:04 AM, Erik Joelsson wrote:
> Hello,
>
> The current --disable-headful option is weird. Even worse, it doesn't
> work since the makefiles still uses the legacy BUILD_HEADLESS_ONLY
> variable, which configure never touches.

The confusion around that variable due to its legacy always makes me 
worried that something is misunderstood. It was originally to deal with 
a build platform that had no headful support (no X11 libs and headers 
etc) and so could not build headful no matter what. The flag but not the 
functionality was carried into the new build system. What you have now 
is a different beast entirely.

> In this patch I'm replacing the configure option with
> --enable-headless-only. Default is disabled, where both headless and GUI
> support is built. When enabled, only headless support is built. These
> are the two variants we are ever interested in.
>
> On the makefile side, I redefined the variable as
> ENABLE_HEADLESS_ONLY=true/false.

This all seems reasonable. Though of course you have to ensure that a 
headless build can still execute all the necessary functionality. Even 
for headless some of the AWT API's still have to be available (printing 
support for one IIRC).

> I also needed to change jawt.c to get a headless only build to actually
> work. The requirement that -DJAVASE_EMBEDDED is set seems unnecessary
> and unrelated to me.

The JAVASE_EMBEDDED stuff has now all been removed, but that change 
hasn't reached dev yet.

Thanks,
David

> Bug: https://bugs.openjdk.java.net/browse/JDK-8163102
>
> Webrev: http://cr.openjdk.java.net/~erikj/8163102/webrev.01
>
> /Erik
>



More information about the build-dev mailing list