5 # spec file for package gcc
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 asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
63 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
64 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
65 %define lsan_arch x86_64 %ix86 %arm aarch64
66 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
67 %define cilkrts_arch x86_64 %ix86
86 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
88 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
89 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
91 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
92 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
93 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
95 Name: gcc%{?cross:-%{cross}}
96 # With generated files in src we could drop the following
99 BuildRequires: gettext-devel
100 BuildRequires: makeinfo
101 ## until here, but at least renaming and patching info files breaks this
102 BuildRequires: gcc-c++
103 BuildRequires: zlib-devel
105 BuildRequires: glibc-devel-32bit
108 %{?cross:BuildRequires: binutils-%{cross}}
109 # here we use %%if because OBS spec parser cannot expand
110 # %%{?macro:...} correctly
111 %if 0%{?gcc_run_tests}
112 BuildRequires: dejagnu
113 BuildRequires: expect
116 URL: http://gcc.gnu.org/
119 Source: gcc-%{version}.tar.bz2
120 Source10: gmp-6.1.1.tar.bz2
121 Source11: mpfr-3.1.5.tar.bz2
122 Source12: mpc-1.0.3.tar.gz
123 Source13: isl-0.17.1.tar.bz2
124 Source20: gcc.manifest
125 Group: Development/Building
126 Summary: The GNU C Compiler and Support Files
128 %{?cross:ExcludeArch: %{cross}}
130 Core package for the GNU Compiler Collection, including the C language
134 Summary: The GNU C++ Compiler
136 Group: Development/Languages
138 This package contains the GNU compiler for C++.
140 %package -n libstdc++
141 Summary: The standard C++ shared library
142 License: GPL-3.0-with-GCC-exception
143 Group: Development/Building
144 %description -n libstdc++
145 The standard C++ library, needed for dynamically linked C++ programs.
146 %post -n libstdc++ -p /sbin/ldconfig
147 %postun -n libstdc++ -p /sbin/ldconfig
149 %package -n libstdc++-devel
150 Summary: Include Files and Libraries mandatory for Development
151 License: GPL-3.0-with-GCC-exception
152 Group: Development/Building
153 %description -n libstdc++-devel
154 This package contains all the headers and libraries of the standard C++
155 library. It is needed for compiling C++ code.
158 Summary: C compiler runtime library
159 License: GPL-3.0-with-GCC-exception
160 Group: Development/Building
161 %description -n libgcc
162 Libgcc is needed for dynamically linked C programs.
163 %post -n libgcc -p /sbin/ldconfig
164 %postun -n libgcc -p /sbin/ldconfig
167 Summary: The GNU compiler collection OpenMP runtime library
168 License: GPL-3.0-with-GCC-exception
169 Group: Development/Building
170 %description -n libgomp
171 This is the OpenMP runtime library needed by OpenMP enabled programs
172 that were built with the -fopenmp compiler option and by programs that
173 were auto-parallelized via the -ftree-parallelize-loops compiler
175 %post -n libgomp -p /sbin/ldconfig
176 %postun -n libgomp -p /sbin/ldconfig
179 Summary: GNU Objective C Compiler
181 Group: Development/Languages
183 This package contains the GNU Objective C compiler. Objective C is an
184 object oriented language, created by Next Inc. and used in their
185 Nextstep OS. The source code is available in the gcc package.
188 Summary: Library for the GNU Objective C Compiler
189 License: GPL-3.0-with-GCC-exception
190 Group: Development/Building
191 %description -n libobjc
192 The library for the GNU Objective C compiler.
193 %post -n libobjc -p /sbin/ldconfig
194 %postun -n libobjc -p /sbin/ldconfig
197 Summary: GNU C Compiler plugin for GDB
198 License: GPL-3.0-with-GCC-exception
199 Group: Development/Building
200 %description -n libcc1
201 The GCC plugin for GDB
202 %post -n libcc1 -p /sbin/ldconfig
203 %postun -n libcc1 -p /sbin/ldconfig
206 Summary: GNU Objective C++ Compiler
208 Group: Development/Languages
210 This package contains the GNU Objective C++ compiler. Objective C++ is an
211 object oriented language, created by Next Inc. and used in their
212 Nextstep OS. The source code is available in the gcc package.
215 Summary: The GCC Preprocessor
217 Group: Development/Languages
219 This Package contains just the preprocessor that is used by the X11
223 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
225 Group: Development/Languages
227 This package contains an Ada95 compiler and associated development
228 tools based on the GNU GCC technology. Ada95 is the object oriented
229 successor of the Ada83 language. To build this package from source you
230 must have installed a binary version to bootstrap the compiler.
233 Summary: GNU Ada Runtime Libraries
234 License: GPL-3.0-with-GCC-exception
235 Group: Development/Languages
236 %description -n libada
237 This package contains the shared libraries required to run programs
238 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
239 shared libraries. It also contains the shared libraries for the
240 Implementation of the Ada Semantic Interface Specification (ASIS), the
241 implementation of Distributed Systems Programming (GLADE) and the Posix
242 1003.5 Binding (Florist).
243 %post -n libada -p /sbin/ldconfig
244 %postun -n libada -p /sbin/ldconfig
247 Summary: The GNU Fortran Compiler and Support Files
249 Group: Development/Languages
251 This is the Fortran compiler of the GNU Compiler Collection (GCC).
253 %package -n libgfortran
254 Summary: The GNU Fortran Compiler Runtime Library
255 License: GPL-3.0-with-GCC-exception
256 Group: Development/Languages
257 %description -n libgfortran
258 The runtime library needed to run programs compiled with the Fortran compiler
259 of the GNU Compiler Collection (GCC).
260 %post -n libgfortran -p /sbin/ldconfig
261 %postun -n libgfortran -p /sbin/ldconfig
263 %package -n libquadmath
264 Summary: The GNU Fortran Compiler Quadmath Runtime Library
266 Group: Development/Languages
267 %description -n libquadmath
268 The runtime library needed to run programs compiled with the Fortran compiler
269 of the GNU Compiler Collection (GCC) and quadruple precision floating point
271 %post -n libquadmath -p /sbin/ldconfig
272 %postun -n libquadmath -p /sbin/ldconfig
275 Summary: The GNU Compiler Transactional Memory Runtime Library
276 License: GPL-3.0-with-GCC-exception
277 Group: Development/Languages
278 %description -n libitm
279 The runtime library needed to run programs compiled with the
280 -fgnu-tm option of the GNU Compiler Collection (GCC).
281 %post -n libitm -p /sbin/ldconfig
282 %postun -n libitm -p /sbin/ldconfig
285 Summary: The GNU Compiler Address Sanitizer Runtime Library
287 Group: Development/Languages
288 %description -n libasan
289 The runtime library needed to run programs compiled with the
290 -fsanitize=address option of the GNU Compiler Collection (GCC).
291 %post -n libasan -p /sbin/ldconfig
292 %postun -n libasan -p /sbin/ldconfig
295 Summary: The GNU Compiler Thread Sanitizer Runtime Library
297 Group: Development/Languages
298 %description -n libtsan
299 The runtime library needed to run programs compiled with the
300 -fsanitize=thread option of the GNU Compiler Collection (GCC).
301 %post -n libtsan -p /sbin/ldconfig
302 %postun -n libtsan -p /sbin/ldconfig
304 %package -n libatomic
305 Summary: The GNU Compiler Atomic Operations Runtime Library
306 License: GPL-3.0-with-GCC-exception
307 Group: Development/Languages
308 %description -n libatomic
309 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
310 %post -n libatomic -p /sbin/ldconfig
311 %postun -n libatomic -p /sbin/ldconfig
313 %package -n libcilkrts
314 Summary: The GNU Compiler Cilk+ Runtime Library
316 Group: Development/Languages
317 %description -n libcilkrts
318 The runtime library needed to run programs compiled with the
319 -fcilkplus option of the GNU Compiler Collection (GCC).
320 %post -n libcilkrts -p /sbin/ldconfig
321 %postun -n libcilkrts -p /sbin/ldconfig
324 Summary: The GNU Compiler Leak Sanitizer Runtime Library
326 Group: Development/Languages
327 %description -n liblsan
328 The runtime library needed to run programs compiled with the
329 -fsanitize=leak option of the GNU Compiler Collection (GCC).
330 %post -n liblsan -p /sbin/ldconfig
331 %postun -n liblsan -p /sbin/ldconfig
334 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
336 Group: Development/Languages
337 %description -n libubsan
338 The runtime library needed to run programs compiled with the
339 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
340 %post -n libubsan -p /sbin/ldconfig
341 %postun -n libubsan -p /sbin/ldconfig
344 Summary: The GNU Compiler Vtable Verifier Runtime Library
346 Group: Development/Languages
347 %description -n libvtv
348 The runtime library needed to run programs compiled with the
349 -fvtable-verify option of the GNU Compiler Collection (GCC).
350 %post -n libvtv -p /sbin/ldconfig
351 %postun -n libvtv -p /sbin/ldconfig
354 Summary: Java Runtime Library for gcc
355 License: GPL-2.0-with-classpath-exception
356 Group: Development/Building
357 %description -n libgcj
358 This library is needed if you want to use the GNU Java compiler, gcj.
359 Source code for this package is in gcc.
360 %post -n libgcj -p /sbin/ldconfig
361 %postun -n libgcj -p /sbin/ldconfig
364 Summary: The GNU Java Compiler
366 Group: Development/Languages
368 The Java compiler from the GCC-tools-suite.
370 %package -n libgcj_bc
371 Summary: Fake library for BC-ABI compatibility.
372 License: GPL-2.0-with-classpath-exception
373 Group: Development/Languages
374 %description -n libgcj_bc
375 A fake library that is used at link time only. It ensures that
376 binaries built with the BC-ABI link against a constant SONAME.
377 This way, BC-ABI binaries continue to work if the SONAME underlying
380 %package -n libgcj-jar
381 Summary: Java runtime library (jar files).
382 License: GPL-2.0-with-classpath-exception
383 Group: Development/Languages
384 %description -n libgcj-jar
385 These are the jar files that go along with the gcj front end to gcc.
387 %package -n libgcj-devel
388 Summary: Include Files and Libraries mandatory for Development.
389 License: GPL-2.0-with-classpath-exception
390 Group: Development/Languages
391 %description -n libgcj-devel
392 This package contains all necessary include files and libraries needed
393 to develop applications that require these.
396 Summary: Java Bytecode Interpreter for gcc
397 License: GPL-2.0-with-classpath-exception
398 Group: Development/Languages
399 %description -n gcc-gij
400 This package contains the java bytecode interpreter gij and related tools.
403 Summary: Foreign Function Interface library
404 License: BSD-3-Clause
405 Group: Development/Building
406 %description -n libffi
407 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.
408 %post -n libffi -p /sbin/ldconfig
409 %postun -n libffi -p /sbin/ldconfig
411 %package -n libffi-devel
412 Summary: Foreign Function Interface library development files
413 License: BSD 3-Clause
414 Group: Development/Building
415 %description -n libffi-devel
416 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 Summary: GNU Go Compiler
421 Group: Development/Languages
423 This package contains a Go compiler and associated development
424 files based on the GNU GCC technology.
427 Summary: GNU Go compiler runtime library
428 License: BSD-3-Clause
429 Group: Development/Languages
430 %description -n libgo
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.
432 %post -n libgo -p /sbin/ldconfig
433 %postun -n libgo -p /sbin/ldconfig
436 Summary: Testsuite results
437 License: SUSE-Public-Domain
438 Group: Development/Languages
439 %description testresults
440 Results from running the gcc and target library testsuites.
442 %package -n gcc-32bit
443 Summary: The GNU C Compiler 32bit support
444 Group: Development/Building
445 %description -n gcc-32bit
446 This package contains 32bit support for the GNU Compiler Collection.
448 %package -n libstdc++-devel-32bit
449 Summary: Include Files and Libraries mandatory for Development
450 License: GPL-3.0-with-GCC-exception
451 Group: Development/Building
452 %description -n libstdc++-devel-32bit
453 This package contains all the headers and libraries of the standard C++
454 library. It is needed for compiling C++ code.
456 %package -n libgcc-32bit
457 Summary: C compiler runtime library
458 License: GPL-3.0-with-GCC-exception
459 Group: Development/Building
460 %description -n libgcc-32bit
461 Libgcc is needed for dynamically linked C programs.
462 %post -n libgcc-32bit -p /sbin/ldconfig
463 %postun -n libgcc-32bit -p /sbin/ldconfig
465 %package -n libgomp-32bit
466 Summary: The GNU compiler collection OpenMP runtime library
467 License: GPL-3.0-with-GCC-exception
468 Group: Development/Building
469 %description -n libgomp-32bit
470 This is the OpenMP runtime library needed by OpenMP enabled programs
471 that were built with the -fopenmp compiler option and by programs that
472 were auto-parallelized via the -ftree-parallelize-loops compiler
474 %post -n libgomp-32bit -p /sbin/ldconfig
475 %postun -n libgomp-32bit -p /sbin/ldconfig
477 %package -n libstdc++-32bit
478 Summary: The standard C++ shared library
479 License: GPL-3.0-with-GCC-exception
480 Group: Development/Building
481 %description -n libstdc++-32bit
482 The standard C++ library, needed for dynamically linked C++ programs.
483 %post -n libstdc++-32bit -p /sbin/ldconfig
484 %postun -n libstdc++-32bit -p /sbin/ldconfig
487 Summary: GNU Objective C Compiler
489 Group: Development/Languages
490 %description objc-32bit
491 This package contains the GNU Objective C compiler. Objective C is an
492 object oriented language, created by Next Inc. and used in their
493 Nextstep OS. The source code is available in the gcc package.
495 %package -n libobjc-32bit
496 Summary: Library for the GNU Objective C Compiler
497 License: GPL-3.0-with-GCC-exception
498 Group: Development/Building
499 %description -n libobjc-32bit
500 The library for the GNU Objective C compiler.
501 %post -n libobjc-32bit -p /sbin/ldconfig
502 %postun -n libobjc-32bit -p /sbin/ldconfig
505 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
507 Group: Development/Languages
508 %description ada-32bit
509 This package contains an Ada95 compiler and associated development
510 tools based on the GNU GCC technology. Ada95 is the object oriented
511 successor of the Ada83 language. To build this package from source you
512 must have installed a binary version to bootstrap the compiler.
514 %package -n libada-32bit
515 Summary: GNU Ada Runtime Libraries
516 License: GPL-3.0-with-GCC-exception
517 Group: Development/Languages
518 %description -n libada-32bit
519 This package contains the shared libraries required to run programs
520 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
521 shared libraries. It also contains the shared libraries for the
522 Implementation of the Ada Semantic Interface Specification (ASIS), the
523 implementation of Distributed Systems Programming (GLADE) and the Posix
524 1003.5 Binding (Florist).
525 %post -n libada-32bit -p /sbin/ldconfig
526 %postun -n libada-32bit -p /sbin/ldconfig
528 %package fortran-32bit
529 Summary: The GNU Fortran Compiler and Support Files
531 Group: Development/Languages
532 %description fortran-32bit
533 This is the Fortran compiler of the GNU Compiler Collection (GCC).
535 %package -n libgfortran-32bit
536 Summary: The GNU Fortran Compiler Runtime Library
537 License: GPL-3.0-with-GCC-exception
538 Group: Development/Languages
539 %description -n libgfortran-32bit
540 The runtime library needed to run programs compiled with the Fortran compiler
541 of the GNU Compiler Collection (GCC).
542 %post -n libgfortran-32bit -p /sbin/ldconfig
543 %postun -n libgfortran-32bit -p /sbin/ldconfig
545 %package -n libquadmath-32bit
546 Summary: The GNU Fortran Compiler Quadmath Runtime Library
548 Group: Development/Languages
549 %description -n libquadmath-32bit
550 The runtime library needed to run programs compiled with the Fortran compiler
551 of the GNU Compiler Collection (GCC) and quadruple precision floating point
553 %post -n libquadmath-32bit -p /sbin/ldconfig
554 %postun -n libquadmath-32bit -p /sbin/ldconfig
556 %package -n libitm-32bit
557 Summary: The GNU Compiler Transactional Memory Runtime Library
558 License: GPL-3.0-with-GCC-exception
559 Group: Development/Languages
560 %description -n libitm-32bit
561 The runtime library needed to run programs compiled with the
562 -fgnu-tm option of the GNU Compiler Collection (GCC).
563 %post -n libitm-32bit -p /sbin/ldconfig
564 %postun -n libitm-32bit -p /sbin/ldconfig
566 %package -n libasan-32bit
567 Summary: The GNU Compiler Address Sanitizer Runtime Library
569 Group: Development/Languages
570 %description -n libasan-32bit
571 The runtime library needed to run programs compiled with the
572 -fsanitize=address option of the GNU Compiler Collection (GCC).
573 %post -n libasan-32bit -p /sbin/ldconfig
574 %postun -n libasan-32bit -p /sbin/ldconfig
576 %package -n liblsan-32bit
577 Summary: The GNU Compiler Address Sanitizer Runtime Library
579 Group: Development/Languages
580 %description -n liblsan-32bit
581 The runtime library needed to run programs compiled with the
582 -fsanitize=leak option of the GNU Compiler Collection (GCC).
583 %post -n liblsan-32bit -p /sbin/ldconfig
584 %postun -n liblsan-32bit -p /sbin/ldconfig
586 %package -n libtsan-32bit
587 Summary: The GNU Compiler Thread Sanitizer Runtime Library
589 Group: Development/Languages
590 %description -n libtsan-32bit
591 The runtime library needed to run programs compiled with the
592 -fsanitize=thread option of the GNU Compiler Collection (GCC).
593 %post -n libtsan-32bit -p /sbin/ldconfig
594 %postun -n libtsan-32bit -p /sbin/ldconfig
596 %package -n libatomic-32bit
597 Summary: The GNU Compiler Atomic Operations Runtime Library
598 License: GPL-3.0-with-GCC-exception
599 Group: Development/Languages
600 %description -n libatomic-32bit
601 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
602 %post -n libatomic-32bit -p /sbin/ldconfig
603 %postun -n libatomic-32bit -p /sbin/ldconfig
605 %package -n libcilkrts-32bit
606 Summary: The GNU Compiler Cilk+ Runtime Library
608 Group: Development/Languages
609 %description -n libcilkrts-32bit
610 The runtime library needed to run programs compiled with the
611 -fcilkplus option of the GNU Compiler Collection (GCC).
612 %post -n libcilkrts-32bit -p /sbin/ldconfig
613 %postun -n libcilkrts-32bit -p /sbin/ldconfig
615 %package -n libubsan-32bit
616 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
618 Group: Development/Languages
619 %description -n libubsan-32bit
620 The runtime library needed to run programs compiled with the
621 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
622 %post -n libubsan-32bit -p /sbin/ldconfig
623 %postun -n libubsan-32bit -p /sbin/ldconfig
625 %package -n libvtv-32bit
626 Summary: The GNU Compiler Vtable Verifier Runtime Library
628 Group: Development/Languages
629 %description -n libvtv-32bit
630 The runtime library needed to run programs compiled with the
631 -fvtable-verify option of the GNU Compiler Collection (GCC).
632 %post -n libvtv-32bit -p /sbin/ldconfig
633 %postun -n libvtv-32bit -p /sbin/ldconfig
635 %package -n libffi-32bit
636 Summary: Foreign Function Interface library
637 License: BSD-3-Clause
638 Group: Development/Building
639 %description -n libffi-32bit
640 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
641 %post -n libffi-32bit -p /sbin/ldconfig
642 %postun -n libffi-32bit -p /sbin/ldconfig
644 %package -n libffi-devel-32bit
645 Summary: Foreign Function Interface library development files
646 License: BSD 3-Clause
647 Group: Development/Building
648 %description -n libffi-devel-32bit
649 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
652 Summary: GNU Go Compiler
654 Group: Development/Languages
655 %description go-32bit
656 This package contains a Go compiler and associated development
657 files based on the GNU GCC technology.
659 %package -n libgo-32bit
660 Summary: GNU Go compiler runtime library
661 License: BSD-3-Clause
662 Group: Development/Languages
663 %description -n libgo-32bit
664 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
665 %post -n libgo-32bit -p /sbin/ldconfig
666 %postun -n libgo-32bit -p /sbin/ldconfig
668 %package plugin-devel
669 Summary: GNU GCC Plugin development files
671 Group: Development/Languages
672 %description plugin-devel
673 This package contains GCC Plugin development files needed for compiler
676 %package -n sanitizer-sources
677 Summary: Sanitizer family tools sources
679 Group: Development/Tools
682 %description -n sanitizer-sources
683 Sanitizer family tools sources for external tools.
687 %setup -q -n gcc-%{version}
693 ln -sf mpfr-3.1.5 mpfr
697 ln -sf isl-0.17.1 isl
699 echo "" > gcc/DEV-PHASE
701 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/BASE-VER`
707 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mthumb -mthumb-fp -Wa,-mimplicit-it=thumb -fno-omit-frame-pointer"
710 %{!?gcc_keep_build_dir:
716 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'
717 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
719 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
720 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
722 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ */ /g'`
724 # -Wall is stripped off now, so -Wformat will not turn on implicitly for
725 # "-Wformat-.." option group, causing additional build warnings and testsuite
726 # FAIL ("test for excess errors" type).
727 # Insert "-Wformat" if we find "-Wformat-..."
728 if [ ! -z "$(echo $RPM_OPT_FLAGS | grep -o "\B\-Wformat\-")" ]; then
729 if [ -z "$(echo $RPM_OPT_FLAGS | grep -Po "\B\-Wformat(\s|\Z)")" ]; then
730 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-Wformat-/-Wformat -Wformat-/")
734 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
735 %{?asan_shadow_scale: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -Wp,-DASAN_SHADOW_SCALE=%{asan_shadow_scale})}
737 %ifarch armv7l armv7hl aarch64
738 %undefine gcc_profiledbootstrap
741 %{!?gcc_skip_configure:
742 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
743 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
745 --prefix=%{_prefix} \
746 --infodir=%{_infodir} \
747 --mandir=%{_mandir} \
749 --libexecdir=%{libdir} \
750 --enable-languages=c,c++,fortran \
751 --enable-checking=release \
753 %{!?gcc_profiledbootstrap:--disable-bootstrap} \
758 --with-slibdir=%{libdir} \
761 --enable-__cxa_atexit \
762 --enable-libstdcxx-allocator=new \
763 --enable-version-specific-runtime-libs \
764 --enable-linker-build-id \
765 --without-system-libunwind \
766 --enable-threads=posix \
771 --enable-libgfortran \
772 %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
774 --with-arch=armv7-a \
775 --with-tune=cortex-a8 \
776 --disable-sjlj-exceptions \
779 --with-arch=armv7-a \
780 --with-tune=cortex-a8 \
781 --disable-sjlj-exceptions \
785 --with-arch=armv8-a \
786 --disable-sjlj-exceptions \
789 --with-arch-32=i586 \
790 --with-tune=generic \
794 --with-arch-32=i586 \
795 --with-tune=generic \
802 --with-arch=armv7-a \
803 --with-tune=cortex-a8 \
804 --disable-sjlj-exceptions \
807 --with-arch=armv7-a \
808 --with-tune=cortex-a8 \
809 --disable-sjlj-exceptions \
813 --with-arch=armv8-a \
814 --disable-sjlj-exceptions \
817 --disable-libgfortran \
818 --disable-libquadmath \
820 --disable-libatomic \
821 --disable-libstdc++-v3 \
822 --disable-libsanitizer \
825 --with-bugurl="http://bugs.tizen.org/" \
826 --with-pkgversion="Tizen GCC %{version} %{gcc_release} %{release}" \
827 --target=%{target_arch} \
828 --host=%{host_arch} \
833 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
836 %{?gcc_exit_on_make_finish:
842 # asan needs a whole shadow address space
843 ulimit -v unlimited || true
844 make -k check %{?_smp_mflags} || true
846 ../contrib/test_summary | tee ../testresults/test_summary.txt
852 make install DESTDIR=$RPM_BUILD_ROOT
855 cp `find . -name "*.sum"` ../testresults/
856 cp --parents `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
857 chmod 644 `find ../testresults/ -type f`
861 rm -rf %{buildroot}/%{_datadir}/locale
863 #remove everything we don't need
864 rm -rf %{buildroot}/%{libsubdir}/install-tools
865 find %{buildroot}/ -name "*.la" -delete
868 ln -s gcc %{buildroot}%{_bindir}/cc
869 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
871 # expose plugins for ar (required for lto builds)
872 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
873 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
875 # legacy preprocessor
876 mkdir -p %{buildroot}/lib
877 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
879 # 32-bit libgcc in multilib configuration
881 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
884 # move libraries to libdir
885 for lib in asan atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan
887 [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
888 [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
893 rm -rf %{buildroot}/%{libsubdir}/include-fixed
894 rm -rf %{buildroot}/%{libsubdir}/include
899 tar -czf libsanitizer.tar.bz libsanitizer
900 mkdir -p %{buildroot}/src
901 mv -v libsanitizer.tar.bz %{buildroot}/src
905 %manifest gcc.manifest
906 %defattr(-,root,root)
918 %{_bindir}/gcc-ranlib
919 %{_bindir}/%{target_arch}-gcc
920 %{_bindir}/%{target_arch}-gcc-%{version}
921 %{_bindir}/%{target_arch}-gcc-ar
922 %{_bindir}/%{target_arch}-gcc-nm
923 %{_bindir}/%{target_arch}-gcc-ranlib
924 %{libsubdir}/collect2
926 %{libsubdir}/lto-wrapper
927 %{libsubdir}/liblto_plugin.so*
928 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
929 %{libsubdir}/include-fixed/*
930 %{libsubdir}/include/*.h
937 %ifarch %cilkrts_arch
938 %{libsubdir}/include/cilk/*
940 %{libsubdir}/include/sanitizer/*
942 %exclude %{libdir}/libasan.so
945 %exclude %{libdir}/liblsan.so
948 %exclude %{libdir}/libtsan.so
952 %defattr(-,root,root)
956 %{_bindir}/%{target_arch}-g++
957 %{_bindir}/%{target_arch}-c++
960 %manifest gcc.manifest
961 %license COPYING3 COPYING.RUNTIME
962 %defattr(-,root,root)
963 %{libdir}/libstdc++.so.*
965 %files -n libstdc++-devel
966 %defattr(-,root,root)
967 %{libdir}/libstdc++.so
968 %{libdir}/libstdc++.a
969 %{libdir}/libsupc++.a
970 %{libsubdir}/include/c++/*
971 %{_datadir}/gcc-%{version}/python/libstdcxx/*
974 %manifest gcc.manifest
975 %license COPYING3 COPYING.RUNTIME
976 %defattr(-,root,root)
977 %{libdir}/libgcc_s.so.*
980 %manifest gcc.manifest
981 %license COPYING3 COPYING.RUNTIME
982 %defattr(-,root,root)
983 %{libdir}/libgomp.so.*
986 %manifest gcc.manifest
987 %defattr(-,root,root)
988 %{libdir}/libcc1.so.*
992 %manifest gcc.manifest
993 %license libsanitizer/LICENSE.TXT
994 %defattr(-,root,root)
995 %{libdir}/libasan.so*
1000 %manifest gcc.manifest
1001 %license libsanitizer/LICENSE.TXT
1002 %defattr(-,root,root)
1003 %{libdir}/liblsan.so*
1008 %manifest gcc.manifest
1009 %license libsanitizer/LICENSE.TXT
1010 %defattr(-,root,root)
1011 %{libdir}/libtsan.so*
1014 %ifarch %atomic_arch
1016 %manifest gcc.manifest
1017 %license COPYING3 COPYING.RUNTIME
1018 %defattr(-,root,root)
1019 %{libdir}/libatomic.so.*
1024 %manifest gcc.manifest
1025 %license COPYING3 COPYING.RUNTIME
1026 %defattr(-,root,root)
1027 %{libdir}/libitm.so.*
1030 %ifarch %cilkrts_arch
1031 %files -n libcilkrts
1032 %manifest gcc.manifest
1033 %defattr(-,root,root)
1034 %{libdir}/libcilkrts.so.*
1039 %manifest gcc.manifest
1040 %license libsanitizer/LICENSE.TXT
1041 %defattr(-,root,root)
1042 %{libdir}/libubsan.so.*
1046 %defattr(-,root,root)
1047 %dir %{libsubdir}/finclude
1049 %{_bindir}/%{target_arch}-gfortran
1051 %{libsubdir}/finclude/*
1052 %{libdir}/libgfortran.a
1053 %{libdir}/libgfortran.so
1054 %{libsubdir}/libgfortran.spec
1055 %{libsubdir}/libcaf_single.a
1056 %ifarch %quadmath_arch
1057 %{libdir}/libquadmath.a
1058 %{libdir}/libquadmath.so
1061 %files -n libgfortran
1062 %defattr(-,root,root)
1063 %{libdir}/libgfortran.so.*
1065 %ifarch %quadmath_arch
1066 %files -n libquadmath
1067 %manifest gcc.manifest
1068 %license COPYING.LIB
1069 %defattr(-,root,root)
1070 %{libdir}/libquadmath.so.*
1074 %defattr(-,root,root)
1080 %defattr(-,root,root)
1081 %{libsubdir}/plugin/*
1085 %defattr(-,root,root)
1086 %doc testresults/test_summary.txt
1087 %doc testresults/*.sum
1092 %defattr(-,root,root)
1093 %{libsubdir}/32/crt*
1095 %{libsubdir}/32/*.so
1097 %{libsubdir}/32/*.spec
1100 %files -n libasan-32bit
1101 %manifest gcc.manifest
1102 %license libsanitizer/LICENSE.TXT
1103 %defattr(-,root,root)
1104 %{libsubdir}/32/libasan.so.*
1108 %files -n liblsan-32bit
1109 %manifest gcc.manifest
1110 %license libsanitizer/LICENSE.TXT
1111 %defattr(-,root,root)
1112 %{libsubdir}/32/liblsan.so.*
1115 %ifarch %atomic_arch
1116 %files -n libatomic-32bit
1117 %manifest gcc.manifest
1118 %license COPYING3 COPYING.RUNTIME
1119 %defattr(-,root,root)
1120 %{libsubdir}/32/libatomic.so.*
1123 %ifarch %cilkrts_arch
1124 %files -n libcilkrts-32bit
1125 %defattr(-,root,root)
1126 %{libsubdir}/32/libcilkrts.so.*
1129 %files -n libgcc-32bit
1130 %manifest gcc.manifest
1131 %license COPYING3 COPYING.RUNTIME
1132 %defattr(-,root,root)
1133 %{libsubdir}/32/libgcc_s.so.*
1135 %files -n libgomp-32bit
1136 %manifest gcc.manifest
1137 %license COPYING3 COPYING.RUNTIME
1138 %defattr(-,root,root)
1139 %{libsubdir}/32/libgomp.so.*
1142 %files -n libitm-32bit
1143 %license COPYING3 COPYING.RUNTIME
1144 %defattr(-,root,root)
1145 %{libsubdir}/32/libitm.so.*
1148 %files -n libgfortran-32bit
1149 %defattr(-,root,root)
1150 %dir %{libsubdir}/32/finclude
1151 %{libsubdir}/32/libgfortran.so.*
1152 %{libsubdir}/32/finclude/*
1154 %ifarch %quadmath_arch
1155 %files -n libquadmath-32bit
1156 %license COPYING.LIB
1157 %defattr(-,root,root)
1158 %{libsubdir}/32/libquadmath.so.*
1162 %files -n libubsan-32bit
1163 %manifest gcc.manifest
1164 %license libsanitizer/LICENSE.TXT
1165 %defattr(-,root,root)
1166 %{libsubdir}/32/libubsan.so.*
1169 %files -n libstdc++-32bit
1170 %manifest gcc.manifest
1171 %license COPYING3 COPYING.RUNTIME
1172 %defattr(-,root,root)
1173 %{libsubdir}/32/libstdc++.so.*
1174 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1176 %files -n libstdc++-devel-32bit
1177 %defattr(-,root,root)
1178 %{libsubdir}/32/libstdc++.so.*-gdb.py
1181 %files -n sanitizer-sources
1182 %defattr(-,root,root,-)
1183 /src/libsanitizer.tar.bz