Makefile revision 246
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater# CDDL HEADER START
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater#
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater# The contents of this file are subject to the terms of the
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater# Common Development and Distribution License (the "License").
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# You may not use this file except in compliance with the License.
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater#
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater# or http://www.opensolaris.org/os/licensing.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# See the License for the specific language governing permissions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and limitations under the License.
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# When distributing Covered Code, include this CDDL HEADER in each
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# If applicable, add the following below this CDDL HEADER, with the
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater# CDDL HEADER END
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
04eba969cb9a54bbda2896db2067c07b2ac5ba16Automatic Updaterinclude ../../make-rules/shared-macros.mk
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_NAME= gcc
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCOMPONENT_VERSION= 3.4.3
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# unfortunately we have our own "special" tarball and not the community version, so use that.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCOMPONENT_ARCHIVE_HASH= sha1:f7a27d5aeb07748eb6e924abfcfcf469c378b13e
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCOMPONENT_ARCHIVE_URL= http://static.opensolaris.org/tarball/userland/$(COMPONENT_ARCHIVE)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsinclude ../../make-rules/prep.mk
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoninclude ../../make-rules/configure.mk
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterinclude ../../make-rules/ips.mk
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
fc3576328379e813ccf6b3a6e66d9bb701a79c83Automatic UpdaterPARCH = $(MACH:i386=i386-pc)
298c514fff250c1a147176cfbbc1c0ca441d1ea5Automatic UpdaterGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
bbb069be941f649228760edcc241122933c066d2Automatic UpdaterPKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater# we build gcc with gcc
9d330c054e02f52cefd8dc0e71550b0fe07e077eAutomatic UpdaterCOMPILER = gcc
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
ca904804e43f663f08eb1ac9d6d617930b9a3cd3Automatic Updater# CC_BITS may get in the way
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCC_BITS=
3a6600c8d319275d73c36eb625f77103cd83e824Automatic Updater
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsCONFIGURE_PREFIX = /usr/sfw
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# we need to override CONFIGURE_OPTIONS because GCC uses a configure that
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# can't deal with CC as an argument
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --enable-languages='c,c++,f77,objc'
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCONFIGURE_OPTIONS += --enable-shared
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# sparc and x86 use different assemblers
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/ccs/bin/as
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic UpdaterCONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_ENV += CC="$(CC)"
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_BUILD_ENV += STAGE1_CFLAGS="$(CFLAGS)"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_BUILD_ENV += CFLAGS_FOR_TARGET="$(CFLAGS)"
6f046a065e5543f8cd7e2f24991c65d2372f4c8dMark AndrewsCOMPONENT_BUILD_TARGETS = bootstrap
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# common targets
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsbuild: $(BUILD_32)
a8644ebab678a1de66cbfaabb513651a739958afAutomatic Updater
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrewsinstall: $(INSTALL_32)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewstest: $(TEST_32)
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsinclude ../../make-rules/depend.mk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson