hotspot/make/solaris/makefiles/sparcWorks.make
author twisti
Mon, 06 May 2013 19:49:23 -0700
changeset 17382 bba473b81ec0
parent 13728 882756847a04
child 26415 582393444d19
permissions -rw-r--r--
8008772: remove gamma launcher Reviewed-by: kvn, neliasso, ctornqvi
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
#
12501
ea7feae692ae 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 11721
diff changeset
     2
# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
# accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
#
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5542
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5542
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5542
diff changeset
    21
# questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
#  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
11955
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    25
# If a SPEC is not set already, then use these defaults.
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    26
ifeq ($(SPEC),)
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    27
  # Compiler-specific flags for sparcworks.
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    28
  CC	= cc
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    29
  CXX	= CC
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
11955
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    31
  # Note that this 'as' is an older version of the Sun Studio 'fbe', and will
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    32
  #   use the older style options. The 'fbe' options will match 'cc' and 'CC'.
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    33
  AS	= /usr/ccs/bin/as
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
11955
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    35
  NM    = /usr/ccs/bin/nm
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    36
  NAWK  = /bin/nawk
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    37
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    38
  MCS	= /usr/ccs/bin/mcs
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    39
  STRIP	= /usr/ccs/bin/strip
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    40
endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    42
# Check for the versions of C++ and C compilers ($CXX and $CC) used. 
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
# Get the last thing on the line that looks like x.x+ (x is a digit).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
COMPILER_REV := \
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    46
$(shell $(CXX) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    47
CC_COMPILER_REV := \
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
    48
$(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
    50
# Pick which compiler is validated
2568
81bbadfc2ca0 6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents: 1549
diff changeset
    51
ifeq ($(JRE_RELEASE_VER),1.6.0)
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
    52
  # Validated compiler for JDK6 is SS11 (5.8)
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    53
  VALIDATED_COMPILER_REVS   := 5.8
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    54
  VALIDATED_CC_COMPILER_REVS := 5.8
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
    55
else
6760
532b60549a90 6983296: build sanity checks for jdk7 should require SS12u1
jcoomes
parents: 6182
diff changeset
    56
  # Validated compiler for JDK7 is SS12 update 1 + patches (5.10)
532b60549a90 6983296: build sanity checks for jdk7 should require SS12u1
jcoomes
parents: 6182
diff changeset
    57
  VALIDATED_COMPILER_REVS   := 5.10
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    58
  VALIDATED_CC_COMPILER_REVS := 5.10
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
    59
endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    61
# Warning messages about not using the above validated versions
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    62
ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS})
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    63
ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),)
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    64
PRINTABLE_CC_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_COMPILER_REV})
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    65
dummy_var_to_enforce_compiler_rev := $(shell \
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    66
	echo >&2 WARNING: You are using CC version ${COMPILER_REV} and \
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    67
	should be using version ${PRINTABLE_CC_REVS}.; \
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    68
	echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    69
	warning.)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    72
ENFORCE_CC_COMPILER_REV${ENFORCE_CC_COMPILER_REV} := $(strip ${VALIDATED_CC_COMPILER_REVS})
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    73
ifeq ($(filter ${ENFORCE_CC_COMPILER_REV},${CC_COMPILER_REV}),)
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    74
PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_CC_COMPILER_REV})
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    75
dummy_var_to_enforce_c_compiler_rev := $(shell \
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    76
	echo >&2 WARNING: You are using cc version ${CC_COMPILER_REV} and \
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    77
	should be using version ${PRINTABLE_C_REVS}.; \
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
    78
	echo >&2 Set ENFORCE_CC_COMPILER_REV=${CC_COMPILER_REV} to avoid this \
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    79
	warning.)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
    82
