Cross Reference: /solaris-userland/components/gcc5/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
176
0N/A#
3261N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
2362N/A
2362N/A#
2362N/A# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/Aexport PARFAIT_BUILD=no
0N/ABUILD_BITS= 64
1173N/ACOMPILER= gcc
1173N/Ainclude ../../make-rules/shared-macros.mk
1173N/A
1173N/ACOMPONENT_NAME= gcc
1173N/ACOMPONENT_VERSION= 5.4.0
1173N/ACOMPONENT_PROJECT_URL= http://gcc.gnu.org/
1173N/ACOMPONENT_ARCHIVE_HASH= \
1173N/A sha256:37089e80c3f2e9a0663d7ccc51c2a6c7dbbf3275bc1e4ed1ed3b1460cd5b3030
1173N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gcc/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
1173N/ACOMPONENT_BUGDB= utility/gnu-compiler
1173N/A
1173N/ATPNO= 29354
1173N/A
1173N/A# Use gcc's default flags instead of userland's.
1173N/ACFLAGS=
1173N/ACPPFLAGS=
1173N/ACXXFLAGS=
1173N/A
1173N/Ainclude $(WS_MAKE_RULES)/common.mk
1173N/A
1173N/A# The GNU compiler wants the GNU utilities.
1173N/APATH=$(GNUBIN):$(USRBINDIR):$(USRDIR)/perl5/bin
1173N/A
1173N/APARCH = $(MACH:i386=x86_64-pc)
0N/AGNU_ARCH = $(PARCH:sparc=sparcv9-sun)-solaris$(SOLARIS_VERSION)
0N/A
1999N/APKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
1999N/A
0N/AVERSION_NUMBERS = $(subst ., ,$(COMPONENT_VERSION))
0N/AGCC_VERSION=$(word 1,$(VERSION_NUMBERS)).$(word 2,$(VERSION_NUMBERS))
1999N/AGCC_MAJOR_VERSION=$(word 1,$(VERSION_NUMBERS))
0N/APKG_MACROS += GCC_MAJOR_VERSION=$(GCC_MAJOR_VERSION)
1999N/APKG_MACROS += GCC_VERSION=$(GCC_VERSION)
1999N/APKG_MACROS += GCC_BASEDIR=$(CONFIGURE_PREFIX)
0N/A
0N/A# direct binding causes various testsuite failures
0N/ALD_B_DIRECT=
0N/A
0N/A# /usr/lib/ld/map.noexdata destroys Intel
0N/ALD_MAP_NOEXDATA.i386=
0N/A
0N/A# /usr/lib/ld/map.noexbss destroys SPARC
0N/ALD_MAP_NOEXBSS.sparc=
0N/A
0N/A# Mapfiles map.noexdata and map.noexbss mark the data + bss and bss
0N/A# segments non executable on x86 and SPARC respectively. The protection
0N/A# extends to the heap segment, if the heap is brk based, as is the case
0N/A# with gcc. Since the introduction of NXHEAP, this is controlled
1999N/A# separately by the NXHEAP extension itself. Whether the heap should be
0N/A# executable or not should be reevaluated. For now, try to avoid
1999N/A# "destruction" as hinted above.
1999N/ANXHEAP_MODE = $(NXHEAP_DISABLE)
1999N/A
1999N/A# for some reason the fixincludes target fails with bash on Solaris.
1999N/ACONFIG_SHELL = /bin/sh
1999N/AMAKESHELL = /bin/sh
0N/ACOMPONENT_BUILD_ENV += SHELL=$(CONFIG_SHELL)
0N/ACOMPONENT_BUILD_ENV += MAKESHELL=$(MAKESHELL)
0N/A
0N/ACONFIGURE_PREFIX = /usr/gcc/$(GCC_MAJOR_VERSION)
1999N/ACONFIGURE_INFODIR = $(CONFIGURE_PREFIX)/share/info
1999N/A
1999N/A# We are going to build the 64-bit version of the compiler and tools, but we
1173N/A# want it to install in the normal .../{bin|lib}/... locations. GCC will
0N/A# take care of building and putting 32/64 bit objects in the right place
0N/A# under there.
0N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
0N/ACONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
1999N/A
1999N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
1999N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
1173N/ACONFIGURE_OPTIONS += --enable-languages="c,c++,fortran,objc"
0N/ACONFIGURE_OPTIONS += --enable-shared
0N/ACONFIGURE_OPTIONS += --enable-initfini-array
0N/ACONFIGURE_OPTIONS += --disable-rpath
0N/ACONFIGURE_OPTIONS += --with-system-zlib
0N/ACONFIGURE_OPTIONS += --with-build-config=no
0N/ACONFIGURE_OPTIONS += --with-gmp-include=$(USRINCDIR)/gmp
0N/ACONFIGURE_OPTIONS += --with-mpfr-include=$(USRINCDIR)/mpfr
0N/ACONFIGURE_OPTIONS += --without-gnu-ld --with-ld=$(USRBINDIR)/ld
0N/ACONFIGURE_OPTIONS += --with-gnu-as --with-as=$(GNUBIN)/as
0N/A
0N/A# If the compiler used to build matches the compiler being built, there is no
0N/A# need for a 3 stage build.
0N/Aifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),)
0N/ACONFIGURE_OPTIONS += --disable-bootstrap
0N/Aelse
0N/ACOMPONENT_BUILD_TARGETS=bootstrap
0N/Aendif
0N/A
0N/ACONFIGURE_OPTIONS += BOOT_CFLAGS='-g -O2'
0N/A
0N/A# This is the target and it must be last
0N/ACONFIGURE_OPTIONS += $(GNU_ARCH)
0N/A
0N/A
0N/ACONFIGURE_ENV += PYTHON="$(PYTHON)"
0N/A
0N/A# compile python modules
0N/ACOMPONENT_POST_INSTALL_ACTION = \
0N/A ( gfind $(PROTO_DIR)$(CONFIGURE_PREFIX) -name '*.py' | \
0N/A xargs -n 1 dirname | sort -u | \
0N/A xargs $(PYTHON) -m compileall )
0N/A
0N/ACOMPONENT_BUILD_ARGS += $(JOBS:%=-j%)
0N/A
0N/A
0N/ACOMPONENT_PRE_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
0N/A
0N/A# We don't have DejaGNU in S11.
0N/Aifeq ($(OS_VERSION), 5.12)
0N/A COMPONENT_PRE_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
0N/Aendif
0N/A
0N/A#
0N/A# Run the tests and generate a summary report, then output the summary
0N/A# report into the results file.
0N/A#
0N/A# To ensure that all tests that are expected to pass actually
0N/A# pass, we have to increase the stacksize limit to at least
0N/A# 16MB. Otherwise we'll get spurious failures in the test
0N/A# harness (gcc.c-torture/compile/limits-exprparen.c and others).
0N/A# With the soft stacksize limit set to 16384 we get reasonably good
0N/A# test results.
0N/A#
0N/ACOMPONENT_PRE_TEST_ACTION += \
0N/A (cd $(COMPONENT_TEST_DIR) ; \
0N/A ulimit -Ss 16385 ; \
0N/A $(ENV) $(COMPONENT_PRE_TEST_ENV) \
0N/A $(GMAKE) -k -i $(JOBS:%=-j%) check check-target ; \
0N/A $(GMAKE) mail-report.log)
1999N/A
1999N/ACOMPONENT_TEST_CMD = $(CAT)
1999N/ACOMPONENT_TEST_TARGETS = mail-report.log
1173N/A
0N/A# Master test results are different between x86 and SPARC.
0N/ACOMPONENT_TEST_MASTER = \
0N/A $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
0N/A
0N/AREQUIRED_PACKAGES += developer/test/dejagnu
1999N/AREQUIRED_PACKAGES += library/gmp
1999N/AREQUIRED_PACKAGES += library/isl
1999N/AREQUIRED_PACKAGES += library/mpc
1173N/AREQUIRED_PACKAGES += library/mpfr
0N/AREQUIRED_PACKAGES += library/zlib
1999N/AREQUIRED_PACKAGES += runtime/tcl-8
0N/AREQUIRED_PACKAGES += shell/bash
0N/AREQUIRED_PACKAGES += shell/ksh93
0N/AREQUIRED_PACKAGES += system/library/math
0N/A