Makefile revision 1273
906N/A#
906N/A# CDDL HEADER START
906N/A#
906N/A# The contents of this file are subject to the terms of the
906N/A# Common Development and Distribution License (the "License").
906N/A# You may not use this file except in compliance with the License.
906N/A#
906N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
906N/A# or http://www.opensolaris.org/os/licensing.
906N/A# See the License for the specific language governing permissions
906N/A# and limitations under the License.
906N/A#
906N/A# When distributing Covered Code, include this CDDL HEADER in each
906N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
906N/A# If applicable, add the following below this CDDL HEADER, with the
906N/A# fields enclosed by brackets "[]" replaced with your own identifying
906N/A# information: Portions Copyright [yyyy] [name of copyright owner]
906N/A#
906N/A# CDDL HEADER END
906N/A#
906N/A# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3595N/A#
906N/Ainclude ../../make-rules/shared-macros.mk
906N/A
3817N/ACOMPONENT_NAME= gcc
3817N/ACOMPONENT_VERSION= 3.4.3
906N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
906N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
906N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4260N/A# unfortunately we have our own "special" tarball and not the community version, so use that.
1799N/ACOMPONENT_ARCHIVE_HASH= \
1799N/A sha256:3ab488fe2df01bf54a57acd70e745266e19232edacf77512f77655296748e7a0
906N/ACOMPONENT_ARCHIVE_URL= $(EXTERNAL_ARCHIVE_MIRROR)/$(SOURCE_ARCHIVE)
906N/ACOMPONENT_BUGDB= utility/gnu-compiler
4260N/A
1799N/Ainclude ../../make-rules/prep.mk
1799N/Ainclude ../../make-rules/configure.mk
906N/Ainclude ../../make-rules/ips.mk
4260N/A
2899N/APARCH = $(MACH:i386=i386-pc)
1389N/AGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
1389N/A
2410N/APKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
906N/A
3936N/A# we build gcc with gcc
3936N/ACOMPILER = gcc
3936N/A
3936N/A# CC_BITS may get in the way
3470N/ACC_BITS=
4744N/A
4744N/A# enabling this causes libstdc++ to break
3817N/ALD_B_DIRECT=
3817N/A
3817N/ACONFIGURE_PREFIX = /usr/sfw
906N/A
3703N/A# we need to override CONFIGURE_OPTIONS because GCC uses a configure that
4744N/A# can't deal with CC as an argument
3703N/ACONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
3703N/ACONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
4744N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
3703N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
1389N/ACONFIGURE_OPTIONS += --enable-languages='c,c++,f77,objc'
906N/ACONFIGURE_OPTIONS += --enable-shared
906N/A# sparc and x86 use different assemblers
906N/ACONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as
906N/ACONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
3470N/ACONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
3470N/A
3470N/ACONFIGURE_ENV += CC="$(CC)"
3470N/ACONFIGURE_ENV += CFLAGS="$(CFLAGS)"
3470N/A
3470N/ACOMPONENT_BUILD_ENV += STAGE1_CFLAGS="$(CFLAGS)"
3470N/ACOMPONENT_BUILD_ENV += CFLAGS_FOR_TARGET="$(CFLAGS)"
3470N/ACOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
3470N/ACOMPONENT_BUILD_TARGETS = bootstrap
3470N/A
3470N/A# common targets
3595N/Abuild: $(BUILD_32)
3470N/A
3470N/A$(PROTO_DIR)/.sedded: $(INSTALL_32)
3775N/A (cd $(@D) ; for file in libstdc++.la libsupc++.la ; do \
3775N/A $(MV) usr/sfw/lib/$$file usr/sfw/lib/$$file.orig ; \
3775N/A sed -e "s;\\(dependency_libs=\\).*;\\1' -L/usr/sfw/lib -lgcc_s -lm';" usr/sfw/lib/$$file.orig >usr/sfw/lib/$$file ; \
3775N/A $(MV) usr/sfw/lib/$(MACH64)/$$file usr/sfw/lib/$(MACH64)/$$file.orig ; \
3470N/A 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 ; \
906N/A done)
1389N/A $(TOUCH) $@
1389N/A
1389N/Ainstall: $(PROTO_DIR)/.sedded
906N/A
3703N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
3703N/A
3703N/Atest: $(TEST_32)
3703N/A
906N/Ainclude ../../make-rules/depend.mk
906N/A