COMPILER_REV_NUMERIC := $(shell echo $(COMPILER_REV) | awk -F. '{ print $$1 * 100 + $$2 }')
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
    83
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
# Fail the build if __fabsf is used.  __fabsf exists only in Solaris 8 2/04
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
# and newer; objects with a dependency on this symbol will not run on older
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
# Solaris 8.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
JVM_FAIL_IF_UNDEFINED = __fabsf
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
JVM_CHECK_SYMBOLS = $(NM) -u -p $(LIBJVM.o) | \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
	$(NAWK) -v f="${JVM_FAIL_IF_UNDEFINED}" \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
	     'BEGIN    { c=split(f,s); rc=0; } \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
	      /:$$/     { file = $$1; } \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
	      /[^:]$$/  { for(n=1;n<=c;++n) { \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
			   if($$1==s[n]) { \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
			     printf("JVM_CHECK_SYMBOLS: %s contains illegal symbol %s\n", \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
				    file,$$1); \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
			     rc=1; \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
			   } \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
		         } \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
                       } \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
	      END      { exit rc; }'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
   103
LINK_LIB.CXX/PRE_HOOK += $(JVM_CHECK_SYMBOLS) || exit 1;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   105
# New architecture options started in SS12 (5.9), we need both styles to build.
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   106
#   The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as.
2568
81bbadfc2ca0 6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents: 1549
diff changeset
   107
#   Note: default for 32bit sparc is now the same as v8plus, so the
81bbadfc2ca0 6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents: 1549
diff changeset
   108
#         settings below have changed all 32bit sparc builds to be v8plus.
81bbadfc2ca0 6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents: 1549
diff changeset
   109
ARCHFLAG_OLD/sparc   = -xarch=v8plus
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   110
ARCHFLAG_NEW/sparc   = -m32 -xarch=sparc
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   111
ARCHFLAG_OLD/sparcv9 = -xarch=v9
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   112
ARCHFLAG_NEW/sparcv9 = -m64 -xarch=sparc
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   113
ARCHFLAG_OLD/i486    =
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   114
ARCHFLAG_NEW/i486    = -m32
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   115
ARCHFLAG_OLD/amd64   = -xarch=amd64
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   116
ARCHFLAG_NEW/amd64   = -m64
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   117
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   118
# Select the ARCHFLAGs and other SS12 (5.9) options
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   119
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   120
  ARCHFLAG/sparc   = $(ARCHFLAG_NEW/sparc)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   121
  ARCHFLAG/sparcv9 = $(ARCHFLAG_NEW/sparcv9)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   122
  ARCHFLAG/i486    = $(ARCHFLAG_NEW/i486)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   123
  ARCHFLAG/amd64   = $(ARCHFLAG_NEW/amd64)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   124
else
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   125
  ARCHFLAG/sparc   = $(ARCHFLAG_OLD/sparc)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   126
  ARCHFLAG/sparcv9 = $(ARCHFLAG_OLD/sparcv9)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   127
  ARCHFLAG/i486    = $(ARCHFLAG_OLD/i486)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   128
  ARCHFLAG/amd64   = $(ARCHFLAG_OLD/amd64)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
endif
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   130
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   131
# ARCHFLAGS for the current build arch
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   132
ARCHFLAG    = $(ARCHFLAG/$(BUILDARCH))
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   133
AS_ARCHFLAG = $(ARCHFLAG_OLD/$(BUILDARCH))
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
# Optional sub-directory in /usr/lib where BUILDARCH libraries are kept.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
ISA_DIR=$(ISA_DIR/$(BUILDARCH))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
ISA_DIR/sparcv9=/sparcv9
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
ISA_DIR/amd64=/amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
# Use these to work around compiler bugs:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
OPT_CFLAGS/SLOWER=-xO3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
OPT_CFLAGS/O2=-xO2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
OPT_CFLAGS/NOOPT=-xO1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6760
diff changeset
   145
# Flags for creating the dependency files.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6760
diff changeset
   146
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6760
diff changeset
   147
DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6760
diff changeset
   148
endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6760
diff changeset
   149
7408
c04a5c989f26 7003125: precompiled.hpp is included when precompiled headers are not used
stefank
parents: 7397
diff changeset
   150
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
c04a5c989f26 7003125: precompiled.hpp is included when precompiled headers are not used
stefank
parents: 7397
diff changeset
   151
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
c04a5c989f26 7003125: precompiled.hpp is included when precompiled headers are not used
stefank
parents: 7397
diff changeset
   152
