Makefile revision 825
842ae4bd224140319ae7feec1872b93dfd491143fielding#
842ae4bd224140319ae7feec1872b93dfd491143fielding# CDDL HEADER START
842ae4bd224140319ae7feec1872b93dfd491143fielding#
842ae4bd224140319ae7feec1872b93dfd491143fielding# The contents of this file are subject to the terms of the
842ae4bd224140319ae7feec1872b93dfd491143fielding# Common Development and Distribution License (the "License").
842ae4bd224140319ae7feec1872b93dfd491143fielding# You may not use this file except in compliance with the License.
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse#
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse# or http://www.opensolaris.org/os/licensing.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd# See the License for the specific language governing permissions
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd# and limitations under the License.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd#
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd# When distributing Covered Code, include this CDDL HEADER in each
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd# If applicable, add the following below this CDDL HEADER, with the
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd# fields enclosed by brackets "[]" replaced with your own identifying
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh# information: Portions Copyright [yyyy] [name of copyright owner]
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh#
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh# CDDL HEADER END
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh#
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh#
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianhinclude ../../make-rules/shared-macros.mk
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianhCOMPONENT_NAME= gcc
60c1c6006c048e5009ae91fa2ba4cd35e5f78e10rseCOMPONENT_VERSION= 3.4.3
60c1c6006c048e5009ae91fa2ba4cd35e5f78e10rseCOMPONENT_PROJECT_URL= http://gcc.gnu.org/
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrseCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrseCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
9603c496d9e1dbc213141ca64378df5fa45a9aa4dougm# unfortunately we have our own "special" tarball and not the community version, so use that.
af5dd1c93d2185f7e37f8783c593b64fd35ea8a6wroweCOMPONENT_ARCHIVE_HASH= sha1:f7a27d5aeb07748eb6e924abfcfcf469c378b13e
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianhCOMPONENT_ARCHIVE_URL= $(EXTERNAL_ARCHIVE_MIRROR)/$(SOURCE_ARCHIVE)
70535d6421eb979ac79d8f49d31cd94d75dd8b2fjorton
9603c496d9e1dbc213141ca64378df5fa45a9aa4dougminclude ../../make-rules/prep.mk
9603c496d9e1dbc213141ca64378df5fa45a9aa4dougminclude ../../make-rules/configure.mk
9603c496d9e1dbc213141ca64378df5fa45a9aa4dougminclude ../../make-rules/ips.mk
9603c496d9e1dbc213141ca64378df5fa45a9aa4dougm
9603c496d9e1dbc213141ca64378df5fa45a9aa4dougmPARCH = $(MACH:i386=i386-pc)
93be7f634f9ab62b564793ca2872d460190a02badreidGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
742318b93e89c311f66b55f426c4d9cf2c14628bjim
93be7f634f9ab62b564793ca2872d460190a02badreidPKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
742318b93e89c311f66b55f426c4d9cf2c14628bjim
93be7f634f9ab62b564793ca2872d460190a02badreid# we build gcc with gcc
93be7f634f9ab62b564793ca2872d460190a02badreidCOMPILER = gcc
93be7f634f9ab62b564793ca2872d460190a02badreid
93be7f634f9ab62b564793ca2872d460190a02badreid# CC_BITS may get in the way
93be7f634f9ab62b564793ca2872d460190a02badreidCC_BITS=
93be7f634f9ab62b564793ca2872d460190a02badreid
93be7f634f9ab62b564793ca2872d460190a02badreid# enabling this causes libstdc++ to break
93be7f634f9ab62b564793ca2872d460190a02badreidLD_B_DIRECT=
628cf3411e8a6d09e27b3666312e43832dda93f3jorton
93be7f634f9ab62b564793ca2872d460190a02badreidCONFIGURE_PREFIX = /usr/sfw
628cf3411e8a6d09e27b3666312e43832dda93f3jorton
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh# we need to override CONFIGURE_OPTIONS because GCC uses a configure that
e03ae1e67ed1e9438db0343bcf3c4f30be6d3d9djorton# can't deal with CC as an argument
e03ae1e67ed1e9438db0343bcf3c4f30be6d3d9djortonCONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
e03ae1e67ed1e9438db0343bcf3c4f30be6d3d9djortonCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianhCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
70535d6421eb979ac79d8f49d31cd94d75dd8b2fjortonCONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
70535d6421eb979ac79d8f49d31cd94d75dd8b2fjortonCONFIGURE_OPTIONS += --enable-languages='c,c++,f77,objc'
9cb81d96f6b556cec1aa456191f43f7932aabaaedougmCONFIGURE_OPTIONS += --enable-shared
9cb81d96f6b556cec1aa456191f43f7932aabaaedougm# sparc and x86 use different assemblers
9cb81d96f6b556cec1aa456191f43f7932aabaaedougmCONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as
621bd763d2e4d32f19013ac8b76b375b5a01851fdougmCONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
621bd763d2e4d32f19013ac8b76b375b5a01851fdougmCONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
60c1c6006c048e5009ae91fa2ba4cd35e5f78e10rse
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianhCONFIGURE_ENV += CC="$(CC)"
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
COMPONENT_BUILD_ENV += STAGE1_CFLAGS="$(CFLAGS)"
COMPONENT_BUILD_ENV += CFLAGS_FOR_TARGET="$(CFLAGS)"
COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
COMPONENT_BUILD_TARGETS = bootstrap
# common targets
build: $(BUILD_32)
$(PROTO_DIR)/.sedded: $(INSTALL_32)
(cd $(@D) ; for file in libstdc++.la libsupc++.la ; do \
$(MV) usr/sfw/lib/$$file usr/sfw/lib/$$file.orig ; \
sed -e "s;\\(dependency_libs=\\).*;\\1' -L/usr/sfw/lib -lgcc_s -lm';" usr/sfw/lib/$$file.orig >usr/sfw/lib/$$file ; \
$(MV) usr/sfw/lib/$(MACH64)/$$file usr/sfw/lib/$(MACH64)/$$file.orig ; \
sed -e "s;\\(dependency_libs=\\).*;\\1' -L/usr/sfw/lib/$(MACH64) -lgcc_s -lm';" usr/sfw/lib/$(MACH64)/$$file.orig >usr/sfw/lib/$(MACH64)/$$file ; \
done)
$(TOUCH) $@
install: $(PROTO_DIR)/.sedded
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
test: $(TEST_32)
include ../../make-rules/depend.mk