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