Makefile revision 3996
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff#
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# CDDL HEADER START
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff#
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# The contents of this file are subject to the terms of the
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# Common Development and Distribution License (the "License").
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# You may not use this file except in compliance with the License.
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff#
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# or http://www.opensolaris.org/os/licensing.
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# See the License for the specific language governing permissions
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# and limitations under the License.
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff#
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# When distributing Covered Code, include this CDDL HEADER in each
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# If applicable, add the following below this CDDL HEADER, with the
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# fields enclosed by brackets "[]" replaced with your own identifying
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# information: Portions Copyright [yyyy] [name of copyright owner]
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff#
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# CDDL HEADER END
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff#
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff#
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloffinclude ../../make-rules/shared-macros.mk
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_NAME= gcc
a3d0d3d37cb056c5c936727cd54153b22bdcf9caAndi EgloffCOMPONENT_VERSION= 4.5.2
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_PROJECT_URL= http://gcc.gnu.org/
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_ARCHIVE_HASH= \
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff sha256:07b880faf29f3f9d9c0953717002ac29f5d061427797d2487a7c9c169e6395b3
9f52434d289d33b46a300c53f7fc1694fbb39379Andi EgloffCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_ARCHIVE_1= testsuite-$(COMPONENT_VERSION).tar.gz
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_ARCHIVE_URL_1 = \
9f52434d289d33b46a300c53f7fc1694fbb39379Andi Egloff http://ftp.gnu.org/pub/gnu/gcc/$(COMPONENT_SRC)/gcc-$(COMPONENT_ARCHIVE_1)
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_ARCHIVE_HASH_1= \
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff sha256:aeb50a52831048da9a6aed118d85a25fc33fa73cae6c80df8f84885712e1b357
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCOMPONENT_BUGDB= utility/gnu-compiler
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffTPNO= 4456
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloffinclude $(WS_MAKE_RULES)/prep.mk
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloffinclude $(WS_MAKE_RULES)/configure.mk
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienleinclude $(WS_MAKE_RULES)/ips.mk
adb077e59a0318a46a2079cccd8fd4a05841130cChad Kienle
9f52434d289d33b46a300c53f7fc1694fbb39379Andi EgloffPATH=/usr/bin:/usr/gnu/bin:/usr/perl5/bin
a3d0d3d37cb056c5c936727cd54153b22bdcf9caAndi Egloff
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienlePARCH = $(MACH:i386=i386-pc)
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienlePKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle# This product bootstraps itself. The gcc flags are not the same
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle# as Studio flags. -O2 means different things for the two compilers
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCFLAGS=-g -O2
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad KienleCFLAGS_FOR_BUILD=$(CFLAGS)
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# CC_BITS may get in the way
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCC_BITS=
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCONFIG_SHELL = /bin/sh
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCONFIGURE_PREFIX = /usr/gcc/4.5
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad KienleCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi EgloffCONFIGURE_OPTIONS += --enable-shared
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad KienleCONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr
376d1bf8f8ca562eecccbf0a0d34aa7c7352e152Laszlo HordosCONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
a3d0d3d37cb056c5c936727cd54153b22bdcf9caAndi Egloff
a3d0d3d37cb056c5c936727cd54153b22bdcf9caAndi EgloffCOMPONENT_POST_UNPACK_ACTION = \
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle ( cd $(COMPONENT_DIR) ; \
fe644a7302b3235c08aec5fd7992a329f2ee1364Laszlo Hordos tar xvf testsuite-$(COMPONENT_VERSION).tar.gz > /dev/null 2>&1 )
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff# sparc and x86 use different assemblers
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# Keep ASLR disabled (the default) for gcc 4.5; build often core dumps with ASLR
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCOMPONENT_BUILD_TARGETS=bootstrap
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienlebuild: $(BUILD_32)
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienleinstall: $(INSTALL_32)
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# To ensure that all tests that are expected to pass actually
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle# pass, we have to increase the stacksize limit to at least
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# 16384 Kb. Otherwise we'll get spurious failures in the test
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# harness (gcc.c-torture/compile/limits-exprparen.c and others).
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# With the soft stacksize limit set to 16384 we get very good
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# test results.
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Eglofftest:
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle ( cd $(BUILD_DIR_32)/gcc ; \
1d771da1e403bc4ac624aa6acf47416cb89c0f56Chad Kienle ulimit -Ss 16384 ; \
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle $(GMAKE) check )
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += developer/assembler
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += developer/gnu-binutils
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += library/gmp
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += library/mpc
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += library/mpfr
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += shell/ksh93
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += system/library
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += system/library/gcc-45-runtime
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += system/library/math
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleREQUIRED_PACKAGES += system/linker
f5908f0beda7b53325a52e5ea2266000bce2fe41Andi Egloff