2551N/A#
2551N/A# CDDL HEADER START
2551N/A#
2551N/A# The contents of this file are subject to the terms of the
2551N/A# Common Development and Distribution License (the "License").
2551N/A# You may not use this file except in compliance with the License.
2551N/A#
2551N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2551N/A# or http://www.opensolaris.org/os/licensing.
2551N/A# See the License for the specific language governing permissions
2551N/A# and limitations under the License.
2551N/A#
2551N/A# When distributing Covered Code, include this CDDL HEADER in each
2551N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2551N/A# If applicable, add the following below this CDDL HEADER, with the
2551N/A# fields enclosed by brackets "[]" replaced with your own identifying
2551N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2551N/A#
2551N/A# CDDL HEADER END
2551N/A#
3996N/A# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2551N/A#
2551N/Aexport PARFAIT_BUILD=no
2551N/A
3996N/ACOMPILER=gcc
3996N/A
2551N/Ainclude ../../make-rules/shared-macros.mk
2551N/A
2551N/ACOMPONENT_NAME= gcc
2551N/ACOMPONENT_VERSION= 4.8.2
2551N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
2551N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2551N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2551N/ACOMPONENT_ARCHIVE_HASH= \
2551N/A sha256:2ea77114344a06c45dd5791275311e91d306545aa5ec9db31d24174f6965e880
2551N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
2551N/ACOMPONENT_BUGDB= utility/gnu-compiler
2551N/A
3661N/ATPNO= 15448
3661N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
2551N/A
2551N/A# The GNU compiler wants the GNU utilities.
2551N/APATH=/usr/gnu/bin:/usr/bin:/usr/perl5/bin
2551N/A
2551N/APARCH = $(MACH:i386=i386-pc)
2551N/AGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
2551N/A
2551N/APKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
2551N/A
2551N/AVERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION))
2551N/AGCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
2551N/APKG_MACROS += GCC_VERSION=$(GCC_VERSION)
2551N/APKG_MACROS += GCC_V=$(word 1,$(VERSION_NUMBERS))$(word 2,$(VERSION_NUMBERS))
2551N/APKG_MACROS += GCC_BASEDIR=usr/gcc/$(GCC_VERSION)
2551N/A
2551N/ACFLAGS.i386 = -mtune=opteron -march=opteron
2551N/ACFLAGS.sparc = -mtune=ultrasparc -mcpu=ultrasparc -mno-unaligned-doubles
2551N/ACFLAGS = -g -O2
2551N/ACFLAGS += $(CFLAGS.$(MACH))
2551N/ACXXFLAGS = -g -O2
2551N/ACXXFLAGS += $(CFLAGS.$(MACH))
2551N/A
2551N/A# direct binding cause various testsuite failures
2551N/ALD_B_DIRECT=
2551N/A
2551N/A# /usr/lib/ld/map.noexdata destroys Intel
2551N/ALD_MAP_NOEXDATA.i386=
2551N/A
2551N/A# /usr/lib/ld/map.noexbss destroys SPARC
2551N/Aifeq ($(MACH),sparc)
2551N/ALD_MAP_NOEXBSS=
2551N/Aendif
2551N/A
2551N/A
2551N/A# for some reason the fixincludes target fails with bash on Solaris.
2551N/ACONFIG_SHELL = /bin/sh
2551N/AMAKESHELL = /bin/sh
2551N/ACOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
2551N/ACOMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
2551N/A
2551N/ACONFIGURE_PREFIX = /usr/gcc/4.8
2551N/A
2551N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
2551N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
2551N/ACONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
2551N/ACONFIGURE_OPTIONS += --enable-shared
2551N/ACONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp
2551N/ACONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr
2551N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
2551N/A
2551N/ACONFIGURE_ENV += PYTHON="$(PYTHON)"
2551N/A
2551N/A# sparc and x86 use different assemblers
2551N/ACONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as
2551N/ACONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
2551N/ACONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
2551N/A
2551N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
2551N/ACONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
2551N/A
2551N/ACOMPONENT_BUILD_TARGETS=bootstrap
2551N/A
2551N/A# compile python modules
2551N/ACOMPONENT_POST_INSTALL_ACTION = \
2551N/A ( gfind $(PROTOUSRDIR) -name '*.py' | xargs -n 1 dirname | sort -u | \
2551N/A xargs $(PYTHON) -m compileall )
2551N/A# strip elves, strip ignores non-elf files
2551N/ACOMPONENT_POST_INSTALL_ACTION += ; \
2551N/A ( gfind $(PROTOUSRDIR) -type f -perm /0111 | xargs /usr/bin/strip -x \
2551N/A 2>/dev/null ; exit 0 )
2551N/A
2551N/A# ASLR has side-effects with libitm and libgomp.
2551N/A# Disable ASLR for now.
2551N/AASLR_MODE=$(ASLR_DISABLE)
2551N/A
2551N/Abuild: $(BUILD_32)
2551N/A
2551N/Ainstall: $(INSTALL_32)
2551N/A
2551N/A# To ensure that all tests that are expected to pass actually
2551N/A# pass, we have to increase the stacksize limit to at least
2551N/A# 16MB. Otherwise we'll get spurious failures in the test
2551N/A# harness (gcc.c-torture/compile/limits-exprparen.c and others).
2551N/A# With the soft stacksize limit set to 16384 we get reasonably good
2551N/A# test results.
2551N/ACOMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384
2551N/ACOMPONENT_TEST_ARGS = -k -i
2551N/ACOMPONENT_TEST_TARGETS = check check-target
2551N/A
2551N/Atest: $(TEST_32)
2551N/A
3996N/A
2551N/A
3996N/AREQUIRED_PACKAGES += library/gmp
3996N/AREQUIRED_PACKAGES += library/mpc
3996N/AREQUIRED_PACKAGES += library/mpfr
3996N/AREQUIRED_PACKAGES += shell/bash
3996N/AREQUIRED_PACKAGES += shell/ksh93
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
3996N/AREQUIRED_PACKAGES += system/library/math
3996N/AREQUIRED_PACKAGES += system/linker