jdk/make/common/Defs-solaris.gmk
author ohair
Mon, 09 Jan 2012 09:18:37 -0800 (2012-01-09)
changeset 11369 d1de4020afbd
parent 10700 31c24f40f614
child 12047 320a714614e9
permissions -rw-r--r--
7128320: Fix freetype sanity check to make it more generic Reviewed-by: luchsh, katleman Contributed-by: Jonathan Lu <luchsh@linux.vnet.ibm.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 7967
diff changeset
     2
# Copyright (c) 1995, 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: 2398
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: 2398
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: 2398
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2398
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2398
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 Solaris.  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 overridden 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
#   LINTFLAGS     (set $(OTHER_LINTFLAGS) instead)
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
    43
#
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
    44
# Note: CPPFLAGS are used in C and C++ compiles.
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
    45
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
# Get shared JDK settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
ifndef PLATFORM_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    51
PLATFORM_SRC = $(BUILDDIR)/../src/solaris
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
endif # PLATFORM_SRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
# Platform specific closed sources
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
  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
    57
    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
# platform specific include files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
PLATFORM_INCLUDE_NAME = $(PLATFORM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
# suffix used for make dependencies files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
DEPEND_SUFFIX = d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
# suffix used for lint files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
LINT_SUFFIX = ln
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
10603
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    76
ifdef ENABLE_FULL_DEBUG_SYMBOLS
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    77
# Only check for Full Debug Symbols support on Solaris if it is
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    78
# specifically enabled. Hopefully, it can be enabled by default
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    79
# once the .debuginfo size issues are worked out.
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    80
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    81
# Default OBJCOPY comes from the SUNWbinutils package:
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    82
DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    83
ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    84
  # On Solaris AMD64/X64, gobjcopy is not happy and fails:
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    85
  #
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    86
  # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    87
  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    88
  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    89
  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    90
  # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    91
  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    92
  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    93
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    94
    echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    95
  OBJCOPY=
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    96
else
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    97
  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: 9350
diff changeset
    98
  ifneq ($(ALT_OBJCOPY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
    99
    _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: 9350
diff changeset
   100
    # 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: 9350
diff changeset
   101
    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: 9350
diff changeset
   102
  endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   103
endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   104
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   105
ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   106
# 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: 9350
diff changeset
   107
# .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: 9350
diff changeset
   108
# 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: 9350
diff changeset
   109
# 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: 9350
diff changeset
   110
# supports FDS.
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   111
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   112
ifeq ($(OBJCOPY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   113
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   114
    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: 9350
diff changeset
   115
else
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   116
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   117
    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: 9350
diff changeset
   118
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   119
  # Library stripping policies for .debuginfo configs:
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   120
  #   all_strip - strips everything from the library
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   121
  #   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: 9350
diff changeset
   122
  #   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: 9350
diff changeset
   123
  #
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   124
  # 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: 9350
diff changeset
   125
  # 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: 9350
diff changeset
   126
  #
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   127
  DEF_STRIP_POLICY="min_strip"
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   128
  ifeq ($(ALT_STRIP_POLICY),)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   129
    STRIP_POLICY=$(DEF_STRIP_POLICY)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   130
  else
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   131
    STRIP_POLICY=$(ALT_STRIP_POLICY)
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   132
  endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   133
  _JUNK_ := $(shell \
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   134
    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   135
endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   136
endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   137
endif
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   138
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
# Java default optimization (-x04/-O2) etc.  Applies to the VM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
#
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   142
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
   143
  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
   144
    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
   145
  else
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   146
    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
   147
  endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
endif
2398
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 919
diff changeset
   149
ifndef FASTDEBUG_OPTIMIZATION_LEVEL
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 919
diff changeset
   150
  FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 919
diff changeset
   151
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
#
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   154
# If -Xa is in CFLAGS_COMMON it will end up ahead of $(CC_OPT) for the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
# optimized build, and that ordering of the flags completely freaks
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
# out cc.  Hence, -Xa is instead in each CFLAGS variant.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
# The more unusual options to the Sun C compiler:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
#	-v		Stricter type checking, more error checking
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
#			(To turn ALL warnings into fatals, use -errwarn=%all)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
#	-xstrconst	Place string literals and constants in read-only area
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
#			(means you can't write on your string literals)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
#	-xs		Force debug information (stabs) into the .so or a.out
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
#			(makes the library/executable debuggable without the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
#			.o files needing to be around, but at a space cost)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
#	-g & -O		If you add the -g option to the optimized compiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
#			you will get better stack retraces, the code is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
#			still optimized. This includes a space cost too.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
#       -xc99=%none     Do NOT allow for c99 extensions to be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
#                       e.g. declarations must precede statements
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
#       -xCC            Allow the C++ style of comments in C: //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
#                       Required with many of the source files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
#       -mt             Assume multi-threaded (important)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
#
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   175
# The more unusual options to the Sun C compiler:
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   176
#       +w              Print more warnings
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   177
#       +w2             Maximum warnings
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   178
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
# Debug flag for C and C++ compiler
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
#
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   183
CFLAGS_DEBUG_OPTION    = -g $(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
   184
CXXFLAGS_DEBUG_OPTION  = -g $(CXX_OPT/NONE)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
# Turn off -g if we are doing tcov build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
ifdef TCOV_BUILD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
  CFLAGS_DEBUG_OPTION=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
  CXXFLAGS_DEBUG_OPTION=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
# FASTDEBUG: Optimize the -g builds, gives us a faster debug java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
#        If true adds -O to the debug compiles. This allows for any assert
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
#        tests to remain and debug checking. The resulting code is faster
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
#        but less debuggable.  Stack traces are still valid, although only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
#        approximate line numbers are given. Printing of local variables
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
#        during a debugging session is not possible, but stepping and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
#        printing of global or static variables should be possible.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
#        Performance/size of files should be about the same, maybe smaller.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
ifeq ($(FASTDEBUG), true)
2398
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 919
diff changeset
   202
  CFLAGS_DEBUG_OPTION    = -g  $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
b0e6622ee72e 6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents: 919
diff changeset
   203
  CXXFLAGS_DEBUG_OPTION  = -g0 $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   206
CFLAGS_COMMON   = -L$(OBJDIR)
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   207
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   208
# Do not allow C99 language features like declarations in code etc.
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   209
CFLAGS_COMMON  += -xc99=%none
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   210
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   211
# Allow C++ comments in C code
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
CFLAGS_COMMON  += -xCC
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   213
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   214
# Show error message tags on errors
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   215
CFLAGS_COMMON   += -errshort=tags
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   216
CXXFLAGS_COMMON += -errtags=yes
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   217
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   218
# Optimization flags
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   219
CFLAGS_OPT      = $(CC_OPT)
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   220
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   221
# Debug version flags
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
CFLAGS_DBG      = $(CFLAGS_DEBUG_OPTION)
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   223
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   224
# Required C compiler flags
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   225
CFLAGS_COMMON  += -Xa $(CFLAGS_REQUIRED)
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   226
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   227
# Maximum warnings all the time
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   228
CXXFLAGS_COMMON += +w
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   229
CFLAGS_COMMON   += -v
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
# Assume MT behavior all the time (important)
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   232
CXXFLAGS_COMMON += -mt
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   233
CFLAGS_COMMON   += -mt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
# Assume no C++ exceptions are used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
CXXFLAGS_COMMON += -features=no%except -DCC_NOEX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
# For C++, these options tell it to assume nothing about locating libraries
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
#    either at compile time, or at runtime. Use of these options will likely
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
#    require the use of -L and -R options to indicate where libraries will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
#    be found at compile time (-L) and at runtime (-R).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
#    The /usr/lib location comes for free, so no need to specify that one.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
#    Note: C is much simplier and there is no need for these options. This
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
#          is mostly needed to avoid dependencies on libraries in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
#          Compiler install area, also see LIBCXX and LIBM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
CXXFLAGS_COMMON += -norunpath -xnolib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
# Treat compiler warnings as errors, if requested
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
ifeq ($(COMPILER_WARNINGS_FATAL),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  CFLAGS_COMMON += -errwarn=%all
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
  CXXFLAGS_COMMON += -errwarn=%all
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   256
CXXFLAGS_OPT	= $(CXX_OPT)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
CXXFLAGS_DBG	= $(CXXFLAGS_DEBUG_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
# Add -xstrconst to the library compiles. This forces all string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
#  literals into the read-only data section, which prevents them from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
#  being written to and increases the runtime pages shared on the system.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
ifdef LIBRARY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
  CFLAGS_COMMON +=-xstrconst
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
# Source browser database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
# COMPILE_WITH_SB    
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
#        If defined adds -xsb to compiles and creates a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
#        source browsing database during compilation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
ifdef COMPILE_WITH_SB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
  ifeq ($(LIBRARY), java)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    CFLAGS_DBG +=   -xsb
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
# Lint Flags:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
#	-Xa			ANSI C plus K&R, favor ANSI rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
#	-fd			report on old style func defs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
#	-errchk=structarg	report on 64bit struct args by value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
#	-errchk=longptr64	report on 64bit to 32bit issues (ignores casts)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
#	-errchk=parentheses	report on suggested use of extra parens
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
#	-v 			suppress unused args
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
#	-x			suppress unused externs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
#	-u			suppress extern func/vars used/defined
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
#	-errfmt=simple		use one line errors with position info
642
d1f02d5e4c74 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 30
diff changeset
   290
#       $(LINT_XARCH_OPTION)    See Compiler-sun.gwk
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
LINTFLAGS_COMMON  = -Xa
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
LINTFLAGS_COMMON += -fd 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
LINTFLAGS_COMMON += -errchk=structarg,longptr64,parentheses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
LINTFLAGS_COMMON += -v
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
LINTFLAGS_COMMON += -x 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
LINTFLAGS_COMMON += -u
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
LINTFLAGS_COMMON += -errfmt=simple 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
LINTFLAGS_OPT   = 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
LINTFLAGS_DBG   =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
# The -W0,-noglobal tells the compiler to NOT generate mangled global
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
#    ELF data symbols for file local static data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
#    This can break fix&continue, but we'd rather do the same compilations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
#    for deliverable bits as we do for non-deliverable bits
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
#    Tell the compilers to never generate globalized names, all the time.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
CFLAGS_COMMON += -W0,-noglobal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
642
d1f02d5e4c74 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 30
diff changeset
   309
# If we have a specific arch value to use, add it
d1f02d5e4c74 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 30
diff changeset
   310
CFLAGS_COMMON    += $(XARCH_OPTION)
d1f02d5e4c74 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 30
diff changeset
   311
CXXFLAGS_COMMON  += $(XARCH_OPTION)
d1f02d5e4c74 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 30
diff changeset
   312
ASFLAGS_COMMON   += $(AS_XARCH_OPTION)
d1f02d5e4c74 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 30
diff changeset
   313
EXTRA_LIBS       += $(XARCH_OPTION)
d1f02d5e4c74 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 30
diff changeset
   314
LINTFLAGS_COMMON += $(LINT_XARCH_OPTION)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
# uncomment the following to build with PERTURBALOT set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
# OTHER_CFLAGS += -DPERTURBALOT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   322
CPPFLAGS_COMMON = -D__solaris__  -D$(ARCH_FAMILY)
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 715
diff changeset
   323
CPPFLAGS_OPT    = -DNDEBUG
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
CPPFLAGS_DBG    = -DDEBUG
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   326
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
   327
  CPPFLAGS_DBG    += -DLOGGING -DDBINFO
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   328
endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   329
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
ifeq ($(ARCH_FAMILY), i586)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
  # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
  #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
  #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
  #   Note: -Dmacro         is the same as    #define macro 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
  #         -Dmacro=	    is the same as    #define macro
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
  CPPFLAGS_COMMON +=  -DcpuIntel -D_LITTLE_ENDIAN= -D$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
  # Turn off a superfluous compiler error message on Intel
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
  CFLAGS_COMMON += -erroff=E_BAD_PRAGMA_PACK_VALUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
# Java memory management is based on memory mapping by default, but a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
# system only assuming malloc/free can be built by adding -DUSE_MALLOC 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
CPPFLAGS_COMMON	+= -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
CPPFLAGS_OPT	+= -DTRIMMED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
LDFLAGS_DEFS_OPTION  = -z defs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
# -L paths for finding and -ljava
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
LDFLAGS_OPT     =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
LDFLAGS_DBG     =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
# We never really want the incremental linker, ever
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
#    The -xildoff option tells Sun's compilers to NOT use incremental linker
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
LDFLAGS_COMMON  += -xildoff
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
ifdef LIBRARY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
  # Libraries need to locate other libraries at runtime, and you can tell
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
  #   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
  #   buried inside the .so. The $ORIGIN says to look relative to where
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
  #   the library itself is and it can be followed with relative paths from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
  #   that. By default we always look in $ORIGIN, optionally we add relative
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
  #   paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
  #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
  #   Try: 'dump -Lv lib*.so' to see these settings in a library.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
  LDFLAGS_COMMON += -R\$$ORIGIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-R\$$ORIGIN/%)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
EXTRA_LIBS += -lc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
# Postprocessing is done on the images directories only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
ifeq ($(VARIANT), OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
  ifeq ($(PARTIAL_GPROF), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
    NO_STRIP = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
  ifeq ($(GPROF), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
    NO_STRIP = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
  ifneq ($(NO_STRIP), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
    # Debug 'strip -x' leaves local function Elf symbols (better stack traces)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
    POST_STRIP_PROCESS = $(STRIP) -x
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
POST_MCS_PROCESS=$(MCS) -d -a "JDK $(FULL_VERSION)"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
# Sun C compiler will take -M and pass it on to ld.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
# Usage: ld $(LD_MAPFILE_FLAG) mapfile *.o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
ifeq ($(CC_VERSION),gcc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
LD_MAPFILE_FLAG = -Xlinker -M -Xlinker
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
LD_MAPFILE_FLAG = -M
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
# Variables globally settable from the make command line (default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
# values in brackets):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
#	GPROF (false)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
# Eg: 	% gnumake GPROF=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
GPROF = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
ifeq ($(GPROF), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
    CFLAGS_COMMON += -DGPROF -xpg
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
    EXTRA_LIBS += -xpg
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
# PARTIAL_GPROF is to be used ONLY during compilation - it should not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
# appear during linking of libraries or programs.  It also should
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
# prevent linking with -z defs to allow a symbol to remain undefined.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
PARTIAL_GPROF = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
ifeq ($(PARTIAL_GPROF), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
  CFLAGS_GPROF += -xpg
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
  LDFLAGS_DEFS_OPTION  = -z nodefs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
# For a TCOV build we add in the TCOV_OPTION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
ifdef TCOV_BUILD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
  TCOV_OPTION		= -xprofile=tcov
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
  LDFLAGS_COMMON 	+= $(TCOV_OPTION) -Kpic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
  CFLAGS_COMMON  	+= $(TCOV_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
  CXXFLAGS_COMMON 	+= $(TCOV_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
  EXTRA_LIBS 	+= $(TCOV_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
  LDNOMAP=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
# Solaris only uses native threads. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
THREADS_FLAG=	native
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
THREADS_DIR=	threads
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
# Support for Quantify.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
ifdef QUANTIFY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
  QUANTIFY_CMD = quantify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
  QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
  LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
  ifdef LIBRARY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
    CFLAGS_COMMON += -K PIC
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
# Support for Purify.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
ifdef PURIFY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
  PURIFY_CMD = /net/suntools.eng/export/tools/sparc/bin/purify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
  PURIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
  LINK_PRE_CMD = $(PURIFY_CMD) $(PURIFY_OPTIONS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
  ifdef LIBRARY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
    CFLAGS_COMMON += -K PIC
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
# Different "levels" of optimization.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
ifeq ($(CC_VERSION),gcc)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   473
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   474
  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
   475
  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
   476
  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
   477
  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
   478
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   479
  CXX_OPT/NONE    =
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   480
  CXX_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
   481
  CXX_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
   482
  CXX_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
   483
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
  CFLAGS_REQUIRED_i586  += -fno-omit-frame-pointer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
  CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   486
  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
  #   (See Rules.gmk) May need to wait for gcc 5?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
  AUTOMATIC_PCH_OPTION = 
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   490
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
else
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   492
  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
  # Highest could be -xO5, but indications are that -xO5 should be reserved
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
  #    for a per-file use, on sources with known performance impacts.
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   495
  OPT_LEVEL/LOWER    = 2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   496
  OPT_LEVEL/HIGHER   = 4
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   497
  OPT_LEVEL/HIGHEST  = 4
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   498
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   499
  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
   500
  CC_OPT/LOWER    = $(OPT_LEVEL/LOWER:%=-xO%)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   501
  CC_OPT/HIGHER   = $(OPT_LEVEL/HIGHER:%=-xO%)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   502
  CC_OPT/HIGHEST  = $(OPT_LEVEL/HIGHEST:%=-xO%)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   503
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   504
  CXX_OPT/NONE    =
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   505
  CXX_OPT/LOWER   = $(OPT_LEVEL/LOWER:%=-xO%)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   506
  CXX_OPT/HIGHER  = $(OPT_LEVEL/HIGHER:%=-xO%)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   507
  CXX_OPT/HIGHEST = $(OPT_LEVEL/HIGHEST:%=-xO%)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   508
    
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   509
  # We need stack frames at all times
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   510
  USE_XKEEPFRAME_OPTION = false
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   511
  ifeq ($(USE_XKEEPFRAME_OPTION),true)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   512
    
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   513
    # Unknown spelling on this option at this time (Maybe in SS13?)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   514
    CC_XKEEPFRAME_OPTIONS  = -xkeepframe
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   515
    CXX_XKEEPFRAME_OPTIONS = -xkeepframe
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   516
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   517
  else
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   518
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   519
    # On X86, make sure tail call optimization is off
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   520
    #    The z and y are the tail call optimizations.
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   521
    ifeq ($(ARCH_FAMILY), i586)
9350
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   522
      CC_NEWER_THAN_58 := \
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   523
        $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   524
	    \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 8 \) )
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   525
      ifeq ($(CC_NEWER_THAN_58),1)
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   526
        #    Somehow, tail call optimization is creeping in.
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   527
        #    Make sure it is off.
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   528
        # WARNING: These may cause compiler warnings about duplicate -O options
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   529
        CC_XKEEPFRAME_OPTIONS  += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   530
        CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   531
      endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   532
    endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   533
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   534
    #  On i586 we need to tell the code generator to ALWAYS use a
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   535
    #   frame pointer.
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   536
    ifeq ($(ARCH_FAMILY), i586)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   537
      # Note that in 5.7, this is done with -xregs=no%frameptr
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   538
      ifeq ($(CC_VER), 5.5)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   539
        # It's not exactly clear when this optimization kicks in, the
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   540
        #   current assumption is -xO4 or greater and for C++ with
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   541
        #   the -features=no%except option and -xO4 and greater.
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   542
        #   Bottom line is, we ALWAYS want a frame pointer!
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   543
        CC_XKEEPFRAME_OPTIONS  += -Wu,-Z~B
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   544
        CXX_XKEEPFRAME_OPTIONS += -Qoption ube -Z~B
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   545
      endif
7485
e9e65ce0013a 6980281: SWAT: SwingSet2 got core dumped in Solaris-AMD64 using b107 swat build
bae
parents: 5801
diff changeset
   546
9350
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   547
      CC_NEWER_THAN_56 := \
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   548
        $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   549
	    \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 6 \) )
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   550
      ifeq ($(CC_NEWER_THAN_56),1)
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   551
        # Do NOT use frame pointer register as a general purpose opt register
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   552
        CC_OPT/NONE            += -xregs=no%frameptr
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   553
        CXX_OPT/NONE           += -xregs=no%frameptr
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   554
        CC_XKEEPFRAME_OPTIONS  += -xregs=no%frameptr
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   555
        CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   556
      endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   557
    endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   558
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   559
    #  Optimizer for sparc needs to be told not to do certain things
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   560
    #   related to frames or save instructions.
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   561
    ifeq ($(ARCH_FAMILY), sparc)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   562
      #  Do not use save instructions instead of add instructions
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   563
      #  This was an optimization starting in SC5.0 that made it hard for us to
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   564
      #    find the "save" instruction (which got turned into an "add")
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   565
      CC_XKEEPFRAME_OPTIONS  += -Wc,-Qrm-s
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   566
      CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qrm-s
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   567
      # Don't allow tail call code optimization. Started in SC5.0.
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   568
      #    We don't like code of this form:
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   569
      #	save
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   570
      #	<code>
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   571
      #	call foo
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   572
      #	   restore
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   573
      #   because we can't tell if the method will have a stack frame
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   574
      #   and register windows or not.
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   575
      CC_XKEEPFRAME_OPTIONS  += -Wc,-Qiselect-T0
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   576
      CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qiselect-T0
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   577
    endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   578
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   579
  endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   580
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   581
  # Extra options used with HIGHEST
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
  #
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   583
  # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
  #          done with care, there are some assumptions below that need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
  #          be understood about the use of pointers, and IEEE behavior.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
  # Use non-standard floating point mode (not IEEE 754)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   588
  CC_HIGHEST_EXTRAS += -fns
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
  # Do some simplification of floating point arithmetic (not IEEE 754)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   590
  CC_HIGHEST_EXTRAS += -fsimple
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
  # Use single precision floating point with 'float'
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   592
  CC_HIGHEST_EXTRAS += -fsingle
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
  # Assume memory references via basic pointer types do not alias
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
  #   (Source with excessing pointer casting and data access with mixed 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
  #    pointer types are not recommended)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   596
  CC_HIGHEST_EXTRAS += -xalias_level=basic
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
  # Use intrinsic or inline versions for math/std functions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
  #   (If you expect perfect errno behavior, do not use this)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   599
  CC_HIGHEST_EXTRAS += -xbuiltin=%all
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
  # Loop data dependency optimizations (need -xO3 or higher)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   601
  CC_HIGHEST_EXTRAS += -xdepend
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
  # Pointer parameters to functions do not overlap
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
  #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
  #    If you pass in multiple pointers to the same data, do not use this)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   605
  CC_HIGHEST_EXTRAS += -xrestrict
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
  # Inline some library routines
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
  #   (If you expect perfect errno behavior, do not use this)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   608
  CC_HIGHEST_EXTRAS += -xlibmil
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
  # Use optimized math routines
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
  #   (If you expect perfect errno behavior, do not use this)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
  #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   612
  #  CC_HIGHEST_EXTRAS += -xlibmopt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
  ifeq ($(ARCH_FAMILY), sparc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
    # Assume at most 8byte alignment, raise SIGBUS on error
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
    ### Presents an ABI issue with customer JNI libs?
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   616
    ####CC_HIGHEST_EXTRAS  += -xmemalign=8s
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
    # Automatic prefetch instructions, explicit prefetch macros
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   618
    CC_HIGHEST_EXTRAS += -xprefetch=auto,explicit
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
    # Pick ultra as the chip to optimize to
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   620
    CC_HIGHEST_EXTRAS += -xchip=ultra
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
  ifeq ($(ARCH), i586)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
    # Pick pentium as the chip to optimize to
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   624
    CC_HIGHEST_EXTRAS += -xchip=pentium
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
  ifdef LIBRARY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
    # The Solaris CBE (Common Build Environment) requires that the use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
    # of appl registers be disabled when compiling a public library (or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
    # a library that's loaded by a public library) on sparc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
    CFLAGS_REQUIRED_sparc    += -xregs=no%appl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
    CFLAGS_REQUIRED_sparcv9  += -xregs=no%appl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
  endif
9350
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   633
  CC_NEWER_THAN_56 := \
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   634
    $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   635
         \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 6 \) )
799e0bb89242 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
ohair
parents: 9035
diff changeset
   636
  ifeq ($(CC_NEWER_THAN_56),1)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
    #     Presents an ABI issue with customer JNI libs? We must be able to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
    #     to handle 4byte aligned objects? (rare occurance, but possible?)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
    CFLAGS_REQUIRED_sparc += -xmemalign=4s
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
  # Just incase someone trys to use the SOS9 compilers
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
  ifeq ($(CC_VER), 5.6)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
    # We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
    CFLAGS_REQUIRED_sparc += -xmemalign=4s
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
  #   (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
  AUTOMATIC_PCH_OPTION =
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   649
  
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   650
  # Add in keep frame options
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   651
  CC_OPT/LOWER    += $(CC_XKEEPFRAME_OPTIONS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   652
  CC_OPT/HIGHER   += $(CC_XKEEPFRAME_OPTIONS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   653
  CC_OPT/HIGHEST  += $(CC_XKEEPFRAME_OPTIONS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   654
  CXX_OPT/LOWER   += $(CXX_XKEEPFRAME_OPTIONS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   655
  CXX_OPT/HIGHER  += $(CXX_XKEEPFRAME_OPTIONS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   656
  CXX_OPT/HIGHEST += $(CXX_XKEEPFRAME_OPTIONS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   657
 
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   658
  # Add in highest optimization settings
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   659
  CC_OPT/HIGHEST  += $(CC_HIGHEST_EXTRAS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   660
  CXX_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   661
  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   664
# Default optimization settings based on level.
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   665
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
   666
CXX_OPT = $(CXX_OPT/$(OPTIMIZATION_LEVEL))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
# Flags required all the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
# Path and option to link against the VM, if you have to.  Note that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
# there are libraries that link against only -ljava, but they do get
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
# the library itself should not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
VM_NAME         = server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
JVMLIB          = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
JAVALIB         = -ljava $(JVMLIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
# Part of INCREMENTAL_BUILD mechanism.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
#   Compiler emits things like:  path/file.o: file.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
#   We want something like: relative_path/file.o relative_path/file.d: file.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
#   In addition on Solaris, any include file starting with / is deleted,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
#   this gets rid of things like /usr/include files, which never change.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
CC_DEPEND	 = -xM1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
CC_DEPEND_FILTER = $(SED) -e '/:[ 	]*[/]/d' -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' | $(SORT) -u
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
# Location of openwin libraries (do we really need this anymore?)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
OPENWIN_HOME    = /usr/openwin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
OPENWIN_LIB     = $(OPENWIN_HOME)/lib$(ISA_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
# Runtime graphics library search paths...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
OPENWIN_RUNTIME_LIB = /usr/openwin/lib$(ISA_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
AWT_RUNPATH = -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_RUNTIME_LIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
# C++ Runtime library (libCrun.so), use instead of -lCrun.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
#    Originally used instead of -lCrun to guarantee use of the system
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
#    .so version and not the .a or .so that came with the compilers.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
#    With the newer compilers this could probably change back to -lCrun but
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
#    in general this is ok to continue to do.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
LIBCXX = /usr/lib$(ISA_DIR)/libCrun.so.1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
5579
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 2398
diff changeset
   704
# JDK now requires Solaris 10, so pick up libm.so.2
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 2398
diff changeset
   705
LIBM = /usr/lib$(ISA_DIR)/libm.so.2
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
# Socket library
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
LIBSOCKET = -lsocket
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
5780
3f7be5f312ae 6960394: Stop linking with -lnsl on Linux
martin
parents: 5506
diff changeset
   710
# Network Services library
3f7be5f312ae 6960394: Stop linking with -lnsl on Linux
martin
parents: 5506
diff changeset
   711
LIBNSL = -lnsl
3f7be5f312ae 6960394: Stop linking with -lnsl on Linux
martin
parents: 5506
diff changeset
   712
10700
31c24f40f614 7092679: (tz) Java getting wrong timezone/DST info on Solaris 11
okutsu
parents: 10603
diff changeset
   713
# service configuration facility library
31c24f40f614 7092679: (tz) Java getting wrong timezone/DST info on Solaris 11
okutsu
parents: 10603
diff changeset
   714
LIBSCF = -lscf
31c24f40f614 7092679: (tz) Java getting wrong timezone/DST info on Solaris 11
okutsu
parents: 10603
diff changeset
   715
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
# GLOBAL_KPIC: If set means all libraries are PIC, position independent code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
#    EXCEPT for select compiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
#    If a .o file is compiled non-PIC then it should be forced
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
#	   into the RW data segment with a mapfile option. This is done
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
#    with object files which generated from .s files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
#    The -ztext enforces that no relocations remain in the text segment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
#    so that it remains purely read-only for optimum system performance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
#    Some libraries may use a smaller size (13bit -Kpic) on sparc instead of 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
#    (32 bit -KPIC) and will override GLOBAL_KPIC appropriately.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
PIC_CODE_LARGE   = -KPIC
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
PIC_CODE_SMALL   = -Kpic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
ifndef TCOV_BUILD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
    GLOBAL_KPIC      = $(PIC_CODE_LARGE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
    CXXFLAGS_COMMON += $(GLOBAL_KPIC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
    CFLAGS_COMMON   += $(GLOBAL_KPIC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
    LDFLAGS_COMMON  += -ztext
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
endif # TCOV_BUILD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
# If your platform has DPS, it will have Type1 fonts too, in which case
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
# it is best to enable DPS support until such time as 2D's rasteriser
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
# can fully handle Type1 fonts in all cases. Default is "yes".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
# DPS (Displayable PostScript) is available on Solaris machines
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
HAVE_DPS = yes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
# Japanese manpages
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
JA_SOURCE_ENCODING = eucJP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
JA_TARGET_ENCODINGS = eucJP UTF-8 PCK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
# Settings for the JDI - Serviceability Agent binding.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
10603
c315c8424ce2 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
dcubed
parents: 9350
diff changeset
   752
SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
INCLUDE_SA=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754