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 %define quadmath_arch %ix86 x86_64 ia64
27 %define tsan_arch x86_64 aarch64
28 %define esan_arch x86_64 armv7l
29 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
30 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
31 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
32 %define lsan_arch x86_64 %ix86 %arm aarch64
33 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
34 %define cilkrts_arch x86_64 %ix86
53 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
55 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
56 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
58 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
59 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
60 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
62 Name: gcc%{?cross:-%{cross}}
63 # With generated files in src we could drop the following
66 BuildRequires: gettext-devel
67 BuildRequires: makeinfo
68 ## until here, but at least renaming and patching info files breaks this
69 BuildRequires: gcc-c++
70 BuildRequires: zlib-devel
72 BuildRequires: glibc-devel-32bit
75 %{?cross:BuildRequires: binutils-%{cross}}
76 # here we use %%if because OBS spec parser cannot expand
77 # %%{?macro:...} correctly
78 %if 0%{?gcc_run_tests}
79 BuildRequires: dejagnu
83 URL: http://gcc.gnu.org/
86 Source: gcc-%{version}.tar.bz2
87 Source10: gmp-6.1.1.tar.bz2
88 Source11: mpfr-3.1.5.tar.bz2
89 Source12: mpc-1.0.3.tar.gz
90 Source13: isl-0.17.1.tar.bz2
91 Source20: gcc.manifest
92 Group: Development/Building
93 Summary: The GNU C Compiler and Support Files
95 %{?cross:ExcludeArch: %{cross}}
97 Core package for the GNU Compiler Collection, including the C language
101 Summary: The GNU C++ Compiler
103 Group: Development/Languages
105 This package contains the GNU compiler for C++.
107 %package -n libstdc++
108 Summary: The standard C++ shared library
109 License: GPL-3.0-with-GCC-exception
110 Group: Development/Building
111 %description -n libstdc++
112 The standard C++ library, needed for dynamically linked C++ programs.
113 %post -n libstdc++ -p /sbin/ldconfig
114 %postun -n libstdc++ -p /sbin/ldconfig
116 %package -n libstdc++-devel
117 Summary: Include Files and Libraries mandatory for Development
118 License: GPL-3.0-with-GCC-exception
119 Group: Development/Building
120 %description -n libstdc++-devel
121 This package contains all the headers and libraries of the standard C++
122 library. It is needed for compiling C++ code.
125 Summary: C compiler runtime library
126 License: GPL-3.0-with-GCC-exception
127 Group: Development/Building
128 %description -n libgcc
129 Libgcc is needed for dynamically linked C programs.
130 %post -n libgcc -p /sbin/ldconfig
131 %postun -n libgcc -p /sbin/ldconfig
134 Summary: The GNU compiler collection OpenMP runtime library
135 License: GPL-3.0-with-GCC-exception
136 Group: Development/Building
137 %description -n libgomp
138 This is the OpenMP runtime library needed by OpenMP enabled programs
139 that were built with the -fopenmp compiler option and by programs that
140 were auto-parallelized via the -ftree-parallelize-loops compiler
142 %post -n libgomp -p /sbin/ldconfig
143 %postun -n libgomp -p /sbin/ldconfig
146 Summary: GNU Objective C Compiler
148 Group: Development/Languages
150 This package contains the GNU Objective C compiler. Objective C is an
151 object oriented language, created by Next Inc. and used in their
152 Nextstep OS. The source code is available in the gcc package.
155 Summary: Library for the GNU Objective C Compiler
156 License: GPL-3.0-with-GCC-exception
157 Group: Development/Building
158 %description -n libobjc
159 The library for the GNU Objective C compiler.
160 %post -n libobjc -p /sbin/ldconfig
161 %postun -n libobjc -p /sbin/ldconfig
164 Summary: GNU C Compiler plugin for GDB
165 License: GPL-3.0-with-GCC-exception
166 Group: Development/Building
167 %description -n libcc1
168 The GCC plugin for GDB
169 %post -n libcc1 -p /sbin/ldconfig
170 %postun -n libcc1 -p /sbin/ldconfig
173 Summary: GNU Objective C++ Compiler
175 Group: Development/Languages
177 This package contains the GNU Objective C++ compiler. Objective C++ is an
178 object oriented language, created by Next Inc. and used in their
179 Nextstep OS. The source code is available in the gcc package.
182 Summary: The GCC Preprocessor
184 Group: Development/Languages
186 This Package contains just the preprocessor that is used by the X11
190 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
192 Group: Development/Languages
194 This package contains an Ada95 compiler and associated development
195 tools based on the GNU GCC technology. Ada95 is the object oriented
196 successor of the Ada83 language. To build this package from source you
197 must have installed a binary version to bootstrap the compiler.
200 Summary: GNU Ada Runtime Libraries
201 License: GPL-3.0-with-GCC-exception
202 Group: Development/Languages
203 %description -n libada
204 This package contains the shared libraries required to run programs
205 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
206 shared libraries. It also contains the shared libraries for the
207 Implementation of the Ada Semantic Interface Specification (ASIS), the
208 implementation of Distributed Systems Programming (GLADE) and the Posix
209 1003.5 Binding (Florist).
210 %post -n libada -p /sbin/ldconfig
211 %postun -n libada -p /sbin/ldconfig
214 Summary: The GNU Fortran Compiler and Support Files
216 Group: Development/Languages
218 This is the Fortran compiler of the GNU Compiler Collection (GCC).
220 %package -n libgfortran
221 Summary: The GNU Fortran Compiler Runtime Library
222 License: GPL-3.0-with-GCC-exception
223 Group: Development/Languages
224 %description -n libgfortran
225 The runtime library needed to run programs compiled with the Fortran compiler
226 of the GNU Compiler Collection (GCC).
227 %post -n libgfortran -p /sbin/ldconfig
228 %postun -n libgfortran -p /sbin/ldconfig
230 %package -n libquadmath
231 Summary: The GNU Fortran Compiler Quadmath Runtime Library
233 Group: Development/Languages
234 %description -n libquadmath
235 The runtime library needed to run programs compiled with the Fortran compiler
236 of the GNU Compiler Collection (GCC) and quadruple precision floating point
238 %post -n libquadmath -p /sbin/ldconfig
239 %postun -n libquadmath -p /sbin/ldconfig
242 Summary: The GNU Compiler Transactional Memory Runtime Library
243 License: GPL-3.0-with-GCC-exception
244 Group: Development/Languages
245 %description -n libitm
246 The runtime library needed to run programs compiled with the
247 -fgnu-tm option of the GNU Compiler Collection (GCC).
248 %post -n libitm -p /sbin/ldconfig
249 %postun -n libitm -p /sbin/ldconfig
252 Summary: The GNU Compiler Address Sanitizer Runtime Library
254 Group: Development/Languages
255 %description -n libasan
256 The runtime library needed to run programs compiled with the
257 -fsanitize=address option of the GNU Compiler Collection (GCC).
258 %post -n libasan -p /sbin/ldconfig
259 %postun -n libasan -p /sbin/ldconfig
262 Summary: The GNU Compiler Thread Sanitizer Runtime Library
264 Group: Development/Languages
265 %description -n libtsan
266 The runtime library needed to run programs compiled with the
267 -fsanitize=thread option of the GNU Compiler Collection (GCC).
268 %post -n libtsan -p /sbin/ldconfig
269 %postun -n libtsan -p /sbin/ldconfig
272 Summary: The GNU Compiler Efficciency Sanitier Runtime Library
274 Group: Development/Languages
275 %description -n libesan
276 The runtime library needed to run programs compiled with the
277 -fsanitize=efficiency-working-set option of the GNU Compiler Collection (GCC).
278 %post -n libesan -p /sbin/ldconfig
279 %postun -n libesan -p /sbin/ldconfig
281 %package -n libatomic
282 Summary: The GNU Compiler Atomic Operations Runtime Library
283 License: GPL-3.0-with-GCC-exception
284 Group: Development/Languages
285 %description -n libatomic
286 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
287 %post -n libatomic -p /sbin/ldconfig
288 %postun -n libatomic -p /sbin/ldconfig
290 %package -n libcilkrts
291 Summary: The GNU Compiler Cilk+ Runtime Library
293 Group: Development/Languages
294 %description -n libcilkrts
295 The runtime library needed to run programs compiled with the
296 -fcilkplus option of the GNU Compiler Collection (GCC).
297 %post -n libcilkrts -p /sbin/ldconfig
298 %postun -n libcilkrts -p /sbin/ldconfig
301 Summary: The GNU Compiler Leak Sanitizer Runtime Library
303 Group: Development/Languages
304 %description -n liblsan
305 The runtime library needed to run programs compiled with the
306 -fsanitize=leak option of the GNU Compiler Collection (GCC).
307 %post -n liblsan -p /sbin/ldconfig
308 %postun -n liblsan -p /sbin/ldconfig
311 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
313 Group: Development/Languages
314 %description -n libubsan
315 The runtime library needed to run programs compiled with the
316 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
317 %post -n libubsan -p /sbin/ldconfig
318 %postun -n libubsan -p /sbin/ldconfig
321 Summary: The GNU Compiler Vtable Verifier Runtime Library
323 Group: Development/Languages
324 %description -n libvtv
325 The runtime library needed to run programs compiled with the
326 -fvtable-verify option of the GNU Compiler Collection (GCC).
327 %post -n libvtv -p /sbin/ldconfig
328 %postun -n libvtv -p /sbin/ldconfig
331 Summary: Java Runtime Library for gcc
332 License: GPL-2.0-with-classpath-exception
333 Group: Development/Building
334 %description -n libgcj
335 This library is needed if you want to use the GNU Java compiler, gcj.
336 Source code for this package is in gcc.
337 %post -n libgcj -p /sbin/ldconfig
338 %postun -n libgcj -p /sbin/ldconfig
341 Summary: The GNU Java Compiler
343 Group: Development/Languages
345 The Java compiler from the GCC-tools-suite.
347 %package -n libgcj_bc
348 Summary: Fake library for BC-ABI compatibility.
349 License: GPL-2.0-with-classpath-exception
350 Group: Development/Languages
351 %description -n libgcj_bc
352 A fake library that is used at link time only. It ensures that
353 binaries built with the BC-ABI link against a constant SONAME.
354 This way, BC-ABI binaries continue to work if the SONAME underlying
357 %package -n libgcj-jar
358 Summary: Java runtime library (jar files).
359 License: GPL-2.0-with-classpath-exception
360 Group: Development/Languages
361 %description -n libgcj-jar
362 These are the jar files that go along with the gcj front end to gcc.
364 %package -n libgcj-devel
365 Summary: Include Files and Libraries mandatory for Development.
366 License: GPL-2.0-with-classpath-exception
367 Group: Development/Languages
368 %description -n libgcj-devel
369 This package contains all necessary include files and libraries needed
370 to develop applications that require these.
373 Summary: Java Bytecode Interpreter for gcc
374 License: GPL-2.0-with-classpath-exception
375 Group: Development/Languages
376 %description -n gcc-gij
377 This package contains the java bytecode interpreter gij and related tools.
380 Summary: Foreign Function Interface library
381 License: BSD-3-Clause
382 Group: Development/Building
383 %description -n libffi
384 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.
385 %post -n libffi -p /sbin/ldconfig
386 %postun -n libffi -p /sbin/ldconfig
388 %package -n libffi-devel
389 Summary: Foreign Function Interface library development files
390 License: BSD 3-Clause
391 Group: Development/Building
392 %description -n libffi-devel
393 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.
396 Summary: GNU Go Compiler
398 Group: Development/Languages
400 This package contains a Go compiler and associated development
401 files based on the GNU GCC technology.
404 Summary: GNU Go compiler runtime library
405 License: BSD-3-Clause
406 Group: Development/Languages
407 %description -n libgo
408 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.
409 %post -n libgo -p /sbin/ldconfig
410 %postun -n libgo -p /sbin/ldconfig
413 Summary: Testsuite results
414 License: SUSE-Public-Domain
415 Group: Development/Languages
416 %description testresults
417 Results from running the gcc and target library testsuites.
419 %package -n gcc-32bit
420 Summary: The GNU C Compiler 32bit support
421 Group: Development/Building
422 %description -n gcc-32bit
423 This package contains 32bit support for the GNU Compiler Collection.
425 %package -n libstdc++-devel-32bit
426 Summary: Include Files and Libraries mandatory for Development
427 License: GPL-3.0-with-GCC-exception
428 Group: Development/Building
429 %description -n libstdc++-devel-32bit
430 This package contains all the headers and libraries of the standard C++
431 library. It is needed for compiling C++ code.
433 %package -n libgcc-32bit
434 Summary: C compiler runtime library
435 License: GPL-3.0-with-GCC-exception
436 Group: Development/Building
437 %description -n libgcc-32bit
438 Libgcc is needed for dynamically linked C programs.
439 %post -n libgcc-32bit -p /sbin/ldconfig
440 %postun -n libgcc-32bit -p /sbin/ldconfig
442 %package -n libgomp-32bit
443 Summary: The GNU compiler collection OpenMP runtime library
444 License: GPL-3.0-with-GCC-exception
445 Group: Development/Building
446 %description -n libgomp-32bit
447 This is the OpenMP runtime library needed by OpenMP enabled programs
448 that were built with the -fopenmp compiler option and by programs that
449 were auto-parallelized via the -ftree-parallelize-loops compiler
451 %post -n libgomp-32bit -p /sbin/ldconfig
452 %postun -n libgomp-32bit -p /sbin/ldconfig
454 %package -n libstdc++-32bit
455 Summary: The standard C++ shared library
456 License: GPL-3.0-with-GCC-exception
457 Group: Development/Building
458 %description -n libstdc++-32bit
459 The standard C++ library, needed for dynamically linked C++ programs.
460 %post -n libstdc++-32bit -p /sbin/ldconfig
461 %postun -n libstdc++-32bit -p /sbin/ldconfig
464 Summary: GNU Objective C Compiler
466 Group: Development/Languages
467 %description objc-32bit
468 This package contains the GNU Objective C compiler. Objective C is an
469 object oriented language, created by Next Inc. and used in their
470 Nextstep OS. The source code is available in the gcc package.
472 %package -n libobjc-32bit
473 Summary: Library for the GNU Objective C Compiler
474 License: GPL-3.0-with-GCC-exception
475 Group: Development/Building
476 %description -n libobjc-32bit
477 The library for the GNU Objective C compiler.
478 %post -n libobjc-32bit -p /sbin/ldconfig
479 %postun -n libobjc-32bit -p /sbin/ldconfig
482 Summary: GNU Ada95 Compiler Based on GCC (GNAT)
484 Group: Development/Languages
485 %description ada-32bit
486 This package contains an Ada95 compiler and associated development
487 tools based on the GNU GCC technology. Ada95 is the object oriented
488 successor of the Ada83 language. To build this package from source you
489 must have installed a binary version to bootstrap the compiler.
491 %package -n libada-32bit
492 Summary: GNU Ada Runtime Libraries
493 License: GPL-3.0-with-GCC-exception
494 Group: Development/Languages
495 %description -n libada-32bit
496 This package contains the shared libraries required to run programs
497 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
498 shared libraries. It also contains the shared libraries for the
499 Implementation of the Ada Semantic Interface Specification (ASIS), the
500 implementation of Distributed Systems Programming (GLADE) and the Posix
501 1003.5 Binding (Florist).
502 %post -n libada-32bit -p /sbin/ldconfig
503 %postun -n libada-32bit -p /sbin/ldconfig
505 %package fortran-32bit
506 Summary: The GNU Fortran Compiler and Support Files
508 Group: Development/Languages
509 %description fortran-32bit
510 This is the Fortran compiler of the GNU Compiler Collection (GCC).
512 %package -n libgfortran-32bit
513 Summary: The GNU Fortran Compiler Runtime Library
514 License: GPL-3.0-with-GCC-exception
515 Group: Development/Languages
516 %description -n libgfortran-32bit
517 The runtime library needed to run programs compiled with the Fortran compiler
518 of the GNU Compiler Collection (GCC).
519 %post -n libgfortran-32bit -p /sbin/ldconfig
520 %postun -n libgfortran-32bit -p /sbin/ldconfig
522 %package -n libquadmath-32bit
523 Summary: The GNU Fortran Compiler Quadmath Runtime Library
525 Group: Development/Languages
526 %description -n libquadmath-32bit
527 The runtime library needed to run programs compiled with the Fortran compiler
528 of the GNU Compiler Collection (GCC) and quadruple precision floating point
530 %post -n libquadmath-32bit -p /sbin/ldconfig
531 %postun -n libquadmath-32bit -p /sbin/ldconfig
533 %package -n libitm-32bit
534 Summary: The GNU Compiler Transactional Memory Runtime Library
535 License: GPL-3.0-with-GCC-exception
536 Group: Development/Languages
537 %description -n libitm-32bit
538 The runtime library needed to run programs compiled with the
539 -fgnu-tm option of the GNU Compiler Collection (GCC).
540 %post -n libitm-32bit -p /sbin/ldconfig
541 %postun -n libitm-32bit -p /sbin/ldconfig
543 %package -n libasan-32bit
544 Summary: The GNU Compiler Address Sanitizer Runtime Library
546 Group: Development/Languages
547 %description -n libasan-32bit
548 The runtime library needed to run programs compiled with the
549 -fsanitize=address option of the GNU Compiler Collection (GCC).
550 %post -n libasan-32bit -p /sbin/ldconfig
551 %postun -n libasan-32bit -p /sbin/ldconfig
553 %package -n liblsan-32bit
554 Summary: The GNU Compiler Address Sanitizer Runtime Library
556 Group: Development/Languages
557 %description -n liblsan-32bit
558 The runtime library needed to run programs compiled with the
559 -fsanitize=leak option of the GNU Compiler Collection (GCC).
560 %post -n liblsan-32bit -p /sbin/ldconfig
561 %postun -n liblsan-32bit -p /sbin/ldconfig
563 %package -n libtsan-32bit
564 Summary: The GNU Compiler Thread Sanitizer Runtime Library
566 Group: Development/Languages
567 %description -n libtsan-32bit
568 The runtime library needed to run programs compiled with the
569 -fsanitize=thread option of the GNU Compiler Collection (GCC).
570 %post -n libtsan-32bit -p /sbin/ldconfig
571 %postun -n libtsan-32bit -p /sbin/ldconfig
573 %package -n libatomic-32bit
574 Summary: The GNU Compiler Atomic Operations Runtime Library
575 License: GPL-3.0-with-GCC-exception
576 Group: Development/Languages
577 %description -n libatomic-32bit
578 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
579 %post -n libatomic-32bit -p /sbin/ldconfig
580 %postun -n libatomic-32bit -p /sbin/ldconfig
582 %package -n libcilkrts-32bit
583 Summary: The GNU Compiler Cilk+ Runtime Library
585 Group: Development/Languages
586 %description -n libcilkrts-32bit
587 The runtime library needed to run programs compiled with the
588 -fcilkplus option of the GNU Compiler Collection (GCC).
589 %post -n libcilkrts-32bit -p /sbin/ldconfig
590 %postun -n libcilkrts-32bit -p /sbin/ldconfig
592 %package -n libubsan-32bit
593 Summary: The GNU Compiler Undefined Sanitizer Runtime Library
595 Group: Development/Languages
596 %description -n libubsan-32bit
597 The runtime library needed to run programs compiled with the
598 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
599 %post -n libubsan-32bit -p /sbin/ldconfig
600 %postun -n libubsan-32bit -p /sbin/ldconfig
602 %package -n libvtv-32bit
603 Summary: The GNU Compiler Vtable Verifier Runtime Library
605 Group: Development/Languages
606 %description -n libvtv-32bit
607 The runtime library needed to run programs compiled with the
608 -fvtable-verify option of the GNU Compiler Collection (GCC).
609 %post -n libvtv-32bit -p /sbin/ldconfig
610 %postun -n libvtv-32bit -p /sbin/ldconfig
612 %package -n libffi-32bit
613 Summary: Foreign Function Interface library
614 License: BSD-3-Clause
615 Group: Development/Building
616 %description -n libffi-32bit
617 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.
618 %post -n libffi-32bit -p /sbin/ldconfig
619 %postun -n libffi-32bit -p /sbin/ldconfig
621 %package -n libffi-devel-32bit
622 Summary: Foreign Function Interface library development files
623 License: BSD 3-Clause
624 Group: Development/Building
625 %description -n libffi-devel-32bit
626 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.
629 Summary: GNU Go Compiler
631 Group: Development/Languages
632 %description go-32bit
633 This package contains a Go compiler and associated development
634 files based on the GNU GCC technology.
636 %package -n libgo-32bit
637 Summary: GNU Go compiler runtime library
638 License: BSD-3-Clause
639 Group: Development/Languages
640 %description -n libgo-32bit
641 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.
642 %post -n libgo-32bit -p /sbin/ldconfig
643 %postun -n libgo-32bit -p /sbin/ldconfig
645 %package plugin-devel
646 Summary: GNU GCC Plugin development files
648 Group: Development/Languages
649 %description plugin-devel
650 This package contains GCC Plugin development files needed for compiler
653 %package -n sanitizer-sources
654 Summary: Sanitizer family tools sources
656 Group: Development/Tools
659 %description -n sanitizer-sources
660 Sanitizer family tools sources for external tools.
664 %setup -q -n gcc-%{version}
670 ln -sf mpfr-3.1.5 mpfr
674 ln -sf isl-0.17.1 isl
676 echo "" > gcc/DEV-PHASE
678 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
684 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -marm -Wa,-mimplicit-it=arm -fno-omit-frame-pointer"
687 %{?esan:%gcc_unforce_options}
692 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'
693 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
695 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
696 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
698 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ */ /g'`
699 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
701 %ifarch armv7l armv7hl aarch64
702 %undefine gcc_profiledbootstrap
705 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
706 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
708 --prefix=%{_prefix} \
709 --infodir=%{_infodir} \
710 --mandir=%{_mandir} \
712 --libexecdir=%{libdir} \
713 --enable-languages=c,c++,fortran \
714 --enable-checking=release \
716 %{!?gcc_profiledbootstrap:--disable-bootstrap} \
721 --with-slibdir=%{libdir} \
724 --enable-__cxa_atexit \
725 --enable-libstdcxx-allocator=new \
726 --enable-version-specific-runtime-libs \
727 --enable-linker-build-id \
728 --without-system-libunwind \
729 --enable-threads=posix \
734 --enable-libgfortran \
735 %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
737 --with-arch=armv7-a \
738 --with-tune=cortex-a8 \
739 --disable-sjlj-exceptions \
742 --with-arch=armv7-a \
743 --with-tune=cortex-a8 \
744 --disable-sjlj-exceptions \
748 --with-arch=armv8-a \
749 --disable-sjlj-exceptions \
752 --with-arch-32=i586 \
753 --with-tune=generic \
757 --with-arch-32=i586 \
758 --with-tune=generic \
765 --with-arch=armv7-a \
766 --with-tune=cortex-a8 \
767 --disable-sjlj-exceptions \
770 --with-arch=armv7-a \
771 --with-tune=cortex-a8 \
772 --disable-sjlj-exceptions \
776 --with-arch=armv8-a \
777 --disable-sjlj-exceptions \
780 --disable-libgfortran \
781 --disable-libquadmath \
783 --disable-libatomic \
784 --disable-libstdc++-v3 \
785 --disable-libsanitizer \
788 --with-bugurl="http://bugs.tizen.org/" \
789 --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release}" \
790 --target=%{target_arch} \
791 --host=%{host_arch} \
794 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
797 # asan needs a whole shadow address space
798 ulimit -v unlimited || true
799 make -k check %{?_smp_mflags} || true
801 ../contrib/test_summary | tee ../testresults/test_summary.txt
807 make install DESTDIR=$RPM_BUILD_ROOT
810 cp `find . -name "*.sum"` ../testresults/
811 cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
812 chmod 644 ../testresults/*
816 rm -rf %{buildroot}/%{_datadir}/locale
818 #remove everything we don't need
819 rm -rf %{buildroot}/%{libsubdir}/install-tools
820 find %{buildroot}/ -name "*.la" -delete
823 ln -s gcc %{buildroot}%{_bindir}/cc
824 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
826 # expose plugins for ar (required for lto builds)
827 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
828 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
830 # legacy preprocessor
831 mkdir -p %{buildroot}/lib
832 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
834 # 32-bit libgcc in multilib configuration
836 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
839 # move libraries to libdir
840 for lib in asan atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan esan
842 [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
843 [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
848 rm -rf %{buildroot}/%{libsubdir}/include-fixed
849 rm -rf %{buildroot}/%{libsubdir}/include
854 tar -czf libsanitizer.tar.bz libsanitizer
855 mkdir -p %{buildroot}/src
856 mv -v libsanitizer.tar.bz %{buildroot}/src
860 %manifest gcc.manifest
861 %defattr(-,root,root)
873 %{_bindir}/gcc-ranlib
874 %{_bindir}/%{target_arch}-gcc
875 %{_bindir}/%{target_arch}-gcc-%{version}
876 %{_bindir}/%{target_arch}-gcc-ar
877 %{_bindir}/%{target_arch}-gcc-nm
878 %{_bindir}/%{target_arch}-gcc-ranlib
879 %{libsubdir}/collect2
881 %{libsubdir}/lto-wrapper
882 %{libsubdir}/liblto_plugin.so*
883 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
884 %{libsubdir}/include-fixed/*
885 %{libsubdir}/include/*.h
892 %ifarch %cilkrts_arch
893 %{libsubdir}/include/cilk/*
895 %{libsubdir}/include/sanitizer/*
897 %exclude %{libdir}/libasan.so
900 %exclude %{libdir}/liblsan.so
903 %exclude %{libdir}/libtsan.so
906 %exclude %{libdir}/libesan.so
910 %defattr(-,root,root)
914 %{_bindir}/%{target_arch}-g++
915 %{_bindir}/%{target_arch}-c++
918 %manifest gcc.manifest
919 %license COPYING3 COPYING.RUNTIME
920 %defattr(-,root,root)
921 %{libdir}/libstdc++.so.*
923 %files -n libstdc++-devel
924 %defattr(-,root,root)
925 %{libdir}/libstdc++.so
926 %{libdir}/libstdc++.a
927 %{libdir}/libsupc++.a
928 %{libsubdir}/include/c++/*
929 %{_datadir}/gcc-%{version}/python/libstdcxx/*
932 %manifest gcc.manifest
933 %license COPYING3 COPYING.RUNTIME
934 %defattr(-,root,root)
935 %{libdir}/libgcc_s.so.*
938 %manifest gcc.manifest
939 %license COPYING3 COPYING.RUNTIME
940 %defattr(-,root,root)
941 %{libdir}/libgomp.so.*
944 %manifest gcc.manifest
945 %defattr(-,root,root)
946 %{libdir}/libcc1.so.*
950 %manifest gcc.manifest
951 %license libsanitizer/LICENSE.TXT
952 %defattr(-,root,root)
953 %{libdir}/libasan.so*
958 %manifest gcc.manifest
959 %license libsanitizer/LICENSE.TXT
960 %defattr(-,root,root)
961 %{libdir}/liblsan.so*
966 %manifest gcc.manifest
967 %license libsanitizer/LICENSE.TXT
968 %defattr(-,root,root)
969 %{libdir}/libtsan.so*
974 %manifest gcc.manifest
975 %license libsanitizer/LICENSE.TXT
976 %defattr(-,root,root)
977 %{libdir}/libesan.so*
982 %manifest gcc.manifest
983 %license COPYING3 COPYING.RUNTIME
984 %defattr(-,root,root)
985 %{libdir}/libatomic.so.*
990 %manifest gcc.manifest
991 %license COPYING3 COPYING.RUNTIME
992 %defattr(-,root,root)
993 %{libdir}/libitm.so.*
996 %ifarch %cilkrts_arch
998 %manifest gcc.manifest
999 %defattr(-,root,root)
1000 %{libdir}/libcilkrts.so.*
1005 %manifest gcc.manifest
1006 %license libsanitizer/LICENSE.TXT
1007 %defattr(-,root,root)
1008 %{libdir}/libubsan.so.*
1012 %defattr(-,root,root)
1013 %dir %{libsubdir}/finclude
1015 %{_bindir}/%{target_arch}-gfortran
1017 %{libsubdir}/finclude/*
1018 %{libdir}/libgfortran.a
1019 %{libdir}/libgfortran.so
1020 %{libsubdir}/libgfortran.spec
1021 %{libsubdir}/libcaf_single.a
1022 %ifarch %quadmath_arch
1023 %{libdir}/libquadmath.a
1024 %{libdir}/libquadmath.so
1027 %files -n libgfortran
1028 %defattr(-,root,root)
1029 %{libdir}/libgfortran.so.*
1031 %ifarch %quadmath_arch
1032 %files -n libquadmath
1033 %manifest gcc.manifest
1034 %license COPYING.LIB
1035 %defattr(-,root,root)
1036 %{libdir}/libquadmath.so.*
1040 %defattr(-,root,root)
1046 %defattr(-,root,root)
1047 %{libsubdir}/plugin/*
1051 %defattr(-,root,root)
1052 %doc testresults/test_summary.txt
1053 %doc testresults/*.sum
1054 %doc testresults/*.log
1058 %defattr(-,root,root)
1059 %{libsubdir}/32/crt*
1061 %{libsubdir}/32/*.so
1063 %{libsubdir}/32/*.spec
1066 %files -n libasan-32bit
1067 %manifest gcc.manifest
1068 %license libsanitizer/LICENSE.TXT
1069 %defattr(-,root,root)
1070 %{libsubdir}/32/libasan.so.*
1074 %files -n liblsan-32bit
1075 %manifest gcc.manifest
1076 %license libsanitizer/LICENSE.TXT
1077 %defattr(-,root,root)
1078 %{libsubdir}/32/liblsan.so.*
1081 %ifarch %atomic_arch
1082 %files -n libatomic-32bit
1083 %manifest gcc.manifest
1084 %license COPYING3 COPYING.RUNTIME
1085 %defattr(-,root,root)
1086 %{libsubdir}/32/libatomic.so.*
1089 %ifarch %cilkrts_arch
1090 %files -n libcilkrts-32bit
1091 %defattr(-,root,root)
1092 %{libsubdir}/32/libcilkrts.so.*
1095 %files -n libgcc-32bit
1096 %manifest gcc.manifest
1097 %license COPYING3 COPYING.RUNTIME
1098 %defattr(-,root,root)
1099 %{libsubdir}/32/libgcc_s.so.*
1101 %files -n libgomp-32bit
1102 %manifest gcc.manifest
1103 %license COPYING3 COPYING.RUNTIME
1104 %defattr(-,root,root)
1105 %{libsubdir}/32/libgomp.so.*
1108 %files -n libitm-32bit
1109 %license COPYING3 COPYING.RUNTIME
1110 %defattr(-,root,root)
1111 %{libsubdir}/32/libitm.so.*
1114 %files -n libgfortran-32bit
1115 %defattr(-,root,root)
1116 %dir %{libsubdir}/32/finclude
1117 %{libsubdir}/32/libgfortran.so.*
1118 %{libsubdir}/32/finclude/*
1120 %ifarch %quadmath_arch
1121 %files -n libquadmath-32bit
1122 %license COPYING.LIB
1123 %defattr(-,root,root)
1124 %{libsubdir}/32/libquadmath.so.*
1128 %files -n libubsan-32bit
1129 %manifest gcc.manifest
1130 %license libsanitizer/LICENSE.TXT
1131 %defattr(-,root,root)
1132 %{libsubdir}/32/libubsan.so.*
1135 %files -n libstdc++-32bit
1136 %manifest gcc.manifest
1137 %license COPYING3 COPYING.RUNTIME
1138 %defattr(-,root,root)
1139 %{libsubdir}/32/libstdc++.so.*
1140 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1142 %files -n libstdc++-devel-32bit
1143 %defattr(-,root,root)
1144 %{libsubdir}/32/libstdc++.so.*-gdb.py
1147 %files -n sanitizer-sources
1148 %defattr(-,root,root,-)
1149 /src/libsanitizer.tar.bz