Makefile revision 7124
220a21d38f675eb835f5758e3d23e896573aa5eaLennart Poettering# CDDL HEADER START
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# The contents of this file are subject to the terms of the
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# Common Development and Distribution License (the "License").
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# You may not use this file except in compliance with the License.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# or http://www.opensolaris.org/os/licensing.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# See the License for the specific language governing permissions
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# and limitations under the License.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# When distributing Covered Code, include this CDDL HEADER in each
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# If applicable, add the following below this CDDL HEADER, with the
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# fields enclosed by brackets "[]" replaced with your own identifying
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# information: Portions Copyright [yyyy] [name of copyright owner]
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# CDDL HEADER END
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCOMPONENT_PROJECT_URL= http://gcc.gnu.org/
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering sha256:37089e80c3f2e9a0663d7ccc51c2a6c7dbbf3275bc1e4ed1ed3b1460cd5b3030
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# Use gcc's default flags instead of userland's.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# The GNU compiler wants the GNU utilities.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringPATH=$(GNUBIN):$(USRBINDIR):$(USRDIR)/perl5/bin
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringGNU_ARCH = $(PARCH:sparc=sparcv9-sun)-solaris$(SOLARIS_VERSION)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringVERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION))
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringGCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringGCC_MAJOR_VERSION=$(word 1,$(VERSION_NUMBERS))
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringPKG_MACROS += GCC_MAJOR_VERSION=$(GCC_MAJOR_VERSION)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringPKG_MACROS += GCC_BASEDIR=$(CONFIGURE_PREFIX)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# direct binding causes various testsuite failures
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# /usr/lib/ld/map.noexdata destroys Intel
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# /usr/lib/ld/map.noexbss destroys SPARC
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# for some reason the fixincludes target fails with bash on Solaris.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCOMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_PREFIX = /usr/gcc/$(GCC_MAJOR_VERSION)
b97610038a122ff30e60b1996369ca4b979d8b19Kay SieversCONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# We are going to build the 64-bit version of the compiler and tools, but we
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# want it to install in the normal .../{bin|lib}/... locations. GCC will
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# take care of building and putting 32/64 bit objects in the right place
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --enable-initfini-array
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --with-build-config=no
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(USRBINDIR)/ld
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCONFIGURE_OPTIONS += --with-gnu-as --with-as=$(GNUBIN)/as
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# If the compiler used to build matches the compiler being built, there is no
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# need for a 3 stage build.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poetteringifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),)
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# This is the target and it must be last
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# compile python modules
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering ( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# To ensure that all tests that are expected to pass actually
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# pass, we have to increase the stacksize limit to at least
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# 16MB. Otherwise we'll get spurious failures in the test
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# harness (gcc.c-torture/compile/limits-exprparen.c and others).
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# With the soft stacksize limit set to 16384 we get reasonably good
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# test results.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCOMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCOMPONENT_TEST_TARGETS = check check-target
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart PoetteringCOMPONENT_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# We don't have DejaGNU in S11.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering COMPONENT_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering '-e "s|\(Test Run By\).*|\1|" ' \
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering '-e "/\(Missing header fix: \).*/d" ' \
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering '-e "/\(\\*\\*\\* complex.h\).*/d" ' \
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering '-e "/\(\\*\\*\\* math.h\).*/d" ' \
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering '-e "/\(\\*\\*\\* stdio.h\).*/d" '
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering# Master test results are different between x86 and SPARC.
e49b5aada0df13c9e8fce7338ae34e075dd7ccd1Lennart Poettering $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master