Done as you suggested. I will update webrevs later.

One problem left. How to switch off ENABLE_AOT if we can't build libjelfshim.so 
(libelf not found or wrong version)?

ENABLE_AOT and JVM_FEATURES_server are defined before LIBJELFSHIM_ENABLED is 
defined.

Can I reset ENABLE_AOT (based on LIBJELFSHIM_ENABLED) in 
make/common/Modules.gmk (where AOT modules filtered out)?

http://cr.openjdk.java.net/~kvn/aot/top.webrev/make/common/Modules.gmk.udiff.html

Thanks,
Vladimir

On 10/27/16 8:45 AM, Volker Simonis wrote:
On Thu, Oct 27, 2016 at 2:22 PM, Volker Simonis
<volker.simo...@gmail.com> wrote:
Hi,

currently libelf support is checked on every 64-bit Linux and Solaris
platform (see lib-elf.m4):

   if ((test "x$OPENJDK_TARGET_OS" = "xlinux" \
        || test "x$OPENJDK_TARGET_OS" = "xsolaris") && \
       (test "x$OPENJDK_TARGET_CPU_BITS" = "x64")); then
     LIBJELFSHIM_ENABLED="true"
   else
     LIBJELFSHIM_ENABLED="false"
   fi

As far as I understand, this is only required for AOT and should
therefore only be checked for if AOT is enabled. We could do something
similar like for FFI (see libraries.m4):

   # Check if ffi is needed
   if HOTSPOT_CHECK_JVM_VARIANT(zero) ||
HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
     NEEDS_LIB_FFI=true
   else
     NEEDS_LIB_FFI=false
   fi

And then test for "NEEDS_LIB_JELFSHIM" in lib-elf.m4 instead of
testing for a specific platform.

Otherwise we get ugly warning like:

WARNING: Could not find libelf!  Not building libjelfshim.so


And I think in the case where we compile for AOT, we should print the
usual, platform-dependent hints like for example:

libelf.so not found: try  to run 'sudo apt-get install libelf-dev'

during configuration if we are running on platforms without AOT
support or if AOT support is switched of.

Regards,
Volker



On Thu, Oct 27, 2016 at 2:45 AM, Vladimir Kozlov
<vladimir.koz...@oracle.com> wrote:
AOT JEP:
https://bugs.openjdk.java.net/browse/JDK-8166089
Subtask:
https://bugs.openjdk.java.net/browse/JDK-8166416
Webrev:
http://cr.openjdk.java.net/~kvn/aot/top.webrev/
http://cr.openjdk.java.net/~kvn/aot/jdk.webrev/
http://cr.openjdk.java.net/~kvn/aot/hs.make.webrev/

Please, review build changes for AOT.  Only Linux/x64 platform is supported.
'jaotc' and AOT part of Hotspot will be build only on Linux/x64.

Changes include new 'jaotc' launcher, makefile changes to build
jdk.vm.compiler (Graal) and jdk.aot modules used by 'jaotc'.
Both modules sources are located in Hotspot: hotspot/src/jdk.aot and
hotspot/src/jdk.vm.compiler.
'jaotc' requires installed libelf package on a system to build native part
of 'jaotc'. It is used to generated AOT shared libraries (.so) as result of
AOT compilation.

Hotspot makefile changes will be pushed together with Hotspot AOT changes.

Thanks,
Vladimir

Reply via email to