10537
23539f11e110 7090259: Fix hotspot sources to build with old compilers
kvn
parents: 9414
diff changeset
   153
# Compiler warnings are treated as errors
23539f11e110 7090259: Fix hotspot sources to build with old compilers
kvn
parents: 9414
diff changeset
   154
CFLAGS_WARN = -xwe
23539f11e110 7090259: Fix hotspot sources to build with old compilers
kvn
parents: 9414
diff changeset
   155
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6760
diff changeset
   156
################################################
6182
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   157
# Begin current (>=5.9) Forte compiler options #
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   158
#################################################
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   159
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   160
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   161
ifeq ($(Platform_arch), x86)
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   162
OPT_CFLAGS/NO_TAIL_CALL_OPT  = -Wu,-O~yz
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   163
OPT_CCFLAGS/NO_TAIL_CALL_OPT = -Qoption ube -O~yz
6182
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   164
OPT_CFLAGS/stubGenerator_x86_32.o = $(OPT_CFLAGS) -xspace
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   165
OPT_CFLAGS/stubGenerator_x86_64.o = $(OPT_CFLAGS) -xspace
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   166
endif # Platform_arch == x86
6182
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   167
ifeq ("${Platform_arch}", "sparc")
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   168
OPT_CFLAGS/stubGenerator_sparc.o = $(OPT_CFLAGS) -xspace
685deffe44a5 6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents: 5547
diff changeset
   169
endif
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   170
endif # COMPILER_REV_NUMERIC >= 509
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   171
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
#################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
# Begin current (>=5.6) Forte compiler options #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
#################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   176
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 506), 1)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
ifeq ("${Platform_arch}", "sparc")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
# We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
ifndef LP64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
CFLAGS += -xmemalign=4s
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
#################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
# Begin current (>=5.5) Forte compiler options #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
#################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   193
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
CFLAGS     += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
AOUT_FLAGS += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
LIB_FLAGS  += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
LFLAGS     += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
ifeq ("${Platform_arch}", "sparc")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
# Flags for Optimization
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
# [phh] Commented out pending verification that we do indeed want
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
#       to potentially bias against u1 and u3 targets.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
#CFLAGS += -xchip=ultra2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
endif # sparc
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
ifeq ("${Platform_arch_model}", "x86_32")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   214
OPT_CFLAGS=-xtarget=pentium -xO4 $(EXTRA_OPT_CFLAGS)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
endif # 32bit x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
ifeq ("${Platform_arch_model}", "x86_64")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   220
ASFLAGS += $(AS_ARCHFLAG)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   221
CFLAGS  += $(ARCHFLAG/amd64)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
# this one seemed useless
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   223
LFLAGS_VM  += $(ARCHFLAG/amd64)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
# this one worked
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   225
LFLAGS  += $(ARCHFLAG/amd64)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   226
AOUT_FLAGS += $(ARCHFLAG/amd64)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
# -xO3 is faster than -xO4 on specjbb with SS10 compiler
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
endif # 64bit x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
# Inline functions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
# no more exceptions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
CFLAGS/NOEX=-features=no%except
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 338
diff changeset
   239
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 338
diff changeset
   240
# avoid compilation problems arising from fact that C++ compiler tries 
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 338
diff changeset
   241
# to search for external template definition by just compiling additional
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 338
diff changeset
   242
# source files in th same context
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 338
diff changeset
   243
