Makefile revision 3996
10139N/A#
10139N/A# CDDL HEADER START
10139N/A#
10139N/A# The contents of this file are subject to the terms of the
10139N/A# Common Development and Distribution License (the "License").
18970N/A# You may not use this file except in compliance with the License.
18970N/A#
10139N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10139N/A# or http://www.opensolaris.org/os/licensing.
10139N/A# See the License for the specific language governing permissions
17185N/A# and limitations under the License.
10139N/A#
17182N/A# When distributing Covered Code, include this CDDL HEADER in each
18644N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17182N/A# If applicable, add the following below this CDDL HEADER, with the
10139N/A# fields enclosed by brackets "[]" replaced with your own identifying
10139N/A# information: Portions Copyright [yyyy] [name of copyright owner]
18688N/A#
18688N/A# CDDL HEADER END
10139N/A#
18970N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
10139N/A#
10139N/Ainclude ../../make-rules/shared-macros.mk
10139N/A
10139N/ACOMPONENT_NAME= gcc
10139N/ACOMPONENT_VERSION= 4.5.2
10139N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
10139N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
12707N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
10139N/ACOMPONENT_ARCHIVE_HASH= \
10139N/A sha256:07b880faf29f3f9d9c0953717002ac29f5d061427797d2487a7c9c169e6395b3
20857N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
10139N/ACOMPONENT_ARCHIVE_1= testsuite-$(COMPONENT_VERSION).tar.gz
10139N/ACOMPONENT_ARCHIVE_URL_1 = \
10139N/A http://ftp.gnu.org/pub/gnu/gcc/$(COMPONENT_SRC)/gcc-$(COMPONENT_ARCHIVE_1)
10139N/ACOMPONENT_ARCHIVE_HASH_1= \
10139N/A sha256:aeb50a52831048da9a6aed118d85a25fc33fa73cae6c80df8f84885712e1b357
10139N/ACOMPONENT_BUGDB= utility/gnu-compiler
20857N/A
10139N/ATPNO= 4456
10139N/A
10139N/Ainclude $(WS_MAKE_RULES)/prep.mk
20829N/Ainclude $(WS_MAKE_RULES)/configure.mk
10139N/Ainclude $(WS_MAKE_RULES)/ips.mk
10139N/A
10139N/APATH=/usr/bin:/usr/gnu/bin:/usr/perl5/bin
10139N/A
10139N/APARCH = $(MACH:i386=i386-pc)
20071N/AGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
10139N/A
10139N/APKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
10139N/A
10139N/A# This product bootstraps itself. The gcc flags are not the same
10139N/A# as Studio flags. -O2 means different things for the two compilers
20071N/ACFLAGS=-g -O2
10139N/ACFLAGS_FOR_BUILD=$(CFLAGS)
10139N/A
10139N/A# CC_BITS may get in the way
10139N/ACC_BITS=
10139N/A
10139N/ACONFIG_SHELL = /bin/sh
10139N/A
10139N/ACONFIGURE_PREFIX = /usr/gcc/4.5
10139N/A
10139N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
10139N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
10139N/ACONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
10139N/ACONFIGURE_OPTIONS += --enable-shared
10139N/ACONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp
10139N/ACONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr
10139N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
10139N/A
10139N/ACOMPONENT_POST_UNPACK_ACTION = \
10139N/A ( cd $(COMPONENT_DIR) ; \
10139N/A tar xvf testsuite-$(COMPONENT_VERSION).tar.gz > /dev/null 2>&1 )
20071N/A
20071N/A# sparc and x86 use different assemblers
20071N/ACONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as
19952N/ACONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
10139N/ACONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
10139N/A
18970N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
18970N/A
10139N/A# Keep ASLR disabled (the default) for gcc 4.5; build often core dumps with ASLR
10139N/A
10139N/ACOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
10139N/A
10139N/ACOMPONENT_BUILD_TARGETS=bootstrap
10139N/A
19397N/Abuild: $(BUILD_32)
19714N/A
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
# 16384 Kb. 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 very good
# test results.
test:
( cd $(BUILD_DIR_32)/gcc ; \
ulimit -Ss 16384 ; \
$(GMAKE) check )
REQUIRED_PACKAGES += developer/assembler
REQUIRED_PACKAGES += developer/gnu-binutils
REQUIRED_PACKAGES += library/gmp
REQUIRED_PACKAGES += library/mpc
REQUIRED_PACKAGES += library/mpfr
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/gcc-45-runtime
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/linker