Makefile revision 1918
1918N/A#
1918N/A# CDDL HEADER START
1918N/A#
1918N/A# The contents of this file are subject to the terms of the
1918N/A# Common Development and Distribution License (the "License").
1918N/A# You may not use this file except in compliance with the License.
1918N/A#
1918N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1918N/A# or http://www.opensolaris.org/os/licensing.
1918N/A# See the License for the specific language governing permissions
1918N/A# and limitations under the License.
1918N/A#
1918N/A# When distributing Covered Code, include this CDDL HEADER in each
1918N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1918N/A# If applicable, add the following below this CDDL HEADER, with the
1918N/A# fields enclosed by brackets "[]" replaced with your own identifying
1918N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1918N/A#
1918N/A# CDDL HEADER END
1918N/A#
1918N/A# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
1918N/A#
1918N/Ainclude ../../make-rules/shared-macros.mk
1918N/A
1918N/ACOMPONENT_NAME= gcc
1918N/ACOMPONENT_VERSION= 4.7.3
1918N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
1918N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
1918N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
1918N/ACOMPONENT_ARCHIVE_HASH= \
1918N/A sha256:34a273937eb63ee710784b65bcf9fb3cfcd79d02848f80c75f8254abd14c79c8
1918N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
1918N/ACOMPONENT_BUGDB= utility/gnu-compiler
1918N/A
1918N/Ainclude ../../make-rules/prep.mk
1918N/Ainclude ../../make-rules/configure.mk
1918N/Ainclude ../../make-rules/ips.mk
1918N/A
1918N/A# The GNU compiler wants the GNU utilities.
1918N/APATH=/usr/gnu/bin:/usr/bin:/usr/perl5/bin
1918N/A
1918N/APARCH = $(MACH:i386=i386-pc)
1918N/AGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
1918N/A
1918N/APKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
1918N/A
1918N/A# This product bootstraps itself. The gcc flags are not the same
1918N/A# as Studio flags. -O2 means different things for the two compilers
1918N/ACFLAGS=-g -O2
1918N/ACFLAGS_FOR_BUILD=$(CFLAGS)
1918N/A
1918N/A# CC_BITS may get in the way
1918N/ACC_BITS=
1918N/A
1918N/A# LD_OPTIONS
1918N/A# /usr/lib/ld/map.noexbss destroys SPARC
1918N/A# /usr/lib/ld/map.noexdata destroys Intel
1918N/AGCC_LD_OPTIONS.sparc=-M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.pagealign -z ignore
1918N/AGCC_LD_OPTIONS.i386=-M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.pagealign -z ignore
1918N/AGCC_LD_OPTIONS = $(GCC_LD_OPTIONS.$(MACH))
1918N/ALD_OPTIONS := $(GCC_LD_OPTIONS)
1918N/A
1918N/ACONFIG_SHELL = /bin/sh
1918N/AMAKESHELL = /bin/sh
1918N/A
1918N/ACONFIGURE_PREFIX = /usr/gcc/4.7
1918N/A
1918N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
1918N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
1918N/ACONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
1918N/ACONFIGURE_OPTIONS += --enable-shared
1918N/ACONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp
1918N/ACONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr
1918N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
1918N/A
1918N/ACONFIGURE_ENV += PYTHON="$(PYTHON)"
1918N/ACONFIGURE_ENV += LD_OPTIONS="$(LD_OPTIONS)"
1918N/A
1918N/A# sparc and x86 use different assemblers
1918N/ACONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as
1918N/ACONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
1918N/ACONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
1918N/A
1918N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
1918N/A
1918N/ACOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
1918N/ACOMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
1918N/A
1918N/ACOMPONENT_BUILD_TARGETS=bootstrap
1918N/A
1918N/ACOMPONENT_POST_INSTALL_ACTION = \
1918N/A ( cd $(PROTOUSRDIR)/gcc/4.7/lib ; \
1918N/A $(PYTHON) -m compileall . ; \
1918N/A cd $(PROTOUSRDIR)/gcc/4.7/lib/$(MACH64) ; \
1918N/A $(PYTHON) -m compileall . ; \
1918N/A cd $(PROTOUSRDIR)/gcc/4.7/share/gcc-4.7.3/python/libstdcxx ; \
1918N/A $(PYTHON) -m compileall . ; \
1918N/A cd $(PROTOUSRDIR)/gcc/4.7/share/gcc-4.7.3/python/libstdcxx/v6 ; \
1918N/A $(PYTHON) -m compileall . )
1918N/A
1918N/A# ASLR has side-effects with libitm and libgomp.
1918N/A# Disable ASLR for now.
1918N/AASLR_MODE=$(ASLR_DISABLE)
1918N/A
1918N/Abuild: $(BUILD_32)
1918N/A
1918N/Ainstall: $(INSTALL_32)
1918N/A
1918N/A# To ensure that all tests that are expected to pass actually
1918N/A# pass, we have to increase the stacksize limit to at least
1918N/A# 16384 Kb. Otherwise we'll get spurious failures in the test
1918N/A# harness (gcc.c-torture/compile/limits-exprparen.c and others).
1918N/A# With the soft stacksize limit set to 16384 we get very good
1918N/A# test results.
1918N/Atest:
1918N/A ( cd $(BUILD_DIR_32)/gcc ; \
1918N/A ulimit -Ss 16384 ; \
1918N/A env - LD_OPTIONS=$(LD_OPTIONS) $(GMAKE) -k -i check ; \
1918N/A cd $(BUILD_DIR_32) ; \
1918N/A env - LD_OPTIONS=$(LD_OPTIONS) $(GMAKE) -k -i check-target )
1918N/A
1918N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
1918N/A
1918N/Ainclude ../../make-rules/depend.mk
1918N/A