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