jdk/make/common/Defs-linux.gmk
author xdono
Wed, 02 Jul 2008 12:55:45 -0700
changeset 715 f16baef3a20e
parent 30 7ea1edf98bfe
child 917 75261da60fff
child 849 be386e469547
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 30
diff changeset
     2
# Copyright 1999-2008 Sun Microsystems, Inc.  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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
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
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile to specify compiler flags for programs and libraries
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# targeted to Linux.  Should not contain any rules.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# WARNING: This file is shared with other workspaces. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#          So when it includes other files, it must use JDK_TOPDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
# Warning: the following variables are overriden by Defs.gmk. Set
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# values will be silently ignored:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#   CFLAGS        (set $(OTHER_CFLAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#   LDLIBS        (set $(EXTRA_LIBS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
# Get shared JDK settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
# Part of INCREMENTAL_BUILD mechanism.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#   Compiler emits things like:  path/file.o: file.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#   We want something like: relative_path/file.o relative_path/file.d: file.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
CC_DEPEND	 = -MM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
ifndef PLATFORM_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    53
  PLATFORM_SRC = $(BUILDDIR)/../src/solaris
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
endif # PLATFORM_SRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
# Platform specific closed sources
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  ifndef CLOSED_PLATFORM_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    59
    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
# platform specific include files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
PLATFORM_INCLUDE_NAME = $(PLATFORM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
# suffix used for make dependencies files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
DEPEND_SUFFIX = d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
# The suffix applied to the library name for FDLIBM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
FDDLIBM_SUFFIX = a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
# The suffix applied to scripts (.bat for windows, nothing for unix)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
SCRIPT_SUFFIX =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
# CC compiler object code output directive flag value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
# Default HPI libraries. Build will build only native, unless
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
# overriden at the make command line. This makes it convenient for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
# people doing, say, a pthreads port -- they can create a posix
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
# directory here, and say "gnumake HPIS=posix" at the top
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
# level.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
HPIS = native
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
# Default optimization
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
CC_HIGHEST_OPT = -O3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
CC_HIGHER_OPT  = -O3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
CC_LOWER_OPT   = -O2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
CC_NO_OPT      =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
ifeq ($(PRODUCT), java)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    _OPT = $(CC_HIGHER_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    _OPT = $(CC_LOWER_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    CPPFLAGS_DBG    += -DLOGGING 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
# For all platforms, do not omit the frame pointer register usage. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
#    We need this frame pointer to make it easy to walk the stacks.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
#    This should be the default on X86, but ia64 and amd64 may not have this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
#    as the default.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
CFLAGS_REQUIRED         =  $(CFLAGS_REQUIRED_$(ARCH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
LDFLAGS_COMMON          += $(LDFLAGS_COMMON_$(ARCH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
# Add in platform specific optimizations for all opt levels
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
CC_HIGHEST_OPT += $(_OPT_$(ARCH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
CC_HIGHER_OPT  += $(_OPT_$(ARCH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
CC_LOWER_OPT   += $(_OPT_$(ARCH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
ifdef NO_OPTIMIZATIONS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
  CC_HIGHEST_OPT = $(CC_NO_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
  CC_HIGHER_OPT  = $(CC_NO_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
  CC_LOWER_OPT   = $(CC_NO_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
# Selection of warning messages
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
GCC_INHIBIT	= -Wno-unused -Wno-parentheses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
GCC_STYLE	= 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
GCC_WARNINGS	= -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
# Treat compiler warnings as errors, if warnings not allowed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
ifeq ($(COMPILER_WARNINGS_FATAL),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
  GCC_WARNINGS += -Werror
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
# Misc compiler options
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
ifeq ($(ARCH),ppc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
  CFLAGS_COMMON   = -fsigned-char
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
else # ARCH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
  CFLAGS_COMMON   = -fno-strict-aliasing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
endif # ARCH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
PIC_CODE_LARGE = -fPIC
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
PIC_CODE_SMALL = -fpic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
GLOBAL_KPIC = $(PIC_CODE_LARGE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
ifeq ($(ARCH), amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
   CFLAGS_COMMON   += $(GLOBAL_KPIC) $(GCC_WARNINGS) -pipe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
   CFLAGS_COMMON   += $(GLOBAL_KPIC) $(GCC_WARNINGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
# Linux 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
DEBUG_FLAG = -g
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
ifeq ($(FASTDEBUG), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
  ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    DEBUG_FLAG = -g1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
CFLAGS_OPT      = $(POPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
CFLAGS_DBG      = $(DEBUG_FLAG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
CXXFLAGS_OPT	= $(POPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
CXXFLAGS_DBG	= $(DEBUG_FLAG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
ifeq ($(FASTDEBUG), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  CFLAGS_DBG    += $(CC_LOWER_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
  CXXFLAGS_DBG	+= $(CC_LOWER_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
		  -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
CPPFLAGS_COMMON += -D_LP64=1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
CPPFLAGS_OPT    = 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
CPPFLAGS_DBG    = -DDEBUG
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
ifdef LIBRARY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
  # Libraries need to locate other libraries at runtime, and you can tell
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
  #   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
  #   buried inside the .so. The $ORIGIN says to look relative to where
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
  #   the library itself is and it can be followed with relative paths from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
  #   that. By default we always look in $ORIGIN, optionally we add relative
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  #   paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
  #   On Linux we add a flag -z origin, not sure if this is necessary, but 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
  #   doesn't seem to hurt.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
  #   Try: 'readelf -d lib*.so' to see these settings in a library.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
  LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
EXTRA_LIBS += -lc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
LDFLAGS_DEFS_OPTION  = -z defs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
# -L paths for finding and -ljava
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
LDFLAGS_OPT     = -Xlinker -O1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
# statically link libgcc but will print a warning with the flag. We don't 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
# want the warning, so check gcc version first.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
CC_VER_MAJOR := $(shell $(CC) -dumpversion | $(SED) 's/egcs-//' | $(CUT) -d'.' -f1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
ifeq ("$(CC_VER_MAJOR)", "3")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
OTHER_LDFLAGS  += -static-libgcc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
#   (See Rules.gmk) The gcc 5 compiler might have an option for this?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
AUTOMATIC_PCH_OPTION = 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
# Post Processing of libraries/executables
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
ifeq ($(VARIANT), OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
  ifneq ($(NO_STRIP), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    # Debug 'strip -g' leaves local function Elf symbols (better stack traces)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    POST_STRIP_PROCESS = $(STRIP) -g
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
# Support for Quantify.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
ifdef QUANTIFY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
QUANTIFY_CMD = quantify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
# Path and option to link against the VM, if you have to.  Note that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
# there are libraries that link against only -ljava, but they do get
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
# the library itself should not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
VM_NAME         = server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
JVMLIB          = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
JAVALIB         = -ljava $(JVMLIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
# We want to privatize JVM symbols on Solaris. This is so the user can
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
# write a function called FindClass and this should not override the 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
# FindClass that is inside the JVM. At this point in time we are not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
# concerned with other JNI libraries because we hope that there will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
# not be as many clashes there.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
PRIVATIZE_JVM_SYMBOLS = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
USE_PTHREADS = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
override ALT_CODESET_KEY         = _NL_CTYPE_CODESET_NAME
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
override AWT_RUNPATH             =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
override HAVE_ALTZONE            = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
override HAVE_FILIOH             = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
override HAVE_GETHRTIME          = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
override HAVE_GETHRVTIME         = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
override HAVE_SIGIGNORE          = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
override LEX_LIBRARY             = -lfl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
ifeq ($(STATIC_CXX),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
override LIBCXX                  = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
override LIBCXX                  = -lstdc++
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
override LIBPOSIX4               =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
override LIBSOCKET               =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
override LIBTHREAD               =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
override MOOT_PRIORITIES         = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
override NO_INTERRUPTIBLE_IO     = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
override OPENWIN_HOME            = /usr/X11R6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
ifeq ($(ARCH), amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
override OPENWIN_LIB             = $(OPENWIN_HOME)/lib64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
override OPENWIN_LIB             = $(OPENWIN_HOME)/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
override OTHER_M4FLAGS           = -D__GLIBC__ -DGNU_ASSEMBLER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
override SUN_CMM_SUBDIR          =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
override THREADS_FLAG            = native
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
override USE_GNU_M4              = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
override USING_GNU_TAR           = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
override WRITE_LIBVERSION        = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
# resulting resolved absolute name of the executable in the environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
# variable EXECNAME.  That executable name is then used that to locate the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
# installation area.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
override USE_EXECNAME            = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
# If your platform has DPS, it will have Type1 fonts too, in which case
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
# it is best to enable DPS support until such time as 2D's rasteriser
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
# can fully handle Type1 fonts in all cases. Default is "yes".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
# DPS (Displayable PostScript) is available on Solaris machines
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
HAVE_DPS = no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
# Japanese manpages
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
JA_SOURCE_ENCODING = eucJP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
JA_TARGET_ENCODINGS = eucJP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
# Settings for the JDI - Serviceability Agent binding.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
# The JDI - Serviceability Agent binding is not currently supported
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
# on Linux-ia64.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
ifeq ($(ARCH), ia64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
  INCLUDE_SA = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
  INCLUDE_SA = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338