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