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