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