jdk/make/common/Defs-linux.gmk
author okutsu
Wed, 05 Oct 2011 15:13:40 +0900
changeset 10700 31c24f40f614
parent 10603 c315c8424ce2
child 11369 d1de4020afbd
permissions -rw-r--r--
7092679: (tz) Java getting wrong timezone/DST info on Solaris 11 6984762: Invalid close of file descriptor '-1' in findZoneinfoFile Reviewed-by: coffeys, ohair, naoto, peytoia
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
     2
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4111
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4111
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4111
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4111
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4111
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile to specify compiler flags for programs and libraries
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# targeted to Linux.  Should not contain any rules.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# WARNING: This file is shared with other workspaces. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#          So when it includes other files, it must use JDK_TOPDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
# Warning: the following variables are overriden by Defs.gmk. Set
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# values will be silently ignored:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#   CFLAGS        (set $(OTHER_CFLAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#   LDLIBS        (set $(EXTRA_LIBS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
# Get shared JDK settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
# Part of INCREMENTAL_BUILD mechanism.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#   Compiler emits things like:  path/file.o: file.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#   We want something like: relative_path/file.o relative_path/file.d: file.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
CC_DEPEND	 = -MM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
ifndef PLATFORM_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    53
  PLATFORM_SRC = $(BUILDDIR)/../src/solaris
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
endif # PLATFORM_SRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
# Platform specific closed sources
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  ifndef CLOSED_PLATFORM_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    59
    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
