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 # Exit right after 'make ..' step to keep all object files produced by gcc build
39 %if 0%{?exit_on_make_finish}
40 %define gcc_exit_on_make_finish 1
43 # Bootstrap build constrains for ASan config
44 %if 0%{?asanbootstrap}
45 %ifarch %arm aarch64 # or #if 0#{?qemu_user_space_build}
46 %{error:"'asanbootstrap' supposed to be used with i586/x86_64 arch"}
47 # The #error macro primitive cannot stop the build because macros are context
48 # free, lazily expanded whereever they are needed, not only during build.
49 # Use non-existing define for now to abort the build.
52 # We'll get 2 libasan runtime conflict: preloaded one and another from build dir.
54 %{error:"'asanbootstrap' could not be used with sanitized environment."}
55 %{error:"Use 'asanbootstrap' without defined 'asan'"}
60 %define quadmath_arch %ix86 x86_64 ia64
61 %define tsan_arch x86_64 aarch64
62 %define esan_arch x86_64 %arm
63 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
64 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
65 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
66 %define lsan_arch x86_64 %ix86 %arm aarch64
67 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
68 %define cilkrts_arch x86_64 %ix86
87 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
89 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
90 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
92 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
93 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
94 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
96 Name: gcc%{?cross:-%{cross}}
97 # With generated files in src we could drop the following
100 BuildRequires: gettext-devel
101 BuildRequires: makeinfo
102 ## until here, but at least renaming and patching info files breaks this
103 BuildRequires: gcc-c++
104 BuildRequires: zlib-devel
106 BuildRequires: glibc-devel-32bit
109 %{?cross:BuildRequires: binutils-%{cross}}
110 # here we use %%if because OBS spec parser cannot expand
111 # %%{?macro:...} correctly
112 %if 0%{?gcc_run_tests}
113 BuildRequires: dejagnu
114 BuildRequires: expect
117 URL: http://gcc.gnu.org/
120 Source: gcc-%{version}.tar.bz2
121 Source10: gmp-6.1.1.tar.bz2
122 Source11: mpfr-3.1.5.tar.bz2
123 Source12: mpc-1.0.3.tar.gz
124 Source13: isl-0.17.1.tar.bz2
125 Source20: gcc.manifest
126 Group: Development/Building
127 Summary: The GNU C Compiler and Support Files
129 %{?cross:ExcludeArch: %{cross}}
131 Core package for the GNU Compiler Collection, including the C language
135 Summary: The GNU C++ Compiler
137 Group: Development/Languages
139 This package contains the GNU compiler for C++.
141 %package -n libstdc++
142 Summary: The standard C++ shared library
143 License: GPL-3.0-with-GCC-exception
144 Group: Development/Building
145 %description -n libstdc++
146 The standard C++ library, needed for dynamically linked C++ programs.
147 %post -n libstdc++ -p /sbin/ldconfig
148 %postun -n libstdc++ -p /sbin/ldconfig
150 %package -n libstdc++-devel
151 Summary: Include Files and Libraries mandatory for Development
152 License: GPL-3.0-with-GCC-exception
153 Group: Development/Building
154 %description -n libstdc++-devel
155 This package contains all the headers and libraries of the standard C++
156 library. It is needed for compiling C++ code.
159 Summary: C compiler runtime library
160 License: GPL-3.0-with-GCC-exception
161 Group: Development/Building
162 %description -n libgcc
163 Libgcc is needed for dynamically linked C programs.
164 %post -n libgcc -p /sbin/ldconfig
165 %postun -n libgcc -p /sbin/ldconfig
168 Summary: The GNU compiler collection OpenMP runtime library
169 License: GPL-3.0-with-GCC-exception
170 Group: Development/Building
171 %description -n libgomp
172 This is the OpenMP runtime library needed by OpenMP enabled programs
173 that were built with the -fopenmp compiler option and by programs that
174 were auto-parallelized via the -ftree-parallelize-loops compiler
176 %post -n libgomp -p /sbin/ldconfig
177 %postun -n libgomp -p /sbin/ldconfig
180 Summary: GNU Objective C Compiler
182 Group: Development/Languages
184 This package contains the GNU Objective C compiler. Objective C is an
185 object oriented language, created by Next Inc. and used in their
186 Nextstep OS. The source code is available in the gcc package.
189 Summary: Library for the GNU Objective C Compiler
190 License: GPL-3.0-with-GCC-exception
191 Group: Development/Building
192 %description -n libobjc
193 The library for the GNU Objective C compiler.
194 %post -n libobjc -p /sbin/ldconfig
195 %postun -n libobjc -p /sbin/ldconfig
198 Summary: GNU C Compiler plugin for GDB
199 License: GPL-3.0-with-GCC-exception
200 Group: Development/Building
201 %description -n libcc1
202 The GCC plugin for GDB
203 %post -n libcc1 -p /sbin/ldconfig
204 %postun -n libcc1 -p /sbin/ldconfig
207 Summary: GNU Objective C++ Compiler
209 Group: Development/Languages
211 This package contains the GNU Objective C++ compiler. Objective C++ is an
212 object oriented language, created by Next Inc. and used in their
213 Nextstep OS. The source code is available in the gcc package.
216 Summary: The GCC Preprocessor
218 Group: Development/Languages
220 This Package contains just the preprocessor that is used by the X11
224 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
226 Group: Development/Languages
228 This package contains an Ada95 compiler and associated development
229 tools based on the GNU GCC technology. Ada95 is the object oriented
230 successor of the Ada83 language. To build this package from source you
231 must have installed a binary version to bootstrap the compiler.
234 Summary: GNU Ada Runtime Libraries
235 License: GPL-3.0-with-GCC-exception
236 Group: Development/Languages
237 %description -n libada
238 This package contains the shared libraries required to run programs
239 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
240 shared libraries. It also contains the shared libraries for the
241 Implementation of the Ada Semantic Interface Specification (ASIS), the
242 implementation of Distributed Systems Programming (GLADE) and the Posix
243 1003.5 Binding (Florist).
244 %post -n libada -p /sbin/ldconfig
245 %postun -n libada -p /sbin/ldconfig
248 Summary: The GNU Fortran Compiler and Support Files
250 Group: Development/Languages
252 This is the Fortran compiler of the GNU Compiler Collection (GCC).
254 %package -n libgfortran
255 Summary: The GNU Fortran Compiler Runtime Library
256 License: GPL-3.0-with-GCC-exception
257 Group: Development/Languages
258 %description -n libgfortran
259 The runtime library needed to run programs compiled with the Fortran compiler
260 of the GNU Compiler Collection (GCC).
261 %post -n libgfortran -p /sbin/ldconfig
262 %postun -n libgfortran -p /sbin/ldconfig
264 %package -n libquadmath
265 Summary: The GNU Fortran Compiler Quadmath Runtime Library
267 Group: Development/Languages
268 %description -n libquadmath
269 The runtime library needed to run programs compiled with the Fortran compiler
270 of the GNU Compiler Collection (GCC) and quadruple precision floating point
272 %post -n libquadmath -p /sbin/ldconfig
273 %postun -n libquadmath -p /sbin/ldconfig
276 Summary: The GNU Compiler Transactional Memory Runtime Library
277 License: GPL-3.0-with-GCC-exception
278 Group: Development/Languages
279 %description -n libitm
280 The runtime library needed to run programs compiled with the
281 -fgnu-tm option of the GNU Compiler Collection (GCC).
282 %post -n libitm -p /sbin/ldconfig
283 %postun -n libitm -p /sbin/ldconfig
286 Summary: The GNU Compiler Address Sanitizer Runtime Library
288 Group: Development/Languages
289 %description -n libasan
290 The runtime library needed to run programs compiled with the
291 -fsanitize=address option of the GNU Compiler Collection (GCC).
292 %post -n libasan -p /sbin/ldconfig
293 %postun -n libasan -p /sbin/ldconfig
296 Summary: The GNU Compiler Thread Sanitizer Runtime Library
298 Group: Development/Languages
299 %description -n libtsan
300 The runtime library needed to run programs compiled with the
301 -fsanitize=thread option of the GNU Compiler Collection (GCC).
302 %post -n libtsan -p /sbin/ldconfig
303 %postun -n libtsan -p /sbin/ldconfig
306 Summary: The GNU Compiler Efficciency Sanitier Runtime Library
308 Group: Development/Languages
309 %description -n libesan
310 The runtime library needed to run programs compiled with the
311 -fsanitize=efficiency-working-set option of the GNU Compiler Collection (GCC).
312 %post -n libesan -p /sbin/ldconfig
313 %postun -n libesan -p /sbin/ldconfig
315 %package -n libatomic
316 Summary: The GNU Compiler Atomic Operations Runtime Library
317 License: GPL-3.0-with-GCC-exception
318 Group: Development/Languages
319 %description -n libatomic
320 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
321 %post -n libatomic -p /sbin/ldconfig
322 %postun -n libatomic -p /sbin/ldconfig
324 %package -n libcilkrts
325 Summary: The GNU Compiler Cilk+ Runtime Library
327 Group: Development/Languages
328 %description -n libcilkrts
329 The runtime library needed to run programs compiled with the
330 -fcilkplus option of the GNU Compiler Collection (GCC).
331 %post -n libcilkrts -p /sbin/ldconfig
332 %postun -n libcilkrts -p /sbin/ldconfig
335 Summary: The GNU Compiler Leak Sanitizer Runtime Library
337 Group: Development/Languages
338 %description -n liblsan
339 The runtime library needed to run programs compiled with the
340 -fsanitize=leak option of the GNU Compiler Collection (GCC).
341 %post -n liblsan -p /sbin/ldconfig
342 %postun -n liblsan -p /sbin/ldconfig
345 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
347 Group: Development/Languages
348 %description -n libubsan
349 The runtime library needed to run programs compiled with the
350 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
351 %post -n libubsan -p /sbin/ldconfig
352 %postun -n libubsan -p /sbin/ldconfig
355 Summary: The GNU Compiler Vtable Verifier Runtime Library
357 Group: Development/Languages
358 %description -n libvtv
359 The runtime library needed to run programs compiled with the
360 -fvtable-verify option of the GNU Compiler Collection (GCC).
361 %post -n libvtv -p /sbin/ldconfig
362 %postun -n libvtv -p /sbin/ldconfig
365 Summary: Java Runtime Library for gcc
366 License: GPL-2.0-with-classpath-exception
367 Group: Development/Building
368 %description -n libgcj
369 This library is needed if you want to use the GNU Java compiler, gcj.
370 Source code for this package is in gcc.
371 %post -n libgcj -p /sbin/ldconfig
372 %postun -n libgcj -p /sbin/ldconfig
375 Summary: The GNU Java Compiler
377 Group: Development/Languages
379 The Java compiler from the GCC-tools-suite.
381 %package -n libgcj_bc
382 Summary: Fake library for BC-ABI compatibility.
383 License: GPL-2.0-with-classpath-exception
384 Group: Development/Languages
385 %description -n libgcj_bc
386 A fake library that is used at link time only. It ensures that
387 binaries built with the BC-ABI link against a constant SONAME.
388 This way, BC-ABI binaries continue to work if the SONAME underlying
391 %package -n libgcj-jar
392 Summary: Java runtime library (jar files).
393 License: GPL-2.0-with-classpath-exception
394 Group: Development/Languages
395 %description -n libgcj-jar
396 These are the jar files that go along with the gcj front end to gcc.
398 %package -n libgcj-devel
399 Summary: Include Files and Libraries mandatory for Development.
400 License: GPL-2.0-with-classpath-exception
401 Group: Development/Languages
402 %description -n libgcj-devel
403 This package contains all necessary include files and libraries needed
404 to develop applications that require these.
407 Summary: Java Bytecode Interpreter for gcc
408 License: GPL-2.0-with-classpath-exception
409 Group: Development/Languages
410 %description -n gcc-gij
411 This package contains the java bytecode interpreter gij and related tools.
414 Summary: Foreign Function Interface library
415 License: BSD-3-Clause
416 Group: Development/Building
417 %description -n libffi
418 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
419 %post -n libffi -p /sbin/ldconfig
420 %postun -n libffi -p /sbin/ldconfig
422 %package -n libffi-devel
423 Summary: Foreign Function Interface library development files
424 License: BSD 3-Clause
425 Group: Development/Building
426 %description -n libffi-devel
427 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
430 Summary: GNU Go Compiler
432 Group: Development/Languages
434 This package contains a Go compiler and associated development
435 files based on the GNU GCC technology.
438 Summary: GNU Go compiler runtime library
439 License: BSD-3-Clause
440 Group: Development/Languages
441 %description -n libgo
442 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
443 %post -n libgo -p /sbin/ldconfig
444 %postun -n libgo -p /sbin/ldconfig
447 Summary: Testsuite results
448 License: SUSE-Public-Domain
449 Group: Development/Languages
450 %description testresults
451 Results from running the gcc and target library testsuites.
453 %package -n gcc-32bit
454 Summary: The GNU C Compiler 32bit support
455 Group: Development/Building
456 %description -n gcc-32bit
457 This package contains 32bit support for the GNU Compiler Collection.
459 %package -n libstdc++-devel-32bit
460 Summary: Include Files and Libraries mandatory for Development
461 License: GPL-3.0-with-GCC-exception
462 Group: Development/Building
463 %description -n libstdc++-devel-32bit
464 This package contains all the headers and libraries of the standard C++
465 library. It is needed for compiling C++ code.
467 %package -n libgcc-32bit
468 Summary: C compiler runtime library
469 License: GPL-3.0-with-GCC-exception
470 Group: Development/Building
471 %description -n libgcc-32bit
472 Libgcc is needed for dynamically linked C programs.
473 %post -n libgcc-32bit -p /sbin/ldconfig
474 %postun -n libgcc-32bit -p /sbin/ldconfig
476 %package -n libgomp-32bit
477 Summary: The GNU compiler collection OpenMP runtime library
478 License: GPL-3.0-with-GCC-exception
479 Group: Development/Building
480 %description -n libgomp-32bit
481 This is the OpenMP runtime library needed by OpenMP enabled programs
482 that were built with the -fopenmp compiler option and by programs that
483 were auto-parallelized via the -ftree-parallelize-loops compiler
485 %post -n libgomp-32bit -p /sbin/ldconfig
486 %postun -n libgomp-32bit -p /sbin/ldconfig
488 %package -n libstdc++-32bit
489 Summary: The standard C++ shared library
490 License: GPL-3.0-with-GCC-exception
491 Group: Development/Building
492 %description -n libstdc++-32bit
493 The standard C++ library, needed for dynamically linked C++ programs.
494 %post -n libstdc++-32bit -p /sbin/ldconfig
495 %postun -n libstdc++-32bit -p /sbin/ldconfig
498 Summary: GNU Objective C Compiler
500 Group: Development/Languages
501 %description objc-32bit
502 This package contains the GNU Objective C compiler. Objective C is an
503 object oriented language, created by Next Inc. and used in their
504 Nextstep OS. The source code is available in the gcc package.
506 %package -n libobjc-32bit
507 Summary: Library for the GNU Objective C Compiler
508 License: GPL-3.0-with-GCC-exception
509 Group: Development/Building
510 %description -n libobjc-32bit
511 The library for the GNU Objective C compiler.
512 %post -n libobjc-32bit -p /sbin/ldconfig
513 %postun -n libobjc-32bit -p /sbin/ldconfig
516 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
518 Group: Development/Languages
519 %description ada-32bit
520 This package contains an Ada95 compiler and associated development
521 tools based on the GNU GCC technology. Ada95 is the object oriented
522 successor of the Ada83 language. To build this package from source you
523 must have installed a binary version to bootstrap the compiler.
525 %package -n libada-32bit
526 Summary: GNU Ada Runtime Libraries
527 License: GPL-3.0-with-GCC-exception
528 Group: Development/Languages
529 %description -n libada-32bit
530 This package contains the shared libraries required to run programs
531 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
532 shared libraries. It also contains the shared libraries for the
533 Implementation of the Ada Semantic Interface Specification (ASIS), the
534 implementation of Distributed Systems Programming (GLADE) and the Posix
535 1003.5 Binding (Florist).
536 %post -n libada-32bit -p /sbin/ldconfig
537 %postun -n libada-32bit -p /sbin/ldconfig
539 %package fortran-32bit
540 Summary: The GNU Fortran Compiler and Support Files
542 Group: Development/Languages
543 %description fortran-32bit
544 This is the Fortran compiler of the GNU Compiler Collection (GCC).
546 %package -n libgfortran-32bit
547 Summary: The GNU Fortran Compiler Runtime Library
548 License: GPL-3.0-with-GCC-exception
549 Group: Development/Languages
550 %description -n libgfortran-32bit
551 The runtime library needed to run programs compiled with the Fortran compiler
552 of the GNU Compiler Collection (GCC).
553 %post -n libgfortran-32bit -p /sbin/ldconfig
554 %postun -n libgfortran-32bit -p /sbin/ldconfig
556 %package -n libquadmath-32bit
557 Summary: The GNU Fortran Compiler Quadmath Runtime Library
559 Group: Development/Languages
560 %description -n libquadmath-32bit
561 The runtime library needed to run programs compiled with the Fortran compiler
562 of the GNU Compiler Collection (GCC) and quadruple precision floating point
564 %post -n libquadmath-32bit -p /sbin/ldconfig
565 %postun -n libquadmath-32bit -p /sbin/ldconfig
567 %package -n libitm-32bit
568 Summary: The GNU Compiler Transactional Memory Runtime Library
569 License: GPL-3.0-with-GCC-exception
570 Group: Development/Languages
571 %description -n libitm-32bit
572 The runtime library needed to run programs compiled with the
573 -fgnu-tm option of the GNU Compiler Collection (GCC).
574 %post -n libitm-32bit -p /sbin/ldconfig
575 %postun -n libitm-32bit -p /sbin/ldconfig
577 %package -n libasan-32bit
578 Summary: The GNU Compiler Address Sanitizer Runtime Library
580 Group: Development/Languages
581 %description -n libasan-32bit
582 The runtime library needed to run programs compiled with the
583 -fsanitize=address option of the GNU Compiler Collection (GCC).
584 %post -n libasan-32bit -p /sbin/ldconfig
585 %postun -n libasan-32bit -p /sbin/ldconfig
587 %package -n liblsan-32bit
588 Summary: The GNU Compiler Address Sanitizer Runtime Library
590 Group: Development/Languages
591 %description -n liblsan-32bit
592 The runtime library needed to run programs compiled with the
593 -fsanitize=leak option of the GNU Compiler Collection (GCC).
594 %post -n liblsan-32bit -p /sbin/ldconfig
595 %postun -n liblsan-32bit -p /sbin/ldconfig
597 %package -n libtsan-32bit
598 Summary: The GNU Compiler Thread Sanitizer Runtime Library
600 Group: Development/Languages
601 %description -n libtsan-32bit
602 The runtime library needed to run programs compiled with the
603 -fsanitize=thread option of the GNU Compiler Collection (GCC).
604 %post -n libtsan-32bit -p /sbin/ldconfig
605 %postun -n libtsan-32bit -p /sbin/ldconfig
607 %package -n libatomic-32bit
608 Summary: The GNU Compiler Atomic Operations Runtime Library
609 License: GPL-3.0-with-GCC-exception
610 Group: Development/Languages
611 %description -n libatomic-32bit
612 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
613 %post -n libatomic-32bit -p /sbin/ldconfig
614 %postun -n libatomic-32bit -p /sbin/ldconfig
616 %package -n libcilkrts-32bit
617 Summary: The GNU Compiler Cilk+ Runtime Library
619 Group: Development/Languages
620 %description -n libcilkrts-32bit
621 The runtime library needed to run programs compiled with the
622 -fcilkplus option of the GNU Compiler Collection (GCC).
623 %post -n libcilkrts-32bit -p /sbin/ldconfig
624 %postun -n libcilkrts-32bit -p /sbin/ldconfig
626 %package -n libubsan-32bit
627 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
629 Group: Development/Languages
630 %description -n libubsan-32bit
631 The runtime library needed to run programs compiled with the
632 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
633 %post -n libubsan-32bit -p /sbin/ldconfig
634 %postun -n libubsan-32bit -p /sbin/ldconfig
636 %package -n libvtv-32bit
637 Summary: The GNU Compiler Vtable Verifier Runtime Library
639 Group: Development/Languages
640 %description -n libvtv-32bit
641 The runtime library needed to run programs compiled with the
642 -fvtable-verify option of the GNU Compiler Collection (GCC).
643 %post -n libvtv-32bit -p /sbin/ldconfig
644 %postun -n libvtv-32bit -p /sbin/ldconfig
646 %package -n libffi-32bit
647 Summary: Foreign Function Interface library
648 License: BSD-3-Clause
649 Group: Development/Building
650 %description -n libffi-32bit
651 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 %post -n libffi-32bit -p /sbin/ldconfig
653 %postun -n libffi-32bit -p /sbin/ldconfig
655 %package -n libffi-devel-32bit
656 Summary: Foreign Function Interface library development files
657 License: BSD 3-Clause
658 Group: Development/Building
659 %description -n libffi-devel-32bit
660 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.
663 Summary: GNU Go Compiler
665 Group: Development/Languages
666 %description go-32bit
667 This package contains a Go compiler and associated development
668 files based on the GNU GCC technology.
670 %package -n libgo-32bit
671 Summary: GNU Go compiler runtime library
672 License: BSD-3-Clause
673 Group: Development/Languages
674 %description -n libgo-32bit
675 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.
676 %post -n libgo-32bit -p /sbin/ldconfig
677 %postun -n libgo-32bit -p /sbin/ldconfig
679 %package plugin-devel
680 Summary: GNU GCC Plugin development files
682 Group: Development/Languages
683 %description plugin-devel
684 This package contains GCC Plugin development files needed for compiler
687 %package -n sanitizer-sources
688 Summary: Sanitizer family tools sources
690 Group: Development/Tools
693 %description -n sanitizer-sources
694 Sanitizer family tools sources for external tools.
698 %setup -q -n gcc-%{version}
704 ln -sf mpfr-3.1.5 mpfr
708 ln -sf isl-0.17.1 isl
710 echo "" > gcc/DEV-PHASE
712 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
718 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mthumb -mthumb-fp -Wa,-mimplicit-it=thumb -fno-omit-frame-pointer"
721 %{?esan:%gcc_unforce_options}
722 %{!?gcc_keep_build_dir:
728 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'
729 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
731 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
732 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
734 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ */ /g'`
736 # -Wall is stripped off now, so -Wformat will not turn on implicitly for
737 # "-Wformat-.." option group, causing additional build warnings and testsuite
738 # FAIL ("test for excess errors" type).
739 # Insert "-Wformat" if we find "-Wformat-..."
740 if [ ! -z "$(echo $RPM_OPT_FLAGS | grep -o "\B\-Wformat\-")" ]; then
741 if [ -z "$(echo $RPM_OPT_FLAGS | grep -Po "\B\-Wformat(\s|\Z)")" ]; then
742 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-Wformat-/-Wformat -Wformat-/")
746 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
747 %{?asan_shadow_scale: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -Wp,-DASAN_SHADOW_SCALE=%{asan_shadow_scale})}
749 %ifarch armv7l armv7hl aarch64
750 %undefine gcc_profiledbootstrap
753 %{!?gcc_skip_configure:
754 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
755 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
757 --prefix=%{_prefix} \
758 --infodir=%{_infodir} \
759 --mandir=%{_mandir} \
761 --libexecdir=%{libdir} \
762 --enable-languages=c,c++,fortran \
763 --enable-checking=release \
765 %{!?gcc_profiledbootstrap:--disable-bootstrap} \
770 --with-slibdir=%{libdir} \
773 --enable-__cxa_atexit \
774 --enable-libstdcxx-allocator=new \
775 --enable-version-specific-runtime-libs \
776 --enable-linker-build-id \
777 --without-system-libunwind \
778 --enable-threads=posix \
783 --enable-libgfortran \
784 %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
786 --with-arch=armv7-a \
787 --with-tune=cortex-a8 \
788 --disable-sjlj-exceptions \
791 --with-arch=armv7-a \
792 --with-tune=cortex-a8 \
793 --disable-sjlj-exceptions \
797 --with-arch=armv8-a \
798 --disable-sjlj-exceptions \
801 --with-arch-32=i586 \
802 --with-tune=generic \
806 --with-arch-32=i586 \
807 --with-tune=generic \
814 --with-arch=armv7-a \
815 --with-tune=cortex-a8 \
816 --disable-sjlj-exceptions \
819 --with-arch=armv7-a \
820 --with-tune=cortex-a8 \
821 --disable-sjlj-exceptions \
825 --with-arch=armv8-a \
826 --disable-sjlj-exceptions \
829 --disable-libgfortran \
830 --disable-libquadmath \
832 --disable-libatomic \
833 --disable-libstdc++-v3 \
834 --disable-libsanitizer \
837 --with-bugurl="http://bugs.tizen.org/" \
838 --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release} %{release}" \
839 --target=%{target_arch} \
840 --host=%{host_arch} \
845 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
848 %{?gcc_exit_on_make_finish:
854 # asan needs a whole shadow address space
855 ulimit -v unlimited || true
856 make -k check %{?_smp_mflags} || true
858 ../contrib/test_summary | tee ../testresults/test_summary.txt
864 make install DESTDIR=$RPM_BUILD_ROOT
867 cp `find . -name "*.sum"` ../testresults/
868 cp --parents `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
869 chmod 644 `find ../testresults/ -type f`
873 rm -rf %{buildroot}/%{_datadir}/locale
875 #remove everything we don't need
876 rm -rf %{buildroot}/%{libsubdir}/install-tools
877 find %{buildroot}/ -name "*.la" -delete
880 ln -s gcc %{buildroot}%{_bindir}/cc
881 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
883 # expose plugins for ar (required for lto builds)
884 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
885 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
887 # legacy preprocessor
888 mkdir -p %{buildroot}/lib
889 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
891 # 32-bit libgcc in multilib configuration
893 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
896 # move libraries to libdir
897 for lib in asan asansi atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan esan
899 [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
900 [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
905 rm -rf %{buildroot}/%{libsubdir}/include-fixed
906 rm -rf %{buildroot}/%{libsubdir}/include
911 tar -czf libsanitizer.tar.bz libsanitizer
912 mkdir -p %{buildroot}/src
913 mv -v libsanitizer.tar.bz %{buildroot}/src
917 %manifest gcc.manifest
918 %defattr(-,root,root)
930 %{_bindir}/gcc-ranlib
931 %{_bindir}/%{target_arch}-gcc
932 %{_bindir}/%{target_arch}-gcc-%{version}
933 %{_bindir}/%{target_arch}-gcc-ar
934 %{_bindir}/%{target_arch}-gcc-nm
935 %{_bindir}/%{target_arch}-gcc-ranlib
936 %{libsubdir}/collect2
938 %{libsubdir}/lto-wrapper
939 %{libsubdir}/liblto_plugin.so*
940 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
941 %{libsubdir}/include-fixed/*
942 %{libsubdir}/include/*.h
949 %ifarch %cilkrts_arch
950 %{libsubdir}/include/cilk/*
952 %{libsubdir}/include/sanitizer/*
954 %exclude %{libdir}/libasan.so
955 %exclude %{libdir}/libasansi.so
958 %exclude %{libdir}/liblsan.so
961 %exclude %{libdir}/libtsan.so
964 %exclude %{libdir}/libesan.so
968 %defattr(-,root,root)
972 %{_bindir}/%{target_arch}-g++
973 %{_bindir}/%{target_arch}-c++
976 %manifest gcc.manifest
977 %license COPYING3 COPYING.RUNTIME
978 %defattr(-,root,root)
979 %{libdir}/libstdc++.so.*
981 %files -n libstdc++-devel
982 %defattr(-,root,root)
983 %{libdir}/libstdc++.so
984 %{libdir}/libstdc++.a
985 %{libdir}/libsupc++.a
986 %{libsubdir}/include/c++/*
987 %{_datadir}/gcc-%{version}/python/libstdcxx/*
990 %manifest gcc.manifest
991 %license COPYING3 COPYING.RUNTIME
992 %defattr(-,root,root)
993 %{libdir}/libgcc_s.so.*
996 %manifest gcc.manifest
997 %license COPYING3 COPYING.RUNTIME
998 %defattr(-,root,root)
999 %{libdir}/libgomp.so.*
1002 %manifest gcc.manifest
1003 %defattr(-,root,root)
1004 %{libdir}/libcc1.so.*
1008 %manifest gcc.manifest
1009 %license libsanitizer/LICENSE.TXT
1010 %defattr(-,root,root)
1011 %{libdir}/libasan.so*
1012 %{libdir}/libasansi.so*
1017 %manifest gcc.manifest
1018 %license libsanitizer/LICENSE.TXT
1019 %defattr(-,root,root)
1020 %{libdir}/liblsan.so*
1025 %manifest gcc.manifest
1026 %license libsanitizer/LICENSE.TXT
1027 %defattr(-,root,root)
1028 %{libdir}/libtsan.so*
1033 %manifest gcc.manifest
1034 %license libsanitizer/LICENSE.TXT
1035 %defattr(-,root,root)
1036 %{libdir}/libesan.so*
1039 %ifarch %atomic_arch
1041 %manifest gcc.manifest
1042 %license COPYING3 COPYING.RUNTIME
1043 %defattr(-,root,root)
1044 %{libdir}/libatomic.so.*
1049 %manifest gcc.manifest
1050 %license COPYING3 COPYING.RUNTIME
1051 %defattr(-,root,root)
1052 %{libdir}/libitm.so.*
1055 %ifarch %cilkrts_arch
1056 %files -n libcilkrts
1057 %manifest gcc.manifest
1058 %defattr(-,root,root)
1059 %{libdir}/libcilkrts.so.*
1064 %manifest gcc.manifest
1065 %license libsanitizer/LICENSE.TXT
1066 %defattr(-,root,root)
1067 %{libdir}/libubsan.so.*
1071 %defattr(-,root,root)
1072 %dir %{libsubdir}/finclude
1074 %{_bindir}/%{target_arch}-gfortran
1076 %{libsubdir}/finclude/*
1077 %{libdir}/libgfortran.a
1078 %{libdir}/libgfortran.so
1079 %{libsubdir}/libgfortran.spec
1080 %{libsubdir}/libcaf_single.a
1081 %ifarch %quadmath_arch
1082 %{libdir}/libquadmath.a
1083 %{libdir}/libquadmath.so
1086 %files -n libgfortran
1087 %defattr(-,root,root)
1088 %{libdir}/libgfortran.so.*
1090 %ifarch %quadmath_arch
1091 %files -n libquadmath
1092 %manifest gcc.manifest
1093 %license COPYING.LIB
1094 %defattr(-,root,root)
1095 %{libdir}/libquadmath.so.*
1099 %defattr(-,root,root)
1105 %defattr(-,root,root)
1106 %{libsubdir}/plugin/*
1110 %defattr(-,root,root)
1111 %doc testresults/test_summary.txt
1112 %doc testresults/*.sum
1117 %defattr(-,root,root)
1118 %{libsubdir}/32/crt*
1120 %{libsubdir}/32/*.so
1122 %{libsubdir}/32/*.spec
1125 %files -n libasan-32bit
1126 %manifest gcc.manifest
1127 %license libsanitizer/LICENSE.TXT
1128 %defattr(-,root,root)
1129 %{libsubdir}/32/libasan.so.*
1130 %{libsubdir}/32/libasansi.so.*
1134 %files -n liblsan-32bit
1135 %manifest gcc.manifest
1136 %license libsanitizer/LICENSE.TXT
1137 %defattr(-,root,root)
1138 %{libsubdir}/32/liblsan.so.*
1141 %ifarch %atomic_arch
1142 %files -n libatomic-32bit
1143 %manifest gcc.manifest
1144 %license COPYING3 COPYING.RUNTIME
1145 %defattr(-,root,root)
1146 %{libsubdir}/32/libatomic.so.*
1149 %ifarch %cilkrts_arch
1150 %files -n libcilkrts-32bit
1151 %defattr(-,root,root)
1152 %{libsubdir}/32/libcilkrts.so.*
1155 %files -n libgcc-32bit
1156 %manifest gcc.manifest
1157 %license COPYING3 COPYING.RUNTIME
1158 %defattr(-,root,root)
1159 %{libsubdir}/32/libgcc_s.so.*
1161 %files -n libgomp-32bit
1162 %manifest gcc.manifest
1163 %license COPYING3 COPYING.RUNTIME
1164 %defattr(-,root,root)
1165 %{libsubdir}/32/libgomp.so.*
1168 %files -n libitm-32bit
1169 %license COPYING3 COPYING.RUNTIME
1170 %defattr(-,root,root)
1171 %{libsubdir}/32/libitm.so.*
1174 %files -n libgfortran-32bit
1175 %defattr(-,root,root)
1176 %dir %{libsubdir}/32/finclude
1177 %{libsubdir}/32/libgfortran.so.*
1178 %{libsubdir}/32/finclude/*
1180 %ifarch %quadmath_arch
1181 %files -n libquadmath-32bit
1182 %license COPYING.LIB
1183 %defattr(-,root,root)
1184 %{libsubdir}/32/libquadmath.so.*
1188 %files -n libubsan-32bit
1189 %manifest gcc.manifest
1190 %license libsanitizer/LICENSE.TXT
1191 %defattr(-,root,root)
1192 %{libsubdir}/32/libubsan.so.*
1195 %files -n libstdc++-32bit
1196 %manifest gcc.manifest
1197 %license COPYING3 COPYING.RUNTIME
1198 %defattr(-,root,root)
1199 %{libsubdir}/32/libstdc++.so.*
1200 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1202 %files -n libstdc++-devel-32bit
1203 %defattr(-,root,root)
1204 %{libsubdir}/32/libstdc++.so.*-gdb.py
1207 %files -n sanitizer-sources
1208 %defattr(-,root,root,-)
1209 /src/libsanitizer.tar.bz