5 # spec file for package gcc
7 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
8 # Copyright (c) 2015-2020 Tizen
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.
19 # Please submit bugfixes or comments via http://bugs.tizen.org/
21 # we use %%{?macro: ... } as it is more compact
24 %define gcc_run_tests 1
27 %if 0%{?dump_configure}
28 %define gcc_dump_configure 1
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
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
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.
57 # We'll get 2 libasan runtime conflict: preloaded one and another from build dir.
59 %{error:"'asanbootstrap' could not be used with sanitized environment."}
60 %{error:"Use 'asanbootstrap' without defined 'asan'"}
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
91 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
93 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
94 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
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}
100 Name: gcc%{?cross:-%{cross}}
101 # With generated files in src we could drop the following
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
111 BuildRequires: glibc-devel-32bit
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
121 %if 0%{?gcc_dump_configure}
122 BuildRequires: configure-dumper
124 URL: http://gcc.gnu.org/
127 Source: gcc-%{version}.tar.bz2
128 Source10: gmp-6.2.1.tar.bz2
129 Source11: mpfr-4.2.0.tar.bz2
130 Source12: mpc-1.3.1.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
136 %{?cross:ExcludeArch: %{cross}}
138 Core package for the GNU Compiler Collection, including the C language
142 Summary: The GNU C++ Compiler
144 Group: Development/Languages
146 This package contains the GNU compiler for C++.
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
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.
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
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
183 %post -n libgomp -p /sbin/ldconfig
184 %postun -n libgomp -p /sbin/ldconfig
187 Summary: GNU Objective C Compiler
189 Group: Development/Languages
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.
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
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
214 Summary: GNU Objective C++ Compiler
216 Group: Development/Languages
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.
223 Summary: The GCC Preprocessor
225 Group: Development/Languages
227 This Package contains just the preprocessor that is used by the X11
231 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
233 Group: Development/Languages
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.
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
255 Summary: The GNU Fortran Compiler and Support Files
257 Group: Development/Languages
259 This is the Fortran compiler of the GNU Compiler Collection (GCC).
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
271 %package -n libquadmath
272 Summary: The GNU Fortran Compiler Quadmath Runtime Library
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
279 %post -n libquadmath -p /sbin/ldconfig
280 %postun -n libquadmath -p /sbin/ldconfig
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
293 Summary: The GNU Compiler Address Sanitizer Runtime Library
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
302 %package -n libhwasan
303 Summary: The GNU Compiler Hardware-assisted Address Sanitizer Runtime Library
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
313 Summary: The GNU Compiler Thread Sanitizer Runtime Library
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
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
332 Summary: The GNU Compiler Leak Sanitizer Runtime Library
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
342 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
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
352 Summary: The GNU Compiler Vtable Verifier Runtime Library
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
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
372 Summary: The GNU Java Compiler
374 Group: Development/Languages
376 The Java compiler from the GCC-tools-suite.
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
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.
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.
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.
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
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.
427 Summary: GNU Go Compiler
429 Group: Development/Languages
431 This package contains a Go compiler and associated development
432 files based on the GNU GCC technology.
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
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.
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.
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.
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
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
484 %post -n libgomp-32bit -p /sbin/ldconfig
485 %postun -n libgomp-32bit -p /sbin/ldconfig
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
497 Summary: GNU Objective C Compiler
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.
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
515 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
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.
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
538 %package fortran-32bit
539 Summary: The GNU Fortran Compiler and Support Files
541 Group: Development/Languages
542 %description fortran-32bit
543 This is the Fortran compiler of the GNU Compiler Collection (GCC).
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
555 %package -n libquadmath-32bit
556 Summary: The GNU Fortran Compiler Quadmath Runtime Library
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
563 %post -n libquadmath-32bit -p /sbin/ldconfig
564 %postun -n libquadmath-32bit -p /sbin/ldconfig
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
576 %package -n libasan-32bit
577 Summary: The GNU Compiler Address Sanitizer Runtime Library
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
586 %package -n liblsan-32bit
587 Summary: The GNU Compiler Address Sanitizer Runtime Library
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
596 %package -n libtsan-32bit
597 Summary: The GNU Compiler Thread Sanitizer Runtime Library
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
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
615 %package -n libubsan-32bit
616 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
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
625 %package -n libvtv-32bit
626 Summary: The GNU Compiler Vtable Verifier Runtime Library
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
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
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.
652 Summary: GNU Go Compiler
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.
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
668 %package plugin-devel
669 Summary: GNU GCC Plugin development files
671 Group: Development/Languages
672 %description plugin-devel
673 This package contains GCC Plugin development files needed for compiler
676 %package -n sanitizer-sources
677 Summary: Sanitizer family tools sources
679 Group: Development/Tools
682 %description -n sanitizer-sources
683 Sanitizer family tools sources for external tools.
686 %package devel-static
687 Summary: GNU GCC static libraries
689 Group: Development/Languages
690 %description devel-static
691 This package contains static libraries from GCC
694 %{?gcc_dump_configure:
695 %package configure-dump
696 Summary: GNU GCC configure dump
698 Group: Development/Languages
699 %description configure-dump
700 This package contains dump of configure variables of GCC
704 %setup -q -n gcc-%{version}
710 ln -sf mpfr-4.2.0 mpfr
716 %global gcc_datestamp `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/DATESTAMP`
722 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -marm -Wa,-mimplicit-it=arm -fasynchronous-unwind-tables"
725 %{!?gcc_keep_build_dir:
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/}
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'`
739 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ */ /g'`
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-/")
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})}
754 %ifarch armv7l armv7hl aarch64
755 %undefine gcc_profiledbootstrap
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
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" \
774 --prefix=%{_prefix} \
775 --infodir=%{_infodir} \
776 --mandir=%{_mandir} \
778 --libexecdir=%{libdir} \
779 --enable-languages=c,c++,fortran \
780 --enable-checking=release \
782 %{!?gcc_profiledbootstrap:--disable-bootstrap} \
787 --with-slibdir=%{libdir} \
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 \
801 --enable-libgfortran \
802 %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
804 --with-arch=armv7-a \
805 --with-tune=cortex-a8 \
806 --disable-sjlj-exceptions \
809 --with-arch=armv7-a+fp \
810 --with-tune=cortex-a8 \
812 --disable-sjlj-exceptions \
816 --with-arch=armv8-a \
817 --disable-sjlj-exceptions \
820 --with-arch-32=i586 \
821 --with-tune=generic \
825 --with-arch-32=i586 \
826 --with-tune=generic \
833 --with-arch=armv7-a \
834 --with-tune=cortex-a8 \
835 --disable-sjlj-exceptions \
838 --with-arch=armv7-a+fp \
839 --with-tune=cortex-a8 \
841 --disable-sjlj-exceptions \
845 --with-arch=armv8-a \
846 --disable-sjlj-exceptions \
849 --disable-libgfortran \
850 --disable-libquadmath \
852 --disable-libatomic \
853 --disable-libstdc++-v3 \
854 --disable-libsanitizer \
857 --with-bugurl="http://bugs.tizen.org/" \
858 --with-pkgversion="Tizen GCC %{version} %{gcc_datestamp} %{release}" \
859 --target=%{target_arch} \
860 --host=%{host_arch} \
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:
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
877 [[ -e '/emul' ]] && \
878 sed -e '/^\(G\?CC_FOR_TARGET\)=\|^\(\(RAW_\)\?CXX_FOR_TARGET\)=/s#\(xg\(cc\|++\)\)#\1 -B/emul%{libsubdir}/#' -i Makefile
882 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}} %{?cross:all-host}
883 %{?gcc_dump_configure:
884 dump_configure.pl .. . \
886 --project-version %{version} \
887 --out_db gcc-%{version}-%{release}-%_project-%_repository.db
891 %{?gcc_exit_on_make_finish:
897 # asan needs a whole shadow address space
898 ulimit -v unlimited || true
899 make -k check %{?_smp_mflags} || true
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
910 make install%{?cross:-host} DESTDIR=$RPM_BUILD_ROOT
912 %{?gcc_dump_configure:
913 install -D -m 0644 gcc-%{version}-%{release}-%_project-%_repository.db %{buildroot}%{_datadir}/gcc-%{version}-%{release}-%_project-%_repository.db
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 {} \;
923 rm -rf %{buildroot}/%{_datadir}/locale
925 #remove everything we don't need
926 rm -rf %{buildroot}/%{libsubdir}/install-tools
927 find %{buildroot}/ -name "*.la" -delete
930 ln -s gcc %{buildroot}%{_bindir}/cc
931 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
933 # legacy preprocessor
934 mkdir -p %{buildroot}/lib
935 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
937 # 32-bit libgcc in multilib configuration
939 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
942 # move libraries to libdir
943 for lib in asan atomic gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan
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}/
951 rm -rf %{buildroot}/%{libsubdir}/include-fixed
952 rm -rf %{buildroot}/%{libsubdir}/include
957 tar -czf libsanitizer.tar.bz libsanitizer
958 mkdir -p %{buildroot}/src
959 mv -v libsanitizer.tar.bz %{buildroot}/src
963 %manifest gcc.manifest
964 %defattr(-,root,root)
977 %{_bindir}/gcc-ranlib
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
986 %{libsubdir}/lto-wrapper
987 %{libsubdir}/liblto_plugin.so*
988 %{libsubdir}/g++-mapper-server
989 %{libsubdir}/include-fixed/*
990 %{libsubdir}/include/*.h
995 %{libsubdir}/include/sanitizer/*
997 %exclude %{libdir}/libasan.so
1000 %exclude %{libdir}/liblsan.so
1003 %exclude %{libdir}/libtsan.so
1007 %defattr(-,root,root)
1008 %{libsubdir}/cc1plus
1011 %{_bindir}/%{target_arch}-g++
1012 %{_bindir}/%{target_arch}-c++
1015 %manifest gcc.manifest
1016 %license COPYING3 COPYING.RUNTIME
1017 %defattr(-,root,root)
1018 %{libdir}/libstdc++.so.*
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/*
1029 %{libsubdir}/32/libstdc++.a
1030 %{libsubdir}/32/libsupc++.a
1031 %{libsubdir}/32/libstdc++fs.a
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
1044 %manifest gcc.manifest
1045 %license COPYING3 COPYING.RUNTIME
1046 %defattr(-,root,root)
1047 %{libdir}/libgomp.so.*
1050 %manifest gcc.manifest
1051 %defattr(-,root,root)
1052 %{libdir}/libcc1.so.*
1056 %manifest gcc.manifest
1057 %license libsanitizer/LICENSE.TXT
1058 %defattr(-,root,root)
1059 %{libdir}/libasan.so*
1062 %ifarch %hwasan_arch
1064 %manifest gcc.manifest
1065 %license libsanitizer/LICENSE.TXT
1066 %defattr(-,root,root)
1067 %{libsubdir}/libhwasan.so*
1072 %manifest gcc.manifest
1073 %license libsanitizer/LICENSE.TXT
1074 %defattr(-,root,root)
1075 %{libdir}/liblsan.so*
1080 %manifest gcc.manifest
1081 %license libsanitizer/LICENSE.TXT
1082 %defattr(-,root,root)
1083 %{libdir}/libtsan.so*
1086 %ifarch %atomic_arch
1088 %manifest gcc.manifest
1089 %license COPYING3 COPYING.RUNTIME
1090 %defattr(-,root,root)
1091 %{libdir}/libatomic.so.*
1096 %manifest gcc.manifest
1097 %license COPYING3 COPYING.RUNTIME
1098 %defattr(-,root,root)
1099 %{libdir}/libitm.so.*
1104 %manifest gcc.manifest
1105 %license libsanitizer/LICENSE.TXT
1106 %defattr(-,root,root)
1107 %{libdir}/libubsan.so.*
1111 %defattr(-,root,root)
1112 %dir %{libsubdir}/finclude
1114 %{_bindir}/%{target_arch}-gfortran
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
1126 %files -n libgfortran
1127 %defattr(-,root,root)
1128 %{libdir}/libgfortran.so.*
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
1140 %defattr(-,root,root)
1146 %defattr(-,root,root)
1147 %{libsubdir}/plugin/*
1151 %defattr(-,root,root)
1153 %{libsubdir}/32/*.so
1155 %{libsubdir}/32/*.spec
1158 %files -n libasan-32bit
1159 %manifest gcc.manifest
1160 %license libsanitizer/LICENSE.TXT
1161 %defattr(-,root,root)
1162 %{libsubdir}/32/libasan.so.*
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.*
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
1182 %files -n libgomp-32bit
1183 %manifest gcc.manifest
1184 %license COPYING3 COPYING.RUNTIME
1185 %defattr(-,root,root)
1186 %{libsubdir}/32/libgomp.so.*
1189 %files -n libitm-32bit
1190 %license COPYING3 COPYING.RUNTIME
1191 %defattr(-,root,root)
1192 %{libsubdir}/32/libitm.so.*
1195 %files -n libgfortran-32bit
1196 %defattr(-,root,root)
1197 %dir %{libsubdir}/32/finclude
1198 %{libsubdir}/32/libgfortran.so.*
1199 %{libsubdir}/32/finclude/*
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
1210 %files -n libubsan-32bit
1211 %manifest gcc.manifest
1212 %license libsanitizer/LICENSE.TXT
1213 %defattr(-,root,root)
1214 %{libsubdir}/32/libubsan.so.*
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
1224 %files -n libstdc++-devel-32bit
1225 %defattr(-,root,root)
1226 %{libsubdir}/32/libstdc++.so.*-gdb.py
1229 %files -n sanitizer-sources
1230 %defattr(-,root,root,-)
1231 /src/libsanitizer.tar.bz
1236 %manifest gcc.manifest
1237 %license COPYING.LIB
1238 %defattr(-,root,root)
1246 %ifarch %hwasan_arch
1247 %{libsubdir}/libhwasan.a
1253 %{libdir}/libubsan.a
1258 %{libdir}/libatomic.a
1259 %{libsubdir}/libcaf_single.a
1261 %{libsubdir}/32/libgomp.a
1263 %{libsubdir}/32/libitm.a
1266 %{libsubdir}/32/libasan.a
1269 %{libsubdir}/32/libubsan.a
1271 %{libsubdir}/32/libatomic.a
1272 %{libsubdir}/32/libcaf_single.a
1278 %defattr(-,root,root)
1279 %doc testresults/test_summary.txt
1283 %{?gcc_dump_configure:
1284 %files configure-dump
1285 %manifest gcc.manifest
1286 %{_datadir}/gcc-%{version}-%{release}-%_project-%_repository.db