# platform specific include files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
PLATFORM_INCLUDE_NAME = $(PLATFORM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
# suffix used for make dependencies files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
DEPEND_SUFFIX = d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
# The suffix applied to the library name for FDLIBM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
FDDLIBM_SUFFIX = a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
# The suffix applied to scripts (.bat for windows, nothing for unix)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
SCRIPT_SUFFIX =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
# CC compiler object code output directive flag value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
10603
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    77
# Default OBJCOPY comes from GNU Binutils on Linux:
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    78
DEF_OBJCOPY=/usr/bin/objcopy
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    79
ifdef CROSS_COMPILE_ARCH
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    80
  # don't try to generate .debuginfo files when cross compiling
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    81
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    82
    echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    83
      "skipping .debuginfo generation.")
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    84
  OBJCOPY=
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    85
else
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    86
  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    87
  ifneq ($(ALT_OBJCOPY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    88
    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    89
    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    90
    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    91
  endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    92
endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    93
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    94
ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    95
# The setting of OBJCOPY above enables the JDK build to import
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    96
# .debuginfo files from the HotSpot build. However, adding FDS
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    97
# support to the JDK build will occur in phases so a different
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    98
# make variable is used to indicate that a particular library
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
    99
# supports FDS.
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   100
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   101
ifeq ($(OBJCOPY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   102
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   103
    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   104
else
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   105
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   106
    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   107
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   108
  # Library stripping policies for .debuginfo configs:
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   109
  #   all_strip - strips everything from the library
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   110
  #   min_strip - strips most stuff from the library; leaves minimum symbols
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   111
  #   no_strip  - does not strip the library at all
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   112
  #
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   113
  # Oracle security policy requires "all_strip". A waiver was granted on
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   114
  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   115
  #
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   116
  DEF_STRIP_POLICY="min_strip"
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   117
  ifeq ($(ALT_STRIP_POLICY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   118
    STRIP_POLICY=$(DEF_STRIP_POLICY)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   119
  else
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   120
    STRIP_POLICY=$(ALT_STRIP_POLICY)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   121
  endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   122
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   123
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   124
    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   125
endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   126
endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   127
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
# Default optimization
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   132
ifndef OPTIMIZATION_LEVEL
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   133
  ifeq ($(PRODUCT), java)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   134
    OPTIMIZATION_LEVEL = HIGHER
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   135
  else
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   136
    OPTIMIZATION_LEVEL = LOWER
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   137
  endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
endif
2398
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 2158
diff changeset
   139
ifndef FASTDEBUG_OPTIMIZATION_LEVEL
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 2158
diff changeset
   140
  FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 2158
diff changeset
   141
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   143
CC_OPT/NONE     = 
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   144
CC_OPT/LOWER    = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   145
CC_OPT/HIGHER   = -O3
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   146
CC_OPT/HIGHEST  = -O3
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   147
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   148
CC_OPT          = $(CC_OPT/$(OPTIMIZATION_LEVEL))
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   149
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
# For all platforms, do not omit the frame pointer register usage. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
#    We need this frame pointer to make it easy to walk the stacks.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
#    This should be the default on X86, but ia64 and amd64 may not have this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
#    as the default.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   161
CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   162
CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
4111
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   163
ifeq ($(ZERO_BUILD), true)
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   164
  CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   165
  ifeq ($(ZERO_ENDIANNESS), little)
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   166
    CFLAGS_REQUIRED     += -D_LITTLE_ENDIAN
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   167
  endif
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   168
  LDFLAGS_COMMON        += $(ZERO_ARCHFLAG)
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   169
else
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   170
  CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   171
  LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   172
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
2158
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   174
# If this is a --hash-style=gnu system, use --hash-style=both
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   175
#   The gnu .hash section won't work on some Linux systems like SuSE 10.
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   176
_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu')
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   177
ifneq ($(_HAS_HASH_STYLE_GNU),)
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   178
  LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   179
endif
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   180
LDFLAGS_COMMON          += $(LDFLAGS_HASH_STYLE)
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 919
diff changeset
   181
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
# Selection of warning messages
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
GCC_INHIBIT	= -Wno-unused -Wno-parentheses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
GCC_STYLE	= 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
GCC_WARNINGS	= -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
# Treat compiler warnings as errors, if warnings not allowed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
ifeq ($(COMPILER_WARNINGS_FATAL),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
  GCC_WARNINGS += -Werror
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
# Misc compiler options
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
#
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   199
ifneq ($(ARCH),ppc)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  CFLAGS_COMMON   = -fno-strict-aliasing
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   201
endif 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
PIC_CODE_LARGE = -fPIC
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
PIC_CODE_SMALL = -fpic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
GLOBAL_KPIC = $(PIC_CODE_LARGE)
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   205
CFLAGS_COMMON   += $(GLOBAL_KPIC) $(GCC_WARNINGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
ifeq ($(ARCH), amd64)
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   207
 CFLAGS_COMMON += -pipe
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
# Linux 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
DEBUG_FLAG = -g
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
ifeq ($(FASTDEBUG), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
  ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    DEBUG_FLAG = -g1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
2791
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   218
# DEBUG_BINARIES overrides everything, use full -g debug information
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   219
ifeq ($(DEBUG_BINARIES), true)
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   220
  DEBUG_FLAG = -g
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   221
  CFLAGS_REQUIRED += $(DEBUG_FLAG)
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   222
endif
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   223
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   224
CFLAGS_OPT      = $(CC_OPT)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
CFLAGS_DBG      = $(DEBUG_FLAG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   229
CXXFLAGS_OPT	= $(CC_OPT)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
CXXFLAGS_DBG	= $(DEBUG_FLAG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
ifeq ($(FASTDEBUG), true)
2398
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 2158
diff changeset
   235
  CFLAGS_DBG    += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 2158
diff changeset
   236
  CXXFLAGS_DBG	+= $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
5632
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   239
CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   240
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   241
# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   242
ifneq ($(ARCH),alpha)
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   243
  CPP_ARCH_FLAGS += -D$(ARCH)
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   244
else
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   245
  CPP_ARCH_FLAGS += -D_$(ARCH)_
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   246
endif
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   247
5179a4221430 6958257: Add support for alpha
andrew
parents: 5506
diff changeset
   248
CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
		  -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
CPPFLAGS_COMMON += -D_LP64=1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
3222
432b8f34c3b0 6858127: Missing -DNDEBUG on Linux and Windows native code compiles
ohair
parents: 2791
diff changeset
   255
CPPFLAGS_OPT    = -DNDEBUG
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
CPPFLAGS_DBG    = -DDEBUG
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   257
ifneq ($(PRODUCT), java)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   258
  CPPFLAGS_DBG    += -DLOGGING 
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   259
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
ifdef LIBRARY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
  # Libraries need to locate other libraries at runtime, and you can tell
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
  #   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
  #   buried inside the .so. The $ORIGIN says to look relative to where
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
  #   the library itself is and it can be followed with relative paths from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
  #   that. By default we always look in $ORIGIN, optionally we add relative
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
  #   paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
  #   On Linux we add a flag -z origin, not sure if this is necessary, but 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
  #   doesn't seem to hurt.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
  #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
  #   Try: 'readelf -d lib*.so' to see these settings in a library.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
  #
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   273
  Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   274
  Z_ORIGIN_FLAG/i586  = -Xlinker -z -Xlinker origin
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   275
  Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin 
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   276
  Z_ORIGIN_FLAG/ia64  = -Xlinker -z -Xlinker origin
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   277
  Z_ORIGIN_FLAG/arm   = 
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   278
  Z_ORIGIN_FLAG/ppc   =
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   279
  Z_ORIGIN_FLAG/zero  = -Xlinker -z -Xlinker origin
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   280
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   281
  LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY))
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   282
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   283
  LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   284
  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%)
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   285
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
EXTRA_LIBS += -lc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
4111
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 3288
diff changeset
   290
LDFLAGS_DEFS_OPTION  = -Xlinker -z -Xlinker defs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
# -L paths for finding and -ljava
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
LDFLAGS_OPT     = -Xlinker -O1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
# statically link libgcc but will print a warning with the flag. We don't 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
# want the warning, so check gcc version first.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
#
9350
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 8796
diff changeset
   305
ifeq ($(CC_MAJORVER),3)
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 8796
diff changeset
   306
  OTHER_LDFLAGS  += -static-libgcc
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
#   (See Rules.gmk) The gcc 5 compiler might have an option for this?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
AUTOMATIC_PCH_OPTION = 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
# Post Processing of libraries/executables
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
ifeq ($(VARIANT), OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
  ifneq ($(NO_STRIP), true)
2791
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   318
    ifneq ($(DEBUG_BINARIES), true)
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   319
      # Debug 'strip -g' leaves local function Elf symbols (better stack
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   320
      # traces)
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   321
      POST_STRIP_PROCESS = $(STRIP) -g
c84bf0caab7f 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2398
diff changeset
   322
    endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
# Support for Quantify.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
ifdef QUANTIFY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
QUANTIFY_CMD = quantify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
# Path and option to link against the VM, if you have to.  Note that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
# there are libraries that link against only -ljava, but they do get
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
# the library itself should not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
VM_NAME         = server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
JVMLIB          = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
JAVALIB         = -ljava $(JVMLIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
# We want to privatize JVM symbols on Solaris. This is so the user can
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
# write a function called FindClass and this should not override the 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
# FindClass that is inside the JVM. At this point in time we are not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
# concerned with other JNI libraries because we hope that there will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
# not be as many clashes there.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
PRIVATIZE_JVM_SYMBOLS = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
USE_PTHREADS = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
override ALT_CODESET_KEY         = _NL_CTYPE_CODESET_NAME
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
override AWT_RUNPATH             =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
override HAVE_ALTZONE            = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
override HAVE_FILIOH             = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
override HAVE_GETHRTIME          = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
override HAVE_GETHRVTIME         = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
override HAVE_SIGIGNORE          = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
override LEX_LIBRARY             = -lfl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
ifeq ($(STATIC_CXX),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
override LIBCXX                  = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
override LIBCXX                  = -lstdc++
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
override LIBPOSIX4               =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
override LIBSOCKET               =
5780
3f7be5f312ae 6960394: Stop linking with -lnsl on Linux
martin
parents: 5506
diff changeset
   375
override LIBNSL                  =
10700
31c24f40f614 7092679: (tz) Java getting wrong timezone/DST info on Solaris 11
okutsu
parents: 10603
diff changeset
   376
override LIBSCF                  =
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
override LIBTHREAD               =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
override MOOT_PRIORITIES         = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
override NO_INTERRUPTIBLE_IO     = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
ifeq ($(ARCH), amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
override OPENWIN_LIB             = $(OPENWIN_HOME)/lib64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
override OPENWIN_LIB             = $(OPENWIN_HOME)/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
override OTHER_M4FLAGS           = -D__GLIBC__ -DGNU_ASSEMBLER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
override SUN_CMM_SUBDIR          =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
override THREADS_FLAG            = native
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
override USE_GNU_M4              = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
override USING_GNU_TAR           = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
override WRITE_LIBVERSION        = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
# resulting resolved absolute name of the executable in the environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
# variable EXECNAME.  That executable name is then used that to locate the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
# installation area.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
override USE_EXECNAME            = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
# If your platform has DPS, it will have Type1 fonts too, in which case
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
# it is best to enable DPS support until such time as 2D's rasteriser
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
# can fully handle Type1 fonts in all cases. Default is "yes".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
# DPS (Displayable PostScript) is available on Solaris machines
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
HAVE_DPS = no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
# Japanese manpages
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
JA_SOURCE_ENCODING = eucJP
9367
7ed49dc79ebc 7036955: Japanese man pages in linux should be in utf-8 encoding
ogino
parents: 8796
diff changeset
   409
JA_TARGET_ENCODINGS = UTF-8
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
# Settings for the JDI - Serviceability Agent binding.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
10603
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9371
diff changeset
   414
SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
# The JDI - Serviceability Agent binding is not currently supported
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
# on Linux-ia64.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
ifeq ($(ARCH), ia64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
  INCLUDE_SA = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
  INCLUDE_SA = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   424
ifdef CROSS_COMPILE_ARCH
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   425
  # X11 headers are not under /usr/include
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   426
  OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   427
  OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   428
  OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 7967
diff changeset
   429
endif