Makefile revision 7295
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# CDDL HEADER START
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# The contents of this file are subject to the terms of the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Common Development and Distribution License (the "License").
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# You may not use this file except in compliance with the License.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# See the License for the specific language governing permissions
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# and limitations under the License.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# When distributing Covered Code, include this CDDL HEADER in each
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# If applicable, add the following below this CDDL HEADER, with the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# CDDL HEADER END
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync sha256:37089e80c3f2e9a0663d7ccc51c2a6c7dbbf3275bc1e4ed1ed3b1460cd5b3030
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Use gcc's default flags instead of userland's.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# The GNU compiler wants the GNU utilities.
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncGNU_ARCH = $(PARCH:sparc=sparcv9-sun)-solaris$(SOLARIS_VERSION)
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncGCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncPKG_MACROS += GCC_MAJOR_VERSION=$(GCC_MAJOR_VERSION)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# direct binding causes various testsuite failures
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# /usr/lib/ld/map.noexdata destroys Intel
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# /usr/lib/ld/map.noexbss destroys SPARC
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Mapfiles map.noexdata and map.noexbss mark the data + bss and bss
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# segments non executable on x86 and SPARC respectively. The protection
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# extends to the heap segment, if the heap is brk based, as is the case
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# with gcc. Since the introduction of NXHEAP, this is controlled
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# separately by the NXHEAP extension itself. Whether the heap should be
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# executable or not should be reevaluated. For now, try to avoid
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# "destruction" as hinted above.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# for some reason the fixincludes target fails with bash on Solaris.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# We are going to build the 64-bit version of the compiler and tools, but we
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# want it to install in the normal .../{bin|lib}/... locations. GCC will
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# take care of building and putting 32/64 bit objects in the right place
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# under there.
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(USRBINDIR)/ld
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCONFIGURE_OPTIONS += --with-gnu-as --with-as=$(GNUBIN)/as
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# If the compiler used to build matches the compiler being built, there is no
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# need for a 3 stage build.
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# This is the target and it must be last
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# compile python modules
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xargs -n 1 dirname | sort -u | \
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCOMPONENT_PRE_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# We don't have DejaGNU in S11.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync COMPONENT_PRE_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Run the tests and generate a summary report, then output the summary
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# report into the results file.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# To ensure that all tests that are expected to pass actually
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# pass, we have to increase the stacksize limit to at least
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# 16MB. Otherwise we'll get spurious failures in the test
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# harness (gcc.c-torture/compile/limits-exprparen.c and others).
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# With the soft stacksize limit set to 16384 we get reasonably good
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# test results.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ulimit -Ss 16385 ; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync $(GMAKE) -k -i $(JOBS:%=-j%) check check-target ; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Master test results are different between x86 and SPARC.