16 # fields enclosed by brackets "[]" replaced with your own identifying |
16 # fields enclosed by brackets "[]" replaced with your own identifying |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
|
21 |
|
22 # |
21 # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
22 # |
24 # |
23 export PARFAIT_BUILD=no |
25 export PARFAIT_BUILD=no |
24 |
26 BUILD_BITS= 64 |
25 COMPILER=gcc |
27 COMPILER= gcc |
26 |
|
27 include ../../make-rules/shared-macros.mk |
28 include ../../make-rules/shared-macros.mk |
28 |
29 |
29 COMPONENT_NAME= gcc |
30 COMPONENT_NAME= gcc |
30 COMPONENT_VERSION= 5.3.0 |
31 COMPONENT_VERSION= 5.3.0 |
31 COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
32 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= \ |
33 COMPONENT_ARCHIVE_HASH= \ |
35 sha256:b7f5f56bd7db6f4fcaa95511dbf69fc596115b976b5352c06531c2fc95ece2f4 |
34 sha256:b7f5f56bd7db6f4fcaa95511dbf69fc596115b976b5352c06531c2fc95ece2f4 |
36 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
35 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
37 COMPONENT_BUGDB= utility/gnu-compiler |
36 COMPONENT_BUGDB= utility/gnu-compiler |
38 |
37 |
39 TPNO= 26089 |
38 TPNO= 26089 |
40 |
39 |
41 include $(WS_MAKE_RULES)/prep.mk |
40 # Use gcc's default flags instead of userland's. |
42 include $(WS_MAKE_RULES)/configure.mk |
41 CFLAGS= |
43 include $(WS_MAKE_RULES)/ips.mk |
42 CPPFLAGS= |
|
43 CXXFLAGS= |
|
44 |
|
45 include $(WS_MAKE_RULES)/common.mk |
44 |
46 |
45 # The GNU compiler wants the GNU utilities. |
47 # The GNU compiler wants the GNU utilities. |
46 PATH=/usr/gnu/bin:/usr/bin:/usr/perl5/bin |
48 PATH=$(GNUBIN):$(USRBINDIR):$(USRDIR)/perl5/bin |
47 |
49 |
48 PARCH = $(MACH64:amd64=x86_64-pc) |
50 PARCH = $(MACH64:amd64=x86_64-pc) |
49 GNU_ARCH = $(PARCH:sparc=sparcv9-sun)-solaris$(SOLARIS_VERSION) |
51 GNU_ARCH = $(PARCH:sparc=sparcv9-sun)-solaris$(SOLARIS_VERSION) |
50 |
52 |
51 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
53 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
60 LD_B_DIRECT= |
62 LD_B_DIRECT= |
61 |
63 |
62 # /usr/lib/ld/map.noexdata destroys Intel |
64 # /usr/lib/ld/map.noexdata destroys Intel |
63 LD_MAP_NOEXDATA.i386= |
65 LD_MAP_NOEXDATA.i386= |
64 |
66 |
65 # /usr/lib/ld/map.noexbss destroys SPARC |
67 # /usr/lib/ld/map.noexbss destroys SPARC |
66 ifeq ($(MACH),sparc) |
68 LD_MAP_NOEXBSS.sparc= |
67 LD_MAP_NOEXBSS= |
|
68 endif |
|
69 |
|
70 |
69 |
71 # for some reason the fixincludes target fails with bash on Solaris. |
70 # for some reason the fixincludes target fails with bash on Solaris. |
72 CONFIG_SHELL = /bin/sh |
71 CONFIG_SHELL = /bin/sh |
73 MAKESHELL = /bin/sh |
72 MAKESHELL = /bin/sh |
74 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
73 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
75 COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL) |
74 COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL) |
76 |
75 |
77 CONFIGURE_PREFIX = /usr/gcc/5.3 |
76 CONFIGURE_PREFIX = /usr/gcc/$(GCC_VERSION) |
|
77 CONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info |
78 |
78 |
79 # We are going to build the 64-bit version of the compiler and tools, but we |
79 # We are going to build the 64-bit version of the compiler and tools, but we |
80 # want it to install in the normal .../{bin|lib}/... locations. GCC will |
80 # want it to install in the normal .../{bin|lib}/... locations. GCC will |
81 # take care of building and putting 32/64 bit objects in the right place |
81 # take care of building and putting 32/64 bit objects in the right place |
82 # under there. |
82 # under there. |
83 CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin |
83 CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin |
84 CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib |
84 CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib |
85 |
85 |
86 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info |
86 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
87 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
87 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
88 CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
88 CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
89 CONFIGURE_OPTIONS += --enable-shared |
89 CONFIGURE_OPTIONS += --enable-shared |
90 CONFIGURE_OPTIONS += --enable-initfini-array |
90 CONFIGURE_OPTIONS += --enable-initfini-array |
91 CONFIGURE_OPTIONS += --disable-rpath |
91 CONFIGURE_OPTIONS += --disable-rpath |
92 CONFIGURE_OPTIONS += --with-system-zlib |
92 CONFIGURE_OPTIONS += --with-system-zlib |
93 CONFIGURE_OPTIONS += --with-build-config=no |
93 CONFIGURE_OPTIONS += --with-build-config=no |
94 CONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp |
94 CONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp |
95 CONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr |
95 CONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr |
96 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld |
96 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(USRBINDIR)/ld |
97 CONFIGURE_OPTIONS += --with-gnu-as --with-as=/usr/gnu/bin/as |
97 CONFIGURE_OPTIONS += --with-gnu-as --with-as=$(GNUBIN)/as |
98 |
98 |
99 # If the compiler used to build matches the compiler being built, there is no |
99 # If the compiler used to build matches the compiler being built, there is no |
100 # need for a 3 stage build. |
100 # need for a 3 stage build. |
101 ifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),) |
101 ifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),) |
102 CONFIGURE_OPTIONS += --disable-bootstrap |
102 CONFIGURE_OPTIONS += --disable-bootstrap |
110 CONFIGURE_OPTIONS += $(GNU_ARCH) |
110 CONFIGURE_OPTIONS += $(GNU_ARCH) |
111 |
111 |
112 |
112 |
113 CONFIGURE_ENV += PYTHON="$(PYTHON)" |
113 CONFIGURE_ENV += PYTHON="$(PYTHON)" |
114 |
114 |
115 CONFIGURE_ENV += CXX_FOR_BUILD="$(CXX) $(CC_BITS)" |
|
116 |
|
117 # compile python modules |
115 # compile python modules |
118 COMPONENT_POST_INSTALL_ACTION = \ |
116 COMPONENT_POST_INSTALL_ACTION = \ |
119 ( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \ |
117 ( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \ |
120 xargs -n 1 dirname | sort -u | \ |
118 xargs -n 1 dirname | sort -u | \ |
121 xargs $(PYTHON) -m compileall ) |
119 xargs $(PYTHON) -m compileall ) |
122 |
|
123 ASLR_MODE=$(ASLR_ENABLE) |
|
124 |
|
125 configure: $(CONFIGURE_64) |
|
126 |
|
127 build: $(BUILD_64) |
|
128 |
|
129 install: $(INSTALL_64) |
|
130 |
120 |
131 # To ensure that all tests that are expected to pass actually |
121 # To ensure that all tests that are expected to pass actually |
132 # pass, we have to increase the stacksize limit to at least |
122 # pass, we have to increase the stacksize limit to at least |
133 # 16MB. Otherwise we'll get spurious failures in the test |
123 # 16MB. Otherwise we'll get spurious failures in the test |
134 # harness (gcc.c-torture/compile/limits-exprparen.c and others). |
124 # harness (gcc.c-torture/compile/limits-exprparen.c and others). |
136 # test results. |
126 # test results. |
137 COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384 |
127 COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384 |
138 COMPONENT_TEST_ARGS = -k -i |
128 COMPONENT_TEST_ARGS = -k -i |
139 COMPONENT_TEST_TARGETS = check check-target |
129 COMPONENT_TEST_TARGETS = check check-target |
140 |
130 |
141 COMPONENT_TEST_ENV += TCL_LIBRARY="/usr/lib/tcl8.5" |
131 COMPONENT_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5" |
142 |
132 |
143 # We don't have DejaGNU in S11. |
133 # We don't have DejaGNU in S11. |
144 ifeq ($(OS_VERSION), 5.12) |
134 ifeq ($(OS_VERSION), 5.12) |
145 COMPONENT_TEST_ENV += DEJAGNULIBS="/usr/share/dejagnu" |
135 COMPONENT_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu" |
146 endif |
136 endif |
147 |
137 |
148 COMPONENT_TEST_TRANSFORMS += \ |
138 COMPONENT_TEST_TRANSFORMS += \ |
149 '-e "s|\(Test Run By\).*|\1|" ' \ |
139 '-e "s|\(Test Run By\).*|\1|" ' \ |
150 '-e "/\(Missing header fix: \).*/d" ' \ |
140 '-e "/\(Missing header fix: \).*/d" ' \ |
154 |
144 |
155 # Master test results are different between x86 and SPARC. |
145 # Master test results are different between x86 and SPARC. |
156 COMPONENT_TEST_MASTER = \ |
146 COMPONENT_TEST_MASTER = \ |
157 $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master |
147 $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master |
158 |
148 |
159 test: $(TEST_64) |
|
160 |
|
161 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
162 |
|
163 |
|
164 REQUIRED_PACKAGES += developer/test/dejagnu |
149 REQUIRED_PACKAGES += developer/test/dejagnu |
165 REQUIRED_PACKAGES += library/gmp |
150 REQUIRED_PACKAGES += library/gmp |
166 REQUIRED_PACKAGES += library/isl |
151 REQUIRED_PACKAGES += library/isl |
167 REQUIRED_PACKAGES += library/mpc |
152 REQUIRED_PACKAGES += library/mpc |
168 REQUIRED_PACKAGES += library/mpfr |
153 REQUIRED_PACKAGES += library/mpfr |
169 REQUIRED_PACKAGES += library/zlib |
154 REQUIRED_PACKAGES += library/zlib |
170 REQUIRED_PACKAGES += runtime/tcl-8 |
155 REQUIRED_PACKAGES += runtime/tcl-8 |
171 REQUIRED_PACKAGES += shell/bash |
156 REQUIRED_PACKAGES += shell/bash |
172 REQUIRED_PACKAGES += shell/ksh93 |
157 REQUIRED_PACKAGES += shell/ksh93 |
173 REQUIRED_PACKAGES += system/library |
|
174 REQUIRED_PACKAGES += system/library/math |
158 REQUIRED_PACKAGES += system/library/math |