packaging: Add %gcc_force_options and %gcc_unforce_options macros
[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 armv7l 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 %ix86
37 %define ARCH i586
38 %endif
39 %ifarch x86_64
40 %define ARCH x86_64
41 %endif
42 %ifarch aarch64
43 %define ARCH aarch64
44 %endif
45 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
46
47 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
48 %define target_abi %{?cross:%{?armv7l:eabi}}%{!?cross:%{?ABI}}
49
50 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
51 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
52 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
53
54 %define asan_force_options -fsanitize-recover=address -fsanitize=address -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE
55 %define ubsan_force_options -fsanitize=undefined,bounds-strict,float-divide-by-zero,float-cast-overflow
56 %define lsan_force_options -fsanitize=leak -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE
57
58 %define asan_runtime_options halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0:log_path=/tmp/asan.log:log_exe_name=1
59 %define ubsan_runtime_options print_cmdline=true:log_path=/tmp/ubsan.log
60 %define lsan_runtime_options print_cmdline=true:detect_leaks=1:log_path=/tmp/lsan.log:log_exe_name=1:fast_unwind_on_malloc=false:malloc_context_size=5:suppressions=/lsan.supp:print_suppressions=false
61
62 Name:         gcc%{?cross:-%{cross}}
63 # With generated files in src we could drop the following
64 BuildRequires: bison
65 BuildRequires: flex
66 BuildRequires: gettext-devel
67 BuildRequires: makeinfo
68 ## until here, but at least renaming and patching info files breaks this
69 BuildRequires: gcc-c++
70 BuildRequires: zlib-devel
71 %ifarch x86_64
72 BuildRequires: glibc-devel-32bit
73 %endif
74 BuildRequires: perl
75 %{?cross:BuildRequires: binutils-%{cross}}
76 # here we use %%if because OBS spec parser cannot expand
77 # %%{?macro:...} correctly
78 %if 0%{?gcc_run_tests}
79 BuildRequires: dejagnu
80 BuildRequires: expect
81 BuildRequires: gdb
82 %endif
83 URL:           http://gcc.gnu.org/
84 Version:       6.3.1
85 Release:       0
86 Source:        gcc-%{version}.tar.bz2
87 Source10: gmp-6.1.1.tar.bz2
88 Source11: mpfr-3.1.5.tar.bz2
89 Source12: mpc-1.0.3.tar.gz
90 Source13: isl-0.17.1.tar.bz2
91 Source15: gcc-force-options
92 Source16: gcc-unforce-options
93 Source17: ASAN_OPTIONS
94 Source18: asan_symbolize.py
95 Source19: LSAN_OPTIONS
96 Source20: gcc.manifest
97 Source21: UBSAN_OPTIONS
98 Source22: macros.ubsan
99 Source23: extract-ubsan-logs
100 Source24: lsan.supp
101 Group:         Development/Building
102 Summary:       The GNU C Compiler and Support Files
103 License:       GPL-3.0+
104 %{?cross:ExcludeArch: %{cross}}
105 %description
106 Core package for the GNU Compiler Collection, including the C language
107 frontend.
108
109 %package c++
110 Summary:       The GNU C++ Compiler
111 License:       GPL-3.0+
112 Group:         Development/Languages
113 %description c++
114 This package contains the GNU compiler for C++.
115
116 %package -n libstdc++
117 Summary:       The standard C++ shared library
118 License:       GPL-3.0-with-GCC-exception
119 Group:         Development/Building
120 %description -n libstdc++
121 The standard C++ library, needed for dynamically linked C++ programs.
122 %post -n libstdc++ -p /sbin/ldconfig
123 %postun -n libstdc++ -p /sbin/ldconfig
124
125 %package -n libstdc++-devel
126 Summary:       Include Files and Libraries mandatory for Development
127 License:       GPL-3.0-with-GCC-exception
128 Group:         Development/Building
129 %description -n libstdc++-devel
130 This package contains all the headers and libraries of the standard C++
131 library. It is needed for compiling C++ code.
132
133 %package -n libgcc
134 Summary:       C compiler runtime library
135 License:       GPL-3.0-with-GCC-exception
136 Group:         Development/Building
137 %description -n libgcc
138 Libgcc is needed for dynamically linked C programs.
139 %post -n libgcc -p /sbin/ldconfig
140 %postun -n libgcc -p /sbin/ldconfig
141
142 %package -n libgomp
143 Summary:       The GNU compiler collection OpenMP runtime library
144 License:       GPL-3.0-with-GCC-exception
145 Group:         Development/Building
146 %description -n libgomp
147 This is the OpenMP runtime library needed by OpenMP enabled programs
148 that were built with the -fopenmp compiler option and by programs that
149 were auto-parallelized via the -ftree-parallelize-loops compiler
150 option.
151 %post -n libgomp -p /sbin/ldconfig
152 %postun -n libgomp -p /sbin/ldconfig
153
154 %package objc
155 Summary:       GNU Objective C Compiler
156 License:       GPL-3.0+
157 Group:         Development/Languages
158 %description objc
159 This package contains the GNU Objective C compiler. Objective C is an
160 object oriented language, created by Next Inc. and used in their
161 Nextstep OS. The source code is available in the gcc package.
162
163 %package -n libobjc
164 Summary:       Library for the GNU Objective C Compiler
165 License:       GPL-3.0-with-GCC-exception
166 Group:         Development/Building
167 %description -n libobjc
168 The library for the GNU Objective C compiler.
169 %post -n libobjc -p /sbin/ldconfig
170 %postun -n libobjc -p /sbin/ldconfig
171
172 %package -n libcc1
173 Summary:       GNU C Compiler plugin for GDB
174 License:       GPL-3.0-with-GCC-exception
175 Group:         Development/Building
176 %description -n libcc1
177 The GCC plugin for GDB
178 %post -n libcc1 -p /sbin/ldconfig
179 %postun -n libcc1 -p /sbin/ldconfig
180
181 %package obj-c++
182 Summary:       GNU Objective C++ Compiler
183 License:       GPL-3.0+
184 Group:         Development/Languages
185 %description obj-c++
186 This package contains the GNU Objective C++ compiler. Objective C++ is an
187 object oriented language, created by Next Inc. and used in their
188 Nextstep OS. The source code is available in the gcc package.
189
190 %package -n cpp
191 Summary:       The GCC Preprocessor
192 License:       GPL-3.0+
193 Group:         Development/Languages
194 %description -n cpp
195 This Package contains just the preprocessor that is used by the X11
196 packages.
197
198 %package ada
199 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
200 License:       GPL-3.0+
201 Group:         Development/Languages
202 %description ada
203 This package contains an Ada95 compiler and associated development
204 tools based on the GNU GCC technology. Ada95 is the object oriented
205 successor of the Ada83 language. To build this package from source you
206 must have installed a binary version to bootstrap the compiler.
207
208 %package -n libada
209 Summary:      GNU Ada Runtime Libraries
210 License:      GPL-3.0-with-GCC-exception
211 Group:        Development/Languages
212 %description -n libada
213 This package contains the shared libraries required to run programs
214 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
215 shared libraries. It also contains the shared libraries for the
216 Implementation of the Ada Semantic Interface Specification (ASIS), the
217 implementation of Distributed Systems Programming (GLADE) and the Posix
218 1003.5 Binding (Florist).
219 %post -n libada -p /sbin/ldconfig
220 %postun -n libada -p /sbin/ldconfig
221
222 %package fortran
223 Summary:       The GNU Fortran Compiler and Support Files
224 License:       GPL-3.0+
225 Group:         Development/Languages
226 %description fortran
227 This is the Fortran compiler of the GNU Compiler Collection (GCC).
228
229 %package -n libgfortran
230 Summary:       The GNU Fortran Compiler Runtime Library
231 License:       GPL-3.0-with-GCC-exception
232 Group:         Development/Languages
233 %description -n libgfortran
234 The runtime library needed to run programs compiled with the Fortran compiler
235 of the GNU Compiler Collection (GCC).
236 %post -n libgfortran -p /sbin/ldconfig
237 %postun -n libgfortran -p /sbin/ldconfig
238
239 %package -n libquadmath
240 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
241 License:       LGPL-2.1
242 Group:         Development/Languages
243 %description -n libquadmath
244 The runtime library needed to run programs compiled with the Fortran compiler
245 of the GNU Compiler Collection (GCC) and quadruple precision floating point
246 operations.
247 %post -n libquadmath -p /sbin/ldconfig
248 %postun -n libquadmath -p /sbin/ldconfig
249
250 %package -n libitm
251 Summary:       The GNU Compiler Transactional Memory Runtime Library
252 License:       GPL-3.0-with-GCC-exception
253 Group:         Development/Languages
254 %description -n libitm
255 The runtime library needed to run programs compiled with the
256 -fgnu-tm option of the GNU Compiler Collection (GCC).
257 %post -n libitm -p /sbin/ldconfig
258 %postun -n libitm -p /sbin/ldconfig
259
260 %package -n libasan
261 Summary:       The GNU Compiler Address Sanitizer Runtime Library
262 License:       MIT
263 Group:         Development/Languages
264 %description -n libasan
265 The runtime library needed to run programs compiled with the
266 -fsanitize=address option of the GNU Compiler Collection (GCC).
267 %post -n libasan -p /sbin/ldconfig
268 %postun -n libasan -p /sbin/ldconfig
269
270 %package -n libtsan
271 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
272 License:       MIT
273 Group:         Development/Languages
274 %description -n libtsan
275 The runtime library needed to run programs compiled with the
276 -fsanitize=thread option of the GNU Compiler Collection (GCC).
277 %post -n libtsan -p /sbin/ldconfig
278 %postun -n libtsan -p /sbin/ldconfig
279
280 %package -n libatomic
281 Summary:       The GNU Compiler Atomic Operations Runtime Library
282 License:       GPL-3.0-with-GCC-exception
283 Group:         Development/Languages
284 %description -n libatomic
285 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
286 %post -n libatomic -p /sbin/ldconfig
287 %postun -n libatomic -p /sbin/ldconfig
288
289 %package -n libcilkrts
290 Summary:       The GNU Compiler Cilk+ Runtime Library
291 License:       MIT
292 Group:         Development/Languages
293 %description -n libcilkrts
294 The runtime library needed to run programs compiled with the
295 -fcilkplus option of the GNU Compiler Collection (GCC).
296 %post -n libcilkrts -p /sbin/ldconfig
297 %postun -n libcilkrts -p /sbin/ldconfig
298
299 %package -n liblsan
300 Summary:       The GNU Compiler Leak Sanitizer Runtime Library
301 License:       MIT
302 Group:         Development/Languages
303 %description -n liblsan
304 The runtime library needed to run programs compiled with the
305 -fsanitize=leak option of the GNU Compiler Collection (GCC).
306 %post -n liblsan -p /sbin/ldconfig
307 %postun -n liblsan -p /sbin/ldconfig
308
309 %package -n libubsan
310 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
311 License:       MIT
312 Group:         Development/Languages
313 %description -n libubsan
314 The runtime library needed to run programs compiled with the
315 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
316 %post -n libubsan -p /sbin/ldconfig
317 %postun -n libubsan -p /sbin/ldconfig
318
319 %package -n libvtv
320 Summary:       The GNU Compiler Vtable Verifier Runtime Library
321 License:       MIT
322 Group:         Development/Languages
323 %description -n libvtv
324 The runtime library needed to run programs compiled with the
325 -fvtable-verify option of the GNU Compiler Collection (GCC).
326 %post -n libvtv -p /sbin/ldconfig
327 %postun -n libvtv -p /sbin/ldconfig
328
329 %package -n libgcj
330 Summary:       Java Runtime Library for gcc
331 License:       GPL-2.0-with-classpath-exception
332 Group:         Development/Building
333 %description -n libgcj
334 This library is needed if you want to use the GNU Java compiler, gcj.
335 Source code for this package is in gcc.
336 %post -n libgcj -p /sbin/ldconfig
337 %postun -n libgcj -p /sbin/ldconfig
338
339 %package java
340 Summary:       The GNU Java Compiler
341 License:       GPL-3.0+
342 Group:         Development/Languages
343 %description java
344 The Java compiler from the GCC-tools-suite.
345
346 %package -n libgcj_bc
347 Summary:       Fake library for BC-ABI compatibility.
348 License:       GPL-2.0-with-classpath-exception
349 Group:         Development/Languages
350 %description -n libgcj_bc
351 A fake library that is used at link time only. It ensures that
352 binaries built with the BC-ABI link against a constant SONAME.
353 This way, BC-ABI binaries continue to work if the SONAME underlying
354 libgcj.so changes.
355
356 %package -n libgcj-jar
357 Summary:       Java runtime library (jar files).
358 License:       GPL-2.0-with-classpath-exception
359 Group:         Development/Languages
360 %description -n libgcj-jar
361 These are the jar files that go along with the gcj front end to gcc.
362
363 %package -n libgcj-devel
364 Summary:       Include Files and Libraries mandatory for Development.
365 License:       GPL-2.0-with-classpath-exception
366 Group:         Development/Languages
367 %description -n libgcj-devel
368 This package contains all necessary include files and libraries needed
369 to develop applications that require these.
370
371 %package -n gcc-gij
372 Summary:       Java Bytecode Interpreter for gcc
373 License:       GPL-2.0-with-classpath-exception
374 Group:         Development/Languages
375 %description -n gcc-gij
376 This package contains the java bytecode interpreter gij and related tools.
377
378 %package -n libffi
379 Summary:       Foreign Function Interface library
380 License:       BSD-3-Clause
381 Group:         Development/Building
382 %description -n libffi
383 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.
384 %post -n libffi -p /sbin/ldconfig
385 %postun -n libffi -p /sbin/ldconfig
386
387 %package -n libffi-devel
388 Summary:       Foreign Function Interface library development files
389 License:       BSD 3-Clause
390 Group:         Development/Building
391 %description -n libffi-devel
392 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.
393
394 %package go
395 Summary:       GNU Go Compiler
396 License:       GPL-3.0+
397 Group:         Development/Languages
398 %description go
399 This package contains a Go compiler and associated development
400 files based on the GNU GCC technology.
401
402 %package -n libgo
403 Summary:       GNU Go compiler runtime library
404 License:       BSD-3-Clause
405 Group:         Development/Languages
406 %description -n libgo
407 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.
408 %post -n libgo -p /sbin/ldconfig
409 %postun -n libgo -p /sbin/ldconfig
410
411 %package testresults
412 Summary:       Testsuite results
413 License:       SUSE-Public-Domain
414 Group:         Development/Languages
415 %description testresults
416 Results from running the gcc and target library testsuites.
417
418 %package -n gcc-32bit
419 Summary:       The GNU C Compiler 32bit support
420 Group:         Development/Building
421 %description -n gcc-32bit
422 This package contains 32bit support for the GNU Compiler Collection.
423
424 %package -n libstdc++-devel-32bit
425 Summary:       Include Files and Libraries mandatory for Development
426 License:       GPL-3.0-with-GCC-exception
427 Group:         Development/Building
428 %description -n libstdc++-devel-32bit
429 This package contains all the headers and libraries of the standard C++
430 library. It is needed for compiling C++ code.
431
432 %package -n libgcc-32bit
433 Summary:       C compiler runtime library
434 License:       GPL-3.0-with-GCC-exception
435 Group:         Development/Building
436 %description -n libgcc-32bit
437 Libgcc is needed for dynamically linked C programs.
438 %post -n libgcc-32bit -p /sbin/ldconfig
439 %postun -n libgcc-32bit -p /sbin/ldconfig
440
441 %package -n libgomp-32bit
442 Summary:       The GNU compiler collection OpenMP runtime library
443 License:       GPL-3.0-with-GCC-exception
444 Group:         Development/Building
445 %description -n libgomp-32bit
446 This is the OpenMP runtime library needed by OpenMP enabled programs
447 that were built with the -fopenmp compiler option and by programs that
448 were auto-parallelized via the -ftree-parallelize-loops compiler
449 option.
450 %post -n libgomp-32bit -p /sbin/ldconfig
451 %postun -n libgomp-32bit -p /sbin/ldconfig
452
453 %package -n libstdc++-32bit
454 Summary:       The standard C++ shared library
455 License:       GPL-3.0-with-GCC-exception
456 Group:         Development/Building
457 %description -n libstdc++-32bit
458 The standard C++ library, needed for dynamically linked C++ programs.
459 %post -n libstdc++-32bit -p /sbin/ldconfig
460 %postun -n libstdc++-32bit -p /sbin/ldconfig
461
462 %package objc-32bit
463 Summary:       GNU Objective C Compiler
464 License:       GPL-3.0+
465 Group:         Development/Languages
466 %description objc-32bit
467 This package contains the GNU Objective C compiler. Objective C is an
468 object oriented language, created by Next Inc. and used in their
469 Nextstep OS. The source code is available in the gcc package.
470
471 %package -n libobjc-32bit
472 Summary:       Library for the GNU Objective C Compiler
473 License:       GPL-3.0-with-GCC-exception
474 Group:         Development/Building
475 %description -n libobjc-32bit
476 The library for the GNU Objective C compiler.
477 %post -n libobjc-32bit -p /sbin/ldconfig
478 %postun -n libobjc-32bit -p /sbin/ldconfig
479
480 %package ada-32bit
481 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
482 License:       GPL-3.0+
483 Group:         Development/Languages
484 %description ada-32bit
485 This package contains an Ada95 compiler and associated development
486 tools based on the GNU GCC technology. Ada95 is the object oriented
487 successor of the Ada83 language. To build this package from source you
488 must have installed a binary version to bootstrap the compiler.
489
490 %package -n libada-32bit
491 Summary:       GNU Ada Runtime Libraries
492 License:       GPL-3.0-with-GCC-exception
493 Group:         Development/Languages
494 %description -n libada-32bit
495 This package contains the shared libraries required to run programs
496 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
497 shared libraries. It also contains the shared libraries for the
498 Implementation of the Ada Semantic Interface Specification (ASIS), the
499 implementation of Distributed Systems Programming (GLADE) and the Posix
500 1003.5 Binding (Florist).
501 %post -n libada-32bit -p /sbin/ldconfig
502 %postun -n libada-32bit -p /sbin/ldconfig
503
504 %package fortran-32bit
505 Summary:       The GNU Fortran Compiler and Support Files
506 License:       GPL-3.0+
507 Group:         Development/Languages
508 %description fortran-32bit
509 This is the Fortran compiler of the GNU Compiler Collection (GCC).
510
511 %package -n libgfortran-32bit
512 Summary:       The GNU Fortran Compiler Runtime Library
513 License:       GPL-3.0-with-GCC-exception
514 Group:         Development/Languages
515 %description -n libgfortran-32bit
516 The runtime library needed to run programs compiled with the Fortran compiler
517 of the GNU Compiler Collection (GCC).
518 %post -n libgfortran-32bit -p /sbin/ldconfig
519 %postun -n libgfortran-32bit -p /sbin/ldconfig
520
521 %package -n libquadmath-32bit
522 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
523 License:       LGPL-2.1
524 Group:         Development/Languages
525 %description -n libquadmath-32bit
526 The runtime library needed to run programs compiled with the Fortran compiler
527 of the GNU Compiler Collection (GCC) and quadruple precision floating point
528 operations.
529 %post -n libquadmath-32bit -p /sbin/ldconfig
530 %postun -n libquadmath-32bit -p /sbin/ldconfig
531
532 %package -n libitm-32bit
533 Summary:       The GNU Compiler Transactional Memory Runtime Library
534 License:       GPL-3.0-with-GCC-exception
535 Group:         Development/Languages
536 %description -n libitm-32bit
537 The runtime library needed to run programs compiled with the
538 -fgnu-tm option of the GNU Compiler Collection (GCC).
539 %post -n libitm-32bit -p /sbin/ldconfig
540 %postun -n libitm-32bit -p /sbin/ldconfig
541
542 %package -n libasan-32bit
543 Summary:       The GNU Compiler Address Sanitizer Runtime Library
544 License:       MIT
545 Group:         Development/Languages
546 %description -n libasan-32bit
547 The runtime library needed to run programs compiled with the
548 -fsanitize=address option of the GNU Compiler Collection (GCC).
549 %post -n libasan-32bit -p /sbin/ldconfig
550 %postun -n libasan-32bit -p /sbin/ldconfig
551
552 %package -n liblsan-32bit
553 Summary:       The GNU Compiler Address Sanitizer Runtime Library
554 License:       MIT
555 Group:         Development/Languages
556 %description -n liblsan-32bit
557 The runtime library needed to run programs compiled with the
558 -fsanitize=leak option of the GNU Compiler Collection (GCC).
559 %post -n liblsan-32bit -p /sbin/ldconfig
560 %postun -n liblsan-32bit -p /sbin/ldconfig
561
562 %package -n libtsan-32bit
563 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
564 License:       MIT
565 Group:         Development/Languages
566 %description -n libtsan-32bit
567 The runtime library needed to run programs compiled with the
568 -fsanitize=thread option of the GNU Compiler Collection (GCC).
569 %post -n libtsan-32bit -p /sbin/ldconfig
570 %postun -n libtsan-32bit -p /sbin/ldconfig
571
572 %package -n libatomic-32bit
573 Summary:       The GNU Compiler Atomic Operations Runtime Library
574 License:       GPL-3.0-with-GCC-exception
575 Group:         Development/Languages
576 %description -n libatomic-32bit
577 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
578 %post -n libatomic-32bit -p /sbin/ldconfig
579 %postun -n libatomic-32bit -p /sbin/ldconfig
580
581 %package -n libcilkrts-32bit
582 Summary:       The GNU Compiler Cilk+ Runtime Library
583 License:       MIT
584 Group:         Development/Languages
585 %description -n libcilkrts-32bit
586 The runtime library needed to run programs compiled with the
587 -fcilkplus option of the GNU Compiler Collection (GCC).
588 %post -n libcilkrts-32bit -p /sbin/ldconfig
589 %postun -n libcilkrts-32bit -p /sbin/ldconfig
590
591 %package -n libubsan-32bit
592 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
593 License:       MIT
594 Group:         Development/Languages
595 %description -n libubsan-32bit
596 The runtime library needed to run programs compiled with the
597 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
598 %post -n libubsan-32bit -p /sbin/ldconfig
599 %postun -n libubsan-32bit -p /sbin/ldconfig
600
601 %package -n libvtv-32bit
602 Summary:       The GNU Compiler Vtable Verifier Runtime Library
603 License:       MIT
604 Group:         Development/Languages
605 %description -n libvtv-32bit
606 The runtime library needed to run programs compiled with the
607 -fvtable-verify option of the GNU Compiler Collection (GCC).
608 %post -n libvtv-32bit -p /sbin/ldconfig
609 %postun -n libvtv-32bit -p /sbin/ldconfig
610
611 %package -n libffi-32bit
612 Summary:       Foreign Function Interface library
613 License:       BSD-3-Clause
614 Group:         Development/Building
615 %description -n libffi-32bit
616 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.
617 %post -n libffi-32bit -p /sbin/ldconfig
618 %postun -n libffi-32bit -p /sbin/ldconfig
619
620 %package -n libffi-devel-32bit
621 Summary:       Foreign Function Interface library development files
622 License:       BSD 3-Clause
623 Group:         Development/Building
624 %description -n libffi-devel-32bit
625 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.
626
627 %package go-32bit
628 Summary:       GNU Go Compiler
629 License:       GPL-3.0+
630 Group:         Development/Languages
631 %description go-32bit
632 This package contains a Go compiler and associated development
633 files based on the GNU GCC technology.
634
635 %package -n libgo-32bit
636 Summary:       GNU Go compiler runtime library
637 License:       BSD-3-Clause
638 Group:         Development/Languages
639 %description -n libgo-32bit
640 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.
641 %post -n libgo-32bit -p /sbin/ldconfig
642 %postun -n libgo-32bit -p /sbin/ldconfig
643
644 %package -n asan-force-options
645 Summary:    Scripts to enable automatic package sanitization
646 Group:      System Environment
647 Requires:   gcc rpm
648 Requires:   libasan
649
650 %description -n asan-force-options
651 Scripts for ASan instrumentation
652
653 %post -n asan-force-options
654 # Change mode to allow all users to run gcc-force/unforce-options
655 chmod a+w /usr/bin
656 [ -d /emul/ ] && chmod a+w /emul/usr/bin/ && chmod a+w /emul/home/abuild/rpmbuild/BUILD/gcc-%{version}/obj/gcc/
657 /usr/bin/gcc-force-options %asan_force_options -fno-common
658 # Add ASan-related macros
659 cat >> /usr/lib/rpm/tizen_macros << EOF
660
661 %%asan_force_options %{asan_force_options}
662 %%gcc_unforce_options /usr/bin/gcc-unforce-options
663 %%gcc_force_options /usr/bin/gcc-force-options
664 %%gcc_force_default_options %%gcc_force_options %%asan_force_options -fno-common
665 %%restore_fcommon \\
666   %%gcc_unforce_options \\
667   %%gcc_force_options %%asan_force_options -fcommon
668 EOF
669
670 %preun -n asan-force-options
671 # Restore read-only mode
672 chmod a-w /usr/bin
673 [ -d /emul/ ] && chmod a-w /emul/usr/bin/ && chmod a-w /emul/home/abuild/rpmbuild/BUILD/gcc-%{version}/obj/gcc/
674 /usr/bin/gcc-unforce-options
675
676 %package -n ubsan-force-options
677 Summary:    Scripts to enable automatic package sanitization
678 Group:      System Environment
679 Requires:   gcc
680 Requires:   libubsan
681
682 %description -n ubsan-force-options
683 Scripts for UBSan instrumentation
684
685 %post -n ubsan-force-options
686 # Change mode to allow all users to run gcc-force/unforce-options
687 chmod a+w /usr/bin
688 [ -d /emul/ ] && chmod a+w /emul/usr/bin/ && chmod a+w /emul/home/abuild/rpmbuild/BUILD/gcc-%{version}/obj/gcc/
689 /usr/bin/gcc-force-options %ubsan_force_options
690 # Add UBSan-related macros
691 cat >> /usr/lib/rpm/tizen_macros << EOF
692
693 %%ubsan_force_options %{ubsan_force_options}
694 %%gcc_unforce_options /usr/bin/gcc-unforce-options
695 %%gcc_force_options /usr/bin/gcc-force-options
696 %%gcc_force_default_options %%gcc_force_options %%ubsan_force_options
697 EOF
698
699 %preun -n ubsan-force-options
700 # Restore read-only mode
701 chmod a-w /usr/bin
702 [ -d /emul/ ] && chmod a-w /emul/usr/bin/ && chmod a-w /emul/home/abuild/rpmbuild/BUILD/gcc-%{version}/obj/gcc/
703 /usr/bin/gcc-unforce-options
704
705 %package -n ubsan-build-env
706 Summary:    UBSan build environment
707 Group:      System Environment
708 Requires:   gcc
709 Requires:   libubsan rpm
710
711 %description -n ubsan-build-env
712 UBSan build environment support files and scripts
713
714 %post -n ubsan-build-env
715 cat %{_rpmconfigdir}/macros.ubsan >> %{_rpmconfigdir}/tizen_macros
716
717 %package -n lsan-force-options
718 Summary:    Scripts to enable automatic package sanitization
719 Group:      System Environment
720 Requires:   gcc
721 Requires:   liblsan
722
723 %description -n lsan-force-options
724 Scripts for LSan instrumentation
725
726 %post -n lsan-force-options
727 # Change mode to allow all users to run gcc-force/unforce-options
728 chmod a+w /usr/bin
729 [ -d /emul/ ] && chmod a+w /emul/usr/bin/ && chmod a+w /emul/home/abuild/rpmbuild/BUILD/gcc-%{version}/obj/gcc/
730 /usr/bin/gcc-force-options %lsan_force_options
731 # Add LSan-related macros
732 cat >> /usr/lib/rpm/tizen_macros << EOF
733
734 %%lsan_force_options %{lsan_force_options}
735 %%gcc_unforce_options /usr/bin/gcc-unforce-options
736 %%gcc_force_options /usr/bin/gcc-force-options
737 %%gcc_force_default_options %%gcc_force_options %%lsan_force_options
738 EOF
739
740 %preun -n lsan-force-options
741 # Restore read-only mode
742 chmod a-w /usr/bin
743 [ -d /emul/ ] && chmod a-w /emul/usr/bin/ && chmod a-w /emul/home/abuild/rpmbuild/BUILD/gcc-%{version}/obj/gcc/
744 /usr/bin/gcc-unforce-options
745 [ -d /emul/ ] && chmod a-w /emul/usr/bin/
746
747 %package -n asan-build-env
748 Summary:    Asan build environment
749 Group:      Development/Libraries
750 Requires:   libasan
751
752 %description -n asan-build-env
753 Asan build environment
754
755 %post -n asan-build-env
756 # Add /usr/lib/libasan.so to /etc/ld.so.preload
757 [ -f /etc/ld.so.preload ] && mv -v /etc/ld.so.preload /etc/ld.so.preload.orig
758 echo "libasan.so" > /etc/ld.so.preload
759 [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload
760 [ -f /etc/ld.so.preload.orig ] && rm -f /etc/ld.so.preload.orig
761
762 %preun -n asan-build-env
763 # Restore /etc/ld.so.preload
764 [ -f /etc/ld.so.preload.orig ] && mv -v /etc/ld.so.preload.orig /etc/ld.so.preload
765
766 %package -n lsan-runtime-env
767 Summary:    LSan runtime environment
768 Group:      Development/Libraries
769 Requires:   liblsan
770 Requires(post): smack
771
772 %description -n lsan-runtime-env
773 LSan runtime environment
774
775 %post -n lsan-runtime-env
776 # Add /usr/lib64/liblsan.so to /etc/ld.so.preload
777 [ -f /etc/ld.so.preload ] && mv -v /etc/ld.so.preload /etc/ld.so.preload.orig
778 echo "%{libdir}/liblsan.so" > /etc/ld.so.preload
779 [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload
780 [ -f /etc/ld.so.preload.orig ] && rm -f /etc/ld.so.preload.orig
781 echo "%{lsan_runtime_options}" > /LSAN_OPTIONS
782 chsmack -a "_" /etc/ld.so.preload /LSAN_OPTIONS /lsan.supp
783
784 %preun -n lsan-runtime-env
785 # Restore /etc/ld.so.preload
786 mv -v /etc/ld.so.preload.orig /etc/ld.so.preload
787
788 %package -n sanitizer-devel
789 Summary:    Sanitizer platform-independent tools
790 License:       MIT
791 Group:      Development/Tools
792 BuildArch:  noarch
793 Requires:   binutils python
794 Requires(post): smack
795
796 %description -n sanitizer-devel
797 The package contatins platform-independent tools for sanitization:
798 - asan_symbolize.py: script for offline symbolization of asan logs
799
800 %package -n asan-runtime-env
801 Summary:    Asan runtime environment for target device
802 Group:      Development/Libraries
803
804 %description -n asan-runtime-env
805 Asan runtime environment
806
807 %post -n asan-runtime-env
808 # Add /usr/lib/libasan.so to /etc/ld.so.preload
809 [ -f /etc/ld.so.preload ] && mv -v /etc/ld.so.preload /etc/ld.so.preload.orig
810 echo "%{libdir}/libasan.so" > /etc/ld.so.preload
811 [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload
812 [ -f /etc/ld.so.preload.orig ] && rm -f /etc/ld.so.preload.orig
813 echo "%{asan_runtime_options}" > /ASAN_OPTIONS
814 chsmack -a "_" /etc/ld.so.preload /ASAN_OPTIONS
815
816 %preun -n asan-runtime-env
817 # Restore /etc/ld.so.preload
818 [ -f /etc/ld.so.preload.orig ] && mv -v /etc/ld.so.preload.orig /etc/ld.so.preload
819
820 %package -n ubsan-runtime-env
821 Summary:    UBSan runtime environment for target device
822 Group:      Development/Libraries
823 Requires:   libubsan
824
825 %description -n ubsan-runtime-env
826 UBSan runtime environment
827
828 %post -n ubsan-runtime-env
829 echo "%{ubsan_runtime_options}" > /UBSAN_OPTIONS
830
831 %package plugin-devel
832 Summary:       GNU GCC Plugin development files
833 License:       GPL-3.0+
834 Group:         Development/Languages
835 %description plugin-devel
836 This package contains GCC Plugin development files needed for compiler
837 plugins build.
838
839 %package -n sanitizer-sources
840 Summary:    Sanitizer family tools sources
841 License:       MIT
842 Group:      Development/Tools
843 BuildArch:  noarch
844
845 %description -n sanitizer-sources
846 Sanitizer family tools sources for external tools.
847
848 %prep
849
850 %setup -q -n gcc-%{version}
851 cp %{SOURCE20} .
852
853 tar xf %{SOURCE10}
854 ln -sf gmp-6.1.1 gmp
855 tar xf %{SOURCE11}
856 ln -sf mpfr-3.1.5 mpfr
857 tar xf %{SOURCE12}
858 ln -sf mpc-1.0.3 mpc
859 tar xf %{SOURCE13}
860 ln -sf isl-0.17.1 isl
861
862 echo "" > gcc/DEV-PHASE
863
864 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
865
866 %build
867 rm -rf obj
868 mkdir obj
869 cd obj
870
871 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'
872 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
873 %{?cross:
874 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
875 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
876 }
877 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  */ /g'`
878
879
880
881 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
882 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
883 ../configure \
884         --prefix=%{_prefix} \
885         --infodir=%{_infodir} \
886         --mandir=%{_mandir} \
887         --libdir=%{libdir} \
888         --libexecdir=%{libdir} \
889         --enable-languages=c,c++,fortran \
890         --enable-checking=release \
891         --disable-libssp \
892         --disable-bootstrap \
893         --disable-libvtv \
894         --enable-plugin \
895         --disable-libcc1 \
896         --disable-libgcj \
897         --with-slibdir=%{libdir} \
898         --with-system-zlib \
899         --with-sysroot=/ \
900         --enable-__cxa_atexit \
901         --enable-libstdcxx-allocator=new \
902         --enable-version-specific-runtime-libs \
903         --enable-linker-build-id \
904         --without-system-libunwind \
905         --enable-threads=posix \
906         --disable-multilib \
907         --enable-lto \
908 %{!?cross: \
909         --enable-libcc1 \
910         --enable-libgfortran \
911 %ifarch armv7l
912         --with-arch=armv7-a \
913         --with-tune=cortex-a8 \
914         --disable-sjlj-exceptions \
915 %endif
916 %ifarch aarch64
917         --with-arch=armv8-a \
918         --disable-sjlj-exceptions \
919 %endif
920 %ifarch %ix86
921         --with-arch-32=i586 \
922         --with-tune=generic \
923         --disable-libmpx \
924 %endif
925 %ifarch x86_64
926         --with-arch-32=i586 \
927         --with-tune=generic \
928         --enable-multilib \
929         --disable-libmpx \
930 %endif
931 } \
932 %{?cross: \
933 %{?armv7l: \
934         --with-arch=armv7-a \
935         --with-tune=cortex-a8 \
936         --disable-sjlj-exceptions \
937 } \
938 %{?aarch64: \
939         --with-arch=armv8-a \
940         --disable-sjlj-exceptions \
941 } \
942         --disable-libgcc \
943         --disable-libgfortran \
944         --disable-libquadmath \
945         --disable-libgomp \
946         --disable-libatomic \
947         --disable-libstdc++-v3 \
948         --disable-libsanitizer \
949         --disable-libitm \
950 } \
951         --with-bugurl="http://bugs.tizen.org/" \
952         --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release}" \
953         --target=%{target_arch} \
954         --host=%{host_arch} \
955         --build=%{host_arch}
956
957
958
959 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
960 %{?gcc_run_tests:
961   echo "Run testsuite"
962   # asan needs a whole shadow address space
963   ulimit -v unlimited || true
964   make -k check %{?_smp_mflags} || true
965   mkdir ../testresults
966   ../contrib/test_summary | tee ../testresults/test_summary.txt
967 }
968
969 %install
970 cd obj
971
972 make install DESTDIR=$RPM_BUILD_ROOT
973
974 %{?gcc_run_tests:
975   cp `find . -name "*.sum"` ../testresults/
976   cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
977   chmod 644 ../testresults/*
978 }
979
980 %{remove_docs}
981 rm -rf %{buildroot}/%{_datadir}/locale
982
983 #remove everything we don't need
984 rm -rf %{buildroot}/%{libsubdir}/install-tools
985 find %{buildroot}/ -name "*.la" -delete
986
987 %{!?cross:
988 ln -s gcc %{buildroot}%{_bindir}/cc
989 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
990
991 # expose plugins for ar (required for lto builds)
992 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
993 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
994
995 # legacy preprocessor
996 mkdir -p %{buildroot}/lib
997 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
998
999 # 32-bit libgcc in multilib configuration
1000 %ifarch x86_64
1001 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
1002 %endif
1003
1004 # move libraries to libdir
1005 for lib in asan atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan
1006 do
1007   [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
1008   [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
1009 done
1010 }
1011
1012 %{?cross:
1013 rm -rf %{buildroot}/%{libsubdir}/include-fixed
1014 rm -rf %{buildroot}/%{libsubdir}/include
1015 }
1016
1017 %{!?cross:
1018 cp %{SOURCE15} %{SOURCE16} %{SOURCE18} %{buildroot}%{_prefix}/bin
1019 chmod a+x %{buildroot}%{_prefix}/bin/gcc-force-options
1020 chmod a+x %{buildroot}%{_prefix}/bin/gcc-unforce-options
1021 chmod a+x %{buildroot}%{_prefix}/bin/asan_symbolize.py
1022
1023 cp %{SOURCE17} %{buildroot}
1024 chmod 644 %{buildroot}/ASAN_OPTIONS
1025
1026 %ifarch %lsan_arch
1027 cp %{SOURCE19} %{SOURCE24} %{buildroot}
1028 chmod 644 %{buildroot}/LSAN_OPTIONS
1029 chmod 644 %{buildroot}/lsan.supp
1030 %endif
1031
1032 cd ../
1033 tar -czf libsanitizer.tar.bz libsanitizer
1034 mkdir -p %{buildroot}/src
1035 mv -v libsanitizer.tar.bz %{buildroot}/src
1036
1037 mkdir -p %{buildroot}/%{_rpmconfigdir}/tizen/
1038 install -m 0644 %{SOURCE21} %{buildroot}/
1039 install -m 0644 %{SOURCE22} %{buildroot}/%{_rpmconfigdir}/
1040 install -m 0755 %{SOURCE23} %{buildroot}/%{_rpmconfigdir}/tizen/
1041 }
1042
1043 %files
1044 %manifest gcc.manifest
1045 %defattr(-,root,root)
1046 %{?cross:
1047 %{_bindir}/*
1048 %{libsubdir}/*
1049 }
1050 %{!?cross:
1051 %{_bindir}/gcc
1052 %{_bindir}/cc
1053 %{_bindir}/gcov
1054 %{_bindir}/gcov-tool
1055 %{_bindir}/gcc-ar
1056 %{_bindir}/gcc-nm
1057 %{_bindir}/gcc-ranlib
1058 %{_bindir}/%{target_arch}-gcc
1059 %{_bindir}/%{target_arch}-gcc-%{version}
1060 %{_bindir}/%{target_arch}-gcc-ar
1061 %{_bindir}/%{target_arch}-gcc-nm
1062 %{_bindir}/%{target_arch}-gcc-ranlib
1063 %{libsubdir}/collect2
1064 %{libsubdir}/lto1
1065 %{libsubdir}/lto-wrapper
1066 %{libsubdir}/liblto_plugin.so*
1067 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
1068 %{libsubdir}/include-fixed/*
1069 %{libsubdir}/include/*.h
1070 %{libsubdir}/*.a
1071 %{libsubdir}/*.so
1072 %{libsubdir}/*.o
1073 %{libsubdir}/*.spec
1074 %{libdir}/*.so
1075 %{libdir}/*.a
1076 %ifarch %cilkrts_arch
1077 %{libsubdir}/include/cilk/*
1078 %endif
1079 %{libsubdir}/include/sanitizer/*
1080 %ifarch %asan_arch
1081 %exclude %{libdir}/libasan.so
1082 %endif
1083 %ifarch %lsan_arch
1084 %exclude %{libdir}/liblsan.so
1085 %endif
1086 %ifarch %tsan_arch
1087 %exclude %{libdir}/libtsan.so
1088 %endif
1089
1090 %files c++
1091 %defattr(-,root,root)
1092 %{libsubdir}/cc1plus
1093 %{_bindir}/g++
1094 %{_bindir}/c++
1095 %{_bindir}/%{target_arch}-g++
1096 %{_bindir}/%{target_arch}-c++
1097
1098 %files -n libstdc++
1099 %manifest gcc.manifest
1100 %license COPYING3 COPYING.RUNTIME
1101 %defattr(-,root,root)
1102 %{libdir}/libstdc++.so.*
1103
1104 %files -n libstdc++-devel
1105 %defattr(-,root,root)
1106 %{libdir}/libstdc++.so
1107 %{libdir}/libstdc++.a
1108 %{libdir}/libsupc++.a
1109 %{libsubdir}/include/c++/*
1110 %{_datadir}/gcc-%{version}/python/libstdcxx/*
1111
1112 %files -n libgcc
1113 %manifest gcc.manifest
1114 %license COPYING3 COPYING.RUNTIME
1115 %defattr(-,root,root)
1116 %{libdir}/libgcc_s.so.*
1117
1118 %files -n libgomp
1119 %manifest gcc.manifest
1120 %license COPYING3 COPYING.RUNTIME
1121 %defattr(-,root,root)
1122 %{libdir}/libgomp.so.*
1123
1124 %files -n libcc1
1125 %manifest gcc.manifest
1126 %defattr(-,root,root)
1127 %{libdir}/libcc1.so.*
1128
1129 %ifarch %asan_arch
1130 %files -n libasan
1131 %manifest gcc.manifest
1132 %license libsanitizer/LICENSE.TXT
1133 %defattr(-,root,root)
1134 %{libdir}/libasan.so*
1135 %endif
1136
1137 %ifarch %lsan_arch
1138 %files -n liblsan
1139 %manifest gcc.manifest
1140 %license libsanitizer/LICENSE.TXT
1141 %defattr(-,root,root)
1142 %{libdir}/liblsan.so*
1143 %endif
1144
1145 %ifarch %tsan_arch
1146 %files -n libtsan
1147 %manifest gcc.manifest
1148 %license libsanitizer/LICENSE.TXT
1149 %defattr(-,root,root)
1150 %{libdir}/libtsan.so*
1151 %endif
1152
1153 %ifarch %atomic_arch
1154 %files -n libatomic
1155 %manifest gcc.manifest
1156 %license COPYING3 COPYING.RUNTIME
1157 %defattr(-,root,root)
1158 %{libdir}/libatomic.so.*
1159 %endif
1160
1161 %ifarch %itm_arch
1162 %files -n libitm
1163 %manifest gcc.manifest
1164 %license COPYING3 COPYING.RUNTIME
1165 %defattr(-,root,root)
1166 %{libdir}/libitm.so.*
1167 %endif
1168
1169 %ifarch %cilkrts_arch
1170 %files -n libcilkrts
1171 %manifest gcc.manifest
1172 %defattr(-,root,root)
1173 %{libdir}/libcilkrts.so.*
1174 %endif
1175
1176 %ifarch %ubsan_arch
1177 %files -n libubsan
1178 %manifest gcc.manifest
1179 %license libsanitizer/LICENSE.TXT
1180 %defattr(-,root,root)
1181 %{libdir}/libubsan.so.*
1182 %endif
1183
1184 %files fortran
1185 %defattr(-,root,root)
1186 %dir %{libsubdir}/finclude
1187 %{_bindir}/gfortran
1188 %{_bindir}/%{target_arch}-gfortran
1189 %{libsubdir}/f951
1190 %{libsubdir}/finclude/*
1191 %{libdir}/libgfortran.a
1192 %{libdir}/libgfortran.so
1193 %{libsubdir}/libgfortran.spec
1194 %{libsubdir}/libcaf_single.a
1195 %ifarch %quadmath_arch
1196 %{libdir}/libquadmath.a
1197 %{libdir}/libquadmath.so
1198 %endif
1199
1200 %files -n libgfortran
1201 %defattr(-,root,root)
1202 %{libdir}/libgfortran.so.*
1203
1204 %ifarch %quadmath_arch
1205 %files -n libquadmath
1206 %manifest gcc.manifest
1207 %license COPYING.LIB
1208 %defattr(-,root,root)
1209 %{libdir}/libquadmath.so.*
1210 %endif
1211
1212 %files -n cpp
1213 %defattr(-,root,root)
1214 %{_bindir}/cpp
1215 %{libsubdir}/cc1
1216 /lib/cpp
1217
1218 %files plugin-devel
1219 %defattr(-,root,root)
1220 %{libsubdir}/plugin/*
1221
1222 %{?gcc_run_tests:
1223 %files testresults
1224 %defattr(-,root,root)
1225 %doc testresults/test_summary.txt
1226 %doc testresults/*.sum
1227 %doc testresults/*.log
1228 }
1229 %ifarch x86_64
1230 %files -n gcc-32bit
1231 %defattr(-,root,root)
1232 %{libsubdir}/32/crt*
1233 %{libsubdir}/32/*.a
1234 %{libsubdir}/32/*.so
1235 %{libsubdir}/32/*.o
1236 %{libsubdir}/32/*.spec
1237
1238 %ifarch %asan_arch
1239 %files -n libasan-32bit
1240 %manifest gcc.manifest
1241 %license libsanitizer/LICENSE.TXT
1242 %defattr(-,root,root)
1243 %{libsubdir}/32/libasan.so.*
1244 %endif
1245
1246 %ifarch %lsan_arch
1247 %files -n liblsan-32bit
1248 %manifest gcc.manifest
1249 %license libsanitizer/LICENSE.TXT
1250 %defattr(-,root,root)
1251 %{libsubdir}/32/liblsan.so.*
1252 %endif
1253
1254 %ifarch %atomic_arch
1255 %files -n libatomic-32bit
1256 %manifest gcc.manifest
1257 %license COPYING3 COPYING.RUNTIME
1258 %defattr(-,root,root)
1259 %{libsubdir}/32/libatomic.so.*
1260 %endif
1261
1262 %ifarch %cilkrts_arch
1263 %files -n libcilkrts-32bit
1264 %defattr(-,root,root)
1265 %{libsubdir}/32/libcilkrts.so.*
1266 %endif
1267
1268 %files -n libgcc-32bit
1269 %manifest gcc.manifest
1270 %license COPYING3 COPYING.RUNTIME
1271 %defattr(-,root,root)
1272 %{libsubdir}/32/libgcc_s.so.*
1273
1274 %files -n libgomp-32bit
1275 %manifest gcc.manifest
1276 %license COPYING3 COPYING.RUNTIME
1277 %defattr(-,root,root)
1278 %{libsubdir}/32/libgomp.so.*
1279
1280 %ifarch %itm_arch
1281 %files -n libitm-32bit
1282 %license COPYING3 COPYING.RUNTIME
1283 %defattr(-,root,root)
1284 %{libsubdir}/32/libitm.so.*
1285 %endif
1286
1287 %files -n libgfortran-32bit
1288 %defattr(-,root,root)
1289 %dir %{libsubdir}/32/finclude
1290 %{libsubdir}/32/libgfortran.so.*
1291 %{libsubdir}/32/finclude/*
1292
1293 %ifarch %quadmath_arch
1294 %files -n libquadmath-32bit
1295 %license COPYING.LIB
1296 %defattr(-,root,root)
1297 %{libsubdir}/32/libquadmath.so.*
1298 %endif
1299
1300 %ifarch %ubsan_arch
1301 %files -n libubsan-32bit
1302 %manifest gcc.manifest
1303 %license libsanitizer/LICENSE.TXT
1304 %defattr(-,root,root)
1305 %{libsubdir}/32/libubsan.so.*
1306 %endif
1307
1308 %files -n libstdc++-32bit
1309 %manifest gcc.manifest
1310 %license COPYING3 COPYING.RUNTIME
1311 %defattr(-,root,root)
1312 %{libsubdir}/32/libstdc++.so.*
1313 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1314
1315 %files -n libstdc++-devel-32bit
1316 %defattr(-,root,root)
1317 %{libsubdir}/32/libstdc++.so.*-gdb.py
1318 %endif
1319
1320 %files -n asan-force-options
1321 %defattr(-,root,root,-)
1322 %{_prefix}/bin/gcc-force-options
1323 %{_prefix}/bin/gcc-unforce-options
1324
1325 %files -n ubsan-force-options
1326 %defattr(-,root,root,-)
1327 %{_prefix}/bin/gcc-force-options
1328 %{_prefix}/bin/gcc-unforce-options
1329
1330 %ifarch %lsan_arch
1331 %files -n lsan-force-options
1332 %manifest gcc.manifest
1333 %defattr(-,root,root,-)
1334 %{_prefix}/bin/gcc-force-options
1335 %{_prefix}/bin/gcc-unforce-options
1336 %endif
1337
1338 %files -n asan-build-env
1339 %defattr(-,root,root,-)
1340 /ASAN_OPTIONS
1341
1342 %files -n asan-runtime-env
1343 %defattr(-,root,root,-)
1344
1345 %ifarch %lsan_arch
1346 %files -n lsan-runtime-env
1347 %defattr(-,root,root,-)
1348 /LSAN_OPTIONS
1349 /lsan.supp
1350 %endif
1351
1352 %ifarch %ubsan_arch
1353 %files -n ubsan-build-env
1354 %defattr(-,root,root,-)
1355 /UBSAN_OPTIONS
1356 %{_rpmconfigdir}/macros.ubsan
1357 %{_rpmconfigdir}/tizen/extract-ubsan-logs
1358
1359 %files -n ubsan-runtime-env
1360 %defattr(-,root,root,-)
1361 %endif
1362
1363 %files -n sanitizer-devel
1364 %defattr(-,root,root,-)
1365 %{_prefix}/bin/asan_symbolize.py
1366
1367 %files -n sanitizer-sources
1368 %defattr(-,root,root,-)
1369 /src/libsanitizer.tar.bz
1370
1371 }
1372
1373 %changelog