# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# We need to build an extra static version of this library for
BUILD_32_and_64 += $(WANBOOT_BUILD)
# -xthreadvar=%all: allow thread-local storage via __thread
# qualifier for all types of variables (global, static and dynamic)
CFLAGS.shared += $(studio_PIC)
# Set the wanboot CFLAGS as needed for the wanboot compilation
CFLAGS.wanboot += -D_BOOT
CFLAGS.wanboot += -g
CXXFLAGS.shared = -mt -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
CXXFLAGS.shared += $(CPP_XPG5MODE)
'-e "/libtool/d"' \
'-e "/-m32/d"' \
'-e "/-m64/d"' \
'-e "/DEPDIR=/d"' \
'-e "/ld: warning/d"' \
'-e "/creating /d"' \
'-e "/gm4 /d"' \
'-e "s/^make\[[0-9]\{1,\}\]/make/g"'
# assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
# at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
# Set the wanboot configure options as needed for wanboot
# libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
# Skipping this during automated tests since it hangs sometimes
# common targets
build: $(BUILD_32_and_64)
$(BUILD_DIR)/$(MACH32)/.installed: COMPONENT_POST_INSTALL_ACTION = $(COMPONENT_POST_INSTALL_ACTION.shared)
$(BUILD_DIR)/$(MACH64)/.installed: COMPONENT_POST_INSTALL_ACTION = $(COMPONENT_POST_INSTALL_ACTION.shared)
$(BUILD_DIR)/wanboot-amd64/.installed: COMPONENT_POST_INSTALL_ACTION = $(COMPONENT_POST_INSTALL_ACTION.wanboot)