Cross Reference: /solaris-userland/components/gcc4/Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
110N/A#
110N/A# CDDL HEADER START
110N/A#
110N/A# The contents of this file are subject to the terms of the
110N/A# Common Development and Distribution License (the "License").
110N/A# You may not use this file except in compliance with the License.
110N/A#
110N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
110N/A# or http://www.opensolaris.org/os/licensing.
110N/A# See the License for the specific language governing permissions
110N/A# and limitations under the License.
110N/A#
110N/A# When distributing Covered Code, include this CDDL HEADER in each
110N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
110N/A# If applicable, add the following below this CDDL HEADER, with the
110N/A# fields enclosed by brackets "[]" replaced with your own identifying
110N/A# information: Portions Copyright [yyyy] [name of copyright owner]
110N/A#
110N/A# CDDL HEADER END
110N/A#
5680N/A
5680N/A#
5516N/A# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
110N/A#
5680N/Aexport PARFAIT_BUILD=no
110N/ABUILD_BITS= 32
110N/ACOMPILER= gcc
110N/Ainclude ../../make-rules/shared-macros.mk
5516N/A
1303N/AGCC_ROOT=/usr/gcc/4.9
5516N/A
110N/ACOMPONENT_NAME= gcc
5516N/ACOMPONENT_VERSION= 4.9.4
2899N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
5680N/ACOMPONENT_ARCHIVE_HASH= \
110N/A sha256:1680f92781b92cbdb57d7e4f647c650678c594154cb0d707fd9a994424a9860d
5680N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
5680N/ACOMPONENT_BUGDB= utility/gnu-compiler
5680N/A
5680N/ATPNO= 31051
5680N/A
2851N/A# Use gcc's default flags instead of userland's.
110N/ACFLAGS=
110N/ACPPFLAGS=
181N/ACXXFLAGS=
110N/A
5680N/ACC += -std=gnu89
110N/A
110N/Ainclude $(WS_MAKE_RULES)/common.mk
110N/A
110N/A# The GNU compiler wants the GNU utilities.
110N/APATH=$(GNUBIN):$(USRBINDIR):$(USRDIR)/perl5/bin
110N/A
110N/APARCH = $(MACH:i386=i386-pc)
1625N/AGNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
110N/A
110N/APKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
110N/A
110N/AVERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION))
110N/AGCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
110N/APKG_MACROS += GCC_VERSION=$(GCC_VERSION)
110N/APKG_MACROS += GCC_V=$(word 1,$(VERSION_NUMBERS))$(word 2,$(VERSION_NUMBERS))
110N/APKG_MACROS += GCC_BASEDIR=$(CONFIGURE_PREFIX)
110N/A
5680N/A# direct binding causes various testsuite failures
110N/ALD_B_DIRECT=
110N/A
110N/A# /usr/lib/ld/map.noexdata destroys Intel
110N/ALD_MAP_NOEXDATA.i386=
5680N/A
5680N/A# /usr/lib/ld/map.noexbss destroys SPARC
5680N/ALD_MAP_NOEXBSS.sparc=
5680N/A
110N/A# Mapfiles map.noexdata and map.noexbss mark the data + bss and bss
110N/A# segments non executable on x86 and SPARC respectively. The protection
110N/A# extends to the heap segment, if the heap is brk based, as is the case
110N/A# with gcc. Since the introduction of NXHEAP, this is controlled
5516N/A# separately by the NXHEAP extension itself. Whether the heap should be
5516N/A# executable or not should be reevaluated. For now, try to avoid
5516N/A# "destruction" as hinted above.
5516N/ANXHEAP_MODE = $(NXHEAP_DISABLE)
3823N/A
3823N/A# for some reason the fixincludes target fails with bash on Solaris.
3823N/ACONFIG_SHELL = /bin/sh
3823N/AMAKESHELL = /bin/sh
3823N/ACOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
5516N/ACOMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
5516N/A
5516N/ACONFIGURE_PREFIX = /usr/gcc/4.9
5516N/ACONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info
5516N/A
5516N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
5516N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
5516N/ACONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
5516N/ACONFIGURE_OPTIONS += --enable-shared
3823N/ACONFIGURE_OPTIONS += --enable-initfini-array
3823N/ACONFIGURE_OPTIONS += --disable-rpath
5516N/ACONFIGURE_OPTIONS += --with-system-zlib
3823N/ACONFIGURE_OPTIONS += --with-build-config=no
110N/ACONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp
1625N/ACONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr
110N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(USRBINDIR)/ld
5680N/ACONFIGURE_OPTIONS += --with-gnu-as --with-as=$(GNUBIN)/as
5680N/A
5680N/A# If the compiler used to build matches the compiler being built, there is no
5680N/A# need for a 3 stage build.
5680N/Aifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),)
5680N/ACONFIGURE_OPTIONS += --disable-bootstrap
5680N/Aelse
110N/ACOMPONENT_BUILD_TARGETS=bootstrap
110N/Aendif
5680N/A
5680N/ACONFIGURE_OPTIONS += BOOT_CFLAGS='-g -O2'
5680N/A
5680N/A# This is the target and it must be last
5680N/ACONFIGURE_OPTIONS += $(GNU_ARCH)
5680N/A
5680N/A
5680N/ACONFIGURE_ENV += PYTHON="$(PYTHON)"
5680N/A
5680N/A# compile python modules
110N/ACOMPONENT_POST_INSTALL_ACTION = \
5680N/A ( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \
5680N/A xargs -n 1 dirname | sort -u | \
5680N/A xargs $(PYTHON) -m compileall )
5680N/A
5680N/ACOMPONENT_BUILD_ARGS += $(JOBS:%=-j%)
5680N/A
5680N/A
5680N/ACOMPONENT_PRE_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
5680N/A
5680N/A# We don't have DejaGNU in S11.
5680N/Aifeq ($(OS_VERSION), 5.12)
5680N/A COMPONENT_PRE_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
5680N/Aendif
5680N/A
5680N/A#
5680N/A# Run the tests and generate a summary report, then output the summary
5680N/A# report into the results file.
5680N/A#
5680N/A# To ensure that all tests that are expected to pass actually
5680N/A# pass, we have to increase the stacksize limit to at least
5680N/A# 16MB. Otherwise we'll get spurious failures in the test
5680N/A# harness (gcc.c-torture/compile/limits-exprparen.c and others).
5680N/A# With the soft stacksize limit set to 16384 we get reasonably good
5680N/A# test results.
5680N/A#
5680N/ACOMPONENT_PRE_TEST_ACTION += \
5680N/A (cd $(COMPONENT_TEST_DIR) ; \
5680N/A ulimit -Ss 16384 ; \
5680N/A $(ENV) $(COMPONENT_PRE_TEST_ENV) \
5680N/A $(GMAKE) -k -i $(JOBS:%=-j%) check check-target ; \
5680N/A $(GMAKE) mail-report.log)
5680N/A
5680N/ACOMPONENT_TEST_CMD = $(CAT)
5680N/ACOMPONENT_TEST_TARGETS = mail-report.log
5680N/A
5680N/A# Master test results are different between x86 and SPARC.
5680N/ACOMPONENT_TEST_MASTER = \
5680N/A $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
5680N/A
5680N/AREQUIRED_PACKAGES += developer/gcc-49
5680N/AREQUIRED_PACKAGES += developer/test/dejagnu
5680N/AREQUIRED_PACKAGES += library/cloog
3353N/AREQUIRED_PACKAGES += library/gmp
3353N/AREQUIRED_PACKAGES += library/isl
4708N/AREQUIRED_PACKAGES += library/mpc
4708N/AREQUIRED_PACKAGES += library/mpfr
5516N/AREQUIRED_PACKAGES += library/zlib
4708N/AREQUIRED_PACKAGES += runtime/tcl-8
4708N/AREQUIRED_PACKAGES += shell/bash
181N/AREQUIRED_PACKAGES += shell/ksh93
5680N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
110N/AREQUIRED_PACKAGES += system/library/math
110N/A