make/lib/CoreLibraries.gmk
author ihse
Thu, 15 Mar 2018 01:43:29 +0100
branchihse-jdk-library-branch
changeset 56311 e05b4241302b
parent 56310 b74ed86a116a
parent 49244 995a5556edfa
child 56421 92bea2b7732a
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
     2
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    26
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    27
35262
6ffcba13c973 8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents: 34014
diff changeset
    28
# Hook to include the corresponding custom file, if present.
47314
743814386712 8188814: Simplify IncludeCustomExtension
ihse
parents: 47217
diff changeset
    29
$(eval $(call IncludeCustomExtension, lib/CoreLibraries.gmk))
35262
6ffcba13c973 8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents: 34014
diff changeset
    30
6ffcba13c973 8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents: 34014
diff changeset
    31
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    32
##########################################################################################
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
    33
# libfdlibm is statically linked with libjava below and not delivered into the
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    34
# product on its own.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    35
42353
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    36
BUILD_LIBFDLIBM_OPTIMIZATION := NONE
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    37
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    38
ifeq ($(OPENJDK_TARGET_OS), solaris)
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    39
  BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    40
endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    41
42353
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    42
ifeq ($(OPENJDK_TARGET_OS), linux)
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    43
  ifeq ($(OPENJDK_TARGET_CPU), ppc64)
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    44
    BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    45
  else ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    46
    BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    47
  else ifeq ($(OPENJDK_TARGET_CPU), s390x)
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    48
    BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    49
  else ifeq ($(OPENJDK_TARGET_CPU), aarch64)
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    50
    BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    51
  endif
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    52
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    53
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    54
LIBFDLIBM_SRC := $(TOPDIR)/src/java.base/share/native/libfdlibm
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    55
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    56
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    57
ifneq ($(OPENJDK_TARGET_OS), macosx)
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
    58
  $(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
    59
      NAME := fdlibm, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
    60
      TYPE := STATIC_LIBRARY, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    61
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    62
      SRC := $(LIBFDLIBM_SRC), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    63
      OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    64
      CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    65
      CFLAGS_windows_debug := -DLOGGING, \
22594
kvn
parents: 22593 20896
diff changeset
    66
      CFLAGS_aix := -qfloat=nomaf, \
42353
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    67
      CFLAGS_linux_ppc64 := -ffp-contract=off, \
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    68
      CFLAGS_linux_ppc64le := -ffp-contract=off, \
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    69
      CFLAGS_linux_s390x := -ffp-contract=off, \
ac0c725825bc 8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents: 41475
diff changeset
    70
      CFLAGS_linux_aarch64 := -ffp-contract=off, \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
    71
      DISABLED_WARNINGS_gcc := sign-compare misleading-indentation, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
    72
      DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    73
      ARFLAGS := $(ARFLAGS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    74
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
    75
  ))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    76
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    77
else
14855
d104ff4d4bb9 8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents: 14789
diff changeset
    78
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    79
  # On macosx the old build does partial (incremental) linking of fdlibm instead of
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    80
  # a plain static library.
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
    81
  $(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM_MAC, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
    82
      NAME := fdlibm, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    83
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    84
      SRC := $(LIBFDLIBM_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    85
      CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 47687
diff changeset
    86
      LDFLAGS := -nostdlib $(ARFLAGS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    87
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
    88
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    89
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    90
  BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    91
  $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 16513
diff changeset
    92
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    93
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    94
endif
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    95
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    96
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    97
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    98
ifeq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    99
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   100
    BUILD_LIBVERIFY_REORDER := $(TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   101
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   102
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   103
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   104
LIBVERIFY_OPTIMIZATION := HIGH
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   105
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   106
  ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   107
    LIBVERIFY_OPTIMIZATION := LOW
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   108
  endif
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   109
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   110
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   111
$(eval $(call SetupJdkLibrary, BUILD_LIBVERIFY, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   112
    NAME := verify, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   113
    SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   114
    OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   115
    CFLAGS := $(CFLAGS_JDKLIB), \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   116
    DISABLED_WARNINGS_gcc := implicit-fallthrough, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
   117
    DISABLED_WARNINGS_microsoft := 4244 4267, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   118
    MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   119
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   120
        $(call SET_SHARED_LIBRARY_ORIGIN), \
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49070
diff changeset
   121
    LIBS_unix := -ljvm, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   122
    LIBS_windows := jvm.lib, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   123
    REORDER := $(BUILD_LIBVERIFY_REORDER), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   124
))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   125
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   126
TARGETS += $(BUILD_LIBVERIFY)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   127
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   128
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   129
45462
0de8011890c0 8173654: Regression since 8u60: System.getenv doesn't return env var set in JNI code
robm
parents: 43806
diff changeset
   130
# Allow a custom makefile to add extra src dirs
0de8011890c0 8173654: Regression since 8u60: System.getenv doesn't return env var set in JNI code
robm
parents: 43806
diff changeset
   131
LIBJAVA_SRC_DIRS += $(call FindSrcDirsForLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   132
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   133
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   134
    -I$(TOPDIR)/src/java.base/share/native/libfdlibm \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   135
    -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   136
    -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   137
35262
6ffcba13c973 8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents: 34014
diff changeset
   138
# Make it possible to override this variable
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   139
LIBJAVA_MAPFILE ?= $(TOPDIR)/make/mapfiles/libjava/mapfile-vers
35262
6ffcba13c973 8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents: 34014
diff changeset
   140
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   141
ifeq ($(OPENJDK_TARGET_OS), macosx)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   142
  BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   143
  BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   144
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   145
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   146
ifeq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   147
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   148
    LIBJAVA_REORDER := $(TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   149
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   150
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   151
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   152
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   153
    NAME := java, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   154
    SRC := $(LIBJAVA_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   155
    OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   156
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   157
        $(LIBJAVA_CFLAGS), \
33984
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30784
diff changeset
   158
    System.c_CFLAGS := $(VERSION_CFLAGS), \
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30784
diff changeset
   159
    jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
37529
868c7195632c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 37525
diff changeset
   160
    WARNINGS_AS_ERRORS_xlc := false, \
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents: 36127
diff changeset
   161
    DISABLED_WARNINGS_gcc := unused-result, \
32408
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   162
    DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
35262
6ffcba13c973 8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents: 34014
diff changeset
   163
    MAPFILE := $(LIBJAVA_MAPFILE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   164
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   165
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   166
    LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   167
    LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   168
        -export:getLastErrorString \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   169
        -export:getErrorString -delayload:shell32.dll, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   170
    LIBS_unix := -ljvm -lverify, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   171
    LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49070
diff changeset
   172
    LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM), \
36110
91a3a6df36ec 8150203: Incremental update from build-infra project
ihse
parents: 35706
diff changeset
   173
    LIBS_aix := $(LIBDL) $(BUILD_LIBFDLIBM) $(LIBM),\
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   174
    LIBS_macosx := -lfdlibm \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   175
        -framework CoreFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   176
        -framework Foundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   177
        -framework Security -framework SystemConfiguration, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   178
    LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   179
        shell32.lib delayimp.lib \
31246
dfc58fd4feec 8066504: GetVersionEx in java.base/windows/native/libjava/java_props_md.c might not get correct Windows version 0
rriggs
parents: 30784
diff changeset
   180
        advapi32.lib version.lib, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   181
    REORDER := $(LIBJAVA_REORDER), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   182
))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   183
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   184
TARGETS += $(BUILD_LIBJAVA)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   185
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   186
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   187
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   188
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   189
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   190
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   191
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   192
BUILD_LIBZIP_EXCLUDES :=
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   193
ifeq ($(USE_EXTERNAL_LIBZ), true)
43806
36e9a4583949 8173207: Upgrade compression library
sherman
parents: 43325
diff changeset
   194
  LIBZIP_EXCLUDES += zlib
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   195
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   196
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   197
BUILD_LIBZIP_REORDER :=
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   198
ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   199
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   200
    BUILD_LIBZIP_REORDER := $(TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   201
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   202
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   203
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   204
ifeq ($(LIBZIP_CAN_USE_MMAP), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   205
  BUILD_LIBZIP_MMAP := -DUSE_MMAP
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   206
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   207
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   208
$(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   209
    NAME := zip, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   210
    OPTIMIZATION := LOW, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   211
    SRC := $(TOPDIR)/src/java.base/share/native/libzip, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   212
    EXCLUDES := $(LIBZIP_EXCLUDES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   213
    CFLAGS := $(CFLAGS_JDKLIB) \
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 47687
diff changeset
   214
        $(LIBZ_CFLAGS) \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   215
        -I$(TOPDIR)/src/java.base/share/native/libjava \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   216
        -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   217
        -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 27186
diff changeset
   218
    CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   219
    DISABLED_WARNINGS_gcc := implicit-fallthrough, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   220
    MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   221
    REORDER := $(BUILD_LIBZIP_REORDER), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   222
    LDFLAGS := $(LDFLAGS_JDKLIB) \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   223
        $(call SET_SHARED_LIBRARY_ORIGIN), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   224
    LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   225
        -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
41358
f2c5e3cc1848 8164011: --patch-module support for CDS
ccheung
parents: 38783
diff changeset
   226
        -export:ZIP_InflateFully -export:ZIP_CRC32 -export:ZIP_FreeEntry, \
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 47687
diff changeset
   227
    LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   228
    LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   229
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   230
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   231
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   232
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   233
TARGETS += $(BUILD_LIBZIP)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   234
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   235
##########################################################################################
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   236
35706
c6bc87214e4c 8148955: libjimage.so compiled with wrong flags
erikj
parents: 35276
diff changeset
   237
JIMAGELIB_CPPFLAGS := \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   238
    -I$(TOPDIR)/src/java.base/share/native/libjava \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   239
    -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   240
    -I$(TOPDIR)/src/java.base/share/native/libjimage \
35706
c6bc87214e4c 8148955: libjimage.so compiled with wrong flags
erikj
parents: 35276
diff changeset
   241
    -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
c6bc87214e4c 8148955: libjimage.so compiled with wrong flags
erikj
parents: 35276
diff changeset
   242
    #
c6bc87214e4c 8148955: libjimage.so compiled with wrong flags
erikj
parents: 35276
diff changeset
   243
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   244
$(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   245
    NAME := jimage, \
41217
c3bdba3a880a 8160630: libjimage.so and others should link statically to libgcc
erikj
parents: 38783
diff changeset
   246
    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   247
    OPTIMIZATION := LOW, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   248
    SRC := $(TOPDIR)/src/java.base/share/native/libjimage \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   249
        $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjimage, \
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   250
    EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
35706
c6bc87214e4c 8148955: libjimage.so compiled with wrong flags
erikj
parents: 35276
diff changeset
   251
    CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
c6bc87214e4c 8148955: libjimage.so compiled with wrong flags
erikj
parents: 35276
diff changeset
   252
    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   253
    DISABLED_WARNINGS_gcc := implicit-fallthrough, \
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   254
    CFLAGS_unix := -UDEBUG, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   255
    MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
41475
e5ebda6a1a83 8167387: libjimage.so has a bad runpath
erikj
parents: 41368
diff changeset
   256
    LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   257
        $(call SET_SHARED_LIBRARY_ORIGIN), \
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   258
    LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   259
        -export:JIMAGE_PackageToModule \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   260
        -export:JIMAGE_FindResource -export:JIMAGE_GetResource \
37612
2c9bb54c90dc 8147634: Need a JImage API that given a JImageLocationRef returns class name
jlaskey
parents: 37529
diff changeset
   261
        -export:JIMAGE_ResourceIterator -export:JIMAGE_ResourcePath, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   262
    LIBS_unix := -ljvm -ldl $(LIBCXX), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   263
    LIBS_macosx := -lc++, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   264
    LIBS_windows := jvm.lib, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   265
))
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   266
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   267
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA)
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   268
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   269
TARGETS += $(BUILD_LIBJIMAGE)
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   270
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   271
##########################################################################################
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   272
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   273
LIBJLI_SRC_DIRS := $(call FindSrcDirsForLib, java.base, jli)
22951
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   274
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   275
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   276
47687
fb290fd1f9d4 8171853: Remove Shark compiler
rkennke
parents: 47314
diff changeset
   277
ifeq ($(call check-jvm-variant, zero), true)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   278
  ERGO_FAMILY := zero
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   279
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   280
  ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   281
    ERGO_FAMILY := i586
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   282
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   283
    ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   284
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   285
endif
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   286
LIBJLI_ALL_ERGO := $(wildcard $(addsuffix /ergo_*.c, $(LIBJLI_SRC_DIRS)))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   287
LIBJLI_EXCLUDE_ERGO := $(filter-out %/ergo_$(ERGO_FAMILY).c, $(LIBJLI_ALL_ERGO))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   288
# If all specialized ergo files are excluded, use generic ergo
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   289
ifeq ($(LIBJLI_ALL_ERGO), $(LIBJLI_EXCLUDE_ERGO))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   290
  LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   291
endif
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   292
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   293
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   294
ifeq ($(OPENJDK_TARGET_OS), macosx)
29742
b73f38796859 8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents: 29374
diff changeset
   295
  LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   296
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   297
  BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   298
  BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   299
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   300
  LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   301
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   302
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   303
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   304
  # Staticically link with c runtime on windows.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   305
  LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   306
  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
28984
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   307
  # Supply the name of the C runtime lib.
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   308
  LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"'
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   309
  ifneq ($(MSVCP_DLL), )
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   310
    LIBJLI_CFLAGS += -DMSVCP_DLL_NAME='"$(notdir $(MSVCP_DLL))"'
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   311
  endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   312
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   313
  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   314
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   315
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   316
LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   317
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 47687
diff changeset
   318
LIBJLI_CFLAGS += $(LIBZ_CFLAGS)
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 47687
diff changeset
   319
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   320
ifneq ($(USE_EXTERNAL_LIBZ), true)
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   321
  LIBJLI_EXTRA_FILES += \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   322
      $(addprefix $(TOPDIR)/src/java.base/share/native/libzip/zlib/, \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   323
          inflate.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   324
          inftrees.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   325
          inffast.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   326
          zadler32.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   327
          zcrc32.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   328
          zutil.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   329
      )
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   330
endif
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   331
49244
995a5556edfa 8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents: 49241
diff changeset
   332
$(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   333
    NAME := jli, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   334
    OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   335
    SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   336
    EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   337
    EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   338
    OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   339
    CFLAGS := $(LIBJLI_CFLAGS), \
48766
2c4d1993b5f9 8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents: 48751
diff changeset
   340
    DISABLED_WARNINGS_gcc := maybe-uninitialized, \
32408
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   341
    DISABLED_WARNINGS_solstudio := \
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   342
        E_ASM_DISABLES_OPTIMIZATION \
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   343
        E_STATEMENT_NOT_REACHED, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   344
    MAPFILE := $(TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   345
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   346
        $(call SET_SHARED_LIBRARY_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   347
    LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   348
    LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   349
    LDFLAGS_windows := \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   350
        -export:JLI_Launch \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   351
        -export:JLI_ManifestIterate \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   352
        -export:JLI_SetTraceLauncher \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   353
        -export:JLI_ReportErrorMessage \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   354
        -export:JLI_ReportErrorMessageSys \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   355
        -export:JLI_ReportMessage \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   356
        -export:JLI_ReportExceptionDescription \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   357
        -export:JLI_MemAlloc \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   358
        -export:JLI_CmdToArgs \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   359
        -export:JLI_GetStdArgc \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   360
        -export:JLI_GetStdArgs \
32267
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   361
        -export:JLI_List_new \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   362
        -export:JLI_List_add \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   363
        -export:JLI_StringDup \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   364
        -export:JLI_MemFree \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   365
        -export:JLI_InitArgProcessing \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   366
        -export:JLI_PreprocessArg \
43325
033e4cced1dc 8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents: 42755
diff changeset
   367
        -export:JLI_AddArgsFromEnvVar \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   368
        -export:JLI_GetAppArgIndex, \
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 47687
diff changeset
   369
    LIBS_unix := $(LIBZ_LIBS), \
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49070
diff changeset
   370
    LIBS_linux := $(LIBDL) -lpthread, \
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49070
diff changeset
   371
    LIBS_solaris := $(LIBDL), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   372
    LIBS_aix := $(LIBDL),\
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   373
    LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   374
    LIBS_windows := advapi32.lib comctl32.lib user32.lib, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   375
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   376
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   377
TARGETS += $(BUILD_LIBJLI)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   378
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   379
# On windows, the static library has the same suffix as the import library created by
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   380
# with the shared library, so the static library is given a different name. No harm
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   381
# in doing it for all platform to reduce complexity.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   382
ifeq ($(OPENJDK_TARGET_OS), windows)
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   383
  $(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   384
      NAME := jli_static, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   385
      TYPE := STATIC_LIBRARY, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   386
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   387
      SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   388
      EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   389
      EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   390
      OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   391
      CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   392
      ARFLAGS := $(ARFLAGS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   393
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   394
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   395
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   396
  TARGETS += $(BUILD_LIBJLI_STATIC)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   397
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   398
else ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   399
  #
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   400
  # On macosx they do partial (incremental) linking of libjli_static.a
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   401
  # code it here...rather than add support to NativeCompilation
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   402
  # as this is first time I see it
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   403
  $(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   404
      NAME := jli_static, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   405
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   406
      SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   407
      EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   408
      EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   409
      OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   410
      CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
48751
54f355e65415 8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents: 47687
diff changeset
   411
      LDFLAGS := -nostdlib $(ARFLAGS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   412
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 35262
diff changeset
   413
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   414
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   415
  ifeq ($(STATIC_BUILD), true)
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   416
    TARGETS += $(BUILD_LIBJLI_STATIC)
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   417
  else
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   418
    $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   419
	$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   420
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   421
    TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   422
  endif
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   423
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   424
else ifeq ($(OPENJDK_TARGET_OS), aix)
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   425
  # AIX also requires a static libjli because the compiler doesn't support '-rpath'
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   426
  $(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   427
      NAME := jli_static, \
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 48766
diff changeset
   428
      TYPE := STATIC_LIBRARY, \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   429
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   430
      SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   431
      EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   432
      EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   433
      OPTIMIZATION := HIGH, \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   434
      CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   435
      ARFLAGS := $(ARFLAGS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   436
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   437
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   438
  TARGETS += $(BUILD_LIBJLI_STATIC)
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   439
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   440
endif