8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# This code is free software; you can redistribute it and/or modify it
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# under the terms of the GNU General Public License version 2 only, as
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# published by the Free Software Foundation. Oracle designates this
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# particular file as subject to the "Classpath" exception as provided
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# by Oracle in the LICENSE file that accompanied this code.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# This code is distributed in the hope that it will be useful, but WITHOUT
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# version 2 for more details (a copy is included in the LICENSE file that
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# accompanied this code).
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You should have received a copy of the GNU General Public License version
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# 2 along with this work; if not, write to the Free Software Foundation,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# or visit www.oracle.com if you need additional information or have any
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# questions.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Definitions for Solaris.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott# Default for COMPILER_WARNINGS_FATAL on Solaris (C & C++ compiler warnings)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifndef COMPILER_WARNINGS_FATAL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster COMPILER_WARNINGS_FATAL=false
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Solaris should use parallel compilation for best build times
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifndef COMPILE_APPROACH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster COMPILE_APPROACH = parallel
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshottendif
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshott
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshott# Indication that we are doing an incremental build.
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshott# This may trigger the creation of make depend files.
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshottifndef INCREMENTAL_BUILD
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshott INCREMENTAL_BUILD = false
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshottendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# FullPath just makes sure it never ends with a / and no duplicates
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterdefine FullPath
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(shell cd $1 2> $(DEV_NULL) && pwd)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendef
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# OptFullPath: Absolute path name of a dir that might not initially exist.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterdefine OptFullPath
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendef
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott# Location on system where jdk installs might be
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterUSRJDKINSTANCES_PATH =/usr/jdk/instances
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# NOTE: Must end with / so that it could be empty, allowing PATH usage.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster UNIXCOMMAND_PATH = /usr/bin/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott# UNIXCCS_PATH: path to where the less common UNIX commands can be found
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshott# NOTE: Must end with / so that it could be empty, allowing PATH usage.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshott UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster UNIXCCS_PATH = /usr/ccs/bin/
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshottendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# SLASH_JAVA: location of all network accessable files
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshottifdef ALT_SLASH_JAVA
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SLASH_JAVA :=$(ALT_SLASH_JAVA)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
01a939641aeb0a095851921879620c3fab295cb2Robert Wapshottendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# JDK_DEVTOOLS_DIR: common path for all the java devtools
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifdef ALT_JDK_DEVTOOLS_DIR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# COMPILER_PATH: path to where the compiler and tools are installed.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# NOTE: Must end with / so that it could be empty, allowing PATH usage.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifneq "$(origin ALT_COMPILER_PATH)" "undefined"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster # If the place where we keep a set of Sun Studio compilers doesn't exist,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster # try and use /opt/SUNWspro, the default location for the SS compilers.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster # (DirExists checks for this path twice, an automount double check)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster _SUNSTUDIO_SET_ROOT=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/SUNWspro
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SUNSTUDIO_SET_ROOT:=$(call DirExists,$(_SUNSTUDIO_SET_ROOT),$(_SUNSTUDIO_SET_ROOT),)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ifneq ($(SUNSTUDIO_SET_ROOT),)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster COMPILER_PATH =$(SUNSTUDIO_SET_ROOT)/$(REQUIRED_COMPILER_VERSION)/bin/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster else
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster COMPILER_PATH =/opt/SUNWspro/bin/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster endif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# NOTE: Must end with / so that it could be empty, allowing PATH usage.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ifdef ALT_JDK_DEVTOOLS_DIR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster else
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ifdef OPENJDK
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster DEVTOOLS_PATH = /usr/bin/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster else
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster endif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster endif
72450cb9c2ca854c6d3479832c2738196c1d3282Robert Wapshottendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# _BOOTDIR2: Second choice
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifndef ALT_BOOTDIR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# GCC_COMPILER_PATH: path to where the gcc/g++ compiler and tools are installed
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# NOTE: Must end with / so that it could be empty, allowing PATH usage.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifneq "$(origin ALT_GCC_COMPILER_PATH)" "undefined"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster GCC_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC_COMPILER_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster GCC_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/gnucc/bin/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Always build headless on Solaris
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterBUILD_HEADLESS = true
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster_CUPS_HEADERS_PATH=/opt/sfw/cups/include
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Set ZLIB_LIBS if not already set
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifeq ("$(ZLIB_LIBS)", "")
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ZLIB_LIBS=-lz
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Import JDK images allow for partial builds, components not built are
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# imported (or copied from) these import areas when needed.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifdef ALT_BUILD_JDK_IMPORT_PATH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterBUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifdef ALT_JDK_IMPORT_PATH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterJDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifdef ALT_HOTSPOT_IMPORT_PATH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterHOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# HOTSPOT_CLIENT_PATH: location of client jvm library file.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifeq ($(ARCH_DATA_MODEL), 32)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ifdef ALT_HOTSPOT_CLIENT_PATH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster else
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster endif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# HOTSPOT_SERVER_PATH: location of server jvm library file.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifdef ALT_HOTSPOT_SERVER_PATH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterHOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Special define for checking the binaries
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Debug builds should downgrade warnings to just info
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterMAPFILE_WARNING-DBG=INFO
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterMAPFILE_WARNING-OPT=WARNING
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterMAPFILE_WARNING-=WARNING
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterMAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Some libraries do not have mapfiles for multiple reasons.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# These libraries for sparc and sparcv9 are exceptions to the mapfile rule:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# libjdgaSUNWafb.so
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# libjdgaSUNWcg6.so
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# libjdgaSUNWffb.so
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# libjdgaSUNWm64.so
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# libxinerama.so
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The library libJdbcOdbc.so has also been given an exception.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The JNI/JVMTI demo libraries are also missing mapfiles, no exceptions yet.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifeq ($(ARCH_FAMILY),sparc)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster MAPFILE_EXCEPTIONS = \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster (libJdbcOdbc|libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster MAPFILE_EXCEPTIONS = (libJdbcOdbc)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Macro to check it's input file for banned dependencies and verify the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# binary built properly. Relies on process exit code.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifndef CROSS_COMPILE_ARCH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterdefine binary_file_verification # binary_file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster( \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(ECHO) "Checking for mapfile use in: $1" && \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if [ "`$(ECHO) $(basename $(notdir $1)) | $(EGREP) '$(MAPFILE_EXCEPTIONS)'`" = "" \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -a "`$(NM) -g -D $1 | $(EGREP) -v 'UNDEF' | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster fi && \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(ECHO) "Library loads for: $1" && \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(LDD) $1 && \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(ECHO) "RUNPATH for: $1" && \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ( $(DUMP) -L -v $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendef
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterelse
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterdefine binary_file_verification
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster( \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(ECHO) "Skipping binary file verification for cross-compile build" \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendef
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterendif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster