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