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