hotspot/make/bsd/makefiles/sparcWorks.make
author jmasa
Thu, 28 Aug 2014 17:45:58 +0000
changeset 26318 4a618975cfcc
parent 13963 e5b53c306fb5
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     1
#
13963
e5b53c306fb5 7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents: 11955
diff changeset
     2
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     4
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     7
# published by the Free Software Foundation.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     8
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    13
# accompanied this code).
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    14
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    18
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    21
# questions.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    22
#  
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    23
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    24
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    25
#------------------------------------------------------------------------
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 10565
diff changeset
    26
# CC, CXX & AS
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    27
11955
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    28
# 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
    29
ifeq ($(SPEC),)
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    30
  CXX = CC
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    31
  CC  = cc
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    32
  AS  = $(CC) -c
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    33
11955
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    34
  HOSTCXX = $(CXX)
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    35
  HOSTCC  = $(CC)
aeca8151886e 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 11721
diff changeset
    36
endif
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    37
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    38
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    39
ARCHFLAG/i486    = -m32
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    40
ARCHFLAG/amd64   = -m64
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    41
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    42
CFLAGS     += $(ARCHFLAG)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    43
AOUT_FLAGS += $(ARCHFLAG)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    44
LFLAGS     += $(ARCHFLAG)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    45
ASFLAGS    += $(ARCHFLAG)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    46
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    47
#------------------------------------------------------------------------
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    48
# Compiler flags
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    49
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    50
# position-independent code
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    51
PICFLAG = -KPIC
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    52
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    53
CFLAGS += $(PICFLAG)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    54
# no more exceptions
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    55
CFLAGS += -features=no%except
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    56
# Reduce code bloat by reverting back to 5.0 behavior for static initializers
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    57
CFLAGS += -features=no%split_init
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    58
# allow zero sized arrays
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    59
CFLAGS += -features=zla
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    60
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    61
# Use C++ Interpreter
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    62
ifdef CC_INTERP
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    63
  CFLAGS += -DCC_INTERP
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    64
endif
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    65
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    66
# We don't need libCstd.so and librwtools7.so, only libCrun.so
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    67
CFLAGS += -library=Crun
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    68
LIBS += -lCrun
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    69
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    70
CFLAGS += -mt
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    71
LFLAGS += -mt
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    72
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    73
# Compiler warnings are treated as errors
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    74
#WARNINGS_ARE_ERRORS = -errwarn=%all
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    75
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) 
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    76
# Special cases
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    77
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    78
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    79
# The flags to use for an Optimized build
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    80
OPT_CFLAGS+=-xO4
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    81
OPT_CFLAGS/NOOPT=-xO0
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    82
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    83
# Flags for creating the dependency files.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    84
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    85
DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    86
endif
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    87
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    88
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    89
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    90
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    91
#------------------------------------------------------------------------
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    92
# Linker flags
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    93
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    94
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    95
MAPFLAG = -Wl,--version-script=FILENAME
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    96
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    97
# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    98
SONAMEFLAG = -h SONAME
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    99
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   100
# Build shared library
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   101
SHARED_FLAG = -G
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   102
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   103
#------------------------------------------------------------------------
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   104
# Debug flags
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   105
DEBUG_CFLAGS += -g
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   106
FASTDEBUG_CFLAGS = -g0
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   107