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