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