Makefile revision 5346
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#
5346N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
246N/A#
246N/Ainclude ../../make-rules/shared-macros.mk
246N/A
3817N/A# Build gcc with gcc
3817N/ACOMPILER = gcc
3817N/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)
1258N/ACOMPONENT_BUGDB= utility/gnu-compiler
246N/A
2899N/ATPNO= 17028
2899N/A
3817N/Ainclude $(WS_MAKE_RULES)/prep.mk
3817N/Ainclude $(WS_MAKE_RULES)/configure.mk
3817N/Ainclude $(WS_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
5346N/A# Make sure to pass -m32/64 any time the installed GCC is used
5346N/ACC += -m$(BITS)
5346N/ACXX += -m$(BITS)
5346N/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
1120N/ACONFIGURE_PREFIX = /usr/gcc/3.4
246N/A
5123N/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/A
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
3477N/Aconfigure: $(CONFIGURE_32)
3477N/A
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 \
1120N/A $(MV) usr/gcc/3.4/lib/$$file usr/gcc/3.4/lib/$$file.orig ; \
1120N/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 ; \
1120N/A $(MV) usr/gcc/3.4/lib/$(MACH64)/$$file usr/gcc/3.4/lib/$(MACH64)/$$file.orig ; \
1120N/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 ; \
378N/A done)
378N/A $(TOUCH) $@
378N/A
378N/Ainstall: $(PROTO_DIR)/.sedded
246N/A
246N/Atest: $(TEST_32)
246N/A
4337N/Asystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
4337N/A
3817N/A
3817N/AREQUIRED_PACKAGES += developer/assembler
3817N/AREQUIRED_PACKAGES += developer/gnu-binutils
3817N/AREQUIRED_PACKAGES += developer/lexer/flex
3817N/AREQUIRED_PACKAGES += developer/parser/bison
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/library
3817N/AREQUIRED_PACKAGES += system/library/gcc-3-runtime
3817N/AREQUIRED_PACKAGES += system/library/math