author | Laszlo Peter <laszlo.peter@oracle.com> |
Wed, 07 Sep 2016 14:48:26 -0700 | |
changeset 6769 | b3c4d8201144 |
parent 5783 | f6513c88489e |
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 |
# |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
21 |
|
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
22 |
# |
5348
623c86e1e386
22599369 gcc3, gcc48, and gcc49 should specify bits
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5144
diff
changeset
|
23 |
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
1727 | 24 |
# |
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
25 |
BUILD_BITS= 32 |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
26 |
COMPILER= gcc |
1727 | 27 |
export PARFAIT_BUILD=no |
28 |
include ../../make-rules/shared-macros.mk |
|
29 |
||
30 |
COMPONENT_NAME= gcc |
|
31 |
COMPONENT_VERSION= 4.8.2 |
|
32 |
COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
|
33 |
COMPONENT_ARCHIVE_HASH= \ |
|
34 |
sha256:2ea77114344a06c45dd5791275311e91d306545aa5ec9db31d24174f6965e880 |
|
35 |
COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
|
36 |
COMPONENT_BUGDB= utility/gnu-compiler |
|
37 |
||
1948
2d1537e7942d
18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents:
1727
diff
changeset
|
38 |
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
|
39 |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
40 |
include $(WS_MAKE_RULES)/gnu-component.mk |
1727 | 41 |
|
42 |
# The GNU compiler wants the GNU utilities. |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
43 |
PATH=$(GNUBIN):$(USRBINDIR):/usr/perl5/bin |
1727 | 44 |
|
45 |
PARCH = $(MACH:i386=i386-pc) |
|
46 |
GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
|
47 |
||
48 |
PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
|
49 |
||
50 |
VERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION)) |
|
51 |
GCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS)) |
|
52 |
PKG_MACROS += GCC_VERSION=$(GCC_VERSION) |
|
53 |
PKG_MACROS += GCC_V=$(word 1,$(VERSION_NUMBERS))$(word 2,$(VERSION_NUMBERS)) |
|
54 |
PKG_MACROS += GCC_BASEDIR=usr/gcc/$(GCC_VERSION) |
|
55 |
||
5348
623c86e1e386
22599369 gcc3, gcc48, and gcc49 should specify bits
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5144
diff
changeset
|
56 |
# Make sure to pass -m32/64 any time the installed GCC is used |
623c86e1e386
22599369 gcc3, gcc48, and gcc49 should specify bits
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5144
diff
changeset
|
57 |
CC += $(CC_BITS) |
623c86e1e386
22599369 gcc3, gcc48, and gcc49 should specify bits
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5144
diff
changeset
|
58 |
CXX += $(CC_BITS) |
623c86e1e386
22599369 gcc3, gcc48, and gcc49 should specify bits
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5144
diff
changeset
|
59 |
|
5783
f6513c88489e
23059370 gcc48 should specify the C standard to use when building
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5682
diff
changeset
|
60 |
# Specify the C Standard to use when building |
f6513c88489e
23059370 gcc48 should specify the C standard to use when building
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5682
diff
changeset
|
61 |
CC += -std=gnu89 |
f6513c88489e
23059370 gcc48 should specify the C standard to use when building
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5682
diff
changeset
|
62 |
|
1727 | 63 |
CFLAGS.i386 = -mtune=opteron -march=opteron |
64 |
CFLAGS.sparc = -mtune=ultrasparc -mcpu=ultrasparc -mno-unaligned-doubles |
|
65 |
CFLAGS = -g -O2 |
|
66 |
CFLAGS += $(CFLAGS.$(MACH)) |
|
67 |
CXXFLAGS = -g -O2 |
|
68 |
CXXFLAGS += $(CFLAGS.$(MACH)) |
|
69 |
||
70 |
# direct binding causes various testsuite failures |
|
71 |
LD_B_DIRECT= |
|
72 |
||
73 |
# /usr/lib/ld/map.noexdata destroys Intel |
|
74 |
LD_MAP_NOEXDATA.i386= |
|
75 |
||
76 |
# /usr/lib/ld/map.noexbss destroys SPARC |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
77 |
LD_MAP_NOEXBSS.sparc= |
1727 | 78 |
|
79 |
||
80 |
# for some reason the fixincludes target fails with bash on Solaris. |
|
81 |
CONFIG_SHELL = /bin/sh |
|
82 |
MAKESHELL = /bin/sh |
|
83 |
COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
|
84 |
COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL) |
|
85 |
||
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
86 |
CONFIGURE_PREFIX = /usr/gcc/4.8 |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
87 |
CONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info |
1727 | 88 |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
89 |
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
1727 | 90 |
CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
91 |
CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
|
92 |
CONFIGURE_OPTIONS += --enable-shared |
|
5144
2d220aefcb53
22219474 gcc 4.8 build with binutils 2.25.1 fails bootstrap comparsion on sparc
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
5066
diff
changeset
|
93 |
CONFIGURE_OPTIONS += --with-build-config=no |
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
94 |
CONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
95 |
CONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
96 |
CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(LD) |
5359
57359db17e2a
21459215 introduce ClooG in Solaris
Stefan Teleman <stefan.teleman@oracle.com>
parents:
5348
diff
changeset
|
97 |
CONFIGURE_OPTIONS += --with-isl=no |
57359db17e2a
21459215 introduce ClooG in Solaris
Stefan Teleman <stefan.teleman@oracle.com>
parents:
5348
diff
changeset
|
98 |
CONFIGURE_OPTIONS += --with-cloog=no |
1727 | 99 |
|
100 |
CONFIGURE_ENV += PYTHON="$(PYTHON)" |
|
101 |
||
102 |
# sparc and x86 use different assemblers |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
103 |
CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=$(USRBINDIR)/as |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5359
diff
changeset
|
104 |
CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=$(GNUBIN)/as |
1727 | 105 |
|
106 |
COMPONENT_BUILD_TARGETS=bootstrap |
|
107 |
||
108 |
# compile python modules |
|
109 |
COMPONENT_POST_INSTALL_ACTION = \ |
|
110 |
( gfind $(PROTOUSRDIR) -name '*.py' | xargs -n 1 dirname | sort -u | \ |
|
111 |
xargs $(PYTHON) -m compileall ) |
|
112 |
# strip elves, strip ignores non-elf files |
|
113 |
COMPONENT_POST_INSTALL_ACTION += ; \ |
|
114 |
( gfind $(PROTOUSRDIR) -type f -perm /0111 | xargs /usr/bin/strip -x \ |
|
115 |
2>/dev/null ; exit 0 ) |
|
116 |
||
117 |
# ASLR has side-effects with libitm and libgomp. |
|
118 |
# Disable ASLR for now. |
|
119 |
ASLR_MODE=$(ASLR_DISABLE) |
|
120 |
||
121 |
# To ensure that all tests that are expected to pass actually |
|
122 |
# pass, we have to increase the stacksize limit to at least |
|
123 |
# 16MB. Otherwise we'll get spurious failures in the test |
|
124 |
# harness (gcc.c-torture/compile/limits-exprparen.c and others). |
|
125 |
# With the soft stacksize limit set to 16384 we get reasonably good |
|
126 |
# test results. |
|
127 |
COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384 |
|
128 |
COMPONENT_TEST_ARGS = -k -i |
|
129 |
COMPONENT_TEST_TARGETS = check check-target |
|
130 |
||
5030
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
131 |
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
|
132 |
'-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
|
133 |
'-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
|
134 |
'-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
|
135 |
'-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
|
136 |
'-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
|
137 |
|
8a4221164865
20460325 GNU-COMPILER should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents:
4339
diff
changeset
|
138 |
# 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
|
139 |
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
|
140 |
$(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
|
141 |
|
1727 | 142 |
|
3817
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
143 |
REQUIRED_PACKAGES += library/gmp |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
144 |
REQUIRED_PACKAGES += library/mpc |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
145 |
REQUIRED_PACKAGES += library/mpfr |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
146 |
REQUIRED_PACKAGES += shell/bash |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
147 |
REQUIRED_PACKAGES += shell/ksh93 |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
148 |
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
|
149 |
REQUIRED_PACKAGES += system/library/math |