common/autoconf/hotspot.m4
author ihse
Tue, 15 Dec 2015 11:02:03 +0100
changeset 34596 e8328ce5b64e
parent 34495 common/autoconf/jdk-options.m4@b8008470cbd0
child 35014 c0fe64e3d52e
permissions -rw-r--r--
8142907: Integration of minor fixes from the build-infra project Reviewed-by: erikj, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     1
#
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
     2
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     4
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    10
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    15
# accompanied this code).
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    16
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    20
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    23
# questions.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    24
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    25
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    26
###############################################################################
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    27
# Check which interpreter of the JVM we want to build.
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    28
# Currently we have:
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    29
#    template: Template interpreter (the default)
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    30
#    cpp     : C++ interpreter
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    31
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_INTERPRETER],
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    32
[
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    33
  AC_ARG_WITH([jvm-interpreter], [AS_HELP_STRING([--with-jvm-interpreter],
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    34
    [JVM interpreter to build (template, cpp) @<:@template@:>@])])
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    35
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    36
  AC_MSG_CHECKING([which interpreter of the JVM to build])
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    37
  if test "x$with_jvm_interpreter" = x; then
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    38
    JVM_INTERPRETER="template"
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    39
  else
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    40
    JVM_INTERPRETER="$with_jvm_interpreter"
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    41
  fi
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    42
  AC_MSG_RESULT([$JVM_INTERPRETER])
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    43
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    44
  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    45
    AC_MSG_ERROR([The available JVM interpreters are: template, cpp])
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    46
  fi
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    47
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    48
  AC_SUBST(JVM_INTERPRETER)
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    49
])
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    50
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    51
###############################################################################
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    52
# Check which variants of the JVM that we want to build.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    53
# Currently we have:
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    54
#    server: normal interpreter and a C2 or tiered C1/C2 compiler
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    55
#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    56
#    minimal1: reduced form of client with optional VM services and features stripped out
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    57
#    zero: no machine code interpreter, no compiler
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    58
#    zeroshark: zero interpreter and shark/llvm compiler backend
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    59
#    core: interpreter only, no compiler (only works on some platforms)
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    60
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    61
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    62
  AC_MSG_CHECKING([which variants of the JVM to build])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    63
  AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    64
      [JVM variants (separated by commas) to build (server, client, minimal1, zero, zeroshark, core) @<:@server@:>@])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    65
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    66
  if test "x$with_jvm_variants" = x; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    67
    with_jvm_variants="server"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    68
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    69
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    70
  JVM_VARIANTS=",$with_jvm_variants,"
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    71
  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    72
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    73
  if test "x$TEST_VARIANTS" != "x,"; then
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    74
    AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, zero, zeroshark, core])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    75
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    76
  AC_MSG_RESULT([$with_jvm_variants])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    77
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    78
  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    79
  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    80
  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    81
  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    82
  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
22467
kvn
parents: 22460 21057
diff changeset
    83
  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    84
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    85
  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    86
    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    87
      AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    88
    fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    89
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    90
  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14810
4e7fee179b4a 7190137: Add support for JVM_VARIANT minimal1
dholmes
parents: 14615
diff changeset
    91
    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    92
      AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
14810
4e7fee179b4a 7190137: Add support for JVM_VARIANT minimal1
dholmes
parents: 14615
diff changeset
    93
    fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    94
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    95
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    96
  # Replace the commas with AND for use in the build directory name.
22181
0fc1d3eb4358 8031709: Configure --with-jvm-variants=client, server, x produces default outputdir containing comma
erikj
parents: 22176
diff changeset
    97
  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    98
  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    99
  if test "x$COUNT_VARIANTS" != "x,1"; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   100
    BUILDING_MULTIPLE_JVM_VARIANTS=yes
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   101
  else
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   102
    BUILDING_MULTIPLE_JVM_VARIANTS=no
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   103
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   104
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   105
  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   106
    AC_MSG_ERROR([You cannot build multiple variants with zero.])
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   107
  fi
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   108
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   109
  AC_SUBST(JVM_VARIANTS)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   110
  AC_SUBST(JVM_VARIANT_SERVER)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   111
  AC_SUBST(JVM_VARIANT_CLIENT)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   112
  AC_SUBST(JVM_VARIANT_MINIMAL1)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   113
  AC_SUBST(JVM_VARIANT_ZERO)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   114
  AC_SUBST(JVM_VARIANT_ZEROSHARK)
22467
kvn
parents: 22460 21057
diff changeset
   115
  AC_SUBST(JVM_VARIANT_CORE)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   116
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   117
  INCLUDE_SA=true
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   118
  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
16581
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16423
diff changeset
   119
    INCLUDE_SA=false
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   120
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   121
  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
16581
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16423
diff changeset
   122
    INCLUDE_SA=false
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   123
  fi
25616
5730ea123552 8049715: PPC64: First steps to enable SA on Linux/PPC64
simonis
parents: 23424
diff changeset
   124
  if test "x$OPENJDK_TARGET_OS" = xaix ; then
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
   125
    INCLUDE_SA=false
22467
kvn
parents: 22460 21057
diff changeset
   126
  fi
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 27133
diff changeset
   127
  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 27133
diff changeset
   128
    INCLUDE_SA=false
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 27133
diff changeset
   129
  fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   130
  AC_SUBST(INCLUDE_SA)
