author | Rich Burridge <rich.burridge@oracle.com> |
Thu, 29 Oct 2015 11:50:25 -0700 | |
changeset 5030 | 8a4221164865 |
parent 4339 | 6501cf9c29f9 |
child 5066 | 7e7b4d607ab6 |
permissions | -rw-r--r-- |
1727 | 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 |
# |
|
3817
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
21 |
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
1727 | 22 |
# |
23 |
export PARFAIT_BUILD=no |
|
24 |
||
3817
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
25 |
COMPILER=gcc |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
26 |
|
1727 | 27 |
include ../../make-rules/shared-macros.mk |
28 |
||
29 |
COMPONENT_NAME= gcc |
|
30 |
COMPONENT_VERSION= 4.8.2 |
|
31 |
COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
|
32 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
33 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
34 |
COMPONENT_ARCHIVE_HASH= \ |
|
35 |
sha256:2ea77114344a06c45dd5791275311e91d306545aa5ec9db31d24174f6965e880 |
|
36 |
COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
|
37 |
COMPONENT_BUGDB= utility/gnu-compiler |
|
38 |
||
1948
2d1537e7942d
18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents:
1727
diff
changeset
|
39 |
TPNO= 15448 |
2d1537e7942d
18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents:
1727
diff
changeset
|
40 |
|
3817
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
41 |
include $(WS_MAKE_RULES)/prep.mk |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
42 |
include $(WS_MAKE_RULES)/configure.mk |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
43 |
include $(WS_MAKE_RULES)/ips.mk |
1727 | 44 |
|
45 |
# The GNU compiler wants the GNU utilities. |
|
46 |
PATH=/usr/gnu/bin:/usr/bin:/usr/perl5/bin |
|
47 |
||
48 |
PARCH = $(MACH:i386=i386-pc) |
|
49 |
GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
|
50 |
||
51 |
PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
|
52 |
||
53 |
VERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION)) |
|
54 |
GCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS)) |
|
55 |
PKG_MACROS += GCC_VERSION=$(GCC_VERSION) |
|
56 |
PKG_MACROS += GCC_V=$(word 1,$(VERSION_NUMBERS))$(word 2,$(VERSION_NUMBERS)) |
|
57 |
PKG_MACROS += GCC_BASEDIR=usr/gcc/$(GCC_VERSION) |
|
58 |
||
59 |
CFLAGS.i386 = -mtune=opteron -march=opteron |
|
60 |
CFLAGS.sparc = -mtune=ultrasparc -mcpu=ultrasparc -mno-unaligned-doubles |
|
61 |
CFLAGS = -g -O2 |
|
62 |
CFLAGS += $(CFLAGS.$(MACH)) |
|
63 |
CXXFLAGS = -g -O2 |
|
64 |
CXXFLAGS += $(CFLAGS.$(MACH)) |
|
65 |
||
66 |
# direct binding causes various testsuite failures |
|
67 |
LD_B_DIRECT= |
|
68 |
||
69 |
# /usr/lib/ld/map.noexdata destroys Intel |
|
70 |
LD_MAP_NOEXDATA.i386= |
|
71 |
||
72 |
# /usr/lib/ld/map.noexbss destroys SPARC |
|
73 |
ifeq ($(MACH),sparc) |
|
74 |
LD_MAP_NOEXBSS= |
|
75 |
endif |
|
76 |
||
77 |
||
78 |
# for some reason the fixincludes target fails with bash on Solaris. |
|
79 |
CONFIG_SHELL = /bin/sh |
|
80 |
MAKESHELL = /bin/sh |
|
81 |
COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
|
82 |
COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL) |
|
83 |
||
84 |
CONFIGURE_PREFIX = /usr/gcc/4.8 |
|
85 |
||
86 |
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info |
|
87 |
CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
|
88 |
CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
|
89 |
CONFIGURE_OPTIONS += --enable-shared |
|
90 |
CONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp |
|
91 |
CONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr |
|
92 |
CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld |
|
93 |
||
94 |
CONFIGURE_ENV += PYTHON="$(PYTHON)" |
|
95 |
||
96 |
# sparc and x86 use different assemblers |
|
97 |
CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as |
|
98 |
CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as |
|
99 |
CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH)) |
|
100 |
||
101 |
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
102 |
CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)" |
|
103 |
||
104 |
COMPONENT_BUILD_TARGETS=bootstrap |
|
105 |
||
106 |
# compile python modules |
|
107 |
COMPONENT_POST_INSTALL_ACTION = \ |
|
108 |
( gfind $(PROTOUSRDIR) -name '*.py' | xargs -n 1 dirname | sort -u | \ |
|
109 |
xargs $(PYTHON) -m compileall ) |
|
110 |
# strip elves, strip ignores non-elf files |
|
111 |
COMPONENT_POST_INSTALL_ACTION += ; \ |
|
112 |
( gfind $(PROTOUSRDIR) -type f -perm /0111 | xargs /usr/bin/strip -x \ |
|
113 |
2>/dev/null ; exit 0 ) |
|
114 |
||
115 |
# ASLR has side-effects with libitm and libgomp. |
|
116 |
# Disable ASLR for now. |
|
117 |
ASLR_MODE=$(ASLR_DISABLE) |
|
118 |
||
2225
f064d3d3190d
20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents:
1948
diff
changeset
|
119 |
configure: $(CONFIGURE_32) |
f064d3d3190d
20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents:
1948
diff
changeset
|
120 |
|
1727 | 121 |
build: $(BUILD_32) |
122 |
||
123 |
install: $(INSTALL_32) |
|
124 |
||
125 |
# To ensure that all tests that are expected to pass actually |
|
126 |
# pass, we have to increase the stacksize limit to at least |
|
127 |
# 16MB. Otherwise we'll get spurious failures in the test |
|
128 |
# harness (gcc.c-torture/compile/limits-exprparen.c and others). |
|
129 |
# With the soft stacksize limit set to 16384 we get reasonably good |
|
130 |
# test results. |
|
131 |
COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384 |
|
132 |
COMPONENT_TEST_ARGS = -k -i |
|
133 |
COMPONENT_TEST_TARGETS = check check-target |
|
134 |
||
5030
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
135 |
COMPONENT_TEST_TRANSFORMS += \ |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
136 |
'-e "s|\(Test Run By\).*|\1|" ' \ |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
137 |
'-e "/\(Missing header fix: \).*/d" ' \ |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
138 |
'-e "/\(\\*\\*\\* complex.h\).*/d" ' \ |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
139 |
'-e "/\(\\*\\*\\* math.h\).*/d" ' \ |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
140 |
'-e "/\(\\*\\*\\* stdio.h\).*/d" ' |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
141 |
|
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
142 |
# Master test results are different between x86 and SPARC. |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
143 |
COMPONENT_TEST_MASTER = \ |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
144 |
$(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master |
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
145 |
|
1727 | 146 |
test: $(TEST_32) |
147 |
||
4339
6501cf9c29f9
21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents:
3817
diff
changeset
|
148 |
system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
6501cf9c29f9
21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents:
3817
diff
changeset
|
149 |
|
1727 | 150 |
|
3817
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
151 |
REQUIRED_PACKAGES += library/gmp |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
152 |
REQUIRED_PACKAGES += library/mpc |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
153 |
REQUIRED_PACKAGES += library/mpfr |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
154 |
REQUIRED_PACKAGES += shell/bash |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
155 |
REQUIRED_PACKAGES += shell/ksh93 |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
156 |
REQUIRED_PACKAGES += system/library |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
157 |
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
158 |
REQUIRED_PACKAGES += system/library/math |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
159 |
REQUIRED_PACKAGES += system/linker |