2 # spec file for package gcc6
4 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # Copyright (c) 2015 Tizen
7 # All modifications and additions to the file contributed by third parties
8 # remain the property of their copyright owners, unless otherwise agreed
9 # upon. The license for this file, and modifications and additions to the
10 # file, is the same license as for the pristine package itself (unless the
11 # license for the pristine package is not an Open Source License, in which
12 # case the license is the MIT License). An "Open Source License" is a
13 # license that conforms to the Open Source Definition (Version 1.9)
14 # published by the Open Source Initiative.
16 # Please submit bugfixes or comments via http://bugs.tizen.org/
18 # we use %%{?macro: ... } as it is more compact
20 %define gcc_run_tests 1
23 # Enable this when testing on device to:
24 # 1. Enable macro to turn on testsuite building ('gcc_run_tests 1')
25 # 2. Keep 'obj/' folder in build stage as we do not want to rebuild all gcc
26 # again on device after invoking rpmbuild --short-circuit -bc ...
27 # 3. Skip configure and make commands and go directly to 'make check'
28 %if 0%{?run_tests_on_device}
29 %define gcc_run_tests 1
30 %define gcc_keep_build_dir 1
31 %define gcc_skip_configure 1
32 %define gcc_skip_make 1
35 %if 0%{?dump_configure}
36 %define gcc_dump_configure 1
39 # Exit right after 'make ..' step to keep all object files produced by gcc build
40 %if 0%{?exit_on_make_finish}
41 %define gcc_exit_on_make_finish 1
44 # Bootstrap build constrains for ASan config
45 %if 0%{?asanbootstrap}
46 %ifarch %arm aarch64 # or #if 0#{?qemu_user_space_build}
47 %{error:"'asanbootstrap' supposed to be used with i586/x86_64 arch"}
48 # The #error macro primitive cannot stop the build because macros are context
49 # free, lazily expanded whereever they are needed, not only during build.
50 # Use non-existing define for now to abort the build.
53 # We'll get 2 libasan runtime conflict: preloaded one and another from build dir.
55 %{error:"'asanbootstrap' could not be used with sanitized environment."}
56 %{error:"Use 'asanbootstrap' without defined 'asan'"}
61 %define quadmath_arch %ix86 x86_64 ia64
62 %define tsan_arch x86_64 aarch64
63 %define esan_arch x86_64 %arm
64 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
65 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
66 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
67 %define lsan_arch x86_64 %ix86 %arm aarch64
68 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
69 %define cilkrts_arch x86_64 %ix86
88 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
90 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
91 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
93 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
94 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
95 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
97 Name: gcc%{?cross:-%{cross}}
98 # With generated files in src we could drop the following
101 BuildRequires: gettext-devel
102 BuildRequires: makeinfo
103 ## until here, but at least renaming and patching info files breaks this
104 BuildRequires: gcc-c++
105 BuildRequires: zlib-devel
107 BuildRequires: glibc-devel-32bit
110 %{?cross:BuildRequires: binutils-%{cross}}
111 # here we use %%if because OBS spec parser cannot expand
112 # %%{?macro:...} correctly
113 %if 0%{?gcc_run_tests}
114 BuildRequires: dejagnu
115 BuildRequires: expect
118 %if 0%{?gcc_dump_configure}
119 BuildRequires: configure-dumper
121 URL: http://gcc.gnu.org/
124 Source: gcc-%{version}.tar.bz2
125 Source10: gmp-6.1.1.tar.bz2
126 Source11: mpfr-3.1.5.tar.bz2
127 Source12: mpc-1.0.3.tar.gz
128 Source13: isl-0.17.1.tar.bz2
129 Source20: gcc.manifest
130 Group: Development/Building
131 Summary: The GNU C Compiler and Support Files
133 %{?cross:ExcludeArch: %{cross}}
135 Core package for the GNU Compiler Collection, including the C language
139 Summary: The GNU C++ Compiler
141 Group: Development/Languages
143 This package contains the GNU compiler for C++.
145 %package -n libstdc++
146 Summary: The standard C++ shared library
147 License: GPL-3.0-with-GCC-exception
148 Group: Development/Building
149 %description -n libstdc++
150 The standard C++ library, needed for dynamically linked C++ programs.
151 %post -n libstdc++ -p /sbin/ldconfig
152 %postun -n libstdc++ -p /sbin/ldconfig
154 %package -n libstdc++-devel
155 Summary: Include Files and Libraries mandatory for Development
156 License: GPL-3.0-with-GCC-exception
157 Group: Development/Building
158 %description -n libstdc++-devel
159 This package contains all the headers and libraries of the standard C++
160 library. It is needed for compiling C++ code.
163 Summary: C compiler runtime library
164 License: GPL-3.0-with-GCC-exception
165 Group: Development/Building
166 %description -n libgcc
167 Libgcc is needed for dynamically linked C programs.
168 %post -n libgcc -p /sbin/ldconfig
169 %postun -n libgcc -p /sbin/ldconfig
172 Summary: The GNU compiler collection OpenMP runtime library
173 License: GPL-3.0-with-GCC-exception
174 Group: Development/Building
175 %description -n libgomp
176 This is the OpenMP runtime library needed by OpenMP enabled programs
177 that were built with the -fopenmp compiler option and by programs that
178 were auto-parallelized via the -ftree-parallelize-loops compiler
180 %post -n libgomp -p /sbin/ldconfig
181 %postun -n libgomp -p /sbin/ldconfig
184 Summary: GNU Objective C Compiler
186 Group: Development/Languages
188 This package contains the GNU Objective C compiler. Objective C is an
189 object oriented language, created by Next Inc. and used in their
190 Nextstep OS. The source code is available in the gcc package.
193 Summary: Library for the GNU Objective C Compiler
194 License: GPL-3.0-with-GCC-exception
195 Group: Development/Building
196 %description -n libobjc
197 The library for the GNU Objective C compiler.
198 %post -n libobjc -p /sbin/ldconfig
199 %postun -n libobjc -p /sbin/ldconfig
202 Summary: GNU C Compiler plugin for GDB
203 License: GPL-3.0-with-GCC-exception
204 Group: Development/Building
205 %description -n libcc1
206 The GCC plugin for GDB
207 %post -n libcc1 -p /sbin/ldconfig
208 %postun -n libcc1 -p /sbin/ldconfig
211 Summary: GNU Objective C++ Compiler
213 Group: Development/Languages
215 This package contains the GNU Objective C++ compiler. Objective C++ is an
216 object oriented language, created by Next Inc. and used in their
217 Nextstep OS. The source code is available in the gcc package.
220 Summary: The GCC Preprocessor
222 Group: Development/Languages
224 This Package contains just the preprocessor that is used by the X11
228 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
230 Group: Development/Languages
232 This package contains an Ada95 compiler and associated development
233 tools based on the GNU GCC technology. Ada95 is the object oriented
234 successor of the Ada83 language. To build this package from source you
235 must have installed a binary version to bootstrap the compiler.
238 Summary: GNU Ada Runtime Libraries
239 License: GPL-3.0-with-GCC-exception
240 Group: Development/Languages
241 %description -n libada
242 This package contains the shared libraries required to run programs
243 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
244 shared libraries. It also contains the shared libraries for the
245 Implementation of the Ada Semantic Interface Specification (ASIS), the
246 implementation of Distributed Systems Programming (GLADE) and the Posix
247 1003.5 Binding (Florist).
248 %post -n libada -p /sbin/ldconfig
249 %postun -n libada -p /sbin/ldconfig
252 Summary: The GNU Fortran Compiler and Support Files
254 Group: Development/Languages
256 This is the Fortran compiler of the GNU Compiler Collection (GCC).
258 %package -n libgfortran
259 Summary: The GNU Fortran Compiler Runtime Library
260 License: GPL-3.0-with-GCC-exception
261 Group: Development/Languages
262 %description -n libgfortran
263 The runtime library needed to run programs compiled with the Fortran compiler
264 of the GNU Compiler Collection (GCC).
265 %post -n libgfortran -p /sbin/ldconfig
266 %postun -n libgfortran -p /sbin/ldconfig
268 %package -n libquadmath
269 Summary: The GNU Fortran Compiler Quadmath Runtime Library
271 Group: Development/Languages
272 %description -n libquadmath
273 The runtime library needed to run programs compiled with the Fortran compiler
274 of the GNU Compiler Collection (GCC) and quadruple precision floating point
276 %post -n libquadmath -p /sbin/ldconfig
277 %postun -n libquadmath -p /sbin/ldconfig
280 Summary: The GNU Compiler Transactional Memory Runtime Library
281 License: GPL-3.0-with-GCC-exception
282 Group: Development/Languages
283 %description -n libitm
284 The runtime library needed to run programs compiled with the
285 -fgnu-tm option of the GNU Compiler Collection (GCC).
286 %post -n libitm -p /sbin/ldconfig
287 %postun -n libitm -p /sbin/ldconfig
290 Summary: The GNU Compiler Address Sanitizer Runtime Library
292 Group: Development/Languages
293 %description -n libasan
294 The runtime library needed to run programs compiled with the
295 -fsanitize=address option of the GNU Compiler Collection (GCC).
296 %post -n libasan -p /sbin/ldconfig
297 %postun -n libasan -p /sbin/ldconfig
300 Summary: The GNU Compiler Thread Sanitizer Runtime Library
302 Group: Development/Languages
303 %description -n libtsan
304 The runtime library needed to run programs compiled with the
305 -fsanitize=thread option of the GNU Compiler Collection (GCC).
306 %post -n libtsan -p /sbin/ldconfig
307 %postun -n libtsan -p /sbin/ldconfig
310 Summary: The GNU Compiler Efficciency Sanitier Runtime Library
312 Group: Development/Languages
313 %description -n libesan
314 The runtime library needed to run programs compiled with the
315 -fsanitize=efficiency-working-set option of the GNU Compiler Collection (GCC).
316 %post -n libesan -p /sbin/ldconfig
317 %postun -n libesan -p /sbin/ldconfig
319 %package -n libatomic
320 Summary: The GNU Compiler Atomic Operations Runtime Library
321 License: GPL-3.0-with-GCC-exception
322 Group: Development/Languages
323 %description -n libatomic
324 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
325 %post -n libatomic -p /sbin/ldconfig
326 %postun -n libatomic -p /sbin/ldconfig
328 %package -n libcilkrts
329 Summary: The GNU Compiler Cilk+ Runtime Library
331 Group: Development/Languages
332 %description -n libcilkrts
333 The runtime library needed to run programs compiled with the
334 -fcilkplus option of the GNU Compiler Collection (GCC).
335 %post -n libcilkrts -p /sbin/ldconfig
336 %postun -n libcilkrts -p /sbin/ldconfig
339 Summary: The GNU Compiler Leak Sanitizer Runtime Library
341 Group: Development/Languages
342 %description -n liblsan
343 The runtime library needed to run programs compiled with the
344 -fsanitize=leak option of the GNU Compiler Collection (GCC).
345 %post -n liblsan -p /sbin/ldconfig
346 %postun -n liblsan -p /sbin/ldconfig
349 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
351 Group: Development/Languages
352 %description -n libubsan
353 The runtime library needed to run programs compiled with the
354 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
355 %post -n libubsan -p /sbin/ldconfig
356 %postun -n libubsan -p /sbin/ldconfig
359 Summary: The GNU Compiler Vtable Verifier Runtime Library
361 Group: Development/Languages
362 %description -n libvtv
363 The runtime library needed to run programs compiled with the
364 -fvtable-verify option of the GNU Compiler Collection (GCC).
365 %post -n libvtv -p /sbin/ldconfig
366 %postun -n libvtv -p /sbin/ldconfig
369 Summary: Java Runtime Library for gcc
370 License: GPL-2.0-with-classpath-exception
371 Group: Development/Building
372 %description -n libgcj
373 This library is needed if you want to use the GNU Java compiler, gcj.
374 Source code for this package is in gcc.
375 %post -n libgcj -p /sbin/ldconfig
376 %postun -n libgcj -p /sbin/ldconfig
379 Summary: The GNU Java Compiler
381 Group: Development/Languages
383 The Java compiler from the GCC-tools-suite.
385 %package -n libgcj_bc
386 Summary: Fake library for BC-ABI compatibility.
387 License: GPL-2.0-with-classpath-exception
388 Group: Development/Languages
389 %description -n libgcj_bc
390 A fake library that is used at link time only. It ensures that
391 binaries built with the BC-ABI link against a constant SONAME.
392 This way, BC-ABI binaries continue to work if the SONAME underlying
395 %package -n libgcj-jar
396 Summary: Java runtime library (jar files).
397 License: GPL-2.0-with-classpath-exception
398 Group: Development/Languages
399 %description -n libgcj-jar
400 These are the jar files that go along with the gcj front end to gcc.
402 %package -n libgcj-devel
403 Summary: Include Files and Libraries mandatory for Development.
404 License: GPL-2.0-with-classpath-exception
405 Group: Development/Languages
406 %description -n libgcj-devel
407 This package contains all necessary include files and libraries needed
408 to develop applications that require these.
411 Summary: Java Bytecode Interpreter for gcc
412 License: GPL-2.0-with-classpath-exception
413 Group: Development/Languages
414 %description -n gcc-gij
415 This package contains the java bytecode interpreter gij and related tools.
418 Summary: Foreign Function Interface library
419 License: BSD-3-Clause
420 Group: Development/Building
421 %description -n libffi
422 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.
423 %post -n libffi -p /sbin/ldconfig
424 %postun -n libffi -p /sbin/ldconfig
426 %package -n libffi-devel
427 Summary: Foreign Function Interface library development files
428 License: BSD 3-Clause
429 Group: Development/Building
430 %description -n libffi-devel
431 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.
434 Summary: GNU Go Compiler
436 Group: Development/Languages
438 This package contains a Go compiler and associated development
439 files based on the GNU GCC technology.
442 Summary: GNU Go compiler runtime library
443 License: BSD-3-Clause
444 Group: Development/Languages
445 %description -n libgo
446 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.
447 %post -n libgo -p /sbin/ldconfig
448 %postun -n libgo -p /sbin/ldconfig
451 Summary: Testsuite results
452 License: SUSE-Public-Domain
453 Group: Development/Languages
454 %description testresults
455 Results from running the gcc and target library testsuites.
457 %package -n gcc-32bit
458 Summary: The GNU C Compiler 32bit support
459 Group: Development/Building
460 %description -n gcc-32bit
461 This package contains 32bit support for the GNU Compiler Collection.
463 %package -n libstdc++-devel-32bit
464 Summary: Include Files and Libraries mandatory for Development
465 License: GPL-3.0-with-GCC-exception
466 Group: Development/Building
467 %description -n libstdc++-devel-32bit
468 This package contains all the headers and libraries of the standard C++
469 library. It is needed for compiling C++ code.
471 %package -n libgcc-32bit
472 Summary: C compiler runtime library
473 License: GPL-3.0-with-GCC-exception
474 Group: Development/Building
475 %description -n libgcc-32bit
476 Libgcc is needed for dynamically linked C programs.
477 %post -n libgcc-32bit -p /sbin/ldconfig
478 %postun -n libgcc-32bit -p /sbin/ldconfig
480 %package -n libgomp-32bit
481 Summary: The GNU compiler collection OpenMP runtime library
482 License: GPL-3.0-with-GCC-exception
483 Group: Development/Building
484 %description -n libgomp-32bit
485 This is the OpenMP runtime library needed by OpenMP enabled programs
486 that were built with the -fopenmp compiler option and by programs that
487 were auto-parallelized via the -ftree-parallelize-loops compiler
489 %post -n libgomp-32bit -p /sbin/ldconfig
490 %postun -n libgomp-32bit -p /sbin/ldconfig
492 %package -n libstdc++-32bit
493 Summary: The standard C++ shared library
494 License: GPL-3.0-with-GCC-exception
495 Group: Development/Building
496 %description -n libstdc++-32bit
497 The standard C++ library, needed for dynamically linked C++ programs.
498 %post -n libstdc++-32bit -p /sbin/ldconfig
499 %postun -n libstdc++-32bit -p /sbin/ldconfig
502 Summary: GNU Objective C Compiler
504 Group: Development/Languages
505 %description objc-32bit
506 This package contains the GNU Objective C compiler. Objective C is an
507 object oriented language, created by Next Inc. and used in their
508 Nextstep OS. The source code is available in the gcc package.
510 %package -n libobjc-32bit
511 Summary: Library for the GNU Objective C Compiler
512 License: GPL-3.0-with-GCC-exception
513 Group: Development/Building
514 %description -n libobjc-32bit
515 The library for the GNU Objective C compiler.
516 %post -n libobjc-32bit -p /sbin/ldconfig
517 %postun -n libobjc-32bit -p /sbin/ldconfig
520 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
522 Group: Development/Languages
523 %description ada-32bit
524 This package contains an Ada95 compiler and associated development
525 tools based on the GNU GCC technology. Ada95 is the object oriented
526 successor of the Ada83 language. To build this package from source you
527 must have installed a binary version to bootstrap the compiler.
529 %package -n libada-32bit
530 Summary: GNU Ada Runtime Libraries
531 License: GPL-3.0-with-GCC-exception
532 Group: Development/Languages
533 %description -n libada-32bit
534 This package contains the shared libraries required to run programs
535 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
536 shared libraries. It also contains the shared libraries for the
537 Implementation of the Ada Semantic Interface Specification (ASIS), the
538 implementation of Distributed Systems Programming (GLADE) and the Posix
539 1003.5 Binding (Florist).
540 %post -n libada-32bit -p /sbin/ldconfig
541 %postun -n libada-32bit -p /sbin/ldconfig
543 %package fortran-32bit
544 Summary: The GNU Fortran Compiler and Support Files
546 Group: Development/Languages
547 %description fortran-32bit
548 This is the Fortran compiler of the GNU Compiler Collection (GCC).
550 %package -n libgfortran-32bit
551 Summary: The GNU Fortran Compiler Runtime Library
552 License: GPL-3.0-with-GCC-exception
553 Group: Development/Languages
554 %description -n libgfortran-32bit
555 The runtime library needed to run programs compiled with the Fortran compiler
556 of the GNU Compiler Collection (GCC).
557 %post -n libgfortran-32bit -p /sbin/ldconfig
558 %postun -n libgfortran-32bit -p /sbin/ldconfig
560 %package -n libquadmath-32bit
561 Summary: The GNU Fortran Compiler Quadmath Runtime Library
563 Group: Development/Languages
564 %description -n libquadmath-32bit
565 The runtime library needed to run programs compiled with the Fortran compiler
566 of the GNU Compiler Collection (GCC) and quadruple precision floating point
568 %post -n libquadmath-32bit -p /sbin/ldconfig
569 %postun -n libquadmath-32bit -p /sbin/ldconfig
571 %package -n libitm-32bit
572 Summary: The GNU Compiler Transactional Memory Runtime Library
573 License: GPL-3.0-with-GCC-exception
574 Group: Development/Languages
575 %description -n libitm-32bit
576 The runtime library needed to run programs compiled with the
577 -fgnu-tm option of the GNU Compiler Collection (GCC).
578 %post -n libitm-32bit -p /sbin/ldconfig
579 %postun -n libitm-32bit -p /sbin/ldconfig
581 %package -n libasan-32bit
582 Summary: The GNU Compiler Address Sanitizer Runtime Library
584 Group: Development/Languages
585 %description -n libasan-32bit
586 The runtime library needed to run programs compiled with the
587 -fsanitize=address option of the GNU Compiler Collection (GCC).
588 %post -n libasan-32bit -p /sbin/ldconfig
589 %postun -n libasan-32bit -p /sbin/ldconfig
591 %package -n liblsan-32bit
592 Summary: The GNU Compiler Address Sanitizer Runtime Library
594 Group: Development/Languages
595 %description -n liblsan-32bit
596 The runtime library needed to run programs compiled with the
597 -fsanitize=leak option of the GNU Compiler Collection (GCC).
598 %post -n liblsan-32bit -p /sbin/ldconfig
599 %postun -n liblsan-32bit -p /sbin/ldconfig
601 %package -n libtsan-32bit
602 Summary: The GNU Compiler Thread Sanitizer Runtime Library
604 Group: Development/Languages
605 %description -n libtsan-32bit
606 The runtime library needed to run programs compiled with the
607 -fsanitize=thread option of the GNU Compiler Collection (GCC).
608 %post -n libtsan-32bit -p /sbin/ldconfig
609 %postun -n libtsan-32bit -p /sbin/ldconfig
611 %package -n libatomic-32bit
612 Summary: The GNU Compiler Atomic Operations Runtime Library
613 License: GPL-3.0-with-GCC-exception
614 Group: Development/Languages
615 %description -n libatomic-32bit
616 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
617 %post -n libatomic-32bit -p /sbin/ldconfig
618 %postun -n libatomic-32bit -p /sbin/ldconfig
620 %package -n libcilkrts-32bit
621 Summary: The GNU Compiler Cilk+ Runtime Library
623 Group: Development/Languages
624 %description -n libcilkrts-32bit
625 The runtime library needed to run programs compiled with the
626 -fcilkplus option of the GNU Compiler Collection (GCC).
627 %post -n libcilkrts-32bit -p /sbin/ldconfig
628 %postun -n libcilkrts-32bit -p /sbin/ldconfig
630 %package -n libubsan-32bit
631 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
633 Group: Development/Languages
634 %description -n libubsan-32bit
635 The runtime library needed to run programs compiled with the
636 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
637 %post -n libubsan-32bit -p /sbin/ldconfig
638 %postun -n libubsan-32bit -p /sbin/ldconfig
640 %package -n libvtv-32bit
641 Summary: The GNU Compiler Vtable Verifier Runtime Library
643 Group: Development/Languages
644 %description -n libvtv-32bit
645 The runtime library needed to run programs compiled with the
646 -fvtable-verify option of the GNU Compiler Collection (GCC).
647 %post -n libvtv-32bit -p /sbin/ldconfig
648 %postun -n libvtv-32bit -p /sbin/ldconfig
650 %package -n libffi-32bit
651 Summary: Foreign Function Interface library
652 License: BSD-3-Clause
653 Group: Development/Building
654 %description -n libffi-32bit
655 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.
656 %post -n libffi-32bit -p /sbin/ldconfig
657 %postun -n libffi-32bit -p /sbin/ldconfig
659 %package -n libffi-devel-32bit
660 Summary: Foreign Function Interface library development files
661 License: BSD 3-Clause
662 Group: Development/Building
663 %description -n libffi-devel-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.
667 Summary: GNU Go Compiler
669 Group: Development/Languages
670 %description go-32bit
671 This package contains a Go compiler and associated development
672 files based on the GNU GCC technology.
674 %package -n libgo-32bit
675 Summary: GNU Go compiler runtime library
676 License: BSD-3-Clause
677 Group: Development/Languages
678 %description -n libgo-32bit
679 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.
680 %post -n libgo-32bit -p /sbin/ldconfig
681 %postun -n libgo-32bit -p /sbin/ldconfig
683 %package plugin-devel
684 Summary: GNU GCC Plugin development files
686 Group: Development/Languages
687 %description plugin-devel
688 This package contains GCC Plugin development files needed for compiler
691 %package -n sanitizer-sources
692 Summary: Sanitizer family tools sources
694 Group: Development/Tools
697 %description -n sanitizer-sources
698 Sanitizer family tools sources for external tools.
700 %{?gcc_dump_configure:
701 %package configure-dump
702 Summary: GNU GCC configure dump
704 Group: Development/Languages
705 %description configure-dump
706 This package contains dump of configure variables of GCC
711 %setup -q -n gcc-%{version}
717 ln -sf mpfr-3.1.5 mpfr
721 ln -sf isl-0.17.1 isl
723 echo "" > gcc/DEV-PHASE
725 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
731 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mthumb -mthumb-fp -Wa,-mimplicit-it=thumb -fno-omit-frame-pointer"
734 %{?esan:%gcc_unforce_options}
735 %{!?gcc_keep_build_dir:
741 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'
742 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
744 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
745 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
747 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ */ /g'`
749 # -Wall is stripped off now, so -Wformat will not turn on implicitly for
750 # "-Wformat-.." option group, causing additional build warnings and testsuite
751 # FAIL ("test for excess errors" type).
752 # Insert "-Wformat" if we find "-Wformat-..."
753 if [ ! -z "$(echo $RPM_OPT_FLAGS | grep -o "\B\-Wformat\-")" ]; then
754 if [ -z "$(echo $RPM_OPT_FLAGS | grep -Po "\B\-Wformat(\s|\Z)")" ]; then
755 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-Wformat-/-Wformat -Wformat-/")
759 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
760 %{?asan_shadow_scale: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -Wp,-DASAN_SHADOW_SCALE=%{asan_shadow_scale})}
762 %ifarch armv7l armv7hl aarch64
763 %undefine gcc_profiledbootstrap
767 # Required for correct libgcc and crt* build
768 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon"
771 %{!?gcc_skip_configure:
772 %{?gcc_dump_configure:patch_configure.pl ..} # Add debug prints into configure
773 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
774 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
776 --prefix=%{_prefix} \
777 --infodir=%{_infodir} \
778 --mandir=%{_mandir} \
780 --libexecdir=%{libdir} \
781 --enable-languages=c,c++,fortran \
782 --enable-checking=release \
784 %{!?gcc_profiledbootstrap:--disable-bootstrap} \
789 --with-slibdir=%{libdir} \
792 --enable-__cxa_atexit \
793 --enable-libstdcxx-allocator=new \
794 --enable-version-specific-runtime-libs \
795 --enable-linker-build-id \
796 --without-system-libunwind \
797 --enable-threads=posix \
802 --enable-libgfortran \
803 %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
805 --with-arch=armv7-a \
806 --with-tune=cortex-a8 \
807 --disable-sjlj-exceptions \
810 --with-arch=armv7-a \
811 --with-tune=cortex-a8 \
813 --disable-sjlj-exceptions \
817 --with-arch=armv8-a \
818 --disable-sjlj-exceptions \
821 --with-arch-32=i586 \
822 --with-tune=generic \
826 --with-arch-32=i586 \
827 --with-tune=generic \
834 --with-arch=armv7-a \
835 --with-tune=cortex-a8 \
836 --disable-sjlj-exceptions \
839 --with-arch=armv7-a \
840 --with-tune=cortex-a8 \
842 --disable-sjlj-exceptions \
846 --with-arch=armv8-a \
847 --disable-sjlj-exceptions \
850 --disable-libgfortran \
851 --disable-libquadmath \
853 --disable-libatomic \
854 --disable-libstdc++-v3 \
855 --disable-libsanitizer \
858 --with-bugurl="http://bugs.tizen.org/" \
859 --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release} %{release}" \
860 --target=%{target_arch} \
861 --host=%{host_arch} \
866 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
867 %{?gcc_dump_configure:
868 dump_configure.pl .. . \
870 --project-version %{version} \
871 --out_db gcc-%{version}-%{release}-%_project-%_repository.db
875 %{?gcc_exit_on_make_finish:
881 # asan needs a whole shadow address space
882 ulimit -v unlimited || true
883 make -k check %{?_smp_mflags} || true
885 ../contrib/test_summary | tee ../testresults/test_summary.txt
891 make install DESTDIR=$RPM_BUILD_ROOT
893 %{?gcc_dump_configure:
894 install -D -m 0644 gcc-%{version}-%{release}-%_project-%_repository.db %{buildroot}%{_datadir}/gcc-%{version}-%{release}-%_project-%_repository.db
898 cp `find . -name "*.sum"` ../testresults/
899 cp --parents `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
900 chmod 644 `find ../testresults/ -type f`
904 rm -rf %{buildroot}/%{_datadir}/locale
906 #remove everything we don't need
907 rm -rf %{buildroot}/%{libsubdir}/install-tools
908 find %{buildroot}/ -name "*.la" -delete
911 ln -s gcc %{buildroot}%{_bindir}/cc
912 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
914 # expose plugins for ar (required for lto builds)
915 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
916 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
918 # legacy preprocessor
919 mkdir -p %{buildroot}/lib
920 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
922 # 32-bit libgcc in multilib configuration
924 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
927 # move libraries to libdir
928 for lib in asan asansi atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan esan
930 [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
931 [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
936 rm -rf %{buildroot}/%{libsubdir}/include-fixed
937 rm -rf %{buildroot}/%{libsubdir}/include
942 tar -czf libsanitizer.tar.bz libsanitizer
943 mkdir -p %{buildroot}/src
944 mv -v libsanitizer.tar.bz %{buildroot}/src
948 %manifest gcc.manifest
949 %defattr(-,root,root)
961 %{_bindir}/gcc-ranlib
962 %{_bindir}/%{target_arch}-gcc
963 %{_bindir}/%{target_arch}-gcc-%{version}
964 %{_bindir}/%{target_arch}-gcc-ar
965 %{_bindir}/%{target_arch}-gcc-nm
966 %{_bindir}/%{target_arch}-gcc-ranlib
967 %{libsubdir}/collect2
969 %{libsubdir}/lto-wrapper
970 %{libsubdir}/liblto_plugin.so*
971 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
972 %{libsubdir}/include-fixed/*
973 %{libsubdir}/include/*.h
980 %ifarch %cilkrts_arch
981 %{libsubdir}/include/cilk/*
983 %{libsubdir}/include/sanitizer/*
985 %exclude %{libdir}/libasan.so
986 %exclude %{libdir}/libasansi.so
989 %exclude %{libdir}/liblsan.so
992 %exclude %{libdir}/libtsan.so
995 %exclude %{libdir}/libesan.so
999 %defattr(-,root,root)
1000 %{libsubdir}/cc1plus
1003 %{_bindir}/%{target_arch}-g++
1004 %{_bindir}/%{target_arch}-c++
1007 %manifest gcc.manifest
1008 %license COPYING3 COPYING.RUNTIME
1009 %defattr(-,root,root)
1010 %{libdir}/libstdc++.so.*
1012 %files -n libstdc++-devel
1013 %defattr(-,root,root)
1014 %{libdir}/libstdc++.so
1015 %{libdir}/libstdc++.a
1016 %{libdir}/libsupc++.a
1017 %{libsubdir}/include/c++/*
1018 %{_datadir}/gcc-%{version}/python/libstdcxx/*
1021 %manifest gcc.manifest
1022 %license COPYING3 COPYING.RUNTIME
1023 %defattr(-,root,root)
1024 %{libdir}/libgcc_s.so.*
1027 %manifest gcc.manifest
1028 %license COPYING3 COPYING.RUNTIME
1029 %defattr(-,root,root)
1030 %{libdir}/libgomp.so.*
1033 %manifest gcc.manifest
1034 %defattr(-,root,root)
1035 %{libdir}/libcc1.so.*
1039 %manifest gcc.manifest
1040 %license libsanitizer/LICENSE.TXT
1041 %defattr(-,root,root)
1042 %{libdir}/libasan.so*
1043 %{libdir}/libasansi.so*
1048 %manifest gcc.manifest
1049 %license libsanitizer/LICENSE.TXT
1050 %defattr(-,root,root)
1051 %{libdir}/liblsan.so*
1056 %manifest gcc.manifest
1057 %license libsanitizer/LICENSE.TXT
1058 %defattr(-,root,root)
1059 %{libdir}/libtsan.so*
1064 %manifest gcc.manifest
1065 %license libsanitizer/LICENSE.TXT
1066 %defattr(-,root,root)
1067 %{libdir}/libesan.so*
1070 %ifarch %atomic_arch
1072 %manifest gcc.manifest
1073 %license COPYING3 COPYING.RUNTIME
1074 %defattr(-,root,root)
1075 %{libdir}/libatomic.so.*
1080 %manifest gcc.manifest
1081 %license COPYING3 COPYING.RUNTIME
1082 %defattr(-,root,root)
1083 %{libdir}/libitm.so.*
1086 %ifarch %cilkrts_arch
1087 %files -n libcilkrts
1088 %manifest gcc.manifest
1089 %defattr(-,root,root)
1090 %{libdir}/libcilkrts.so.*
1095 %manifest gcc.manifest
1096 %license libsanitizer/LICENSE.TXT
1097 %defattr(-,root,root)
1098 %{libdir}/libubsan.so.*
1102 %defattr(-,root,root)
1103 %dir %{libsubdir}/finclude
1105 %{_bindir}/%{target_arch}-gfortran
1107 %{libsubdir}/finclude/*
1108 %{libdir}/libgfortran.a
1109 %{libdir}/libgfortran.so
1110 %{libsubdir}/libgfortran.spec
1111 %{libsubdir}/libcaf_single.a
1112 %ifarch %quadmath_arch
1113 %{libdir}/libquadmath.a
1114 %{libdir}/libquadmath.so
1117 %files -n libgfortran
1118 %defattr(-,root,root)
1119 %{libdir}/libgfortran.so.*
1121 %ifarch %quadmath_arch
1122 %files -n libquadmath
1123 %manifest gcc.manifest
1124 %license COPYING.LIB
1125 %defattr(-,root,root)
1126 %{libdir}/libquadmath.so.*
1130 %defattr(-,root,root)
1136 %defattr(-,root,root)
1137 %{libsubdir}/plugin/*
1141 %defattr(-,root,root)
1142 %doc testresults/test_summary.txt
1143 %doc testresults/*.sum
1148 %defattr(-,root,root)
1149 %{libsubdir}/32/crt*
1151 %{libsubdir}/32/*.so
1153 %{libsubdir}/32/*.spec
1156 %files -n libasan-32bit
1157 %manifest gcc.manifest
1158 %license libsanitizer/LICENSE.TXT
1159 %defattr(-,root,root)
1160 %{libsubdir}/32/libasan.so.*
1161 %{libsubdir}/32/libasansi.so.*
1165 %files -n liblsan-32bit
1166 %manifest gcc.manifest
1167 %license libsanitizer/LICENSE.TXT
1168 %defattr(-,root,root)
1169 %{libsubdir}/32/liblsan.so.*
1172 %ifarch %atomic_arch
1173 %files -n libatomic-32bit
1174 %manifest gcc.manifest
1175 %license COPYING3 COPYING.RUNTIME
1176 %defattr(-,root,root)
1177 %{libsubdir}/32/libatomic.so.*
1180 %ifarch %cilkrts_arch
1181 %files -n libcilkrts-32bit
1182 %defattr(-,root,root)
1183 %{libsubdir}/32/libcilkrts.so.*
1186 %files -n libgcc-32bit
1187 %manifest gcc.manifest
1188 %license COPYING3 COPYING.RUNTIME
1189 %defattr(-,root,root)
1190 %{libsubdir}/32/libgcc_s.so.*
1192 %files -n libgomp-32bit
1193 %manifest gcc.manifest
1194 %license COPYING3 COPYING.RUNTIME
1195 %defattr(-,root,root)
1196 %{libsubdir}/32/libgomp.so.*
1199 %files -n libitm-32bit
1200 %license COPYING3 COPYING.RUNTIME
1201 %defattr(-,root,root)
1202 %{libsubdir}/32/libitm.so.*
1205 %files -n libgfortran-32bit
1206 %defattr(-,root,root)
1207 %dir %{libsubdir}/32/finclude
1208 %{libsubdir}/32/libgfortran.so.*
1209 %{libsubdir}/32/finclude/*
1211 %ifarch %quadmath_arch
1212 %files -n libquadmath-32bit
1213 %license COPYING.LIB
1214 %defattr(-,root,root)
1215 %{libsubdir}/32/libquadmath.so.*
1219 %files -n libubsan-32bit
1220 %manifest gcc.manifest
1221 %license libsanitizer/LICENSE.TXT
1222 %defattr(-,root,root)
1223 %{libsubdir}/32/libubsan.so.*
1226 %files -n libstdc++-32bit
1227 %manifest gcc.manifest
1228 %license COPYING3 COPYING.RUNTIME
1229 %defattr(-,root,root)
1230 %{libsubdir}/32/libstdc++.so.*
1231 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1233 %files -n libstdc++-devel-32bit
1234 %defattr(-,root,root)
1235 %{libsubdir}/32/libstdc++.so.*-gdb.py
1238 %files -n sanitizer-sources
1239 %defattr(-,root,root,-)
1240 /src/libsanitizer.tar.bz
1243 %{?gcc_dump_configure:
1244 %files configure-dump
1245 %manifest gcc.manifest
1246 %{_datadir}/gcc-%{version}-%{release}-%_project-%_repository.db