make/common/Defs-linux.gmk

Print this page


   1 #
   2 # Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  57 ifndef OPENJDK
  58   ifndef CLOSED_PLATFORM_SRC
  59     CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
  60   endif
  61 endif
  62 
  63 # platform specific include files
  64 PLATFORM_INCLUDE_NAME = $(PLATFORM)
  65 PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
  66 
  67 # suffix used for make dependencies files.
  68 DEPEND_SUFFIX = d
  69 # The suffix applied to the library name for FDLIBM
  70 FDDLIBM_SUFFIX = a
  71 # The suffix applied to scripts (.bat for windows, nothing for unix)
  72 SCRIPT_SUFFIX =
  73 # CC compiler object code output directive flag value
  74 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
  75 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
  76 
  77 # Default OBJCOPY comes from GNU Binutils on Linux:
  78 DEF_OBJCOPY=/usr/bin/objcopy
  79 ifdef CROSS_COMPILE_ARCH




  80   # don't try to generate .debuginfo files when cross compiling
  81   _JUNK_ := $(shell \
  82     echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
  83       "skipping .debuginfo generation.")
  84   OBJCOPY=
  85 else
  86   OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
  87   ifneq ($(ALT_OBJCOPY),)
  88     _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
  89     # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
  90     OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
  91   endif
  92 endif
  93 
  94 ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
  95 # The setting of OBJCOPY above enables the JDK build to import
  96 # .debuginfo files from the HotSpot build. However, adding FDS
  97 # support to the JDK build will occur in phases so a different
  98 # make variable is used to indicate that a particular library
  99 # supports FDS.
 100 
 101 ifeq ($(OBJCOPY),)
 102   _JUNK_ := $(shell \
 103     echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
 104 else

 105   _JUNK_ := $(shell \
 106     echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
 107 
 108   # Library stripping policies for .debuginfo configs:
 109   #   all_strip - strips everything from the library
 110   #   min_strip - strips most stuff from the library; leaves minimum symbols
 111   #   no_strip  - does not strip the library at all
 112   #
 113   # Oracle security policy requires "all_strip". A waiver was granted on
 114   # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
 115   #
 116   DEF_STRIP_POLICY="min_strip"
 117   ifeq ($(ALT_STRIP_POLICY),)
 118     STRIP_POLICY=$(DEF_STRIP_POLICY)
 119   else
 120     STRIP_POLICY=$(ALT_STRIP_POLICY)
 121   endif
 122 
 123   _JUNK_ := $(shell \
 124     echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")






 125 endif
 126 endif
 127 
 128 #
 129 # Default optimization
 130 #
 131 
 132 ifndef OPTIMIZATION_LEVEL
 133   ifeq ($(PRODUCT), java)
 134     OPTIMIZATION_LEVEL = HIGHER
 135   else
 136     OPTIMIZATION_LEVEL = LOWER
 137   endif
 138 endif
 139 ifndef FASTDEBUG_OPTIMIZATION_LEVEL
 140   FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
 141 endif
 142 
 143 CC_OPT/NONE     = 
 144 CC_OPT/LOWER    = -O2
 145 CC_OPT/HIGHER   = -O3
 146 CC_OPT/HIGHEST  = -O3


 396 # installation area.
 397 override USE_EXECNAME            = true
 398 
 399 # If your platform has DPS, it will have Type1 fonts too, in which case
 400 # it is best to enable DPS support until such time as 2D's rasteriser
 401 # can fully handle Type1 fonts in all cases. Default is "yes".
 402 # HAVE_DPS should only be "no" if the platform has no DPS headers or libs
 403 # DPS (Displayable PostScript) is available on Solaris machines
 404 HAVE_DPS = no
 405 
 406 #
 407 # Japanese manpages
 408 #
 409 JA_SOURCE_ENCODING = eucJP
 410 JA_TARGET_ENCODINGS = UTF-8
 411 
 412 # Settings for the JDI - Serviceability Agent binding.
 413 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 414 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
 415 SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo

 416 
 417 # The JDI - Serviceability Agent binding is not currently supported
 418 # on Linux-ia64.
 419 ifeq ($(ARCH), ia64)
 420   INCLUDE_SA = false
 421 else
 422   INCLUDE_SA = true
 423 endif
 424 
 425 ifdef CROSS_COMPILE_ARCH
 426   # X11 headers are not under /usr/include
 427   OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
 428   OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
 429   OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
 430 endif
   1 #
   2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  57 ifndef OPENJDK
  58   ifndef CLOSED_PLATFORM_SRC
  59     CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
  60   endif
  61 endif
  62 
  63 # platform specific include files
  64 PLATFORM_INCLUDE_NAME = $(PLATFORM)
  65 PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
  66 
  67 # suffix used for make dependencies files.
  68 DEPEND_SUFFIX = d
  69 # The suffix applied to the library name for FDLIBM
  70 FDDLIBM_SUFFIX = a
  71 # The suffix applied to scripts (.bat for windows, nothing for unix)
  72 SCRIPT_SUFFIX =
  73 # CC compiler object code output directive flag value
  74 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
  75 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
  76 
  77 ENABLE_FULL_DEBUG_SYMBOLS ?= 1
  78 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
  79 
  80 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
  81   # Default OBJCOPY comes from GNU Binutils on Linux:
  82   DEF_OBJCOPY=/usr/bin/objcopy
  83   ifdef CROSS_COMPILE_ARCH
  84     # don't try to generate .debuginfo files when cross compiling
  85     _JUNK_ := $(shell \
  86       echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
  87         "skipping .debuginfo generation.")
  88     OBJCOPY=
  89   else
  90     OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
  91     ifneq ($(ALT_OBJCOPY),)
  92       _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
  93       # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
  94       OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
  95     endif
  96   endif
  97 
  98   # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
  99   # JDK build to import .debuginfo or .diz files from the HotSpot build.
 100   # However, adding FDS support to the JDK build will occur in phases
 101   # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS)
 102   # is used to indicate that a particular library supports FDS.

 103 
 104   ifeq ($(OBJCOPY),)
 105     _JUNK_ := $(shell \
 106       echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
 107     ENABLE_FULL_DEBUG_SYMBOLS=0
 108   else
 109     _JUNK_ := $(shell \
 110       echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
 111 
 112     # Library stripping policies for .debuginfo configs:
 113     #   all_strip - strips everything from the library
 114     #   min_strip - strips most stuff from the library; leaves minimum symbols
 115     #   no_strip  - does not strip the library at all
 116     #
 117     # Oracle security policy requires "all_strip". A waiver was granted on
 118     # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
 119     #
 120     # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
 121     STRIP_POLICY ?= min_strip




 122 
 123     _JUNK_ := $(shell \
 124       echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
 125 
 126     ZIP_DEBUGINFO_FILES ?= 1
 127 
 128     _JUNK_ := $(shell \
 129       echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
 130   endif
 131 endif

 132 
 133 #
 134 # Default optimization
 135 #
 136 
 137 ifndef OPTIMIZATION_LEVEL
 138   ifeq ($(PRODUCT), java)
 139     OPTIMIZATION_LEVEL = HIGHER
 140   else
 141     OPTIMIZATION_LEVEL = LOWER
 142   endif
 143 endif
 144 ifndef FASTDEBUG_OPTIMIZATION_LEVEL
 145   FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
 146 endif
 147 
 148 CC_OPT/NONE     = 
 149 CC_OPT/LOWER    = -O2
 150 CC_OPT/HIGHER   = -O3
 151 CC_OPT/HIGHEST  = -O3


 401 # installation area.
 402 override USE_EXECNAME            = true
 403 
 404 # If your platform has DPS, it will have Type1 fonts too, in which case
 405 # it is best to enable DPS support until such time as 2D's rasteriser
 406 # can fully handle Type1 fonts in all cases. Default is "yes".
 407 # HAVE_DPS should only be "no" if the platform has no DPS headers or libs
 408 # DPS (Displayable PostScript) is available on Solaris machines
 409 HAVE_DPS = no
 410 
 411 #
 412 # Japanese manpages
 413 #
 414 JA_SOURCE_ENCODING = eucJP
 415 JA_TARGET_ENCODINGS = UTF-8
 416 
 417 # Settings for the JDI - Serviceability Agent binding.
 418 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 419 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
 420 SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
 421 SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz
 422 
 423 # The JDI - Serviceability Agent binding is not currently supported
 424 # on Linux-ia64.
 425 ifeq ($(ARCH), ia64)
 426   INCLUDE_SA = false
 427 else
 428   INCLUDE_SA = true
 429 endif
 430 
 431 ifdef CROSS_COMPILE_ARCH
 432   # X11 headers are not under /usr/include
 433   OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
 434   OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
 435   OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
 436 endif