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