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 %define quadmath_arch %ix86 x86_64 ia64
24 %define tsan_arch x86_64 aarch64
25 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
26 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
27 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
28 %define lsan_arch x86_64 %ix86 %arm aarch64
29 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
30 %define cilkrts_arch x86_64 %ix86
49 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
51 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
52 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
54 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
55 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
56 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
58 Name: gcc%{?cross:-%{cross}}
59 # With generated files in src we could drop the following
62 BuildRequires: gettext-devel
63 BuildRequires: makeinfo
64 ## until here, but at least renaming and patching info files breaks this
65 BuildRequires: gcc-c++
66 BuildRequires: zlib-devel
68 BuildRequires: glibc-devel-32bit
71 %{?cross:BuildRequires: binutils-%{cross}}
72 # here we use %%if because OBS spec parser cannot expand
73 # %%{?macro:...} correctly
74 %if 0%{?gcc_run_tests}
75 BuildRequires: dejagnu
79 URL: http://gcc.gnu.org/
82 Source: gcc-%{version}.tar.bz2
83 Source10: gmp-6.1.1.tar.bz2
84 Source11: mpfr-3.1.5.tar.bz2
85 Source12: mpc-1.0.3.tar.gz
86 Source13: isl-0.17.1.tar.bz2
87 Source20: gcc.manifest
88 Group: Development/Building
89 Summary: The GNU C Compiler and Support Files
91 %{?cross:ExcludeArch: %{cross}}
93 Core package for the GNU Compiler Collection, including the C language
97 Summary: The GNU C++ Compiler
99 Group: Development/Languages
101 This package contains the GNU compiler for C++.
103 %package -n libstdc++
104 Summary: The standard C++ shared library
105 License: GPL-3.0-with-GCC-exception
106 Group: Development/Building
107 %description -n libstdc++
108 The standard C++ library, needed for dynamically linked C++ programs.
109 %post -n libstdc++ -p /sbin/ldconfig
110 %postun -n libstdc++ -p /sbin/ldconfig
112 %package -n libstdc++-devel
113 Summary: Include Files and Libraries mandatory for Development
114 License: GPL-3.0-with-GCC-exception
115 Group: Development/Building
116 %description -n libstdc++-devel
117 This package contains all the headers and libraries of the standard C++
118 library. It is needed for compiling C++ code.
121 Summary: C compiler runtime library
122 License: GPL-3.0-with-GCC-exception
123 Group: Development/Building
124 %description -n libgcc
125 Libgcc is needed for dynamically linked C programs.
126 %post -n libgcc -p /sbin/ldconfig
127 %postun -n libgcc -p /sbin/ldconfig
130 Summary: The GNU compiler collection OpenMP runtime library
131 License: GPL-3.0-with-GCC-exception
132 Group: Development/Building
133 %description -n libgomp
134 This is the OpenMP runtime library needed by OpenMP enabled programs
135 that were built with the -fopenmp compiler option and by programs that
136 were auto-parallelized via the -ftree-parallelize-loops compiler
138 %post -n libgomp -p /sbin/ldconfig
139 %postun -n libgomp -p /sbin/ldconfig
142 Summary: GNU Objective C Compiler
144 Group: Development/Languages
146 This package contains the GNU Objective C compiler. Objective C is an
147 object oriented language, created by Next Inc. and used in their
148 Nextstep OS. The source code is available in the gcc package.
151 Summary: Library for the GNU Objective C Compiler
152 License: GPL-3.0-with-GCC-exception
153 Group: Development/Building
154 %description -n libobjc
155 The library for the GNU Objective C compiler.
156 %post -n libobjc -p /sbin/ldconfig
157 %postun -n libobjc -p /sbin/ldconfig
160 Summary: GNU C Compiler plugin for GDB
161 License: GPL-3.0-with-GCC-exception
162 Group: Development/Building
163 %description -n libcc1
164 The GCC plugin for GDB
165 %post -n libcc1 -p /sbin/ldconfig
166 %postun -n libcc1 -p /sbin/ldconfig
169 Summary: GNU Objective C++ Compiler
171 Group: Development/Languages
173 This package contains the GNU Objective C++ compiler. Objective C++ is an
174 object oriented language, created by Next Inc. and used in their
175 Nextstep OS. The source code is available in the gcc package.
178 Summary: The GCC Preprocessor
180 Group: Development/Languages
182 This Package contains just the preprocessor that is used by the X11
186 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
188 Group: Development/Languages
190 This package contains an Ada95 compiler and associated development
191 tools based on the GNU GCC technology. Ada95 is the object oriented
192 successor of the Ada83 language. To build this package from source you
193 must have installed a binary version to bootstrap the compiler.
196 Summary: GNU Ada Runtime Libraries
197 License: GPL-3.0-with-GCC-exception
198 Group: Development/Languages
199 %description -n libada
200 This package contains the shared libraries required to run programs
201 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
202 shared libraries. It also contains the shared libraries for the
203 Implementation of the Ada Semantic Interface Specification (ASIS), the
204 implementation of Distributed Systems Programming (GLADE) and the Posix
205 1003.5 Binding (Florist).
206 %post -n libada -p /sbin/ldconfig
207 %postun -n libada -p /sbin/ldconfig
210 Summary: The GNU Fortran Compiler and Support Files
212 Group: Development/Languages
214 This is the Fortran compiler of the GNU Compiler Collection (GCC).
216 %package -n libgfortran
217 Summary: The GNU Fortran Compiler Runtime Library
218 License: GPL-3.0-with-GCC-exception
219 Group: Development/Languages
220 %description -n libgfortran
221 The runtime library needed to run programs compiled with the Fortran compiler
222 of the GNU Compiler Collection (GCC).
223 %post -n libgfortran -p /sbin/ldconfig
224 %postun -n libgfortran -p /sbin/ldconfig
226 %package -n libquadmath
227 Summary: The GNU Fortran Compiler Quadmath Runtime Library
229 Group: Development/Languages
230 %description -n libquadmath
231 The runtime library needed to run programs compiled with the Fortran compiler
232 of the GNU Compiler Collection (GCC) and quadruple precision floating point
234 %post -n libquadmath -p /sbin/ldconfig
235 %postun -n libquadmath -p /sbin/ldconfig
238 Summary: The GNU Compiler Transactional Memory Runtime Library
239 License: GPL-3.0-with-GCC-exception
240 Group: Development/Languages
241 %description -n libitm
242 The runtime library needed to run programs compiled with the
243 -fgnu-tm option of the GNU Compiler Collection (GCC).
244 %post -n libitm -p /sbin/ldconfig
245 %postun -n libitm -p /sbin/ldconfig
248 Summary: The GNU Compiler Address Sanitizer Runtime Library
250 Group: Development/Languages
251 %description -n libasan
252 The runtime library needed to run programs compiled with the
253 -fsanitize=address option of the GNU Compiler Collection (GCC).
254 %post -n libasan -p /sbin/ldconfig
255 %postun -n libasan -p /sbin/ldconfig
258 Summary: The GNU Compiler Thread Sanitizer Runtime Library
260 Group: Development/Languages
261 %description -n libtsan
262 The runtime library needed to run programs compiled with the
263 -fsanitize=thread option of the GNU Compiler Collection (GCC).
264 %post -n libtsan -p /sbin/ldconfig
265 %postun -n libtsan -p /sbin/ldconfig
267 %package -n libatomic
268 Summary: The GNU Compiler Atomic Operations Runtime Library
269 License: GPL-3.0-with-GCC-exception
270 Group: Development/Languages
271 %description -n libatomic
272 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
273 %post -n libatomic -p /sbin/ldconfig
274 %postun -n libatomic -p /sbin/ldconfig
276 %package -n libcilkrts
277 Summary: The GNU Compiler Cilk+ Runtime Library
279 Group: Development/Languages
280 %description -n libcilkrts
281 The runtime library needed to run programs compiled with the
282 -fcilkplus option of the GNU Compiler Collection (GCC).
283 %post -n libcilkrts -p /sbin/ldconfig
284 %postun -n libcilkrts -p /sbin/ldconfig
287 Summary: The GNU Compiler Leak Sanitizer Runtime Library
289 Group: Development/Languages
290 %description -n liblsan
291 The runtime library needed to run programs compiled with the
292 -fsanitize=leak option of the GNU Compiler Collection (GCC).
293 %post -n liblsan -p /sbin/ldconfig
294 %postun -n liblsan -p /sbin/ldconfig
297 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
299 Group: Development/Languages
300 %description -n libubsan
301 The runtime library needed to run programs compiled with the
302 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
303 %post -n libubsan -p /sbin/ldconfig
304 %postun -n libubsan -p /sbin/ldconfig
307 Summary: The GNU Compiler Vtable Verifier Runtime Library
309 Group: Development/Languages
310 %description -n libvtv
311 The runtime library needed to run programs compiled with the
312 -fvtable-verify option of the GNU Compiler Collection (GCC).
313 %post -n libvtv -p /sbin/ldconfig
314 %postun -n libvtv -p /sbin/ldconfig
317 Summary: Java Runtime Library for gcc
318 License: GPL-2.0-with-classpath-exception
319 Group: Development/Building
320 %description -n libgcj
321 This library is needed if you want to use the GNU Java compiler, gcj.
322 Source code for this package is in gcc.
323 %post -n libgcj -p /sbin/ldconfig
324 %postun -n libgcj -p /sbin/ldconfig
327 Summary: The GNU Java Compiler
329 Group: Development/Languages
331 The Java compiler from the GCC-tools-suite.
333 %package -n libgcj_bc
334 Summary: Fake library for BC-ABI compatibility.
335 License: GPL-2.0-with-classpath-exception
336 Group: Development/Languages
337 %description -n libgcj_bc
338 A fake library that is used at link time only. It ensures that
339 binaries built with the BC-ABI link against a constant SONAME.
340 This way, BC-ABI binaries continue to work if the SONAME underlying
343 %package -n libgcj-jar
344 Summary: Java runtime library (jar files).
345 License: GPL-2.0-with-classpath-exception
346 Group: Development/Languages
347 %description -n libgcj-jar
348 These are the jar files that go along with the gcj front end to gcc.
350 %package -n libgcj-devel
351 Summary: Include Files and Libraries mandatory for Development.
352 License: GPL-2.0-with-classpath-exception
353 Group: Development/Languages
354 %description -n libgcj-devel
355 This package contains all necessary include files and libraries needed
356 to develop applications that require these.
359 Summary: Java Bytecode Interpreter for gcc
360 License: GPL-2.0-with-classpath-exception
361 Group: Development/Languages
362 %description -n gcc-gij
363 This package contains the java bytecode interpreter gij and related tools.
366 Summary: Foreign Function Interface library
367 License: BSD-3-Clause
368 Group: Development/Building
369 %description -n libffi
370 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.
371 %post -n libffi -p /sbin/ldconfig
372 %postun -n libffi -p /sbin/ldconfig
374 %package -n libffi-devel
375 Summary: Foreign Function Interface library development files
376 License: BSD 3-Clause
377 Group: Development/Building
378 %description -n libffi-devel
379 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.
382 Summary: GNU Go Compiler
384 Group: Development/Languages
386 This package contains a Go compiler and associated development
387 files based on the GNU GCC technology.
390 Summary: GNU Go compiler runtime library
391 License: BSD-3-Clause
392 Group: Development/Languages
393 %description -n libgo
394 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.
395 %post -n libgo -p /sbin/ldconfig
396 %postun -n libgo -p /sbin/ldconfig
399 Summary: Testsuite results
400 License: SUSE-Public-Domain
401 Group: Development/Languages
402 %description testresults
403 Results from running the gcc and target library testsuites.
405 %package -n gcc-32bit
406 Summary: The GNU C Compiler 32bit support
407 Group: Development/Building
408 %description -n gcc-32bit
409 This package contains 32bit support for the GNU Compiler Collection.
411 %package -n libstdc++-devel-32bit
412 Summary: Include Files and Libraries mandatory for Development
413 License: GPL-3.0-with-GCC-exception
414 Group: Development/Building
415 %description -n libstdc++-devel-32bit
416 This package contains all the headers and libraries of the standard C++
417 library. It is needed for compiling C++ code.
419 %package -n libgcc-32bit
420 Summary: C compiler runtime library
421 License: GPL-3.0-with-GCC-exception
422 Group: Development/Building
423 %description -n libgcc-32bit
424 Libgcc is needed for dynamically linked C programs.
425 %post -n libgcc-32bit -p /sbin/ldconfig
426 %postun -n libgcc-32bit -p /sbin/ldconfig
428 %package -n libgomp-32bit
429 Summary: The GNU compiler collection OpenMP runtime library
430 License: GPL-3.0-with-GCC-exception
431 Group: Development/Building
432 %description -n libgomp-32bit
433 This is the OpenMP runtime library needed by OpenMP enabled programs
434 that were built with the -fopenmp compiler option and by programs that
435 were auto-parallelized via the -ftree-parallelize-loops compiler
437 %post -n libgomp-32bit -p /sbin/ldconfig
438 %postun -n libgomp-32bit -p /sbin/ldconfig
440 %package -n libstdc++-32bit
441 Summary: The standard C++ shared library
442 License: GPL-3.0-with-GCC-exception
443 Group: Development/Building
444 %description -n libstdc++-32bit
445 The standard C++ library, needed for dynamically linked C++ programs.
446 %post -n libstdc++-32bit -p /sbin/ldconfig
447 %postun -n libstdc++-32bit -p /sbin/ldconfig
450 Summary: GNU Objective C Compiler
452 Group: Development/Languages
453 %description objc-32bit
454 This package contains the GNU Objective C compiler. Objective C is an
455 object oriented language, created by Next Inc. and used in their
456 Nextstep OS. The source code is available in the gcc package.
458 %package -n libobjc-32bit
459 Summary: Library for the GNU Objective C Compiler
460 License: GPL-3.0-with-GCC-exception
461 Group: Development/Building
462 %description -n libobjc-32bit
463 The library for the GNU Objective C compiler.
464 %post -n libobjc-32bit -p /sbin/ldconfig
465 %postun -n libobjc-32bit -p /sbin/ldconfig
468 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
470 Group: Development/Languages
471 %description ada-32bit
472 This package contains an Ada95 compiler and associated development
473 tools based on the GNU GCC technology. Ada95 is the object oriented
474 successor of the Ada83 language. To build this package from source you
475 must have installed a binary version to bootstrap the compiler.
477 %package -n libada-32bit
478 Summary: GNU Ada Runtime Libraries
479 License: GPL-3.0-with-GCC-exception
480 Group: Development/Languages
481 %description -n libada-32bit
482 This package contains the shared libraries required to run programs
483 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
484 shared libraries. It also contains the shared libraries for the
485 Implementation of the Ada Semantic Interface Specification (ASIS), the
486 implementation of Distributed Systems Programming (GLADE) and the Posix
487 1003.5 Binding (Florist).
488 %post -n libada-32bit -p /sbin/ldconfig
489 %postun -n libada-32bit -p /sbin/ldconfig
491 %package fortran-32bit
492 Summary: The GNU Fortran Compiler and Support Files
494 Group: Development/Languages
495 %description fortran-32bit
496 This is the Fortran compiler of the GNU Compiler Collection (GCC).
498 %package -n libgfortran-32bit
499 Summary: The GNU Fortran Compiler Runtime Library
500 License: GPL-3.0-with-GCC-exception
501 Group: Development/Languages
502 %description -n libgfortran-32bit
503 The runtime library needed to run programs compiled with the Fortran compiler
504 of the GNU Compiler Collection (GCC).
505 %post -n libgfortran-32bit -p /sbin/ldconfig
506 %postun -n libgfortran-32bit -p /sbin/ldconfig
508 %package -n libquadmath-32bit
509 Summary: The GNU Fortran Compiler Quadmath Runtime Library
511 Group: Development/Languages
512 %description -n libquadmath-32bit
513 The runtime library needed to run programs compiled with the Fortran compiler
514 of the GNU Compiler Collection (GCC) and quadruple precision floating point
516 %post -n libquadmath-32bit -p /sbin/ldconfig
517 %postun -n libquadmath-32bit -p /sbin/ldconfig
519 %package -n libitm-32bit
520 Summary: The GNU Compiler Transactional Memory Runtime Library
521 License: GPL-3.0-with-GCC-exception
522 Group: Development/Languages
523 %description -n libitm-32bit
524 The runtime library needed to run programs compiled with the
525 -fgnu-tm option of the GNU Compiler Collection (GCC).
526 %post -n libitm-32bit -p /sbin/ldconfig
527 %postun -n libitm-32bit -p /sbin/ldconfig
529 %package -n libasan-32bit
530 Summary: The GNU Compiler Address Sanitizer Runtime Library
532 Group: Development/Languages
533 %description -n libasan-32bit
534 The runtime library needed to run programs compiled with the
535 -fsanitize=address option of the GNU Compiler Collection (GCC).
536 %post -n libasan-32bit -p /sbin/ldconfig
537 %postun -n libasan-32bit -p /sbin/ldconfig
539 %package -n liblsan-32bit
540 Summary: The GNU Compiler Address Sanitizer Runtime Library
542 Group: Development/Languages
543 %description -n liblsan-32bit
544 The runtime library needed to run programs compiled with the
545 -fsanitize=leak option of the GNU Compiler Collection (GCC).
546 %post -n liblsan-32bit -p /sbin/ldconfig
547 %postun -n liblsan-32bit -p /sbin/ldconfig
549 %package -n libtsan-32bit
550 Summary: The GNU Compiler Thread Sanitizer Runtime Library
552 Group: Development/Languages
553 %description -n libtsan-32bit
554 The runtime library needed to run programs compiled with the
555 -fsanitize=thread option of the GNU Compiler Collection (GCC).
556 %post -n libtsan-32bit -p /sbin/ldconfig
557 %postun -n libtsan-32bit -p /sbin/ldconfig
559 %package -n libatomic-32bit
560 Summary: The GNU Compiler Atomic Operations Runtime Library
561 License: GPL-3.0-with-GCC-exception
562 Group: Development/Languages
563 %description -n libatomic-32bit
564 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
565 %post -n libatomic-32bit -p /sbin/ldconfig
566 %postun -n libatomic-32bit -p /sbin/ldconfig
568 %package -n libcilkrts-32bit
569 Summary: The GNU Compiler Cilk+ Runtime Library
571 Group: Development/Languages
572 %description -n libcilkrts-32bit
573 The runtime library needed to run programs compiled with the
574 -fcilkplus option of the GNU Compiler Collection (GCC).
575 %post -n libcilkrts-32bit -p /sbin/ldconfig
576 %postun -n libcilkrts-32bit -p /sbin/ldconfig
578 %package -n libubsan-32bit
579 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
581 Group: Development/Languages
582 %description -n libubsan-32bit
583 The runtime library needed to run programs compiled with the
584 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
585 %post -n libubsan-32bit -p /sbin/ldconfig
586 %postun -n libubsan-32bit -p /sbin/ldconfig
588 %package -n libvtv-32bit
589 Summary: The GNU Compiler Vtable Verifier Runtime Library
591 Group: Development/Languages
592 %description -n libvtv-32bit
593 The runtime library needed to run programs compiled with the
594 -fvtable-verify option of the GNU Compiler Collection (GCC).
595 %post -n libvtv-32bit -p /sbin/ldconfig
596 %postun -n libvtv-32bit -p /sbin/ldconfig
598 %package -n libffi-32bit
599 Summary: Foreign Function Interface library
600 License: BSD-3-Clause
601 Group: Development/Building
602 %description -n libffi-32bit
603 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.
604 %post -n libffi-32bit -p /sbin/ldconfig
605 %postun -n libffi-32bit -p /sbin/ldconfig
607 %package -n libffi-devel-32bit
608 Summary: Foreign Function Interface library development files
609 License: BSD 3-Clause
610 Group: Development/Building
611 %description -n libffi-devel-32bit
612 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.
615 Summary: GNU Go Compiler
617 Group: Development/Languages
618 %description go-32bit
619 This package contains a Go compiler and associated development
620 files based on the GNU GCC technology.
622 %package -n libgo-32bit
623 Summary: GNU Go compiler runtime library
624 License: BSD-3-Clause
625 Group: Development/Languages
626 %description -n libgo-32bit
627 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.
628 %post -n libgo-32bit -p /sbin/ldconfig
629 %postun -n libgo-32bit -p /sbin/ldconfig
631 %package plugin-devel
632 Summary: GNU GCC Plugin development files
634 Group: Development/Languages
635 %description plugin-devel
636 This package contains GCC Plugin development files needed for compiler
639 %package -n sanitizer-sources
640 Summary: Sanitizer family tools sources
642 Group: Development/Tools
645 %description -n sanitizer-sources
646 Sanitizer family tools sources for external tools.
650 %setup -q -n gcc-%{version}
656 ln -sf mpfr-3.1.5 mpfr
660 ln -sf isl-0.17.1 isl
662 echo "" > gcc/DEV-PHASE
664 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
667 %{?asan:%gcc_unforce_options}
672 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'
673 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
675 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
676 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
678 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ */ /g'`
679 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
681 %ifarch armv7l armv7hl aarch64
682 %undefine gcc_profiledbootstrap
685 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
686 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
688 --prefix=%{_prefix} \
689 --infodir=%{_infodir} \
690 --mandir=%{_mandir} \
692 --libexecdir=%{libdir} \
693 --enable-languages=c,c++,fortran \
694 --enable-checking=release \
696 %{!?gcc_profiledbootstrap:--disable-bootstrap} \
701 --with-slibdir=%{libdir} \
704 --enable-__cxa_atexit \
705 --enable-libstdcxx-allocator=new \
706 --enable-version-specific-runtime-libs \
707 --enable-linker-build-id \
708 --without-system-libunwind \
709 --enable-threads=posix \
714 --enable-libgfortran \
715 %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
717 --with-arch=armv7-a \
718 --with-tune=cortex-a8 \
719 --disable-sjlj-exceptions \
722 --with-arch=armv7-a \
723 --with-tune=cortex-a8 \
724 --disable-sjlj-exceptions \
728 --with-arch=armv8-a \
729 --disable-sjlj-exceptions \
732 --with-arch-32=i586 \
733 --with-tune=generic \
737 --with-arch-32=i586 \
738 --with-tune=generic \
745 --with-arch=armv7-a \
746 --with-tune=cortex-a8 \
747 --disable-sjlj-exceptions \
750 --with-arch=armv7-a \
751 --with-tune=cortex-a8 \
752 --disable-sjlj-exceptions \
756 --with-arch=armv8-a \
757 --disable-sjlj-exceptions \
760 --disable-libgfortran \
761 --disable-libquadmath \
763 --disable-libatomic \
764 --disable-libstdc++-v3 \
765 --disable-libsanitizer \
768 --with-bugurl="http://bugs.tizen.org/" \
769 --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release}" \
770 --target=%{target_arch} \
771 --host=%{host_arch} \
774 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
777 # asan needs a whole shadow address space
778 ulimit -v unlimited || true
779 make -k check %{?_smp_mflags} || true
781 ../contrib/test_summary | tee ../testresults/test_summary.txt
787 make install DESTDIR=$RPM_BUILD_ROOT
790 cp `find . -name "*.sum"` ../testresults/
791 cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
792 chmod 644 ../testresults/*
796 rm -rf %{buildroot}/%{_datadir}/locale
798 #remove everything we don't need
799 rm -rf %{buildroot}/%{libsubdir}/install-tools
800 find %{buildroot}/ -name "*.la" -delete
803 ln -s gcc %{buildroot}%{_bindir}/cc
804 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
806 # expose plugins for ar (required for lto builds)
807 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
808 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
810 # legacy preprocessor
811 mkdir -p %{buildroot}/lib
812 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
814 # 32-bit libgcc in multilib configuration
816 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
819 # move libraries to libdir
820 for lib in asan atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan
822 [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
823 [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
828 rm -rf %{buildroot}/%{libsubdir}/include-fixed
829 rm -rf %{buildroot}/%{libsubdir}/include
834 tar -czf libsanitizer.tar.bz libsanitizer
835 mkdir -p %{buildroot}/src
836 mv -v libsanitizer.tar.bz %{buildroot}/src
840 %manifest gcc.manifest
841 %defattr(-,root,root)
853 %{_bindir}/gcc-ranlib
854 %{_bindir}/%{target_arch}-gcc
855 %{_bindir}/%{target_arch}-gcc-%{version}
856 %{_bindir}/%{target_arch}-gcc-ar
857 %{_bindir}/%{target_arch}-gcc-nm
858 %{_bindir}/%{target_arch}-gcc-ranlib
859 %{libsubdir}/collect2
861 %{libsubdir}/lto-wrapper
862 %{libsubdir}/liblto_plugin.so*
863 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
864 %{libsubdir}/include-fixed/*
865 %{libsubdir}/include/*.h
872 %ifarch %cilkrts_arch
873 %{libsubdir}/include/cilk/*
875 %{libsubdir}/include/sanitizer/*
877 %exclude %{libdir}/libasan.so
880 %exclude %{libdir}/liblsan.so
883 %exclude %{libdir}/libtsan.so
887 %defattr(-,root,root)
891 %{_bindir}/%{target_arch}-g++
892 %{_bindir}/%{target_arch}-c++
895 %manifest gcc.manifest
896 %license COPYING3 COPYING.RUNTIME
897 %defattr(-,root,root)
898 %{libdir}/libstdc++.so.*
900 %files -n libstdc++-devel
901 %defattr(-,root,root)
902 %{libdir}/libstdc++.so
903 %{libdir}/libstdc++.a
904 %{libdir}/libsupc++.a
905 %{libsubdir}/include/c++/*
906 %{_datadir}/gcc-%{version}/python/libstdcxx/*
909 %manifest gcc.manifest
910 %license COPYING3 COPYING.RUNTIME
911 %defattr(-,root,root)
912 %{libdir}/libgcc_s.so.*
915 %manifest gcc.manifest
916 %license COPYING3 COPYING.RUNTIME
917 %defattr(-,root,root)
918 %{libdir}/libgomp.so.*
921 %manifest gcc.manifest
922 %defattr(-,root,root)
923 %{libdir}/libcc1.so.*
927 %manifest gcc.manifest
928 %license libsanitizer/LICENSE.TXT
929 %defattr(-,root,root)
930 %{libdir}/libasan.so*
935 %manifest gcc.manifest
936 %license libsanitizer/LICENSE.TXT
937 %defattr(-,root,root)
938 %{libdir}/liblsan.so*
943 %manifest gcc.manifest
944 %license libsanitizer/LICENSE.TXT
945 %defattr(-,root,root)
946 %{libdir}/libtsan.so*
951 %manifest gcc.manifest
952 %license COPYING3 COPYING.RUNTIME
953 %defattr(-,root,root)
954 %{libdir}/libatomic.so.*
959 %manifest gcc.manifest
960 %license COPYING3 COPYING.RUNTIME
961 %defattr(-,root,root)
962 %{libdir}/libitm.so.*
965 %ifarch %cilkrts_arch
967 %manifest gcc.manifest
968 %defattr(-,root,root)
969 %{libdir}/libcilkrts.so.*
974 %manifest gcc.manifest
975 %license libsanitizer/LICENSE.TXT
976 %defattr(-,root,root)
977 %{libdir}/libubsan.so.*
981 %defattr(-,root,root)
982 %dir %{libsubdir}/finclude
984 %{_bindir}/%{target_arch}-gfortran
986 %{libsubdir}/finclude/*
987 %{libdir}/libgfortran.a
988 %{libdir}/libgfortran.so
989 %{libsubdir}/libgfortran.spec
990 %{libsubdir}/libcaf_single.a
991 %ifarch %quadmath_arch
992 %{libdir}/libquadmath.a
993 %{libdir}/libquadmath.so
996 %files -n libgfortran
997 %defattr(-,root,root)
998 %{libdir}/libgfortran.so.*
1000 %ifarch %quadmath_arch
1001 %files -n libquadmath
1002 %manifest gcc.manifest
1003 %license COPYING.LIB
1004 %defattr(-,root,root)
1005 %{libdir}/libquadmath.so.*
1009 %defattr(-,root,root)
1015 %defattr(-,root,root)
1016 %{libsubdir}/plugin/*
1020 %defattr(-,root,root)
1021 %doc testresults/test_summary.txt
1022 %doc testresults/*.sum
1023 %doc testresults/*.log
1027 %defattr(-,root,root)
1028 %{libsubdir}/32/crt*
1030 %{libsubdir}/32/*.so
1032 %{libsubdir}/32/*.spec
1035 %files -n libasan-32bit
1036 %manifest gcc.manifest
1037 %license libsanitizer/LICENSE.TXT
1038 %defattr(-,root,root)
1039 %{libsubdir}/32/libasan.so.*
1043 %files -n liblsan-32bit
1044 %manifest gcc.manifest
1045 %license libsanitizer/LICENSE.TXT
1046 %defattr(-,root,root)
1047 %{libsubdir}/32/liblsan.so.*
1050 %ifarch %atomic_arch
1051 %files -n libatomic-32bit
1052 %manifest gcc.manifest
1053 %license COPYING3 COPYING.RUNTIME
1054 %defattr(-,root,root)
1055 %{libsubdir}/32/libatomic.so.*
1058 %ifarch %cilkrts_arch
1059 %files -n libcilkrts-32bit
1060 %defattr(-,root,root)
1061 %{libsubdir}/32/libcilkrts.so.*
1064 %files -n libgcc-32bit
1065 %manifest gcc.manifest
1066 %license COPYING3 COPYING.RUNTIME
1067 %defattr(-,root,root)
1068 %{libsubdir}/32/libgcc_s.so.*
1070 %files -n libgomp-32bit
1071 %manifest gcc.manifest
1072 %license COPYING3 COPYING.RUNTIME
1073 %defattr(-,root,root)
1074 %{libsubdir}/32/libgomp.so.*
1077 %files -n libitm-32bit
1078 %license COPYING3 COPYING.RUNTIME
1079 %defattr(-,root,root)
1080 %{libsubdir}/32/libitm.so.*
1083 %files -n libgfortran-32bit
1084 %defattr(-,root,root)
1085 %dir %{libsubdir}/32/finclude
1086 %{libsubdir}/32/libgfortran.so.*
1087 %{libsubdir}/32/finclude/*
1089 %ifarch %quadmath_arch
1090 %files -n libquadmath-32bit
1091 %license COPYING.LIB
1092 %defattr(-,root,root)
1093 %{libsubdir}/32/libquadmath.so.*
1097 %files -n libubsan-32bit
1098 %manifest gcc.manifest
1099 %license libsanitizer/LICENSE.TXT
1100 %defattr(-,root,root)
1101 %{libsubdir}/32/libubsan.so.*
1104 %files -n libstdc++-32bit
1105 %manifest gcc.manifest
1106 %license COPYING3 COPYING.RUNTIME
1107 %defattr(-,root,root)
1108 %{libsubdir}/32/libstdc++.so.*
1109 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1111 %files -n libstdc++-devel-32bit
1112 %defattr(-,root,root)
1113 %{libsubdir}/32/libstdc++.so.*-gdb.py
1116 %files -n sanitizer-sources
1117 %defattr(-,root,root,-)
1118 /src/libsanitizer.tar.bz