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