3393N/A#
3393N/A# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3393N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3393N/A#
3393N/A# This code is free software; you can redistribute it and/or modify it
3393N/A# under the terms of the GNU General Public License version 2 only, as
3393N/A# published by the Free Software Foundation.
3393N/A#
3393N/A# This code is distributed in the hope that it will be useful, but WITHOUT
3393N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3393N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3393N/A# version 2 for more details (a copy is included in the LICENSE file that
3393N/A# accompanied this code).
3393N/A#
3393N/A# You should have received a copy of the GNU General Public License version
3393N/A# 2 along with this work; if not, write to the Free Software Foundation,
3393N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3393N/A#
3393N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3393N/A# or visit www.oracle.com if you need additional information or have any
3393N/A# questions.
3393N/A#
3393N/A#
3393N/A
3393N/A# Rules to build fix_empty_sec_hdr_flags, used by vm.make on Solaris
3393N/A
3450N/A# Allow $(FIX_EMPTY_SEC_HDR_FLAGS) to be called from any directory.
3450N/A# We don't set or use the GENERATED macro to avoid affecting
3450N/A# other HotSpot Makefiles.
3450N/ATOPDIR = $(shell echo `pwd`)
3450N/AFIX_EMPTY_SEC_HDR_FLAGS = $(TOPDIR)/../generated/fix_empty_sec_hdr_flags
3393N/A
3393N/AFIX_EMPTY_SEC_HDR_FLAGS_DIR = $(GAMMADIR)/src/os/solaris/fix_empty_sec_hdr_flags
3393N/AFIX_EMPTY_SEC_HDR_FLAGS_SRC = $(FIX_EMPTY_SEC_HDR_FLAGS_DIR)/fix_empty_sec_hdr_flags.c
3393N/AFIX_EMPTY_SEC_HDR_FLAGS_FLAGS =
3393N/ALIBS_FIX_EMPTY_SEC_HDR_FLAGS += -lelf
3393N/A
3393N/Aifeq ("${Platform_compiler}", "sparcWorks")
3393N/A# Enable the following FIX_EMPTY_SEC_HDR_FLAGS_FLAGS addition if you need to
3393N/A# compare the built ELF objects.
3393N/A#
3393N/A# The -g option makes static data global and the "-W0,-noglobal"
3393N/A# option tells the compiler to not globalize static data using a unique
3393N/A# globalization prefix. Instead force the use of a static globalization
3393N/A# prefix based on the source filepath so the objects from two identical
3393N/A# compilations are the same.
3393N/A#
3393N/A# Note: The blog says to use "-W0,-xglobalstatic", but that doesn't
3393N/A# seem to work. I got "-W0,-noglobal" from Kelly and that works.
3393N/A#FIX_EMPTY_SEC_HDR_FLAGS_FLAGS += -W0,-noglobal
3393N/Aendif # Platform_compiler == sparcWorks
3393N/A
3393N/A$(FIX_EMPTY_SEC_HDR_FLAGS): $(FIX_EMPTY_SEC_HDR_FLAGS_SRC)
3393N/A $(CC) -g -o $@ $< $(FIX_EMPTY_SEC_HDR_FLAGS_FLAGS) $(LIBS_FIX_EMPTY_SEC_HDR_FLAGS)