5562N/A#
5562N/A# CDDL HEADER START
5562N/A#
5562N/A# The contents of this file are subject to the terms of the
5562N/A# Common Development and Distribution License (the "License").
7118N/A# You may not use this file except in compliance with the License.
7118N/A#
5562N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5562N/A# or http://www.opensolaris.org/os/licensing.
5562N/A# See the License for the specific language governing permissions
5562N/A# and limitations under the License.
5562N/A#
5562N/A# When distributing Covered Code, include this CDDL HEADER in each
5562N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5562N/A# If applicable, add the following below this CDDL HEADER, with the
5562N/A# fields enclosed by brackets "[]" replaced with your own identifying
7118N/A# information: Portions Copyright [yyyy] [name of copyright owner]
7118N/A#
5562N/A# CDDL HEADER END
5562N/A#
7118N/A
7118N/A#
7118N/A# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
7118N/A#
7118N/Aexport PARFAIT_BUILD=no
7118N/ABUILD_BITS= 32
7118N/ACOMPILER= gcc
7118N/Ainclude ../../make-rules/shared-macros.mk
7118N/A
7118N/AGCC_ROOT=/usr/gcc/4.9
5562N/A
5562N/ACOMPONENT_NAME= gcc
5562N/ACOMPONENT_VERSION= 4.9.4
5562N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
5562N/ACOMPONENT_ARCHIVE_HASH= \
5562N/A sha256:1680f92781b92cbdb57d7e4f647c650678c594154cb0d707fd9a994424a9860d
5562N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
5562N/ACOMPONENT_BUGDB= utility/gnu-compiler
5562N/A
5562N/ATPNO= 31051
5562N/A
5562N/A# Use gcc's default flags instead of userland's.
5562N/ACFLAGS=
5562N/ACPPFLAGS=
5562N/ACXXFLAGS=
5562N/A
5562N/ACC += -std=gnu89
5562N/A
5562N/Ainclude $(WS_MAKE_RULES)/common.mk
5562N/A
7118N/A# The GNU compiler wants the GNU utilities.
7118N/APATH=$(GNUBIN):$(USRBINDIR):$(USRDIR)/perl5/bin
7118N/A
7118N/APARCH = $(MACH:i386=i386-pc)
7118N/AGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
7118N/A
7118N/APKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
7118N/A
7118N/AVERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION))
7118N/AGCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
7118N/APKG_MACROS += GCC_VERSION=$(GCC_VERSION)
7118N/APKG_MACROS += GCC_V=$(word 1,$(VERSION_NUMBERS))$(word 2,$(VERSION_NUMBERS))
7118N/APKG_MACROS += GCC_BASEDIR=$(CONFIGURE_PREFIX)
7118N/A
7118N/A# direct binding causes various testsuite failures
7118N/ALD_B_DIRECT=
7118N/A
7118N/A# /usr/lib/ld/map.noexdata destroys Intel
7118N/ALD_MAP_NOEXDATA.i386=
7118N/A
7118N/A# /usr/lib/ld/map.noexbss destroys SPARC
7118N/ALD_MAP_NOEXBSS.sparc=
7118N/A
7118N/A# Mapfiles map.noexdata and map.noexbss mark the data + bss and bss
7118N/A# segments non executable on x86 and SPARC respectively. The protection
7118N/A# extends to the heap segment, if the heap is brk based, as is the case
7118N/A# with gcc. Since the introduction of NXHEAP, this is controlled
7118N/A# separately by the NXHEAP extension itself. Whether the heap should be
7118N/A# executable or not should be reevaluated. For now, try to avoid
7118N/A# "destruction" as hinted above.
7118N/ANXHEAP_MODE = $(NXHEAP_DISABLE)
7118N/A
7118N/A# for some reason the fixincludes target fails with bash on Solaris.
7118N/ACONFIG_SHELL = /bin/sh
7118N/AMAKESHELL = /bin/sh
7118N/ACOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
7118N/ACOMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
7118N/A
7118N/ACONFIGURE_PREFIX = /usr/gcc/4.9
7118N/ACONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info
7118N/A
7118N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
7118N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
7118N/ACONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
7118N/ACONFIGURE_OPTIONS += --enable-shared
7118N/ACONFIGURE_OPTIONS += --enable-initfini-array
7118N/ACONFIGURE_OPTIONS += --disable-rpath
7118N/ACONFIGURE_OPTIONS += --with-system-zlib
7118N/ACONFIGURE_OPTIONS += --with-build-config=no
7118N/ACONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp
7118N/ACONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr
7118N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(USRBINDIR)/ld
7118N/ACONFIGURE_OPTIONS += --with-gnu-as --with-as=$(GNUBIN)/as
7118N/A
7118N/A# If the compiler used to build matches the compiler being built, there is no
7118N/A# need for a 3 stage build.
7118N/Aifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),)
7118N/ACONFIGURE_OPTIONS += --disable-bootstrap
7118N/Aelse
7118N/ACOMPONENT_BUILD_TARGETS=bootstrap
7118N/Aendif
7118N/A
7118N/ACONFIGURE_OPTIONS += BOOT_CFLAGS='-g -O2'
7118N/A
7118N/A# This is the target and it must be last
5562N/ACONFIGURE_OPTIONS += $(GNU_ARCH)
5562N/A
7118N/A
7118N/ACONFIGURE_ENV += PYTHON="$(PYTHON)"
7118N/A
7118N/A# compile python modules
7118N/ACOMPONENT_POST_INSTALL_ACTION = \
7118N/A ( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \
7118N/A xargs -n 1 dirname | sort -u | \
7118N/A xargs $(PYTHON) -m compileall )
7118N/A
7118N/ACOMPONENT_BUILD_ARGS += $(JOBS:%=-j%)
7118N/A
7118N/A
7118N/ACOMPONENT_PRE_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
7118N/A
7118N/A# We don't have DejaGNU in S11.
7118N/Aifeq ($(OS_VERSION), 5.12)
7118N/A COMPONENT_PRE_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
7118N/Aendif
7118N/A
7118N/A#
7118N/A# Run the tests and generate a summary report, then output the summary
7118N/A# report into the results file.
7118N/A#
7118N/A# To ensure that all tests that are expected to pass actually
7118N/A# pass, we have to increase the stacksize limit to at least
7118N/A# 16MB. Otherwise we'll get spurious failures in the test
7118N/A# harness (gcc.c-torture/compile/limits-exprparen.c and others).
7118N/A# With the soft stacksize limit set to 16384 we get reasonably good
7118N/A# test results.
7118N/A#
7118N/ACOMPONENT_PRE_TEST_ACTION += \
7118N/A (cd $(COMPONENT_TEST_DIR) ; \
7118N/A ulimit -Ss 16384 ; \
7118N/A $(ENV) $(COMPONENT_PRE_TEST_ENV) \
7118N/A $(GMAKE) -k -i $(JOBS:%=-j%) check check-target ; \
7118N/A $(GMAKE) mail-report.log)
7118N/A
7118N/ACOMPONENT_TEST_CMD = $(CAT)
7118N/ACOMPONENT_TEST_TARGETS = mail-report.log
7118N/A
7118N/A# Master test results are different between x86 and SPARC.
7118N/ACOMPONENT_TEST_MASTER = \
7118N/A $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
7118N/A
7118N/AREQUIRED_PACKAGES += developer/gcc-49
7118N/AREQUIRED_PACKAGES += developer/test/dejagnu
5562N/AREQUIRED_PACKAGES += library/cloog
5562N/AREQUIRED_PACKAGES += library/gmp
7118N/AREQUIRED_PACKAGES += library/isl
5562N/AREQUIRED_PACKAGES += library/mpc
5562N/AREQUIRED_PACKAGES += library/mpfr
5562N/AREQUIRED_PACKAGES += library/zlib
5562N/AREQUIRED_PACKAGES += runtime/tcl-8
5562N/AREQUIRED_PACKAGES += shell/bash
5562N/AREQUIRED_PACKAGES += shell/ksh93
5562N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
5562N/AREQUIRED_PACKAGES += system/library/math
5562N/A