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