|
1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
4 # The contents of this file are subject to the terms of the |
|
5 # Common Development and Distribution License (the "License"). |
|
6 # You may not use this file except in compliance with the License. |
|
7 # |
|
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 # or http://www.opensolaris.org/os/licensing. |
|
10 # See the License for the specific language governing permissions |
|
11 # and limitations under the License. |
|
12 # |
|
13 # When distributing Covered Code, include this CDDL HEADER in each |
|
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 # If applicable, add the following below this CDDL HEADER, with the |
|
16 # fields enclosed by brackets "[]" replaced with your own identifying |
|
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 include ../../make-rules/shared-macros.mk |
|
24 |
|
25 COMPONENT_NAME= gcc |
|
26 COMPONENT_VERSION= 3.4.3 |
|
27 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
28 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
29 # unfortunately we have our own "special" tarball and not the community version, so use that. |
|
30 COMPONENT_ARCHIVE_HASH= sha1:f7a27d5aeb07748eb6e924abfcfcf469c378b13e |
|
31 COMPONENT_ARCHIVE_URL= http://static.opensolaris.org/tarball/userland/$(COMPONENT_ARCHIVE) |
|
32 |
|
33 include ../../make-rules/prep.mk |
|
34 include ../../make-rules/configure.mk |
|
35 include ../../make-rules/ips.mk |
|
36 |
|
37 PARCH = $(MACH:i386=i386-pc) |
|
38 GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
|
39 |
|
40 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
|
41 |
|
42 # we build gcc with gcc |
|
43 COMPILER = gcc |
|
44 |
|
45 # CC_BITS may get in the way |
|
46 CC_BITS= |
|
47 |
|
48 CONFIGURE_PREFIX = /usr/sfw |
|
49 |
|
50 # we need to override CONFIGURE_OPTIONS because GCC uses a configure that |
|
51 # can't deal with CC as an argument |
|
52 CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX) |
|
53 CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR) |
|
54 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info |
|
55 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld |
|
56 CONFIGURE_OPTIONS += --enable-languages='c,c++,f77,objc' |
|
57 CONFIGURE_OPTIONS += --enable-shared |
|
58 # sparc and x86 use different assemblers |
|
59 CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/ccs/bin/as |
|
60 CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as |
|
61 CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH)) |
|
62 |
|
63 CONFIGURE_ENV += CC="$(CC)" |
|
64 CONFIGURE_ENV += CFLAGS="$(CFLAGS)" |
|
65 |
|
66 COMPONENT_BUILD_ENV += STAGE1_CFLAGS="$(CFLAGS)" |
|
67 COMPONENT_BUILD_ENV += CFLAGS_FOR_TARGET="$(CFLAGS)" |
|
68 COMPONENT_BUILD_TARGETS = bootstrap |
|
69 |
|
70 # common targets |
|
71 build: $(BUILD_32) |
|
72 |
|
73 install: $(INSTALL_32) |
|
74 |
|
75 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
76 |
|
77 test: $(TEST_32) |
|
78 |
|
79 include ../../make-rules/depend.mk |