Gentoo Archives: gentoo-commits

From: Steve Arnold <nerdboy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/gnat-gcc/files/, dev-lang/gnat-gcc/
Date: Sat, 04 Jun 2016 04:05:41
Message-Id: 1465013089.c4b4d9a83711610c09f8db31919b095a4d9628f2.nerdboy@gentoo
1 commit: c4b4d9a83711610c09f8db31919b095a4d9628f2
2 Author: Stephen L Arnold <nerdboy <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 4 03:54:17 2016 +0000
4 Commit: Steve Arnold <nerdboy <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 4 04:04:49 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4b4d9a8
7
8 dev-lang/gnat-gcc: version bump to 4.9.3 (ebuild and gnatboot)
9
10 Newly reworked gnat-gcc with new multilib and hardened support. Will
11 probably also need updates to gnat.eclass to build Ada packages.
12 Ncurses with use=ada works again (in the overlay) but the existing
13 gnat.eclass Ada configuration will most likely get simplified first.
14 Other arches still in progress.
15
16 Package-Manager: portage-2.2.28
17
18 dev-lang/gnat-gcc/Manifest | 7 ++
19 dev-lang/gnat-gcc/files/gcc-spec-env-r1.patch | 87 ++++++++++++++++++++++
20 ...t-gcc-4.9.3-make-default-paths-match-slot.patch | 27 +++++++
21 dev-lang/gnat-gcc/gnat-gcc-4.9.3.ebuild | 86 +++++++++++++++++++++
22 dev-lang/gnat-gcc/metadata.xml | 27 ++++---
23 5 files changed, 224 insertions(+), 10 deletions(-)
24
25 diff --git a/dev-lang/gnat-gcc/Manifest b/dev-lang/gnat-gcc/Manifest
26 index fdf0a33..2a681b7 100644
27 --- a/dev-lang/gnat-gcc/Manifest
28 +++ b/dev-lang/gnat-gcc/Manifest
29 @@ -1,3 +1,7 @@
30 +DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 WHIRLPOOL 8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
31 +DIST gcc-4.9.3-patches-1.5.tar.bz2 25384 SHA256 e1c43125fab5a4db1997a01b362b3611907c9020e41a591e5eb2f5669f216538 SHA512 d266790b1f537c7c3de459cc67f9151b77b16b1e36780c3d2a02f2e4627d5a0f8f6430d7092bbfa6f9a4667c02170d3ce75b0453b6facc94998d414e58f4a1e1 WHIRLPOOL 31b4d54f0858f5673d76590ac822e097ddf799d4eafba81c1378af7cbaadd7be8634297ca9f900a78f7382ebfa9626a40e12ca7c06eff88431de04ddd4d2cec0
32 +DIST gcc-4.9.3-piepatches-v0.6.4.tar.bz2 14431 SHA256 012c3025ac2e14781ff25028c0b1d42a07f510b125006116e268bcd90fb6c9db SHA512 3bbeacbca5e8ef6ab0b1d58add42f5e8e82328afe024666f9585b5398c8722e7d012abfd2009a98ad47b1f1b26afaf421402a9e7719a5662516b32dcbe5608be WHIRLPOOL 9e68d981aed42ece2f481f62efc078ad370ac780e96ba39c4273c8675d552b845cd52c588bd41839868f430b0a532789858914f4ef32a1bc187e2983264ebfd3
33 +DIST gcc-4.9.3.tar.bz2 90006707 SHA256 2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e SHA512 9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a3144a79cc8fcba3443f7b44c7337d79d704b522d053f54f79aa6b442df WHIRLPOOL 085e4cc1825b031652cbe9e098671f761acfeca64c6cc9b8ad2a8961c13fcac9e02b4538b44dc38181a355266f2c55c99ce5a1bff3f2860b870285cf3f0e84a5
34 DIST gcc-ada-3.4.6.tar.bz2 3784327 SHA256 d5bfb166b2ad287ba85ebba533cca4453b521479cffc1bd3c6d273f6b3d794e2 SHA512 db54512d28388629c5e1af468127d737ffa513299917438992de63dc9b6495b41b81488d4bf748c6adc1e469228326ef5fb4bc682ebc5e6cc85dd5995b421a50 WHIRLPOOL e0264296c090cd19e6ebde5d1c0242a8b9ef34e9d2dd6b521c0c6353907613a1436208362851b15b5c66c9985d0aa098616be0087a3c46c4dee5d6a894825c96
35 DIST gcc-ada-4.1.2.tar.bz2 4589609 SHA256 703125c4d033c666b52db2aeee0a05e3461467fe8ff6e5e588b5cdb8c6928bb0 SHA512 7885ae0782f80b0c3adb35b0317f8de665f828eb96fada6f97046da897081655864736aed7a35ca7db996543e02126b1e0b4d71512e6dca95700601c6cf2dc10 WHIRLPOOL 8005eb7956964535b130c531a619a4bb46b4a4cdb4f1524c8ae1c0ad8db15628062b45b0f526aa860b5e7397fa5f9d502ff1990ae6652940a5d724434d0e2c6a
36 DIST gcc-ada-4.2.3.tar.bz2 4740243 SHA256 08956727415fb1721c5c89ef33ebe94ab718459e88f7cd4589fc1c2b7e98cb4c SHA512 3143bca05c59cef64d26a42e2dc5732215301e0ea147e0670bdd8b53fd21ee76b58a1dc81e001a96b81549b96a633c95ff2314f25c0ab26f39c33bdaa32356d7 WHIRLPOOL db3592005bb4903bc11e1cdc3b351836395e1883478c5abd4be52f7946386e7dc9c9a5782900c5c97731add94f4cadf995510297bb6c276ea75c7ec46aeca8ec
37 @@ -26,3 +30,6 @@ DIST gnatboot-4.3-sparc.tar.bz2 13065130 SHA256 e234336123fd65c0f73cd25af99dbb43
38 DIST gnatboot-4.4-amd64.tar.bz2 26117669 SHA256 fd6c6ea6e4d57eb178d239a8b1e4d99d6638cb9d7d322c0789b37e8ed6a49b67 SHA512 bf68582e8e8ecc9c4f4dbec90ef47edf10769ca7a2dd197b065f44e5ad1e40b81c44592bb362651654b187ebad972095176509273b5e98edc1a26c2164075d80 WHIRLPOOL 59d714a3ea70dae7c4b9e6d177336810bbb5ea7bcdbe038c7c34d543ef8c45f40d240ecbc58de1b49c88904b245cdd3ef9121bc88fa3bdecf413762f67301cde
39 DIST gnatboot-4.4-i686.tar.bz2 17194327 SHA256 1081cdf2514fd1c03b40f0923d0046ffd2886b3bc6eabd217eaa40da1765ba5b SHA512 29a4e32d178f065ceef88efc9bae3bd2b68553e34d485b929e055733ceabdaf172c58ab92f24340d8a46fdbb1565e5f7573b744e3931ed261aaeb488c40501e6 WHIRLPOOL 80987d40ddf7589a74c6280dd687ad442ee7a560c5bb2eece950c50fcf0bfaa38e2befeec72e6fbf2695bb9d89ecfe905cf894152a56b22c7384926a59ce4f11
40 DIST gnatboot-4.4-sparc.tar.bz2 13962662 SHA256 467fa1da5ee4c769a10b2c870e132e1bf7827688e88860fdd27259e9b258109b SHA512 d02b07824da718d5a3c41a4d5c848b872cecbcf3ec04e59ba922fed0549e1d6901c07122038c286f6627d6f4edb1a71a6e52b8a5e52e8c788d9d51ac96f225b4 WHIRLPOOL 9164527588573ba1b5088c7835e739e3518bbdb099e0b85f205ca7602da87bd20646f8bd9fa12a14417ff18fe90041288be3647ecd900f300cf33621c5fb48fb
41 +DIST gnatboot-4.9-amd64.tar.xz 126692152 SHA256 4d7bfd5f8cb190ea51d6bea37a24aa149b6017093fa3aad9c5831c047a006381 SHA512 da41b0986e2c84ff14da86e4149d19a9429c456b6f6ef2733552e8d09ae1af62d4352cd4d2b892ed36c4a1278c5f8cef3513eafbd52cdd74a26e8d369662160f WHIRLPOOL bad5be4f54728004e1ed60d0440e8eb9d0b2dd64693e401f33c97a7f48026e2086a764c677463bb62cc87885582997fd69a9703133592d473bb5c07f2ad1984a
42 +DIST gnatboot-4.9-arm.tar.xz 104226768 SHA256 7789b327b5828e7d537e08cca5addc3e7ec4d1a9743737c60c36f65e9bdda819 SHA512 11c1fdbe08432ef3d01c74de9ce54a2ca750097b52d7d7ec88389a8a918a011dce918d342089b7e4bc60850e1427d398a0f144659db3b36565a9574fe3daef29 WHIRLPOOL 3d15dc7f22371152383c3508c1de2b8b2d4e5fbf729a88844bbe42cabe6d25a39e01eba72ec51abdb253550170b8c239fcb666dca94ec158ab30f477d96098ba
43 +DIST gnatboot-4.9-i686.tar.xz 82344156 SHA256 bf15503603827b46c22f3dbbf7461c64006d5c7d8cf2e2d986f082d1dfacca67 SHA512 c652c1f7530f61839e7937f598b1ff795a1394c6a8d0ab1dc7fda894f84adc394d6041b895a0ffa35b246b8868b7e495f28ec9576e469c026626c93764112ff9 WHIRLPOOL 8c9fda1dab1e1d4739ec73d2f6031a32c469bc6571211d7c1cc816863a551c8f032522a3a14aea44b0f9b3c9bcba87e1d7eace0f9344ac7876ea40c8dcb76fca
44
45 diff --git a/dev-lang/gnat-gcc/files/gcc-spec-env-r1.patch b/dev-lang/gnat-gcc/files/gcc-spec-env-r1.patch
46 new file mode 100644
47 index 0000000..a589268
48 --- /dev/null
49 +++ b/dev-lang/gnat-gcc/files/gcc-spec-env-r1.patch
50 @@ -0,0 +1,87 @@
51 +2013-08-22 Magnus Granberg <zorry@g.o>
52 +
53 + * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var
54 + and move the process of the user specifed specs.
55 +
56 + This allows us to easily control pie/ssp defaults with gcc-config profiles.
57 + Original patch by Rob Holland
58 + Extended to support multiple entries separated by ':' by Kevin F. Quinn
59 + Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
60 + Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg
61 +
62 +--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100
63 ++++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200
64 +@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
65 + do_option_spec (option_default_specs[i].name,
66 + option_default_specs[i].spec);
67 +
68 ++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
69 ++ /* Add specs listed in GCC_SPECS. Note; in the process of separating
70 ++ * each spec listed, the string is overwritten at token boundaries
71 ++ * (':') with '\0', an effect of strtok_r().
72 ++ */
73 ++ specs_file = getenv ("GCC_SPECS");
74 ++ if (specs_file && (strlen(specs_file) > 0))
75 ++ {
76 ++ char *spec, *saveptr;
77 ++ for (spec=strtok_r(specs_file,":",&saveptr);
78 ++ spec!=NULL;
79 ++ spec=strtok_r(NULL,":",&saveptr))
80 ++ {
81 ++ struct user_specs *user = (struct user_specs *)
82 ++ xmalloc (sizeof (struct user_specs));
83 ++ user->next = (struct user_specs *) 0;
84 ++ user->filename = spec;
85 ++ if (user_specs_tail)
86 ++ user_specs_tail->next = user;
87 ++ else
88 ++ user_specs_head = user;
89 ++ user_specs_tail = user;
90 ++ }
91 ++ }
92 ++#endif
93 ++ /* Process any user specified specs in the order given on the command
94 ++ * line. */
95 ++ for (uptr = user_specs_head; uptr; uptr = uptr->next)
96 ++ {
97 ++ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
98 ++ R_OK, true);
99 ++ read_specs (filename ? filename : uptr->filename, false, true);
100 ++ }
101 ++ /* Process any user self specs. */
102 ++ {
103 ++ struct spec_list *sl;
104 ++ for (sl = specs; sl; sl = sl->next)
105 ++ if (sl->name_len == sizeof "self_spec" - 1
106 ++ && !strcmp (sl->name, "self_spec"))
107 ++ do_self_spec (*sl->ptr_spec);
108 ++ }
109 ++
110 + /* Process DRIVER_SELF_SPECS, adding any new options to the end
111 + of the command line. */
112 +
113 +@@ -6535,24 +6578,6 @@ main (int argc, char **argv)
114 + PREFIX_PRIORITY_LAST, 0, 1);
115 + }
116 +
117 +- /* Process any user specified specs in the order given on the command
118 +- line. */
119 +- for (uptr = user_specs_head; uptr; uptr = uptr->next)
120 +- {
121 +- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
122 +- R_OK, true);
123 +- read_specs (filename ? filename : uptr->filename, false, true);
124 +- }
125 +-
126 +- /* Process any user self specs. */
127 +- {
128 +- struct spec_list *sl;
129 +- for (sl = specs; sl; sl = sl->next)
130 +- if (sl->name_len == sizeof "self_spec" - 1
131 +- && !strcmp (sl->name, "self_spec"))
132 +- do_self_spec (*sl->ptr_spec);
133 +- }
134 +-
135 + if (compare_debug)
136 + {
137 + enum save_temps save;
138
139 diff --git a/dev-lang/gnat-gcc/files/gnat-gcc-4.9.3-make-default-paths-match-slot.patch b/dev-lang/gnat-gcc/files/gnat-gcc-4.9.3-make-default-paths-match-slot.patch
140 new file mode 100644
141 index 0000000..0c197a1
142 --- /dev/null
143 +++ b/dev-lang/gnat-gcc/files/gnat-gcc-4.9.3-make-default-paths-match-slot.patch
144 @@ -0,0 +1,27 @@
145 +--- gcc/Makefile.in.orig 2016-05-20 15:01:04.277726220 -0700
146 ++++ gcc/Makefile.in 2016-05-20 18:40:43.658617109 -0700
147 +@@ -594,9 +594,9 @@
148 + # --------
149 +
150 + # Directory in which the compiler finds libraries etc.
151 +-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
152 ++libsubdir = $(libdir)/gnat-gcc/$(target_noncanonical)/SLOT_MARKER
153 + # Directory in which the compiler finds executables
154 +-libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
155 ++libexecsubdir = $(libexecdir)/gnat-gcc/$(target_noncanonical)/SLOT_MARKER
156 + # Directory in which all plugin resources are installed
157 + plugin_resourcesdir = $(libsubdir)/plugin
158 + # Directory in which plugin headers are installed
159 +@@ -1944,9 +1944,9 @@
160 +
161 + DRIVER_DEFINES = \
162 + -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
163 +- -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
164 +- -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
165 +- -DDEFAULT_TARGET_VERSION=\"$(version)\" \
166 ++ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gnat-gcc/\" \
167 ++ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gnat-gcc/\" \
168 ++ -DDEFAULT_TARGET_VERSION=\"SLOT_MARKER\" \
169 + -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
170 + -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
171 + -DTOOLDIR_BASE_PREFIX=\"$(libsubdir_to_prefix)$(prefix_to_exec_prefix)\" \
172
173 diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.9.3.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.9.3.ebuild
174 new file mode 100644
175 index 0000000..8e2d69b
176 --- /dev/null
177 +++ b/dev-lang/gnat-gcc/gnat-gcc-4.9.3.ebuild
178 @@ -0,0 +1,86 @@
179 +# Copyright 1999-2016 Gentoo Foundation
180 +# Distributed under the terms of the GNU General Public License v2
181 +# $Id$
182 +
183 +EAPI="5"
184 +
185 +PATCH_VER="1.5"
186 +PIE_VER="0.6.4"
187 +SPECS_VER="0.2.0"
188 +SPECS_GCC_VER="4.4.3"
189 +PIE_GLIBC_STABLE="amd64 x86 mips ppc ppc64 arm"
190 +SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
191 +
192 +inherit gnatbuild-r1
193 +
194 +DESCRIPTION="GNAT Ada Compiler - gcc version"
195 +HOMEPAGE="https://gcc.gnu.org/"
196 +LICENSE="GMGPL"
197 +
198 +IUSE="acats doc hardened"
199 +
200 +BOOT_SLOT="4.9"
201 +
202 +# SLOT is set in gnatbuild-r1.eclass, depends only on PV (basically SLOT=GCCBRANCH)
203 +# so the URI's are static.
204 +KEYWORDS="~amd64 ~arm ~x86"
205 +
206 +# arm is armv7-hardfloat, no neon:
207 +# (--with-arch=armv7-a --with-mode=thumb --with-float=hard --with-fpu=vfpv3-d16)
208 +SRC_URI="mirror://gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2
209 + mirror://gentoo/gcc-${PV}-patches-${PATCH_VER}.tar.bz2
210 + mirror://gentoo/gcc-${PV}-piepatches-v${PIE_VER}.tar.bz2
211 + hardened? ( mirror://gentoo/gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2 )
212 + amd64? ( http://dev.gentoo.org/~nerdboy/files/gnatboot-${BOOT_SLOT}-amd64.tar.xz )
213 + arm? ( http://dev.gentoo.org/~nerdboy/files/gnatboot-${BOOT_SLOT}-arm.tar.xz )
214 + x86? ( http://dev.gentoo.org/~nerdboy/files/gnatboot-${BOOT_SLOT}-i686.tar.xz )"
215 +
216 +# starting with 4.3.0 gnat needs these libs
217 +RDEPEND=">=dev-libs/mpfr-3.1.2
218 + >=dev-libs/gmp-5.1.3
219 + >=dev-libs/mpc-1.0.1
220 + >=sys-libs/zlib-1.2
221 + >=sys-libs/ncurses-5.7:0"
222 +
223 +DEPEND="${RDEPEND}
224 + doc? ( >=sys-apps/texinfo-5 )"
225 +
226 +if [[ ${CATEGORY} != cross-* ]] ; then
227 + PDEPEND="${PDEPEND} >=sys-libs/glibc-2.12"
228 +fi
229 +
230 +src_prepare() {
231 + # See if we can enable boehm-gc for Ada
232 + #epatch "${FILESDIR}"/${PN}-4.9.3-enable-boehm-gc-for-Ada.patch
233 +
234 + #fixup some hardwired flags
235 + pushd "${S}"/gcc/ada > /dev/null
236 +
237 + # universal gcc -> gnatgcc substitution occasionally produces lines too long
238 + # and then build halts on the style check.
239 + #
240 + sed -i -e 's:gnatgcc:gcc:' osint.ads switch.ads ||
241 + die "reversing [gnat]gcc substitution in comments failed"
242 +
243 + popd > /dev/null
244 +
245 + # gcc pretty much ignores --with-system-zlib. At least it still descends
246 + # into zlib and does configure and build there (gcc bug@7125?). For whatever
247 + # reason this conflicts with multilib in gcc-4.4..
248 + sed -i -e "s:libgui zlib:libgui:" "${S}"/configure
249 +}
250 +
251 +src_compile() {
252 + # looks like gnatlib_and_tools and gnatlib_shared have become part of
253 + # bootstrap
254 + gnatbuild-r1_src_compile configure make-tools bootstrap
255 +}
256 +
257 +src_install() {
258 + gnatbuild-r1_src_install
259 +
260 + if use acats ; then
261 + insinto "${LIBPATH}"/acats
262 + doins -r "${S}"/gcc/testsuite/ada/acats/*
263 + fi
264 +}
265
266 diff --git a/dev-lang/gnat-gcc/metadata.xml b/dev-lang/gnat-gcc/metadata.xml
267 index fb03ada..e4bed84 100644
268 --- a/dev-lang/gnat-gcc/metadata.xml
269 +++ b/dev-lang/gnat-gcc/metadata.xml
270 @@ -1,18 +1,25 @@
271 <?xml version="1.0" encoding="UTF-8"?>
272 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
273 <pkgmetadata>
274 -<maintainer type="project">
275 + <maintainer type="project">
276 <email>ada@g.o</email>
277 - <name>Gentoo Resources for Ada</name>
278 + <name>Gentoo Ada Project</name>
279 </maintainer>
280 <use>
281 - <flag name="lto">Add support for link-time optimizations (unsupported, use
282 - at your own risk).</flag>
283 + <flag name="acats">
284 + Installs ACATS source under LIBPATH.
285 + </flag>
286 + <flag name="lto">
287 + Enable Link Time Optimization (somewhat unsafe).
288 + </flag>
289 </use>
290 -<longdescription>
291 -GNAT, the (GN)U (A)da (T)oolchain, is a high performance Ada 95
292 -development environment based on the mature GCC compiler technology. It
293 -implements the full Ada 95 language defined by the ISO standard and is upward
294 -compatible with Ada 83. This is an FSF supported version, integrated with gcc.
295 -</longdescription>
296 + <longdescription>
297 + GNAT, the (GN)U (A)da (T)oolchain, is a high performance Ada 95 development
298 + environment based on the mature GCC compiler technology. It implements the
299 + full Ada 95 language defined by the ISO standard and is upward compatible
300 + with Ada 83. This is an FSF supported version, integrated with gcc.
301 + </longdescription>
302 + <upstream>
303 + <remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
304 + </upstream>
305 </pkgmetadata>