16581
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16423
diff changeset
   131
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   132
  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   133
    MACOSX_UNIVERSAL="true"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   134
  fi
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   135
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   136
  AC_SUBST(MACOSX_UNIVERSAL)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   137
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   138
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   139
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   140
###############################################################################
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   141
# Setup legacy vars/targets and new vars to deal with different debug levels.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   142
#
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   143
#    release: no debug information, all optimizations, no asserts.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   144
#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   145
#    fastdebug: debug information (-g), all optimizations, all asserts
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   146
#    slowdebug: debug information (-g), no optimizations, all asserts
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   147
#
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   148
AC_DEFUN_ONCE([HOTSPOT_SETUP_DEBUG_LEVEL],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   149
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   150
  case $DEBUG_LEVEL in
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   151
    release )
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   152
      VARIANT="OPT"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   153
      FASTDEBUG="false"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   154
      DEBUG_CLASSFILES="false"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   155
      BUILD_VARIANT_RELEASE=""
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   156
      HOTSPOT_DEBUG_LEVEL="product"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   157
      HOTSPOT_EXPORT="product"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   158
      ;;
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   159
    fastdebug )
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   160
      VARIANT="DBG"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   161
      FASTDEBUG="true"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   162
      DEBUG_CLASSFILES="true"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   163
      BUILD_VARIANT_RELEASE="-fastdebug"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   164
      HOTSPOT_DEBUG_LEVEL="fastdebug"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   165
      HOTSPOT_EXPORT="fastdebug"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   166
      ;;
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   167
    slowdebug )
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   168
      VARIANT="DBG"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   169
      FASTDEBUG="false"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   170
      DEBUG_CLASSFILES="true"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   171
      BUILD_VARIANT_RELEASE="-debug"
26546
2ea705d15f8c 8058317: Top-level Makefiles uses deprecated target jvmg in HotSpot Makefiles
ehelin
parents: 25854
diff changeset
   172
      HOTSPOT_DEBUG_LEVEL="debug"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   173
      HOTSPOT_EXPORT="debug"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   174
      ;;
23424
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   175
    optimized )
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   176
      VARIANT="OPT"
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   177
      FASTDEBUG="false"
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   178
      DEBUG_CLASSFILES="false"
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   179
      BUILD_VARIANT_RELEASE="-optimized"
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   180
      HOTSPOT_DEBUG_LEVEL="optimized"
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   181
      HOTSPOT_EXPORT="optimized"
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   182
      ;;
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   183
  esac
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   184
23424
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   185
  # The debug level 'optimized' is a little special because it is currently only
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   186
  # applicable to the HotSpot build where it means to build a completely
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   187
  # optimized version of the VM without any debugging code (like for the
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   188
  # 'release' debug level which is called 'product' in the HotSpot build) but
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   189
  # with the exception that it can contain additional code which is otherwise
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   190
  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   191
  # test new and/or experimental features which are not intended for customer
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   192
  # shipment. Because these new features need to be tested and benchmarked in
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   193
  # real world scenarios, we want to build the containing JDK at the 'release'
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   194
  # debug level.
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   195
  if test "x$DEBUG_LEVEL" = xoptimized; then
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   196
    DEBUG_LEVEL="release"
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   197
  fi
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
   198
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   199
  #####
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   200
  # Generate the legacy makefile targets for hotspot.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   201
  # The hotspot api for selecting the build artifacts, really, needs to be improved.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   202
  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   203
  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   204
  # But until then ...
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   205
  HOTSPOT_TARGET=""
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   206
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   207
  if test "x$JVM_VARIANT_SERVER" = xtrue; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   208
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   209
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   210
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   211
  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   212
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   213
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   214
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   215
  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14810
4e7fee179b4a 7190137: Add support for JVM_VARIANT minimal1
dholmes
parents: 14615
diff changeset
   216
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   217
  fi
14810
4e7fee179b4a 7190137: Add support for JVM_VARIANT minimal1
dholmes
parents: 14615
diff changeset
   218
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   219
  if test "x$JVM_VARIANT_ZERO" = xtrue; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   220
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   221
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   222
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   223
  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   224
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   225
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   226
22467
kvn
parents: 22460 21057
diff changeset
   227
  if test "x$JVM_VARIANT_CORE" = xtrue; then
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
   228
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
22467
kvn
parents: 22460 21057
diff changeset
   229
  fi
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
   230
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   231
  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   232
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   233
  # On Macosx universal binaries are produced, but they only contain
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   234
  # 64 bit intel. This invalidates control of which jvms are built
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   235
  # from configure, but only server is valid anyway. Fix this
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   236
  # when hotspot makefiles are rewritten.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   237
  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15054
e649ff651503 8004490: build-infra: mac: hotspot is always built in product, regardless of --with-debug-level setting
erikj
parents: 14810
diff changeset
   238
    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   239
  fi
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   240
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   241
  #####
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   242
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   243
  AC_SUBST(DEBUG_LEVEL)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   244
  AC_SUBST(VARIANT)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   245
  AC_SUBST(FASTDEBUG)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   246
  AC_SUBST(DEBUG_CLASSFILES)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   247
  AC_SUBST(BUILD_VARIANT_RELEASE)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   248
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   249
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   250
AC_DEFUN_ONCE([HOTSPOT_SETUP_HOTSPOT_OPTIONS],
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   251
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   252
  # Control wether Hotspot runs Queens test after build.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   253
  AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   254
      [run the Queens test after Hotspot build @<:@disabled@:>@])],,
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   255
      [enable_hotspot_test_in_build=no])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   256
  if test "x$enable_hotspot_test_in_build" = "xyes"; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   257
    TEST_IN_BUILD=true
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   258
  else
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   259
    TEST_IN_BUILD=false
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   260
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   261
  AC_SUBST(TEST_IN_BUILD)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   262
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   263
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
   264
AC_DEFUN_ONCE([HOTSPOT_SETUP_BUILD_TWEAKS],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   265
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   266
  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   267
  AC_SUBST(HOTSPOT_MAKE_ARGS)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   268
])