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