27bfc5e7df429daa2662cc5695674faced0cf880
[platform/upstream/gcc.git] / packaging / linaro-gcc.spec
1 #
2 # spec file for package gcc6
3 #
4 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # Copyright (c) 2015 Tizen
6 #
7 # All modifications and additions to the file contributed by third parties
8 # remain the property of their copyright owners, unless otherwise agreed
9 # upon. The license for this file, and modifications and additions to the
10 # file, is the same license as for the pristine package itself (unless the
11 # license for the pristine package is not an Open Source License, in which
12 # case the license is the MIT License). An "Open Source License" is a
13 # license that conforms to the Open Source Definition (Version 1.9)
14 # published by the Open Source Initiative.
15
16 # Please submit bugfixes or comments via http://bugs.tizen.org/
17 #
18 # we use %%{?macro: ... } as it is more compact
19 %if 0%{?run_tests}
20 %define gcc_run_tests 1
21 %endif
22
23 %define quadmath_arch %ix86 x86_64 ia64
24 %define tsan_arch x86_64 aarch64
25 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
26 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
27 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
28 %define lsan_arch x86_64 %ix86 %arm aarch64
29 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
30 %define cilkrts_arch x86_64 %ix86
31
32 %ifarch armv7l
33 %define ARCH armv7l
34 %define ABI eabi
35 %endif
36 %ifarch armv7hl
37 %define ARCH armv7hl
38 %define ABI eabihf
39 %endif
40 %ifarch %ix86
41 %define ARCH i586
42 %endif
43 %ifarch x86_64
44 %define ARCH x86_64
45 %endif
46 %ifarch aarch64
47 %define ARCH aarch64
48 %endif
49 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
50
51 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
52 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
53
54 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
55 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
56 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
57
58 Name:         gcc%{?cross:-%{cross}}
59 # With generated files in src we could drop the following
60 BuildRequires: bison
61 BuildRequires: flex
62 BuildRequires: gettext-devel
63 BuildRequires: makeinfo
64 ## until here, but at least renaming and patching info files breaks this
65 BuildRequires: gcc-c++
66 BuildRequires: zlib-devel
67 %ifarch x86_64
68 BuildRequires: glibc-devel-32bit
69 %endif
70 BuildRequires: perl
71 %{?cross:BuildRequires: binutils-%{cross}}
72 # here we use %%if because OBS spec parser cannot expand
73 # %%{?macro:...} correctly
74 %if 0%{?gcc_run_tests}
75 BuildRequires: dejagnu
76 BuildRequires: expect
77 BuildRequires: gdb
78 %endif
79 URL:           http://gcc.gnu.org/
80 Version:       6.3.1
81 Release:       0
82 Source:        gcc-%{version}.tar.bz2
83 Source10: gmp-6.1.1.tar.bz2
84 Source11: mpfr-3.1.5.tar.bz2
85 Source12: mpc-1.0.3.tar.gz
86 Source13: isl-0.17.1.tar.bz2
87 Source20: gcc.manifest
88 Group:         Development/Building
89 Summary:       The GNU C Compiler and Support Files
90 License:       GPL-3.0+
91 %{?cross:ExcludeArch: %{cross}}
92 %description
93 Core package for the GNU Compiler Collection, including the C language
94 frontend.
95
96 %package c++
97 Summary:       The GNU C++ Compiler
98 License:       GPL-3.0+
99 Group:         Development/Languages
100 %description c++
101 This package contains the GNU compiler for C++.
102
103 %package -n libstdc++
104 Summary:       The standard C++ shared library
105 License:       GPL-3.0-with-GCC-exception
106 Group:         Development/Building
107 %description -n libstdc++
108 The standard C++ library, needed for dynamically linked C++ programs.
109 %post -n libstdc++ -p /sbin/ldconfig
110 %postun -n libstdc++ -p /sbin/ldconfig
111
112 %package -n libstdc++-devel
113 Summary:       Include Files and Libraries mandatory for Development
114 License:       GPL-3.0-with-GCC-exception
115 Group:         Development/Building
116 %description -n libstdc++-devel
117 This package contains all the headers and libraries of the standard C++
118 library. It is needed for compiling C++ code.
119
120 %package -n libgcc
121 Summary:       C compiler runtime library
122 License:       GPL-3.0-with-GCC-exception
123 Group:         Development/Building
124 %description -n libgcc
125 Libgcc is needed for dynamically linked C programs.
126 %post -n libgcc -p /sbin/ldconfig
127 %postun -n libgcc -p /sbin/ldconfig
128
129 %package -n libgomp
130 Summary:       The GNU compiler collection OpenMP runtime library
131 License:       GPL-3.0-with-GCC-exception
132 Group:         Development/Building
133 %description -n libgomp
134 This is the OpenMP runtime library needed by OpenMP enabled programs
135 that were built with the -fopenmp compiler option and by programs that
136 were auto-parallelized via the -ftree-parallelize-loops compiler
137 option.
138 %post -n libgomp -p /sbin/ldconfig
139 %postun -n libgomp -p /sbin/ldconfig
140
141 %package objc
142 Summary:       GNU Objective C Compiler
143 License:       GPL-3.0+
144 Group:         Development/Languages
145 %description objc
146 This package contains the GNU Objective C compiler. Objective C is an
147 object oriented language, created by Next Inc. and used in their
148 Nextstep OS. The source code is available in the gcc package.
149
150 %package -n libobjc
151 Summary:       Library for the GNU Objective C Compiler
152 License:       GPL-3.0-with-GCC-exception
153 Group:         Development/Building
154 %description -n libobjc
155 The library for the GNU Objective C compiler.
156 %post -n libobjc -p /sbin/ldconfig
157 %postun -n libobjc -p /sbin/ldconfig
158
159 %package -n libcc1
160 Summary:       GNU C Compiler plugin for GDB
161 License:       GPL-3.0-with-GCC-exception
162 Group:         Development/Building
163 %description -n libcc1
164 The GCC plugin for GDB
165 %post -n libcc1 -p /sbin/ldconfig
166 %postun -n libcc1 -p /sbin/ldconfig
167
168 %package obj-c++
169 Summary:       GNU Objective C++ Compiler
170 License:       GPL-3.0+
171 Group:         Development/Languages
172 %description obj-c++
173 This package contains the GNU Objective C++ compiler. Objective C++ is an
174 object oriented language, created by Next Inc. and used in their
175 Nextstep OS. The source code is available in the gcc package.
176
177 %package -n cpp
178 Summary:       The GCC Preprocessor
179 License:       GPL-3.0+
180 Group:         Development/Languages
181 %description -n cpp
182 This Package contains just the preprocessor that is used by the X11
183 packages.
184
185 %package ada
186 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
187 License:       GPL-3.0+
188 Group:         Development/Languages
189 %description ada
190 This package contains an Ada95 compiler and associated development
191 tools based on the GNU GCC technology. Ada95 is the object oriented
192 successor of the Ada83 language. To build this package from source you
193 must have installed a binary version to bootstrap the compiler.
194
195 %package -n libada
196 Summary:      GNU Ada Runtime Libraries
197 License:      GPL-3.0-with-GCC-exception
198 Group:        Development/Languages
199 %description -n libada
200 This package contains the shared libraries required to run programs
201 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
202 shared libraries. It also contains the shared libraries for the
203 Implementation of the Ada Semantic Interface Specification (ASIS), the
204 implementation of Distributed Systems Programming (GLADE) and the Posix
205 1003.5 Binding (Florist).
206 %post -n libada -p /sbin/ldconfig
207 %postun -n libada -p /sbin/ldconfig
208
209 %package fortran
210 Summary:       The GNU Fortran Compiler and Support Files
211 License:       GPL-3.0+
212 Group:         Development/Languages
213 %description fortran
214 This is the Fortran compiler of the GNU Compiler Collection (GCC).
215
216 %package -n libgfortran
217 Summary:       The GNU Fortran Compiler Runtime Library
218 License:       GPL-3.0-with-GCC-exception
219 Group:         Development/Languages
220 %description -n libgfortran
221 The runtime library needed to run programs compiled with the Fortran compiler
222 of the GNU Compiler Collection (GCC).
223 %post -n libgfortran -p /sbin/ldconfig
224 %postun -n libgfortran -p /sbin/ldconfig
225
226 %package -n libquadmath
227 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
228 License:       LGPL-2.1
229 Group:         Development/Languages
230 %description -n libquadmath
231 The runtime library needed to run programs compiled with the Fortran compiler
232 of the GNU Compiler Collection (GCC) and quadruple precision floating point
233 operations.
234 %post -n libquadmath -p /sbin/ldconfig
235 %postun -n libquadmath -p /sbin/ldconfig
236
237 %package -n libitm
238 Summary:       The GNU Compiler Transactional Memory Runtime Library
239 License:       GPL-3.0-with-GCC-exception
240 Group:         Development/Languages
241 %description -n libitm
242 The runtime library needed to run programs compiled with the
243 -fgnu-tm option of the GNU Compiler Collection (GCC).
244 %post -n libitm -p /sbin/ldconfig
245 %postun -n libitm -p /sbin/ldconfig
246
247 %package -n libasan
248 Summary:       The GNU Compiler Address Sanitizer Runtime Library
249 License:       MIT
250 Group:         Development/Languages
251 %description -n libasan
252 The runtime library needed to run programs compiled with the
253 -fsanitize=address option of the GNU Compiler Collection (GCC).
254 %post -n libasan -p /sbin/ldconfig
255 %postun -n libasan -p /sbin/ldconfig
256
257 %package -n libtsan
258 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
259 License:       MIT
260 Group:         Development/Languages
261 %description -n libtsan
262 The runtime library needed to run programs compiled with the
263 -fsanitize=thread option of the GNU Compiler Collection (GCC).
264 %post -n libtsan -p /sbin/ldconfig
265 %postun -n libtsan -p /sbin/ldconfig
266
267 %package -n libatomic
268 Summary:       The GNU Compiler Atomic Operations Runtime Library
269 License:       GPL-3.0-with-GCC-exception
270 Group:         Development/Languages
271 %description -n libatomic
272 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
273 %post -n libatomic -p /sbin/ldconfig
274 %postun -n libatomic -p /sbin/ldconfig
275
276 %package -n libcilkrts
277 Summary:       The GNU Compiler Cilk+ Runtime Library
278 License:       MIT
279 Group:         Development/Languages
280 %description -n libcilkrts
281 The runtime library needed to run programs compiled with the
282 -fcilkplus option of the GNU Compiler Collection (GCC).
283 %post -n libcilkrts -p /sbin/ldconfig
284 %postun -n libcilkrts -p /sbin/ldconfig
285
286 %package -n liblsan
287 Summary:       The GNU Compiler Leak Sanitizer Runtime Library
288 License:       MIT
289 Group:         Development/Languages
290 %description -n liblsan
291 The runtime library needed to run programs compiled with the
292 -fsanitize=leak option of the GNU Compiler Collection (GCC).
293 %post -n liblsan -p /sbin/ldconfig
294 %postun -n liblsan -p /sbin/ldconfig
295
296 %package -n libubsan
297 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
298 License:       MIT
299 Group:         Development/Languages
300 %description -n libubsan
301 The runtime library needed to run programs compiled with the
302 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
303 %post -n libubsan -p /sbin/ldconfig
304 %postun -n libubsan -p /sbin/ldconfig
305
306 %package -n libvtv
307 Summary:       The GNU Compiler Vtable Verifier Runtime Library
308 License:       MIT
309 Group:         Development/Languages
310 %description -n libvtv
311 The runtime library needed to run programs compiled with the
312 -fvtable-verify option of the GNU Compiler Collection (GCC).
313 %post -n libvtv -p /sbin/ldconfig
314 %postun -n libvtv -p /sbin/ldconfig
315
316 %package -n libgcj
317 Summary:       Java Runtime Library for gcc
318 License:       GPL-2.0-with-classpath-exception
319 Group:         Development/Building
320 %description -n libgcj
321 This library is needed if you want to use the GNU Java compiler, gcj.
322 Source code for this package is in gcc.
323 %post -n libgcj -p /sbin/ldconfig
324 %postun -n libgcj -p /sbin/ldconfig
325
326 %package java
327 Summary:       The GNU Java Compiler
328 License:       GPL-3.0+
329 Group:         Development/Languages
330 %description java
331 The Java compiler from the GCC-tools-suite.
332
333 %package -n libgcj_bc
334 Summary:       Fake library for BC-ABI compatibility.
335 License:       GPL-2.0-with-classpath-exception
336 Group:         Development/Languages
337 %description -n libgcj_bc
338 A fake library that is used at link time only. It ensures that
339 binaries built with the BC-ABI link against a constant SONAME.
340 This way, BC-ABI binaries continue to work if the SONAME underlying
341 libgcj.so changes.
342
343 %package -n libgcj-jar
344 Summary:       Java runtime library (jar files).
345 License:       GPL-2.0-with-classpath-exception
346 Group:         Development/Languages
347 %description -n libgcj-jar
348 These are the jar files that go along with the gcj front end to gcc.
349
350 %package -n libgcj-devel
351 Summary:       Include Files and Libraries mandatory for Development.
352 License:       GPL-2.0-with-classpath-exception
353 Group:         Development/Languages
354 %description -n libgcj-devel
355 This package contains all necessary include files and libraries needed
356 to develop applications that require these.
357
358 %package -n gcc-gij
359 Summary:       Java Bytecode Interpreter for gcc
360 License:       GPL-2.0-with-classpath-exception
361 Group:         Development/Languages
362 %description -n gcc-gij
363 This package contains the java bytecode interpreter gij and related tools.
364
365 %package -n libffi
366 Summary:       Foreign Function Interface library
367 License:       BSD-3-Clause
368 Group:         Development/Building
369 %description -n libffi
370 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
371 %post -n libffi -p /sbin/ldconfig
372 %postun -n libffi -p /sbin/ldconfig
373
374 %package -n libffi-devel
375 Summary:       Foreign Function Interface library development files
376 License:       BSD 3-Clause
377 Group:         Development/Building
378 %description -n libffi-devel
379 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
380
381 %package go
382 Summary:       GNU Go Compiler
383 License:       GPL-3.0+
384 Group:         Development/Languages
385 %description go
386 This package contains a Go compiler and associated development
387 files based on the GNU GCC technology.
388
389 %package -n libgo
390 Summary:       GNU Go compiler runtime library
391 License:       BSD-3-Clause
392 Group:         Development/Languages
393 %description -n libgo
394 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
395 %post -n libgo -p /sbin/ldconfig
396 %postun -n libgo -p /sbin/ldconfig
397
398 %package testresults
399 Summary:       Testsuite results
400 License:       SUSE-Public-Domain
401 Group:         Development/Languages
402 %description testresults
403 Results from running the gcc and target library testsuites.
404
405 %package -n gcc-32bit
406 Summary:       The GNU C Compiler 32bit support
407 Group:         Development/Building
408 %description -n gcc-32bit
409 This package contains 32bit support for the GNU Compiler Collection.
410
411 %package -n libstdc++-devel-32bit
412 Summary:       Include Files and Libraries mandatory for Development
413 License:       GPL-3.0-with-GCC-exception
414 Group:         Development/Building
415 %description -n libstdc++-devel-32bit
416 This package contains all the headers and libraries of the standard C++
417 library. It is needed for compiling C++ code.
418
419 %package -n libgcc-32bit
420 Summary:       C compiler runtime library
421 License:       GPL-3.0-with-GCC-exception
422 Group:         Development/Building
423 %description -n libgcc-32bit
424 Libgcc is needed for dynamically linked C programs.
425 %post -n libgcc-32bit -p /sbin/ldconfig
426 %postun -n libgcc-32bit -p /sbin/ldconfig
427
428 %package -n libgomp-32bit
429 Summary:       The GNU compiler collection OpenMP runtime library
430 License:       GPL-3.0-with-GCC-exception
431 Group:         Development/Building
432 %description -n libgomp-32bit
433 This is the OpenMP runtime library needed by OpenMP enabled programs
434 that were built with the -fopenmp compiler option and by programs that
435 were auto-parallelized via the -ftree-parallelize-loops compiler
436 option.
437 %post -n libgomp-32bit -p /sbin/ldconfig
438 %postun -n libgomp-32bit -p /sbin/ldconfig
439
440 %package -n libstdc++-32bit
441 Summary:       The standard C++ shared library
442 License:       GPL-3.0-with-GCC-exception
443 Group:         Development/Building
444 %description -n libstdc++-32bit
445 The standard C++ library, needed for dynamically linked C++ programs.
446 %post -n libstdc++-32bit -p /sbin/ldconfig
447 %postun -n libstdc++-32bit -p /sbin/ldconfig
448
449 %package objc-32bit
450 Summary:       GNU Objective C Compiler
451 License:       GPL-3.0+
452 Group:         Development/Languages
453 %description objc-32bit
454 This package contains the GNU Objective C compiler. Objective C is an
455 object oriented language, created by Next Inc. and used in their
456 Nextstep OS. The source code is available in the gcc package.
457
458 %package -n libobjc-32bit
459 Summary:       Library for the GNU Objective C Compiler
460 License:       GPL-3.0-with-GCC-exception
461 Group:         Development/Building
462 %description -n libobjc-32bit
463 The library for the GNU Objective C compiler.
464 %post -n libobjc-32bit -p /sbin/ldconfig
465 %postun -n libobjc-32bit -p /sbin/ldconfig
466
467 %package ada-32bit
468 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
469 License:       GPL-3.0+
470 Group:         Development/Languages
471 %description ada-32bit
472 This package contains an Ada95 compiler and associated development
473 tools based on the GNU GCC technology. Ada95 is the object oriented
474 successor of the Ada83 language. To build this package from source you
475 must have installed a binary version to bootstrap the compiler.
476
477 %package -n libada-32bit
478 Summary:       GNU Ada Runtime Libraries
479 License:       GPL-3.0-with-GCC-exception
480 Group:         Development/Languages
481 %description -n libada-32bit
482 This package contains the shared libraries required to run programs
483 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
484 shared libraries. It also contains the shared libraries for the
485 Implementation of the Ada Semantic Interface Specification (ASIS), the
486 implementation of Distributed Systems Programming (GLADE) and the Posix
487 1003.5 Binding (Florist).
488 %post -n libada-32bit -p /sbin/ldconfig
489 %postun -n libada-32bit -p /sbin/ldconfig
490
491 %package fortran-32bit
492 Summary:       The GNU Fortran Compiler and Support Files
493 License:       GPL-3.0+
494 Group:         Development/Languages
495 %description fortran-32bit
496 This is the Fortran compiler of the GNU Compiler Collection (GCC).
497
498 %package -n libgfortran-32bit
499 Summary:       The GNU Fortran Compiler Runtime Library
500 License:       GPL-3.0-with-GCC-exception
501 Group:         Development/Languages
502 %description -n libgfortran-32bit
503 The runtime library needed to run programs compiled with the Fortran compiler
504 of the GNU Compiler Collection (GCC).
505 %post -n libgfortran-32bit -p /sbin/ldconfig
506 %postun -n libgfortran-32bit -p /sbin/ldconfig
507
508 %package -n libquadmath-32bit
509 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
510 License:       LGPL-2.1
511 Group:         Development/Languages
512 %description -n libquadmath-32bit
513 The runtime library needed to run programs compiled with the Fortran compiler
514 of the GNU Compiler Collection (GCC) and quadruple precision floating point
515 operations.
516 %post -n libquadmath-32bit -p /sbin/ldconfig
517 %postun -n libquadmath-32bit -p /sbin/ldconfig
518
519 %package -n libitm-32bit
520 Summary:       The GNU Compiler Transactional Memory Runtime Library
521 License:       GPL-3.0-with-GCC-exception
522 Group:         Development/Languages
523 %description -n libitm-32bit
524 The runtime library needed to run programs compiled with the
525 -fgnu-tm option of the GNU Compiler Collection (GCC).
526 %post -n libitm-32bit -p /sbin/ldconfig
527 %postun -n libitm-32bit -p /sbin/ldconfig
528
529 %package -n libasan-32bit
530 Summary:       The GNU Compiler Address Sanitizer Runtime Library
531 License:       MIT
532 Group:         Development/Languages
533 %description -n libasan-32bit
534 The runtime library needed to run programs compiled with the
535 -fsanitize=address option of the GNU Compiler Collection (GCC).
536 %post -n libasan-32bit -p /sbin/ldconfig
537 %postun -n libasan-32bit -p /sbin/ldconfig
538
539 %package -n liblsan-32bit
540 Summary:       The GNU Compiler Address Sanitizer Runtime Library
541 License:       MIT
542 Group:         Development/Languages
543 %description -n liblsan-32bit
544 The runtime library needed to run programs compiled with the
545 -fsanitize=leak option of the GNU Compiler Collection (GCC).
546 %post -n liblsan-32bit -p /sbin/ldconfig
547 %postun -n liblsan-32bit -p /sbin/ldconfig
548
549 %package -n libtsan-32bit
550 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
551 License:       MIT
552 Group:         Development/Languages
553 %description -n libtsan-32bit
554 The runtime library needed to run programs compiled with the
555 -fsanitize=thread option of the GNU Compiler Collection (GCC).
556 %post -n libtsan-32bit -p /sbin/ldconfig
557 %postun -n libtsan-32bit -p /sbin/ldconfig
558
559 %package -n libatomic-32bit
560 Summary:       The GNU Compiler Atomic Operations Runtime Library
561 License:       GPL-3.0-with-GCC-exception
562 Group:         Development/Languages
563 %description -n libatomic-32bit
564 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
565 %post -n libatomic-32bit -p /sbin/ldconfig
566 %postun -n libatomic-32bit -p /sbin/ldconfig
567
568 %package -n libcilkrts-32bit
569 Summary:       The GNU Compiler Cilk+ Runtime Library
570 License:       MIT
571 Group:         Development/Languages
572 %description -n libcilkrts-32bit
573 The runtime library needed to run programs compiled with the
574 -fcilkplus option of the GNU Compiler Collection (GCC).
575 %post -n libcilkrts-32bit -p /sbin/ldconfig
576 %postun -n libcilkrts-32bit -p /sbin/ldconfig
577
578 %package -n libubsan-32bit
579 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
580 License:       MIT
581 Group:         Development/Languages
582 %description -n libubsan-32bit
583 The runtime library needed to run programs compiled with the
584 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
585 %post -n libubsan-32bit -p /sbin/ldconfig
586 %postun -n libubsan-32bit -p /sbin/ldconfig
587
588 %package -n libvtv-32bit
589 Summary:       The GNU Compiler Vtable Verifier Runtime Library
590 License:       MIT
591 Group:         Development/Languages
592 %description -n libvtv-32bit
593 The runtime library needed to run programs compiled with the
594 -fvtable-verify option of the GNU Compiler Collection (GCC).
595 %post -n libvtv-32bit -p /sbin/ldconfig
596 %postun -n libvtv-32bit -p /sbin/ldconfig
597
598 %package -n libffi-32bit
599 Summary:       Foreign Function Interface library
600 License:       BSD-3-Clause
601 Group:         Development/Building
602 %description -n libffi-32bit
603 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
604 %post -n libffi-32bit -p /sbin/ldconfig
605 %postun -n libffi-32bit -p /sbin/ldconfig
606
607 %package -n libffi-devel-32bit
608 Summary:       Foreign Function Interface library development files
609 License:       BSD 3-Clause
610 Group:         Development/Building
611 %description -n libffi-devel-32bit
612 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
613
614 %package go-32bit
615 Summary:       GNU Go Compiler
616 License:       GPL-3.0+
617 Group:         Development/Languages
618 %description go-32bit
619 This package contains a Go compiler and associated development
620 files based on the GNU GCC technology.
621
622 %package -n libgo-32bit
623 Summary:       GNU Go compiler runtime library
624 License:       BSD-3-Clause
625 Group:         Development/Languages
626 %description -n libgo-32bit
627 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
628 %post -n libgo-32bit -p /sbin/ldconfig
629 %postun -n libgo-32bit -p /sbin/ldconfig
630
631 %package plugin-devel
632 Summary:       GNU GCC Plugin development files
633 License:       GPL-3.0+
634 Group:         Development/Languages
635 %description plugin-devel
636 This package contains GCC Plugin development files needed for compiler
637 plugins build.
638
639 %package -n sanitizer-sources
640 Summary:    Sanitizer family tools sources
641 License:       MIT
642 Group:      Development/Tools
643 BuildArch:  noarch
644
645 %description -n sanitizer-sources
646 Sanitizer family tools sources for external tools.
647
648 %prep
649
650 %setup -q -n gcc-%{version}
651 cp %{SOURCE20} .
652
653 tar xf %{SOURCE10}
654 ln -sf gmp-6.1.1 gmp
655 tar xf %{SOURCE11}
656 ln -sf mpfr-3.1.5 mpfr
657 tar xf %{SOURCE12}
658 ln -sf mpc-1.0.3 mpc
659 tar xf %{SOURCE13}
660 ln -sf isl-0.17.1 isl
661
662 echo "" > gcc/DEV-PHASE
663
664 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
665
666 %build
667 %{?asan:%gcc_unforce_options}
668 rm -rf obj
669 mkdir obj
670 cd obj
671
672 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g' -e 's/-fexceptions//' -e 's/\([[:space:]]\+.*-D_FORTIFY_SOURCE=\)[[:alnum:]]\+/\10/g'
673 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
674 %{?cross:
675 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
676 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
677 }
678 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  */ /g'`
679 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
680
681 %ifarch armv7l armv7hl aarch64
682 %undefine gcc_profiledbootstrap
683 %endif
684
685 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
686 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
687 ../configure \
688         --prefix=%{_prefix} \
689         --infodir=%{_infodir} \
690         --mandir=%{_mandir} \
691         --libdir=%{libdir} \
692         --libexecdir=%{libdir} \
693         --enable-languages=c,c++,fortran \
694         --enable-checking=release \
695         --disable-libssp \
696         %{!?gcc_profiledbootstrap:--disable-bootstrap} \
697         --disable-libvtv \
698         --enable-plugin \
699         --disable-libcc1 \
700         --disable-libgcj \
701         --with-slibdir=%{libdir} \
702         --with-system-zlib \
703         --with-sysroot=/ \
704         --enable-__cxa_atexit \
705         --enable-libstdcxx-allocator=new \
706         --enable-version-specific-runtime-libs \
707         --enable-linker-build-id \
708         --without-system-libunwind \
709         --enable-threads=posix \
710         --disable-multilib \
711         --enable-lto \
712 %{!?cross: \
713         --enable-libcc1 \
714         --enable-libgfortran \
715         %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
716 %ifarch armv7l
717         --with-arch=armv7-a \
718         --with-tune=cortex-a8 \
719         --disable-sjlj-exceptions \
720 %endif
721 %ifarch armv7hl
722         --with-arch=armv7-a \
723         --with-tune=cortex-a8 \
724         --disable-sjlj-exceptions \
725         --with-float=hard \
726 %endif
727 %ifarch aarch64
728         --with-arch=armv8-a \
729         --disable-sjlj-exceptions \
730 %endif
731 %ifarch %ix86
732         --with-arch-32=i586 \
733         --with-tune=generic \
734         --disable-libmpx \
735 %endif
736 %ifarch x86_64
737         --with-arch-32=i586 \
738         --with-tune=generic \
739         --enable-multilib \
740         --disable-libmpx \
741 %endif
742 } \
743 %{?cross: \
744 %{?armv7l: \
745         --with-arch=armv7-a \
746         --with-tune=cortex-a8 \
747         --disable-sjlj-exceptions \
748 } \
749 %{?armv7hl: \
750         --with-arch=armv7-a \
751         --with-tune=cortex-a8 \
752         --disable-sjlj-exceptions \
753         --with-float=hard \
754 } \
755 %{?aarch64: \
756         --with-arch=armv8-a \
757         --disable-sjlj-exceptions \
758 } \
759         --disable-libgcc \
760         --disable-libgfortran \
761         --disable-libquadmath \
762         --disable-libgomp \
763         --disable-libatomic \
764         --disable-libstdc++-v3 \
765         --disable-libsanitizer \
766         --disable-libitm \
767 } \
768         --with-bugurl="http://bugs.tizen.org/" \
769         --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release}" \
770         --target=%{target_arch} \
771         --host=%{host_arch} \
772         --build=%{host_arch}
773
774 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
775 %{?gcc_run_tests:
776   echo "Run testsuite"
777   # asan needs a whole shadow address space
778   ulimit -v unlimited || true
779   make -k check %{?_smp_mflags} || true
780   mkdir ../testresults
781   ../contrib/test_summary | tee ../testresults/test_summary.txt
782 }
783
784 %install
785 cd obj
786
787 make install DESTDIR=$RPM_BUILD_ROOT
788
789 %{?gcc_run_tests:
790   cp `find . -name "*.sum"` ../testresults/
791   cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
792   chmod 644 ../testresults/*
793 }
794
795 %{remove_docs}
796 rm -rf %{buildroot}/%{_datadir}/locale
797
798 #remove everything we don't need
799 rm -rf %{buildroot}/%{libsubdir}/install-tools
800 find %{buildroot}/ -name "*.la" -delete
801
802 %{!?cross:
803 ln -s gcc %{buildroot}%{_bindir}/cc
804 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
805
806 # expose plugins for ar (required for lto builds)
807 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
808 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
809
810 # legacy preprocessor
811 mkdir -p %{buildroot}/lib
812 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
813
814 # 32-bit libgcc in multilib configuration
815 %ifarch x86_64
816 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
817 %endif
818
819 # move libraries to libdir
820 for lib in asan atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan
821 do
822   [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
823   [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
824 done
825 }
826
827 %{?cross:
828 rm -rf %{buildroot}/%{libsubdir}/include-fixed
829 rm -rf %{buildroot}/%{libsubdir}/include
830 }
831
832 %{!?cross:
833 cd ../
834 tar -czf libsanitizer.tar.bz libsanitizer
835 mkdir -p %{buildroot}/src
836 mv -v libsanitizer.tar.bz %{buildroot}/src
837 }
838
839 %files
840 %manifest gcc.manifest
841 %defattr(-,root,root)
842 %{?cross:
843 %{_bindir}/*
844 %{libsubdir}/*
845 }
846 %{!?cross:
847 %{_bindir}/gcc
848 %{_bindir}/cc
849 %{_bindir}/gcov
850 %{_bindir}/gcov-tool
851 %{_bindir}/gcc-ar
852 %{_bindir}/gcc-nm
853 %{_bindir}/gcc-ranlib
854 %{_bindir}/%{target_arch}-gcc
855 %{_bindir}/%{target_arch}-gcc-%{version}
856 %{_bindir}/%{target_arch}-gcc-ar
857 %{_bindir}/%{target_arch}-gcc-nm
858 %{_bindir}/%{target_arch}-gcc-ranlib
859 %{libsubdir}/collect2
860 %{libsubdir}/lto1
861 %{libsubdir}/lto-wrapper
862 %{libsubdir}/liblto_plugin.so*
863 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
864 %{libsubdir}/include-fixed/*
865 %{libsubdir}/include/*.h
866 %{libsubdir}/*.a
867 %{libsubdir}/*.so
868 %{libsubdir}/*.o
869 %{libsubdir}/*.spec
870 %{libdir}/*.so
871 %{libdir}/*.a
872 %ifarch %cilkrts_arch
873 %{libsubdir}/include/cilk/*
874 %endif
875 %{libsubdir}/include/sanitizer/*
876 %ifarch %asan_arch
877 %exclude %{libdir}/libasan.so
878 %endif
879 %ifarch %lsan_arch
880 %exclude %{libdir}/liblsan.so
881 %endif
882 %ifarch %tsan_arch
883 %exclude %{libdir}/libtsan.so
884 %endif
885
886 %files c++
887 %defattr(-,root,root)
888 %{libsubdir}/cc1plus
889 %{_bindir}/g++
890 %{_bindir}/c++
891 %{_bindir}/%{target_arch}-g++
892 %{_bindir}/%{target_arch}-c++
893
894 %files -n libstdc++
895 %manifest gcc.manifest
896 %license COPYING3 COPYING.RUNTIME
897 %defattr(-,root,root)
898 %{libdir}/libstdc++.so.*
899
900 %files -n libstdc++-devel
901 %defattr(-,root,root)
902 %{libdir}/libstdc++.so
903 %{libdir}/libstdc++.a
904 %{libdir}/libsupc++.a
905 %{libsubdir}/include/c++/*
906 %{_datadir}/gcc-%{version}/python/libstdcxx/*
907
908 %files -n libgcc
909 %manifest gcc.manifest
910 %license COPYING3 COPYING.RUNTIME
911 %defattr(-,root,root)
912 %{libdir}/libgcc_s.so.*
913
914 %files -n libgomp
915 %manifest gcc.manifest
916 %license COPYING3 COPYING.RUNTIME
917 %defattr(-,root,root)
918 %{libdir}/libgomp.so.*
919
920 %files -n libcc1
921 %manifest gcc.manifest
922 %defattr(-,root,root)
923 %{libdir}/libcc1.so.*
924
925 %ifarch %asan_arch
926 %files -n libasan
927 %manifest gcc.manifest
928 %license libsanitizer/LICENSE.TXT
929 %defattr(-,root,root)
930 %{libdir}/libasan.so*
931 %endif
932
933 %ifarch %lsan_arch
934 %files -n liblsan
935 %manifest gcc.manifest
936 %license libsanitizer/LICENSE.TXT
937 %defattr(-,root,root)
938 %{libdir}/liblsan.so*
939 %endif
940
941 %ifarch %tsan_arch
942 %files -n libtsan
943 %manifest gcc.manifest
944 %license libsanitizer/LICENSE.TXT
945 %defattr(-,root,root)
946 %{libdir}/libtsan.so*
947 %endif
948
949 %ifarch %atomic_arch
950 %files -n libatomic
951 %manifest gcc.manifest
952 %license COPYING3 COPYING.RUNTIME
953 %defattr(-,root,root)
954 %{libdir}/libatomic.so.*
955 %endif
956
957 %ifarch %itm_arch
958 %files -n libitm
959 %manifest gcc.manifest
960 %license COPYING3 COPYING.RUNTIME
961 %defattr(-,root,root)
962 %{libdir}/libitm.so.*
963 %endif
964
965 %ifarch %cilkrts_arch
966 %files -n libcilkrts
967 %manifest gcc.manifest
968 %defattr(-,root,root)
969 %{libdir}/libcilkrts.so.*
970 %endif
971
972 %ifarch %ubsan_arch
973 %files -n libubsan
974 %manifest gcc.manifest
975 %license libsanitizer/LICENSE.TXT
976 %defattr(-,root,root)
977 %{libdir}/libubsan.so.*
978 %endif
979
980 %files fortran
981 %defattr(-,root,root)
982 %dir %{libsubdir}/finclude
983 %{_bindir}/gfortran
984 %{_bindir}/%{target_arch}-gfortran
985 %{libsubdir}/f951
986 %{libsubdir}/finclude/*
987 %{libdir}/libgfortran.a
988 %{libdir}/libgfortran.so
989 %{libsubdir}/libgfortran.spec
990 %{libsubdir}/libcaf_single.a
991 %ifarch %quadmath_arch
992 %{libdir}/libquadmath.a
993 %{libdir}/libquadmath.so
994 %endif
995
996 %files -n libgfortran
997 %defattr(-,root,root)
998 %{libdir}/libgfortran.so.*
999
1000 %ifarch %quadmath_arch
1001 %files -n libquadmath
1002 %manifest gcc.manifest
1003 %license COPYING.LIB
1004 %defattr(-,root,root)
1005 %{libdir}/libquadmath.so.*
1006 %endif
1007
1008 %files -n cpp
1009 %defattr(-,root,root)
1010 %{_bindir}/cpp
1011 %{libsubdir}/cc1
1012 /lib/cpp
1013
1014 %files plugin-devel
1015 %defattr(-,root,root)
1016 %{libsubdir}/plugin/*
1017
1018 %{?gcc_run_tests:
1019 %files testresults
1020 %defattr(-,root,root)
1021 %doc testresults/test_summary.txt
1022 %doc testresults/*.sum
1023 %doc testresults/*.log
1024 }
1025 %ifarch x86_64
1026 %files -n gcc-32bit
1027 %defattr(-,root,root)
1028 %{libsubdir}/32/crt*
1029 %{libsubdir}/32/*.a
1030 %{libsubdir}/32/*.so
1031 %{libsubdir}/32/*.o
1032 %{libsubdir}/32/*.spec
1033
1034 %ifarch %asan_arch
1035 %files -n libasan-32bit
1036 %manifest gcc.manifest
1037 %license libsanitizer/LICENSE.TXT
1038 %defattr(-,root,root)
1039 %{libsubdir}/32/libasan.so.*
1040 %endif
1041
1042 %ifarch %lsan_arch
1043 %files -n liblsan-32bit
1044 %manifest gcc.manifest
1045 %license libsanitizer/LICENSE.TXT
1046 %defattr(-,root,root)
1047 %{libsubdir}/32/liblsan.so.*
1048 %endif
1049
1050 %ifarch %atomic_arch
1051 %files -n libatomic-32bit
1052 %manifest gcc.manifest
1053 %license COPYING3 COPYING.RUNTIME
1054 %defattr(-,root,root)
1055 %{libsubdir}/32/libatomic.so.*
1056 %endif
1057
1058 %ifarch %cilkrts_arch
1059 %files -n libcilkrts-32bit
1060 %defattr(-,root,root)
1061 %{libsubdir}/32/libcilkrts.so.*
1062 %endif
1063
1064 %files -n libgcc-32bit
1065 %manifest gcc.manifest
1066 %license COPYING3 COPYING.RUNTIME
1067 %defattr(-,root,root)
1068 %{libsubdir}/32/libgcc_s.so.*
1069
1070 %files -n libgomp-32bit
1071 %manifest gcc.manifest
1072 %license COPYING3 COPYING.RUNTIME
1073 %defattr(-,root,root)
1074 %{libsubdir}/32/libgomp.so.*
1075
1076 %ifarch %itm_arch
1077 %files -n libitm-32bit
1078 %license COPYING3 COPYING.RUNTIME
1079 %defattr(-,root,root)
1080 %{libsubdir}/32/libitm.so.*
1081 %endif
1082
1083 %files -n libgfortran-32bit
1084 %defattr(-,root,root)
1085 %dir %{libsubdir}/32/finclude
1086 %{libsubdir}/32/libgfortran.so.*
1087 %{libsubdir}/32/finclude/*
1088
1089 %ifarch %quadmath_arch
1090 %files -n libquadmath-32bit
1091 %license COPYING.LIB
1092 %defattr(-,root,root)
1093 %{libsubdir}/32/libquadmath.so.*
1094 %endif
1095
1096 %ifarch %ubsan_arch
1097 %files -n libubsan-32bit
1098 %manifest gcc.manifest
1099 %license libsanitizer/LICENSE.TXT
1100 %defattr(-,root,root)
1101 %{libsubdir}/32/libubsan.so.*
1102 %endif
1103
1104 %files -n libstdc++-32bit
1105 %manifest gcc.manifest
1106 %license COPYING3 COPYING.RUNTIME
1107 %defattr(-,root,root)
1108 %{libsubdir}/32/libstdc++.so.*
1109 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1110
1111 %files -n libstdc++-devel-32bit
1112 %defattr(-,root,root)
1113 %{libsubdir}/32/libstdc++.so.*-gdb.py
1114 %endif
1115
1116 %files -n sanitizer-sources
1117 %defattr(-,root,root,-)
1118 /src/libsanitizer.tar.bz
1119
1120 }
1121
1122 %changelog