make/autoconf/flags-other.m4
author ihse
Mon, 19 Feb 2018 11:08:33 +0100
branchihse-cflags-rewrite-branch
changeset 56146 d019a80c41c0
parent 48909 make/autoconf/flags.m4@54b423e1c4cf
parent 56124 make/autoconf/flags.m4@b2b9dfdc39c8
child 56176 b3e3a12dcb33
permissions -rw-r--r--
Merge
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
#
48767
0c6ce8fdb50a 8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()
gadams
parents: 48751
diff changeset
     2
# Copyright (c) 2011, 2018, 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
42538
973e43884dba 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42530
diff changeset
    26
################################################################################
973e43884dba 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42530
diff changeset
    27
#
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    28
# Setup flags for other tools than C/C++ compiler
42538
973e43884dba 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42530
diff changeset
    29
#
32810
8203e52cd373 8138694: Devkit build on Macosx still requires Xcode to be installed
erikj
parents: 30856
diff changeset
    30
8203e52cd373 8138694: Devkit build on Macosx still requires Xcode to be installed
erikj
parents: 30856
diff changeset
    31
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    32
AC_DEFUN([FLAGS_SETUP_ARFLAGS],
32810
8203e52cd373 8138694: Devkit build on Macosx still requires Xcode to be installed
erikj
parents: 30856
diff changeset
    33
[
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    34
  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20362
diff changeset
    35
  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    36
    ARFLAGS="-r"
22467
kvn
parents: 22466 21055
diff changeset
    37
  elif test "x$OPENJDK_TARGET_OS" = xaix; then
22466
25aaf85d1ada 8024265: Enable new build on AIX
simonis
parents: 22465
diff changeset
    38
    ARFLAGS="-X64"
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    39
  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    40
    # lib.exe is used as AR to create static libraries.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    41
    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20362
diff changeset
    42
  else
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    43
    ARFLAGS=""
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20362
diff changeset
    44
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20362
diff changeset
    45
  AC_SUBST(ARFLAGS)
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    46
])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    47
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    48
AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    49
[
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    50
  ## Setup strip.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    51
  # FIXME: should this really be per platform, or should it be per toolchain type?
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    52
  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    53
  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    54
  if test "x$OPENJDK_TARGET_OS" = xlinux; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    55
    STRIPFLAGS="-g"
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    56
  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    57
    STRIPFLAGS="-x"
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    58
  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    59
    STRIPFLAGS="-S"
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    60
  elif test "x$OPENJDK_TARGET_OS" = xaix; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    61
    STRIPFLAGS="-X32_64"
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    62
  fi
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    63
32811
df82db312e58 8135060: Stop building Xcode projects in install build
erikj
parents: 30856
diff changeset
    64
  AC_SUBST(STRIPFLAGS)
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    65
])
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    66
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    67
AC_DEFUN([FLAGS_SETUP_RCFLAGS],
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
    68
[
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    69
  # On Windows, we need to set RC flags.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    70
  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
27593
4703225f5be4 8065913: Various improvements in SetupNativeCompilation
ihse
parents: 27586
diff changeset
    71
    RC_FLAGS="-nologo -l0x409"
37402
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    72
    JVM_RCFLAGS="-nologo"
35747
aeaa6d0101a8 8149647: Incremental enhancements from build-infra
ihse
parents: 35451
diff changeset
    73
    if test "x$DEBUG_LEVEL" = xrelease; then
27593
4703225f5be4 8065913: Various improvements in SetupNativeCompilation
ihse
parents: 27586
diff changeset
    74
      RC_FLAGS="$RC_FLAGS -DNDEBUG"
37402
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    75
      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    76
    fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    77
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    78
    # The version variables used to create RC_FLAGS may be overridden
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    79
    # in a custom configure script, or possibly the command line.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    80
    # Let those variables be expanded at make time in spec.gmk.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    81
    # The \$ are escaped to the shell, and the $(...) variables
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    82
    # are evaluated by make.
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
    83
    RC_FLAGS="$RC_FLAGS \
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30740
diff changeset
    84
        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
27593
4703225f5be4 8065913: Various improvements in SetupNativeCompilation
ihse
parents: 27586
diff changeset
    85
        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
4703225f5be4 8065913: Various improvements in SetupNativeCompilation
ihse
parents: 27586
diff changeset
    86
        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
33941
c112bac36e88 8135083: Product version string for DLLs and EXEs should not include trailing zeros
dtitov
parents: 33927
diff changeset
    87
        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
27593
4703225f5be4 8065913: Various improvements in SetupNativeCompilation
ihse
parents: 27586
diff changeset
    88
        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48327
d2a837cf9ff1 8192833: JEP 322: Time-Based Release Versioning
mr
parents: 48300
diff changeset
    89
        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30740
diff changeset
    90
        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
37402
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    91
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    92
    JVM_RCFLAGS="$JVM_RCFLAGS \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    93
        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    94
        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    95
        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    96
        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    97
        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    98
        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
    99
        -D\"HS_FNAME=jvm.dll\" \
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
   100
        -D\"HS_INTERNAL_NAME=jvm\""
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20362
diff changeset
   101
  fi
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   102
  AC_SUBST(RC_FLAGS)
37402
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
   103
  AC_SUBST(JVM_RCFLAGS)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   104
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   105
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   106
AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   107
[
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   108
  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   109
  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   110
  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   111
  #                              commands produced by the link step (currently AIX only)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   112
  if test "x$TOOLCHAIN_TYPE" = xxlc; then
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   113
    COMPILER_TARGET_BITS_FLAG="-q"
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   114
    COMPILER_COMMAND_FILE_FLAG="-f"
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   115
    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   116
  else
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   117
    COMPILER_TARGET_BITS_FLAG="-m"
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   118
    COMPILER_COMMAND_FILE_FLAG="@"
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   119
    COMPILER_BINDCMD_FILE_FLAG=""
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   120
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   121
    # The solstudio linker does not support @-files.
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   122
    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   123
      COMPILER_COMMAND_FILE_FLAG=
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   124
    fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   125
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   126
    # Check if @file is supported by gcc
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   127
    if test "x$TOOLCHAIN_TYPE" = xgcc; then
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   128
      AC_MSG_CHECKING([if @file is supported by gcc])
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   129
      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   130
      $ECHO "" "--version" > command.file
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   131
      if $CXX @command.file 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD; then
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   132
        AC_MSG_RESULT(yes)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   133
        COMPILER_COMMAND_FILE_FLAG="@"
33562
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32813
diff changeset
   134
      else
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   135
        AC_MSG_RESULT(no)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   136
        COMPILER_COMMAND_FILE_FLAG=
37402
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
   137
      fi
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   138
      $RM command.file
42141
06c697759688 7164925: Change -KPIC to -xcode=pic32 on sparc
ihse
parents: 42140
diff changeset
   139
    fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20362
diff changeset
   140
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   141
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   142
  AC_SUBST(COMPILER_TARGET_BITS_FLAG)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   143
  AC_SUBST(COMPILER_COMMAND_FILE_FLAG)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   144
  AC_SUBST(COMPILER_BINDCMD_FILE_FLAG)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   145
56124
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   146
  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   147
    CC_OUT_OPTION=-Fo
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   148
    EXE_OUT_OPTION=-out:
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   149
    LD_OUT_OPTION=-out:
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   150
    AR_OUT_OPTION=-out:
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   151
  else
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   152
    # The option used to specify the target .o,.a or .so file.
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   153
    # When compiling, how to specify the to be created object file.
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   154
    CC_OUT_OPTION='-o$(SPACE)'
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   155
    # When linking, how to specify the to be created executable.
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   156
    EXE_OUT_OPTION='-o$(SPACE)'
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   157
    # When linking, how to specify the to be created dynamically linkable library.
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   158
    LD_OUT_OPTION='-o$(SPACE)'
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   159
    # When archiving, how to specify the to be create static archive for object files.
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   160
    AR_OUT_OPTION='rcs$(SPACE)'
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   161
  fi
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   162
  AC_SUBST(CC_OUT_OPTION)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   163
  AC_SUBST(EXE_OUT_OPTION)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   164
  AC_SUBST(LD_OUT_OPTION)
b2b9dfdc39c8 Start breaking out stuff from flags.m4.
ihse
parents: 48854
diff changeset
   165
  AC_SUBST(AR_OUT_OPTION)
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   166
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   167
  # Generate make dependency files
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   168
  if test "x$TOOLCHAIN_TYPE" = xgcc; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   169
    C_FLAG_DEPS="-MMD -MF"
23161
85635b5bf0a6 8019470: Changes needed to compile JDK 8 on MacOS with clang compiler
henryjen
parents: 22730
diff changeset
   170
  elif test "x$TOOLCHAIN_TYPE" = xclang; then
85635b5bf0a6 8019470: Changes needed to compile JDK 8 on MacOS with clang compiler
henryjen
parents: 22730
diff changeset
   171
    C_FLAG_DEPS="-MMD -MF"
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   172
  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   173
    C_FLAG_DEPS="-xMMD -xMF"
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   174
  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   175
    C_FLAG_DEPS="-qmakedep=gcc -MF"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20362
diff changeset
   176
  fi
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   177
  CXX_FLAG_DEPS="$C_FLAG_DEPS"
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   178
  AC_SUBST(C_FLAG_DEPS)
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22715
diff changeset
   179
  AC_SUBST(CXX_FLAG_DEPS)
37402
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
   180
])
62b5f067032e 8152666: The new Hotspot Build System
erikj
parents: 36541
diff changeset
   181