5 # spec file for package gcc6
7 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
8 # Copyright (c) 2015 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
23 %define gcc_run_tests 1
26 # Enable this when testing on device to:
27 # 1. Enable macro to turn on testsuite building ('gcc_run_tests 1')
28 # 2. Keep 'obj/' folder in build stage as we do not want to rebuild all gcc
29 # again on device after invoking rpmbuild --short-circuit -bc ...
30 # 3. Skip configure and make commands and go directly to 'make check'
31 %if 0%{?run_tests_on_device}
32 %define gcc_run_tests 1
33 %define gcc_keep_build_dir 1
34 %define gcc_skip_configure 1
35 %define gcc_skip_make 1
38 %if 0%{?dump_configure}
39 %define gcc_dump_configure 1
42 # Exit right after 'make ..' step to keep all object files produced by gcc build
43 %if 0%{?exit_on_make_finish}
44 %define gcc_exit_on_make_finish 1
47 # Bootstrap build constrains for ASan config
48 %if 0%{?asanbootstrap}
49 %ifarch %arm aarch64 # or #if 0#{?qemu_user_space_build}
50 %{error:"'asanbootstrap' supposed to be used with i586/x86_64 arch"}
51 # The #error macro primitive cannot stop the build because macros are context
52 # free, lazily expanded whereever they are needed, not only during build.
53 # Use non-existing define for now to abort the build.
56 # We'll get 2 libasan runtime conflict: preloaded one and another from build dir.
58 %{error:"'asanbootstrap' could not be used with sanitized environment."}
59 %{error:"Use 'asanbootstrap' without defined 'asan'"}
64 %define quadmath_arch %ix86 x86_64 ia64
65 %define tsan_arch x86_64 aarch64
66 %define esan_arch x86_64 %arm
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 %ix86 %arm aarch64
71 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
72 %define cilkrts_arch x86_64 %ix86
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
110 BuildRequires: glibc-devel-32bit
113 %{?cross:BuildRequires: binutils-%{cross}}
114 # here we use %%if because OBS spec parser cannot expand
115 # %%{?macro:...} correctly
116 %if 0%{?gcc_run_tests}
117 BuildRequires: dejagnu
118 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.1.1.tar.bz2
129 Source11: mpfr-3.1.5.tar.bz2
130 Source12: mpc-1.0.3.tar.gz
131 Source13: isl-0.17.1.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
303 Summary: The GNU Compiler Thread Sanitizer Runtime Library
305 Group: Development/Languages
306 %description -n libtsan
307 The runtime library needed to run programs compiled with the
308 -fsanitize=thread option of the GNU Compiler Collection (GCC).
309 %post -n libtsan -p /sbin/ldconfig
310 %postun -n libtsan -p /sbin/ldconfig
313 Summary: The GNU Compiler Efficciency Sanitier Runtime Library
315 Group: Development/Languages
316 %description -n libesan
317 The runtime library needed to run programs compiled with the
318 -fsanitize=efficiency-working-set option of the GNU Compiler Collection (GCC).
319 %post -n libesan -p /sbin/ldconfig
320 %postun -n libesan -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
331 %package -n libcilkrts
332 Summary: The GNU Compiler Cilk+ Runtime Library
334 Group: Development/Languages
335 %description -n libcilkrts
336 The runtime library needed to run programs compiled with the
337 -fcilkplus option of the GNU Compiler Collection (GCC).
338 %post -n libcilkrts -p /sbin/ldconfig
339 %postun -n libcilkrts -p /sbin/ldconfig
342 Summary: The GNU Compiler Leak Sanitizer Runtime Library
344 Group: Development/Languages
345 %description -n liblsan
346 The runtime library needed to run programs compiled with the
347 -fsanitize=leak option of the GNU Compiler Collection (GCC).
348 %post -n liblsan -p /sbin/ldconfig
349 %postun -n liblsan -p /sbin/ldconfig
352 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
354 Group: Development/Languages
355 %description -n libubsan
356 The runtime library needed to run programs compiled with the
357 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
358 %post -n libubsan -p /sbin/ldconfig
359 %postun -n libubsan -p /sbin/ldconfig
362 Summary: The GNU Compiler Vtable Verifier Runtime Library
364 Group: Development/Languages
365 %description -n libvtv
366 The runtime library needed to run programs compiled with the
367 -fvtable-verify option of the GNU Compiler Collection (GCC).
368 %post -n libvtv -p /sbin/ldconfig
369 %postun -n libvtv -p /sbin/ldconfig
372 Summary: Java Runtime Library for gcc
373 License: GPL-2.0-with-classpath-exception
374 Group: Development/Building
375 %description -n libgcj
376 This library is needed if you want to use the GNU Java compiler, gcj.
377 Source code for this package is in gcc.
378 %post -n libgcj -p /sbin/ldconfig
379 %postun -n libgcj -p /sbin/ldconfig
382 Summary: The GNU Java Compiler
384 Group: Development/Languages
386 The Java compiler from the GCC-tools-suite.
388 %package -n libgcj_bc
389 Summary: Fake library for BC-ABI compatibility.
390 License: GPL-2.0-with-classpath-exception
391 Group: Development/Languages
392 %description -n libgcj_bc
393 A fake library that is used at link time only. It ensures that
394 binaries built with the BC-ABI link against a constant SONAME.
395 This way, BC-ABI binaries continue to work if the SONAME underlying
398 %package -n libgcj-jar
399 Summary: Java runtime library (jar files).
400 License: GPL-2.0-with-classpath-exception
401 Group: Development/Languages
402 %description -n libgcj-jar
403 These are the jar files that go along with the gcj front end to gcc.
405 %package -n libgcj-devel
406 Summary: Include Files and Libraries mandatory for Development.
407 License: GPL-2.0-with-classpath-exception
408 Group: Development/Languages
409 %description -n libgcj-devel
410 This package contains all necessary include files and libraries needed
411 to develop applications that require these.
414 Summary: Java Bytecode Interpreter for gcc
415 License: GPL-2.0-with-classpath-exception
416 Group: Development/Languages
417 %description -n gcc-gij
418 This package contains the java bytecode interpreter gij and related tools.
421 Summary: Foreign Function Interface library
422 License: BSD-3-Clause
423 Group: Development/Building
424 %description -n libffi
425 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.
426 %post -n libffi -p /sbin/ldconfig
427 %postun -n libffi -p /sbin/ldconfig
429 %package -n libffi-devel
430 Summary: Foreign Function Interface library development files
431 License: BSD 3-Clause
432 Group: Development/Building
433 %description -n libffi-devel
434 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.
437 Summary: GNU Go Compiler
439 Group: Development/Languages
441 This package contains a Go compiler and associated development
442 files based on the GNU GCC technology.
445 Summary: GNU Go compiler runtime library
446 License: BSD-3-Clause
447 Group: Development/Languages
448 %description -n libgo
449 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.
450 %post -n libgo -p /sbin/ldconfig
451 %postun -n libgo -p /sbin/ldconfig
454 Summary: Testsuite results
455 License: SUSE-Public-Domain
456 Group: Development/Languages
457 %description testresults
458 Results from running the gcc and target library testsuites.
460 %package -n gcc-32bit
461 Summary: The GNU C Compiler 32bit support
462 Group: Development/Building
463 %description -n gcc-32bit
464 This package contains 32bit support for the GNU Compiler Collection.
466 %package -n libstdc++-devel-32bit
467 Summary: Include Files and Libraries mandatory for Development
468 License: GPL-3.0-with-GCC-exception
469 Group: Development/Building
470 %description -n libstdc++-devel-32bit
471 This package contains all the headers and libraries of the standard C++
472 library. It is needed for compiling C++ code.
474 %package -n libgcc-32bit
475 Summary: C compiler runtime library
476 License: GPL-3.0-with-GCC-exception
477 Group: Development/Building
478 %description -n libgcc-32bit
479 Libgcc is needed for dynamically linked C programs.
480 %post -n libgcc-32bit -p /sbin/ldconfig
481 %postun -n libgcc-32bit -p /sbin/ldconfig
483 %package -n libgomp-32bit
484 Summary: The GNU compiler collection OpenMP runtime library
485 License: GPL-3.0-with-GCC-exception
486 Group: Development/Building
487 %description -n libgomp-32bit
488 This is the OpenMP runtime library needed by OpenMP enabled programs
489 that were built with the -fopenmp compiler option and by programs that
490 were auto-parallelized via the -ftree-parallelize-loops compiler
492 %post -n libgomp-32bit -p /sbin/ldconfig
493 %postun -n libgomp-32bit -p /sbin/ldconfig
495 %package -n libstdc++-32bit
496 Summary: The standard C++ shared library
497 License: GPL-3.0-with-GCC-exception
498 Group: Development/Building
499 %description -n libstdc++-32bit
500 The standard C++ library, needed for dynamically linked C++ programs.
501 %post -n libstdc++-32bit -p /sbin/ldconfig
502 %postun -n libstdc++-32bit -p /sbin/ldconfig
505 Summary: GNU Objective C Compiler
507 Group: Development/Languages
508 %description objc-32bit
509 This package contains the GNU Objective C compiler. Objective C is an
510 object oriented language, created by Next Inc. and used in their
511 Nextstep OS. The source code is available in the gcc package.
513 %package -n libobjc-32bit
514 Summary: Library for the GNU Objective C Compiler
515 License: GPL-3.0-with-GCC-exception
516 Group: Development/Building
517 %description -n libobjc-32bit
518 The library for the GNU Objective C compiler.
519 %post -n libobjc-32bit -p /sbin/ldconfig
520 %postun -n libobjc-32bit -p /sbin/ldconfig
523 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
525 Group: Development/Languages
526 %description ada-32bit
527 This package contains an Ada95 compiler and associated development
528 tools based on the GNU GCC technology. Ada95 is the object oriented
529 successor of the Ada83 language. To build this package from source you
530 must have installed a binary version to bootstrap the compiler.
532 %package -n libada-32bit
533 Summary: GNU Ada Runtime Libraries
534 License: GPL-3.0-with-GCC-exception
535 Group: Development/Languages
536 %description -n libada-32bit
537 This package contains the shared libraries required to run programs
538 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
539 shared libraries. It also contains the shared libraries for the
540 Implementation of the Ada Semantic Interface Specification (ASIS), the
541 implementation of Distributed Systems Programming (GLADE) and the Posix
542 1003.5 Binding (Florist).
543 %post -n libada-32bit -p /sbin/ldconfig
544 %postun -n libada-32bit -p /sbin/ldconfig
546 %package fortran-32bit
547 Summary: The GNU Fortran Compiler and Support Files
549 Group: Development/Languages
550 %description fortran-32bit
551 This is the Fortran compiler of the GNU Compiler Collection (GCC).
553 %package -n libgfortran-32bit
554 Summary: The GNU Fortran Compiler Runtime Library
555 License: GPL-3.0-with-GCC-exception
556 Group: Development/Languages
557 %description -n libgfortran-32bit
558 The runtime library needed to run programs compiled with the Fortran compiler
559 of the GNU Compiler Collection (GCC).
560 %post -n libgfortran-32bit -p /sbin/ldconfig
561 %postun -n libgfortran-32bit -p /sbin/ldconfig
563 %package -n libquadmath-32bit
564 Summary: The GNU Fortran Compiler Quadmath Runtime Library
566 Group: Development/Languages
567 %description -n libquadmath-32bit
568 The runtime library needed to run programs compiled with the Fortran compiler
569 of the GNU Compiler Collection (GCC) and quadruple precision floating point
571 %post -n libquadmath-32bit -p /sbin/ldconfig
572 %postun -n libquadmath-32bit -p /sbin/ldconfig
574 %package -n libitm-32bit
575 Summary: The GNU Compiler Transactional Memory Runtime Library
576 License: GPL-3.0-with-GCC-exception
577 Group: Development/Languages
578 %description -n libitm-32bit
579 The runtime library needed to run programs compiled with the
580 -fgnu-tm option of the GNU Compiler Collection (GCC).
581 %post -n libitm-32bit -p /sbin/ldconfig
582 %postun -n libitm-32bit -p /sbin/ldconfig
584 %package -n libasan-32bit
585 Summary: The GNU Compiler Address Sanitizer Runtime Library
587 Group: Development/Languages
588 %description -n libasan-32bit
589 The runtime library needed to run programs compiled with the
590 -fsanitize=address option of the GNU Compiler Collection (GCC).
591 %post -n libasan-32bit -p /sbin/ldconfig
592 %postun -n libasan-32bit -p /sbin/ldconfig
594 %package -n liblsan-32bit
595 Summary: The GNU Compiler Address Sanitizer Runtime Library
597 Group: Development/Languages
598 %description -n liblsan-32bit
599 The runtime library needed to run programs compiled with the
600 -fsanitize=leak option of the GNU Compiler Collection (GCC).
601 %post -n liblsan-32bit -p /sbin/ldconfig
602 %postun -n liblsan-32bit -p /sbin/ldconfig
604 %package -n libtsan-32bit
605 Summary: The GNU Compiler Thread Sanitizer Runtime Library
607 Group: Development/Languages
608 %description -n libtsan-32bit
609 The runtime library needed to run programs compiled with the
610 -fsanitize=thread option of the GNU Compiler Collection (GCC).
611 %post -n libtsan-32bit -p /sbin/ldconfig
612 %postun -n libtsan-32bit -p /sbin/ldconfig
614 %package -n libatomic-32bit
615 Summary: The GNU Compiler Atomic Operations Runtime Library
616 License: GPL-3.0-with-GCC-exception
617 Group: Development/Languages
618 %description -n libatomic-32bit
619 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
620 %post -n libatomic-32bit -p /sbin/ldconfig
621 %postun -n libatomic-32bit -p /sbin/ldconfig
623 %package -n libcilkrts-32bit
624 Summary: The GNU Compiler Cilk+ Runtime Library
626 Group: Development/Languages
627 %description -n libcilkrts-32bit
628 The runtime library needed to run programs compiled with the
629 -fcilkplus option of the GNU Compiler Collection (GCC).
630 %post -n libcilkrts-32bit -p /sbin/ldconfig
631 %postun -n libcilkrts-32bit -p /sbin/ldconfig
633 %package -n libubsan-32bit
634 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
636 Group: Development/Languages
637 %description -n libubsan-32bit
638 The runtime library needed to run programs compiled with the
639 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
640 %post -n libubsan-32bit -p /sbin/ldconfig
641 %postun -n libubsan-32bit -p /sbin/ldconfig
643 %package -n libvtv-32bit
644 Summary: The GNU Compiler Vtable Verifier Runtime Library
646 Group: Development/Languages
647 %description -n libvtv-32bit
648 The runtime library needed to run programs compiled with the
649 -fvtable-verify option of the GNU Compiler Collection (GCC).
650 %post -n libvtv-32bit -p /sbin/ldconfig
651 %postun -n libvtv-32bit -p /sbin/ldconfig
653 %package -n libffi-32bit
654 Summary: Foreign Function Interface library
655 License: BSD-3-Clause
656 Group: Development/Building
657 %description -n libffi-32bit
658 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.
659 %post -n libffi-32bit -p /sbin/ldconfig
660 %postun -n libffi-32bit -p /sbin/ldconfig
662 %package -n libffi-devel-32bit
663 Summary: Foreign Function Interface library development files
664 License: BSD 3-Clause
665 Group: Development/Building
666 %description -n libffi-devel-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.
670 Summary: GNU Go Compiler
672 Group: Development/Languages
673 %description go-32bit
674 This package contains a Go compiler and associated development
675 files based on the GNU GCC technology.
677 %package -n libgo-32bit
678 Summary: GNU Go compiler runtime library
679 License: BSD-3-Clause
680 Group: Development/Languages
681 %description -n libgo-32bit
682 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.
683 %post -n libgo-32bit -p /sbin/ldconfig
684 %postun -n libgo-32bit -p /sbin/ldconfig
686 %package plugin-devel
687 Summary: GNU GCC Plugin development files
689 Group: Development/Languages
690 %description plugin-devel
691 This package contains GCC Plugin development files needed for compiler
694 %package -n sanitizer-sources
695 Summary: Sanitizer family tools sources
697 Group: Development/Tools
700 %description -n sanitizer-sources
701 Sanitizer family tools sources for external tools.
703 %{?gcc_dump_configure:
704 %package configure-dump
705 Summary: GNU GCC configure dump
707 Group: Development/Languages
708 %description configure-dump
709 This package contains dump of configure variables of GCC
714 %setup -q -n gcc-%{version}
720 ln -sf mpfr-3.1.5 mpfr
724 ln -sf isl-0.17.1 isl
726 echo "" > gcc/DEV-PHASE
728 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
734 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mthumb -mthumb-fp -Wa,-mimplicit-it=thumb -fno-omit-frame-pointer"
737 %{?esan:%gcc_unforce_options}
738 %{!?gcc_keep_build_dir:
744 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g' -e 's/-fexceptions//' -e 's/\([[:space:]]\+.*-D_FORTIFY_SOURCE=\)[[:alnum:]]\+/\10/g'
745 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
747 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
748 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
750 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ */ /g'`
752 # -Wall is stripped off now, so -Wformat will not turn on implicitly for
753 # "-Wformat-.." option group, causing additional build warnings and testsuite
754 # FAIL ("test for excess errors" type).
755 # Insert "-Wformat" if we find "-Wformat-..."
756 if [ ! -z "$(echo $RPM_OPT_FLAGS | grep -o "\B\-Wformat\-")" ]; then
757 if [ -z "$(echo $RPM_OPT_FLAGS | grep -Po "\B\-Wformat(\s|\Z)")" ]; then
758 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-Wformat-/-Wformat -Wformat-/")
762 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
763 %{?asan_shadow_scale: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -Wp,-DASAN_SHADOW_SCALE=%{asan_shadow_scale})}
765 %ifarch armv7l armv7hl aarch64
766 %undefine gcc_profiledbootstrap
770 # Required for correct libgcc and crt* build
771 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon"
774 %{!?gcc_skip_configure:
775 %{?gcc_dump_configure:patch_configure.pl ..} # Add debug prints into configure
776 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
777 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
779 --prefix=%{_prefix} \
780 --infodir=%{_infodir} \
781 --mandir=%{_mandir} \
783 --libexecdir=%{libdir} \
784 --enable-languages=c,c++,fortran \
785 --enable-checking=release \
787 %{!?gcc_profiledbootstrap:--disable-bootstrap} \
792 --with-slibdir=%{libdir} \
795 --enable-__cxa_atexit \
796 --enable-libstdcxx-allocator=new \
797 --enable-version-specific-runtime-libs \
798 --enable-linker-build-id \
799 --without-system-libunwind \
800 --enable-threads=posix \
805 --enable-libgfortran \
806 %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
808 --with-arch=armv7-a \
809 --with-tune=cortex-a8 \
810 --disable-sjlj-exceptions \
813 --with-arch=armv7-a \
814 --with-tune=cortex-a8 \
816 --disable-sjlj-exceptions \
820 --with-arch=armv8-a \
821 --disable-sjlj-exceptions \
824 --with-arch-32=i586 \
825 --with-tune=generic \
829 --with-arch-32=i586 \
830 --with-tune=generic \
837 --with-arch=armv7-a \
838 --with-tune=cortex-a8 \
839 --disable-sjlj-exceptions \
842 --with-arch=armv7-a \
843 --with-tune=cortex-a8 \
845 --disable-sjlj-exceptions \
849 --with-arch=armv8-a \
850 --disable-sjlj-exceptions \
853 --disable-libgfortran \
854 --disable-libquadmath \
856 --disable-libatomic \
857 --disable-libstdc++-v3 \
858 --disable-libsanitizer \
861 --with-bugurl="http://bugs.tizen.org/" \
862 --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release} %{release}" \
863 --target=%{target_arch} \
864 --host=%{host_arch} \
869 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
870 %{?gcc_dump_configure:
871 dump_configure.pl .. . \
873 --project-version %{version} \
874 --out_db gcc-%{version}-%{release}-%_project-%_repository.db
878 %{?gcc_exit_on_make_finish:
884 # asan needs a whole shadow address space
885 ulimit -v unlimited || true
886 make -k check %{?_smp_mflags} || true
888 ../contrib/test_summary | tee ../testresults/test_summary.txt
894 make install DESTDIR=$RPM_BUILD_ROOT
896 %{?gcc_dump_configure:
897 install -D -m 0644 gcc-%{version}-%{release}-%_project-%_repository.db %{buildroot}%{_datadir}/gcc-%{version}-%{release}-%_project-%_repository.db
901 cp `find . -name "*.sum"` ../testresults/
902 cp --parents `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
903 chmod 644 `find ../testresults/ -type f`
907 rm -rf %{buildroot}/%{_datadir}/locale
909 #remove everything we don't need
910 rm -rf %{buildroot}/%{libsubdir}/install-tools
911 find %{buildroot}/ -name "*.la" -delete
914 ln -s gcc %{buildroot}%{_bindir}/cc
915 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
917 # expose plugins for ar (required for lto builds)
918 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
919 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
921 # legacy preprocessor
922 mkdir -p %{buildroot}/lib
923 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
925 # 32-bit libgcc in multilib configuration
927 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
930 # move libraries to libdir
931 for lib in asan asansi atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan esan
933 [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
934 [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
939 rm -rf %{buildroot}/%{libsubdir}/include-fixed
940 rm -rf %{buildroot}/%{libsubdir}/include
945 tar -czf libsanitizer.tar.bz libsanitizer
946 mkdir -p %{buildroot}/src
947 mv -v libsanitizer.tar.bz %{buildroot}/src
951 %manifest gcc.manifest
952 %defattr(-,root,root)
964 %{_bindir}/gcc-ranlib
965 %{_bindir}/%{target_arch}-gcc
966 %{_bindir}/%{target_arch}-gcc-%{version}
967 %{_bindir}/%{target_arch}-gcc-ar
968 %{_bindir}/%{target_arch}-gcc-nm
969 %{_bindir}/%{target_arch}-gcc-ranlib
970 %{libsubdir}/collect2
972 %{libsubdir}/lto-wrapper
973 %{libsubdir}/liblto_plugin.so*
974 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
975 %{libsubdir}/include-fixed/*
976 %{libsubdir}/include/*.h
983 %ifarch %cilkrts_arch
984 %{libsubdir}/include/cilk/*
986 %{libsubdir}/include/sanitizer/*
988 %exclude %{libdir}/libasan.so
989 %exclude %{libdir}/libasansi.so
992 %exclude %{libdir}/liblsan.so
995 %exclude %{libdir}/libtsan.so
998 %exclude %{libdir}/libesan.so
1002 %defattr(-,root,root)
1003 %{libsubdir}/cc1plus
1006 %{_bindir}/%{target_arch}-g++
1007 %{_bindir}/%{target_arch}-c++
1010 %manifest gcc.manifest
1011 %license COPYING3 COPYING.RUNTIME
1012 %defattr(-,root,root)
1013 %{libdir}/libstdc++.so.*
1015 %files -n libstdc++-devel
1016 %defattr(-,root,root)
1017 %{libdir}/libstdc++.so
1018 %{libdir}/libstdc++.a
1019 %{libdir}/libsupc++.a
1020 %{libsubdir}/include/c++/*
1021 %{_datadir}/gcc-%{version}/python/libstdcxx/*
1024 %manifest gcc.manifest
1025 %license COPYING3 COPYING.RUNTIME
1026 %defattr(-,root,root)
1027 %{libdir}/libgcc_s.so.*
1030 %manifest gcc.manifest
1031 %license COPYING3 COPYING.RUNTIME
1032 %defattr(-,root,root)
1033 %{libdir}/libgomp.so.*
1036 %manifest gcc.manifest
1037 %defattr(-,root,root)
1038 %{libdir}/libcc1.so.*
1042 %manifest gcc.manifest
1043 %license libsanitizer/LICENSE.TXT
1044 %defattr(-,root,root)
1045 %{libdir}/libasan.so*
1046 %{libdir}/libasansi.so*
1051 %manifest gcc.manifest
1052 %license libsanitizer/LICENSE.TXT
1053 %defattr(-,root,root)
1054 %{libdir}/liblsan.so*
1059 %manifest gcc.manifest
1060 %license libsanitizer/LICENSE.TXT
1061 %defattr(-,root,root)
1062 %{libdir}/libtsan.so*
1067 %manifest gcc.manifest
1068 %license libsanitizer/LICENSE.TXT
1069 %defattr(-,root,root)
1070 %{libdir}/libesan.so*
1073 %ifarch %atomic_arch
1075 %manifest gcc.manifest
1076 %license COPYING3 COPYING.RUNTIME
1077 %defattr(-,root,root)
1078 %{libdir}/libatomic.so.*
1083 %manifest gcc.manifest
1084 %license COPYING3 COPYING.RUNTIME
1085 %defattr(-,root,root)
1086 %{libdir}/libitm.so.*
1089 %ifarch %cilkrts_arch
1090 %files -n libcilkrts
1091 %manifest gcc.manifest
1092 %defattr(-,root,root)
1093 %{libdir}/libcilkrts.so.*
1098 %manifest gcc.manifest
1099 %license libsanitizer/LICENSE.TXT
1100 %defattr(-,root,root)
1101 %{libdir}/libubsan.so.*
1105 %defattr(-,root,root)
1106 %dir %{libsubdir}/finclude
1108 %{_bindir}/%{target_arch}-gfortran
1110 %{libsubdir}/finclude/*
1111 %{libdir}/libgfortran.a
1112 %{libdir}/libgfortran.so
1113 %{libsubdir}/libgfortran.spec
1114 %{libsubdir}/libcaf_single.a
1115 %ifarch %quadmath_arch
1116 %{libdir}/libquadmath.a
1117 %{libdir}/libquadmath.so
1120 %files -n libgfortran
1121 %defattr(-,root,root)
1122 %{libdir}/libgfortran.so.*
1124 %ifarch %quadmath_arch
1125 %files -n libquadmath
1126 %manifest gcc.manifest
1127 %license COPYING.LIB
1128 %defattr(-,root,root)
1129 %{libdir}/libquadmath.so.*
1133 %defattr(-,root,root)
1139 %defattr(-,root,root)
1140 %{libsubdir}/plugin/*
1144 %defattr(-,root,root)
1145 %doc testresults/test_summary.txt
1146 %doc testresults/*.sum
1151 %defattr(-,root,root)
1152 %{libsubdir}/32/crt*
1154 %{libsubdir}/32/*.so
1156 %{libsubdir}/32/*.spec
1159 %files -n libasan-32bit
1160 %manifest gcc.manifest
1161 %license libsanitizer/LICENSE.TXT
1162 %defattr(-,root,root)
1163 %{libsubdir}/32/libasan.so.*
1164 %{libsubdir}/32/libasansi.so.*
1168 %files -n liblsan-32bit
1169 %manifest gcc.manifest
1170 %license libsanitizer/LICENSE.TXT
1171 %defattr(-,root,root)
1172 %{libsubdir}/32/liblsan.so.*
1175 %ifarch %atomic_arch
1176 %files -n libatomic-32bit
1177 %manifest gcc.manifest
1178 %license COPYING3 COPYING.RUNTIME
1179 %defattr(-,root,root)
1180 %{libsubdir}/32/libatomic.so.*
1183 %ifarch %cilkrts_arch
1184 %files -n libcilkrts-32bit
1185 %defattr(-,root,root)
1186 %{libsubdir}/32/libcilkrts.so.*
1189 %files -n libgcc-32bit
1190 %manifest gcc.manifest
1191 %license COPYING3 COPYING.RUNTIME
1192 %defattr(-,root,root)
1193 %{libsubdir}/32/libgcc_s.so.*
1195 %files -n libgomp-32bit
1196 %manifest gcc.manifest
1197 %license COPYING3 COPYING.RUNTIME
1198 %defattr(-,root,root)
1199 %{libsubdir}/32/libgomp.so.*
1202 %files -n libitm-32bit
1203 %license COPYING3 COPYING.RUNTIME
1204 %defattr(-,root,root)
1205 %{libsubdir}/32/libitm.so.*
1208 %files -n libgfortran-32bit
1209 %defattr(-,root,root)
1210 %dir %{libsubdir}/32/finclude
1211 %{libsubdir}/32/libgfortran.so.*
1212 %{libsubdir}/32/finclude/*
1214 %ifarch %quadmath_arch
1215 %files -n libquadmath-32bit
1216 %license COPYING.LIB
1217 %defattr(-,root,root)
1218 %{libsubdir}/32/libquadmath.so.*
1222 %files -n libubsan-32bit
1223 %manifest gcc.manifest
1224 %license libsanitizer/LICENSE.TXT
1225 %defattr(-,root,root)
1226 %{libsubdir}/32/libubsan.so.*
1229 %files -n libstdc++-32bit
1230 %manifest gcc.manifest
1231 %license COPYING3 COPYING.RUNTIME
1232 %defattr(-,root,root)
1233 %{libsubdir}/32/libstdc++.so.*
1234 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1236 %files -n libstdc++-devel-32bit
1237 %defattr(-,root,root)
1238 %{libsubdir}/32/libstdc++.so.*-gdb.py
1241 %files -n sanitizer-sources
1242 %defattr(-,root,root,-)
1243 /src/libsanitizer.tar.bz
1246 %{?gcc_dump_configure:
1247 %files configure-dump
1248 %manifest gcc.manifest
1249 %{_datadir}/gcc-%{version}-%{release}-%_project-%_repository.db