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) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
22 # |
24 # |
|
25 BUILD_BITS= 32 |
23 include ../../make-rules/shared-macros.mk |
26 include ../../make-rules/shared-macros.mk |
24 |
27 |
25 COMPONENT_NAME= gcc |
28 COMPONENT_NAME= gcc |
26 COMPONENT_VERSION= 4.7.3 |
29 COMPONENT_VERSION= 4.7.3 |
27 COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
30 COMPONENT_PROJECT_URL= http://gcc.gnu.org/ |
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
30 COMPONENT_ARCHIVE_HASH= \ |
31 COMPONENT_ARCHIVE_HASH= \ |
31 sha256:34a273937eb63ee710784b65bcf9fb3cfcd79d02848f80c75f8254abd14c79c8 |
32 sha256:34a273937eb63ee710784b65bcf9fb3cfcd79d02848f80c75f8254abd14c79c8 |
32 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
33 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE) |
33 COMPONENT_BUGDB= utility/gnu-compiler |
34 COMPONENT_BUGDB= utility/gnu-compiler |
34 |
35 |
35 TPNO= 14467 |
36 TPNO= 14467 |
36 |
37 |
37 include $(WS_MAKE_RULES)/prep.mk |
38 include $(WS_MAKE_RULES)/gnu-component.mk |
38 include $(WS_MAKE_RULES)/configure.mk |
|
39 include $(WS_MAKE_RULES)/ips.mk |
|
40 |
39 |
41 # The GNU compiler wants the GNU utilities. |
40 # The GNU compiler wants the GNU utilities. |
42 PATH=/usr/gnu/bin:/usr/bin:/usr/perl5/bin |
41 PATH=$(GNUBIN):$(USRBINDIR):/usr/perl5/bin |
43 |
42 |
44 PARCH = $(MACH:i386=i386-pc) |
43 PARCH = $(MACH:i386=i386-pc) |
45 GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
44 GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION) |
46 |
45 |
47 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
46 PKG_MACROS += GNU_ARCH="$(GNU_ARCH)" |
66 |
65 |
67 # /usr/lib/ld/map.noexdata destroys Intel |
66 # /usr/lib/ld/map.noexdata destroys Intel |
68 LD_MAP_NOEXDATA.i386= |
67 LD_MAP_NOEXDATA.i386= |
69 |
68 |
70 # /usr/lib/ld/map.noexbss destroys SPARC |
69 # /usr/lib/ld/map.noexbss destroys SPARC |
71 ifeq ($(MACH),sparc) |
70 LD_MAP_NOEXBSS.sparc= |
72 LD_MAP_NOEXBSS= |
|
73 endif |
|
74 |
71 |
75 # for some reason the fixincludes target fails with bash on Solaris. |
72 # for some reason the fixincludes target fails with bash on Solaris. |
76 CONFIG_SHELL = /bin/sh |
73 CONFIG_SHELL = /bin/sh |
77 MAKESHELL = /bin/sh |
74 MAKESHELL = /bin/sh |
78 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
75 COMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL) |
79 COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL) |
76 COMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL) |
80 |
77 |
81 CONFIGURE_PREFIX = /usr/gcc/4.7 |
78 CONFIGURE_PREFIX = /usr/gcc/4.7 |
|
79 CONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info |
82 |
80 |
83 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/share/info |
81 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
84 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
82 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
85 CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
83 CONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc" |
86 CONFIGURE_OPTIONS += --enable-shared |
84 CONFIGURE_OPTIONS += --enable-shared |
87 CONFIGURE_OPTIONS += --with-gmp-include=/usr/include/gmp |
85 CONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp |
88 CONFIGURE_OPTIONS += --with-mpfr-include=/usr/include/mpfr |
86 CONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr |
89 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=/usr/bin/ld |
87 CONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(LD) |
90 CONFIGURE_OPTIONS += --with-isl=no |
88 CONFIGURE_OPTIONS += --with-isl=no |
91 CONFIGURE_OPTIONS += --with-cloog=no |
89 CONFIGURE_OPTIONS += --with-cloog=no |
92 |
90 |
93 CONFIGURE_ENV += PYTHON="$(PYTHON)" |
91 CONFIGURE_ENV += PYTHON="$(PYTHON)" |
94 |
92 |
95 # sparc and x86 use different assemblers |
93 # sparc and x86 use different assemblers |
96 CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=/usr/bin/as |
94 CONFIGURE_OPTIONS.sparc += --without-gnu-as --with-as=$(USRBINDIR)/as |
97 CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=/usr/gnu/bin/as |
95 CONFIGURE_OPTIONS.i386 += --with-gnu-as --with-as=$(GNUBIN)/as |
98 CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH)) |
|
99 |
|
100 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
101 CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)" |
|
102 |
96 |
103 COMPONENT_BUILD_TARGETS=bootstrap |
97 COMPONENT_BUILD_TARGETS=bootstrap |
104 |
98 |
105 # compile python modules |
99 # compile python modules |
106 COMPONENT_POST_INSTALL_ACTION = \ |
100 COMPONENT_POST_INSTALL_ACTION = \ |
113 |
107 |
114 # ASLR has side-effects with libitm and libgomp. |
108 # ASLR has side-effects with libitm and libgomp. |
115 # Disable ASLR for now. |
109 # Disable ASLR for now. |
116 ASLR_MODE=$(ASLR_DISABLE) |
110 ASLR_MODE=$(ASLR_DISABLE) |
117 |
111 |
118 configure: $(CONFIGURE_32) |
|
119 |
|
120 build: $(BUILD_32) |
|
121 |
|
122 install: $(INSTALL_32) |
|
123 |
|
124 # To ensure that all tests that are expected to pass actually |
112 # To ensure that all tests that are expected to pass actually |
125 # pass, we have to increase the stacksize limit to at least |
113 # pass, we have to increase the stacksize limit to at least |
126 # 16MB. Otherwise we'll get spurious failures in the test |
114 # 16MB. Otherwise we'll get spurious failures in the test |
127 # harness (gcc.c-torture/compile/limits-exprparen.c and others). |
115 # harness (gcc.c-torture/compile/limits-exprparen.c and others). |
128 # With the soft stacksize limit set to 16384 we get reasonably good |
116 # With the soft stacksize limit set to 16384 we get reasonably good |
129 # test results. |
117 # test results. |
130 COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384 |
118 COMPONENT_PRE_TEST_ACTION = ulimit -Ss 16384 |
131 COMPONENT_TEST_ARGS = -k -i |
119 COMPONENT_TEST_ARGS = -k -i |
132 COMPONENT_TEST_TARGETS = check check-target |
120 COMPONENT_TEST_TARGETS = check check-target |
133 |
121 |
134 test: $(TEST_32) |
|
135 |
|
136 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
137 |
|
138 |
122 |
139 REQUIRED_PACKAGES += library/gmp |
123 REQUIRED_PACKAGES += library/gmp |
140 REQUIRED_PACKAGES += library/mpc |
124 REQUIRED_PACKAGES += library/mpc |
141 REQUIRED_PACKAGES += library/mpfr |
125 REQUIRED_PACKAGES += library/mpfr |
142 REQUIRED_PACKAGES += system/library |
|
143 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
126 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
144 REQUIRED_PACKAGES += system/library/math |
127 REQUIRED_PACKAGES += system/library/math |