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#
5680N/A
5680N/A#
5346N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
246N/A#
5680N/ABUILD_BITS= 32
7102N/A
7102N/Aexport PARFAIT_BUILD=no
7102N/A
5680N/A# Build gcc with gcc
5680N/ACOMPILER= gcc
246N/Ainclude ../../make-rules/shared-macros.mk
246N/A
5786N/A# build with itself until it's gone
5786N/AGCC_ROOT = /usr/gcc/3.4
5786N/A
246N/ACOMPONENT_NAME= gcc
246N/ACOMPONENT_VERSION= 3.4.3
618N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
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
6002N/A# Bootstrapping problems. To be obsoleted soon, so do not publish.
6002N/Aifeq ($(BUILD_TYPE), evaluation)
6002N/ABUILD_32=
6002N/AINSTALL_32=
6002N/APUBLISH_STAMP=
6002N/Aendif
6002N/A
5680N/AINSTALL_TARGET=
5680N/Ainclude $(WS_MAKE_RULES)/gnu-component.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
5780N/ACFLAGS += -std=gnu89
5780N/A
6229N/A# gcc3 doesn't support -mincoming-stack-boundary, but doesn't need it either.
6229N/Agcc_STACK_ALIGN.i386.32 =
6229N/A
1120N/ACONFIGURE_PREFIX = /usr/gcc/3.4
5680N/ACONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info
246N/A
5680N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
5680N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(LD)
246N/ACONFIGURE_OPTIONS += --enable-languages='c,c++,f77,objc'
246N/ACONFIGURE_OPTIONS += --enable-shared
246N/A# sparc and x86 use different assemblers
5680N/ACONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=$(USRBINDIR)/as
5680N/ACONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=$(GNUBIN)/as
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
6057N/Aifneq ($(BUILD_TYPE), evaluation)
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
6057N/Aendif
246N/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/gcc-3-runtime
3817N/AREQUIRED_PACKAGES += system/library/math