CFLAGS +=  -template=no%extdef
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 338
diff changeset
   244
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
# Reduce code bloat by reverting back to 5.0 behavior for static initializers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
CFLAGS += -features=no%split_init
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
# Use -D_Crun_inline_placement so we don't get references to 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
#    __1c2n6FIpv_0_ or   void*operator new(unsigned,void*)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
#  This avoids the hard requirement of the newer Solaris C++ runtime patches.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
#  NOTE: This is an undocumented feature of the SS10 compiler. See 6306698.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
CFLAGS += -D_Crun_inline_placement
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
# PIC is safer for SPARC, and is considerably slower
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
# a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
PICFLAG         = -KPIC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
PICFLAG/DEFAULT = $(PICFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
# [RGV] Need to figure which files to remove to get link to work
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
#PICFLAG/BETTER  = -pic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
PICFLAG/BETTER  = $(PICFLAG/DEFAULT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
PICFLAG/BYFILE  = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
MAPFLAG = -M FILENAME
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
SONAMEFLAG = -h SONAME
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
# Build shared library
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
SHARED_FLAG = -G
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
# We don't need libCstd.so and librwtools7.so, only libCrun.so
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
CFLAGS += -library=%none
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
LFLAGS += -library=%none
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
LFLAGS += -mt
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   278
endif	# COMPILER_REV_NUMERIC >= 505
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
######################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
# End 5.5 Forte compiler options     #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
######################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
######################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
# Begin 5.2 Forte compiler options   #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
######################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   288
ifeq ($(COMPILER_REV_NUMERIC), 502)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
CFLAGS     += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
AOUT_FLAGS += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
LIB_FLAGS  += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
LFLAGS     += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
ifeq ("${Platform_arch}", "sparc")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
# Flags for Optimization
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
# [phh] Commented out pending verification that we do indeed want
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
#       to potentially bias against u1 and u3 targets.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
#CFLAGS += -xchip=ultra2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
ifdef LP64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
# SC5.0 tools on v9 are flakey at -xO4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
# [phh] Is this still true for 6.1?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
endif # sparc
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
ifeq ("${Platform_arch_model}", "x86_32")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
# SC5.0 tools on x86 are flakey at -xO4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
# [phh] Is this still true for 6.1?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
OPT_CFLAGS+=-xO3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
endif # 32bit x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
# no more exceptions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
CFLAGS/NOEX=-noex
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
4493
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   326
# Inline functions
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   327
CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   328
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
# Reduce code bloat by reverting back to 5.0 behavior for static initializers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
CFLAGS += -Qoption ccfe -one_static_init
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
# PIC is safer for SPARC, and is considerably slower
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
# a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
PICFLAG         = -KPIC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
PICFLAG/DEFAULT = $(PICFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
# [RGV] Need to figure which files to remove to get link to work
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
#PICFLAG/BETTER  = -pic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
PICFLAG/BETTER  = $(PICFLAG/DEFAULT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
PICFLAG/BYFILE  = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
4493
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   341
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   342
MAPFLAG = -M FILENAME
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   343
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   344
# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   345
SONAMEFLAG = -h SONAME
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   346
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   347
# Build shared library
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   348
SHARED_FLAG = -G
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 3261
diff changeset
   349
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
# Would be better if these weren't needed, since we link with CC, but
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
# at present removing them causes run-time errors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
LFLAGS += -library=Crun
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
LIBS   += -library=Crun -lCrun
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   355
endif	# COMPILER_REV_NUMERIC == 502
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
##################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
# End 5.2 Forte compiler options #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
##################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
##################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
# Begin old 5.1 compiler options #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
##################################
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   364
ifeq ($(COMPILER_REV_NUMERIC), 501)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
_JUNK_ := $(shell echo >&2 \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
       "*** ERROR: sparkWorks.make incomplete for 5.1 compiler")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
	@exit 1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
##################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
# End old 5.1 compiler options   #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
##################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
##################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
# Begin old 5.0 compiler options #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
##################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   378
ifeq	(${COMPILER_REV_NUMERIC}, 500)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
# Had to hoist this higher apparently because of other changes. Must
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
# come before -xarch specification.
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   382
#  NOTE: native says optimize for the machine doing the compile, bad news.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
CFLAGS += -xtarget=native
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
CFLAGS     += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
AOUT_FLAGS += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
LIB_FLAGS  += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
LFLAGS     += $(ARCHFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
CFLAGS += -library=iostream
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
LFLAGS += -library=iostream  -library=Crun
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
LIBS += -library=iostream -library=Crun -lCrun
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
# Flags for Optimization
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
ifdef LP64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
# SC5.0 tools on v9 are flakey at -xO4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
ifeq ("${Platform_arch}", "sparc")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.il
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
endif # sparc
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
ifeq ("${Platform_arch_model}", "x86_32")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS)
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   410
ifeq ("${COMPILER_REV_NUMERIC}", "500")
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
# SC5.0 tools on x86 are flakey at -xO4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
OPT_CFLAGS+=-xO3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
OPT_CFLAGS+=-xO4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
endif  # 32bit x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
# The following options run into misaligned ldd problem (raj)
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   422
#OPT_CFLAGS = -fast -O4 $(ARCHFLAG/sparc) -xchip=ultra
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
# no more exceptions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
CFLAGS/NOEX=-noex
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
# PIC is safer for SPARC, and is considerably slower
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
# a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
PICFLAG         = -PIC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
PICFLAG/DEFAULT = $(PICFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
# [RGV] Need to figure which files to remove to get link to work
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
#PICFLAG/BETTER  = -pic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
PICFLAG/BETTER  = $(PICFLAG/DEFAULT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
PICFLAG/BYFILE  = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   436
endif	# COMPILER_REV_NUMERIC = 500
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
# End old 5.0 compiler options #
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   442
ifeq ("${COMPILER_REV_NUMERIC}", "402")
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
# 4.2 COMPILERS SHOULD NO LONGER BE USED
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
_JUNK_ := $(shell echo >&2 \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
       "*** ERROR: SC4.2 compilers are not supported by this code base!")
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
	@exit 1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
# do not include shared lib path in a.outs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
AOUT_FLAGS += -norunpath
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
LFLAGS_VM = -norunpath -z noversion
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
# need position-indep-code for shared libraries
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
# (ild appears to get errors on PIC code, so we'll try non-PIC for debug)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
ifeq ($(PICFLAGS),DEFAULT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
VM_PICFLAG/LIBJVM  = $(PICFLAG/DEFAULT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
VM_PICFLAG/LIBJVM  = $(PICFLAG/BYFILE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
VM_PICFLAG/AOUT    =
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
CFLAGS += $(VM_PICFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
# less dynamic linking (no PLTs, please)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
#LIB_FLAGS += $(LINK_MODE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
# %%%%% despite -znodefs, -Bsymbolic gets link errors -- Rose
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
LINK_MODE = $(LINK_MODE/$(VERSION))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
LINK_MODE/debug     =
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
LINK_MODE/optimized = -Bsymbolic -znodefs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
# Have thread local errnos
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   474
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
CFLAGS += -mt
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
CFLAGS += -D_REENTRANT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
ifdef CC_INTERP
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
# C++ Interpreter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
CFLAGS += -DCC_INTERP
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
# Flags for Debugging
10559
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   486
# The -g0 setting allows the C++ frontend to inline, which is a big win.
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   487
# The -xs setting disables 'lazy debug info' which puts everything in
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   488
# the .so instead of requiring the '.o' files.
12501
ea7feae692ae 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 11721
diff changeset
   489
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
10559
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   490
  OPT_CFLAGS += -g0 -xs
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   491
endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
DEBUG_CFLAGS = -g
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
FASTDEBUG_CFLAGS = -g0
12501
ea7feae692ae 7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents: 11721
diff changeset
   494
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
10559
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   495
  DEBUG_CFLAGS += -xs
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   496
  FASTDEBUG_CFLAGS += -xs
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   497
endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   499
# Special global options for SS12
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   500
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   501
  # There appears to be multiple issues with the new Dwarf2 debug format, so
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   502
  #   we tell the compiler to use the older 'stabs' debug format all the time.
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   503
  #   Note that this needs to be used in optimized compiles too to be 100%.
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   504
  #   This is a workaround for SS12 (5.9) bug 6694600
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   505
  CFLAGS += -xdebugformat=stabs
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   506
endif
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 360
diff changeset
   507
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
# Enable the following CFLAGS additions if you need to compare the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
# built ELF objects.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
# The -g option makes static data global and the "-Qoption ccfe
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
# -xglobalstatic" option tells the compiler to not globalize static
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
# data using a unique globalization prefix. Instead force the use of
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
# a static globalization prefix based on the source filepath so the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
# objects from two identical compilations are the same.
10559
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   516
# EXTRA_CFLAGS only covers vm_version.cpp for some reason
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   517
#EXTRA_CFLAGS += -Qoption ccfe -xglobalstatic
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   518
#OPT_CFLAGS += -Qoption ccfe -xglobalstatic
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
#DEBUG_CFLAGS += -Qoption ccfe -xglobalstatic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
#FASTDEBUG_CFLAGS += -Qoption ccfe -xglobalstatic
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   522
ifeq	(${COMPILER_REV_NUMERIC}, 502)
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
   523
COMPILER_DATE := $(shell $(CXX) -V 2>&1 | sed -n '/^.*[ ]C++[ ]\([1-9]\.[0-9][0-9]*\)/p' | awk '{ print $$NF; }')
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
ifeq	(${COMPILER_DATE}, 2001/01/31)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
# disable -g0 in fastdebug since SC6.1 dated 2001/01/31 seems to be buggy
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
# use an innocuous value because it will get -g if it's empty
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
FASTDEBUG_CFLAGS = -c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
# Uncomment or 'gmake CFLAGS_BROWSE=-sbfast' to get source browser information.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
# CFLAGS_BROWSE	= -sbfast
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
CFLAGS		+= $(CFLAGS_BROWSE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
# ILD is gone as of SS11 (5.8), not supportted in SS10 (5.7)
1549
710f8deef989 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 986
diff changeset
   536
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \< 507), 1)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
  # use ild when debugging (but when optimizing we want reproducible results)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
  ILDFLAG = $(ILDFLAG/$(VERSION))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
  ILDFLAG/debug     = -xildon
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
  ILDFLAG/optimized =
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
  AOUT_FLAGS += $(ILDFLAG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
489c9b5090e2 Initial load
duke
parents:
diff changeset
   544
# Where to put the *.o files (a.out, or shared library)?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   545
LINK_INTO = $(LINK_INTO/$(VERSION))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
LINK_INTO/debug = LIBJVM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
LINK_INTO/optimized = LIBJVM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
# We link the debug version into the a.out because:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   550
#  1. ild works on a.out but not shared libraries, and using ild
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
#     can cut rebuild times by 25% for small changes. (ILD is gone in SS11)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
#  2. dbx cannot gracefully set breakpoints in shared libraries
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
# apply this setting to link into the shared library even in the debug version:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
ifdef LP64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
LINK_INTO = LIBJVM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
#LINK_INTO = LIBJVM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   561
489c9b5090e2 Initial load
duke
parents:
diff changeset
   562
# Solaris platforms collect lots of redundant file-ident lines,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   563
# to the point of wasting a significant percentage of file space.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
# (The text is stored in ELF .comment sections, contributed by
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
# all "#pragma ident" directives in header and source files.)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
# This command "compresses" the .comment sections simply by
489c9b5090e2 Initial load
duke
parents:
diff changeset
   567
# removing repeated lines.  The data can be extracted from
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
# binaries in the field by using "mcs -p libjvm.so" or the older
489c9b5090e2 Initial load
duke
parents:
diff changeset
   569
# command "what libjvm.so".
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
   570
LINK_LIB.CXX/POST_HOOK += $(MCS) -c $@ || exit 1;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   571
# (The exit 1 is necessary to cause a build failure if the command fails and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
# multiple commands are strung together, and the final semicolon is necessary
489c9b5090e2 Initial load
duke
parents:
diff changeset
   573
# since the hook must terminate itself as a valid command.)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
# Also, strip debug and line number information (worth about 1.7Mb).
10559
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   576
# If we can create .debuginfo files, then the VM is stripped in vm.make
a94d067da388 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 10537
diff changeset
   577
# and this macro is not used.
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
   578
STRIP_LIB.CXX/POST_HOOK = $(STRIP) -x $@ || exit 1;
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10559
diff changeset
   579
# STRIP_LIB.CXX/POST_HOOK is incorporated into LINK_LIB.CXX/POST_HOOK
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
# in certain configurations, such as product.make.  Other configurations,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   581
# such as debug.make, do not include the strip operation.