49f6edf3185ce724b6ecff2549b08f3fd9891044
[platform/upstream/linaro-gcc.git] / packaging / gcc-armv7hl.spec
1 %define cross armv7hl
2 %define armv7hl 1
3
4 #
5 # spec file for package gcc6
6 #
7 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
8 # Copyright (c) 2015 Tizen
9 #
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.
18
19 # Please submit bugfixes or comments via http://bugs.tizen.org/
20 #
21 # we use %%{?macro: ... } as it is more compact
22 %if 0%{?run_tests}
23 %define gcc_run_tests 1
24 %endif
25
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
35
36 %ifarch armv7l
37 %define ARCH armv7l
38 %define ABI eabi
39 %endif
40 %ifarch armv7hl
41 %define ARCH armv7hl
42 %define ABI eabihf
43 %endif
44 %ifarch %ix86
45 %define ARCH i586
46 %endif
47 %ifarch x86_64
48 %define ARCH x86_64
49 %endif
50 %ifarch aarch64
51 %define ARCH aarch64
52 %endif
53 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
54
55 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
56 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
57
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}
61
62 Name:         gcc%{?cross:-%{cross}}
63 # With generated files in src we could drop the following
64 BuildRequires: bison
65 BuildRequires: flex
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
71 %ifarch x86_64
72 BuildRequires: glibc-devel-32bit
73 %endif
74 BuildRequires: perl
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
80 BuildRequires: expect
81 BuildRequires: gdb
82 %endif
83 URL:           http://gcc.gnu.org/
84 Version:       6.2.1
85 Release:       0
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
94 License:       GPL-3.0+
95 %{?cross:ExcludeArch: %{cross}}
96 %description
97 Core package for the GNU Compiler Collection, including the C language
98 frontend.
99
100 %package c++
101 Summary:       The GNU C++ Compiler
102 License:       GPL-3.0+
103 Group:         Development/Languages
104 %description c++
105 This package contains the GNU compiler for C++.
106
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
115
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.
123
124 %package -n libgcc
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
132
133 %package -n libgomp
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
141 option.
142 %post -n libgomp -p /sbin/ldconfig
143 %postun -n libgomp -p /sbin/ldconfig
144
145 %package objc
146 Summary:       GNU Objective C Compiler
147 License:       GPL-3.0+
148 Group:         Development/Languages
149 %description objc
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.
153
154 %package -n libobjc
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
162
163 %package -n libcc1
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
171
172 %package obj-c++
173 Summary:       GNU Objective C++ Compiler
174 License:       GPL-3.0+
175 Group:         Development/Languages
176 %description obj-c++
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.
180
181 %package -n cpp
182 Summary:       The GCC Preprocessor
183 License:       GPL-3.0+
184 Group:         Development/Languages
185 %description -n cpp
186 This Package contains just the preprocessor that is used by the X11
187 packages.
188
189 %package ada
190 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
191 License:       GPL-3.0+
192 Group:         Development/Languages
193 %description ada
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.
198
199 %package -n libada
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
212
213 %package fortran
214 Summary:       The GNU Fortran Compiler and Support Files
215 License:       GPL-3.0+
216 Group:         Development/Languages
217 %description fortran
218 This is the Fortran compiler of the GNU Compiler Collection (GCC).
219
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
229
230 %package -n libquadmath
231 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
232 License:       LGPL-2.1
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
237 operations.
238 %post -n libquadmath -p /sbin/ldconfig
239 %postun -n libquadmath -p /sbin/ldconfig
240
241 %package -n libitm
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
250
251 %package -n libasan
252 Summary:       The GNU Compiler Address Sanitizer Runtime Library
253 License:       MIT
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
260
261 %package -n libtsan
262 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
263 License:       MIT
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
270
271 %package -n libesan
272 Summary:       The GNU Compiler Efficciency Sanitier Runtime Library
273 License:       MIT
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
280
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
289
290 %package -n libcilkrts
291 Summary:       The GNU Compiler Cilk+ Runtime Library
292 License:       MIT
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
299
300 %package -n liblsan
301 Summary:       The GNU Compiler Leak Sanitizer Runtime Library
302 License:       MIT
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
309
310 %package -n libubsan
311 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
312 License:       MIT
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
319
320 %package -n libvtv
321 Summary:       The GNU Compiler Vtable Verifier Runtime Library
322 License:       MIT
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
329
330 %package -n libgcj
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
339
340 %package java
341 Summary:       The GNU Java Compiler
342 License:       GPL-3.0+
343 Group:         Development/Languages
344 %description java
345 The Java compiler from the GCC-tools-suite.
346
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
355 libgcj.so changes.
356
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.
363
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.
371
372 %package -n gcc-gij
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.
378
379 %package -n libffi
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
387
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.
394
395 %package go
396 Summary:       GNU Go Compiler
397 License:       GPL-3.0+
398 Group:         Development/Languages
399 %description go
400 This package contains a Go compiler and associated development
401 files based on the GNU GCC technology.
402
403 %package -n libgo
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
411
412 %package testresults
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.
418
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.
424
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.
432
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
441
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
450 option.
451 %post -n libgomp-32bit -p /sbin/ldconfig
452 %postun -n libgomp-32bit -p /sbin/ldconfig
453
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
462
463 %package objc-32bit
464 Summary:       GNU Objective C Compiler
465 License:       GPL-3.0+
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.
471
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
480
481 %package ada-32bit
482 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
483 License:       GPL-3.0+
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.
490
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
504
505 %package fortran-32bit
506 Summary:       The GNU Fortran Compiler and Support Files
507 License:       GPL-3.0+
508 Group:         Development/Languages
509 %description fortran-32bit
510 This is the Fortran compiler of the GNU Compiler Collection (GCC).
511
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
521
522 %package -n libquadmath-32bit
523 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
524 License:       LGPL-2.1
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
529 operations.
530 %post -n libquadmath-32bit -p /sbin/ldconfig
531 %postun -n libquadmath-32bit -p /sbin/ldconfig
532
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
542
543 %package -n libasan-32bit
544 Summary:       The GNU Compiler Address Sanitizer Runtime Library
545 License:       MIT
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
552
553 %package -n liblsan-32bit
554 Summary:       The GNU Compiler Address Sanitizer Runtime Library
555 License:       MIT
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
562
563 %package -n libtsan-32bit
564 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
565 License:       MIT
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
572
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
581
582 %package -n libcilkrts-32bit
583 Summary:       The GNU Compiler Cilk+ Runtime Library
584 License:       MIT
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
591
592 %package -n libubsan-32bit
593 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
594 License:       MIT
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
601
602 %package -n libvtv-32bit
603 Summary:       The GNU Compiler Vtable Verifier Runtime Library
604 License:       MIT
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
611
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
620
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.
627
628 %package go-32bit
629 Summary:       GNU Go Compiler
630 License:       GPL-3.0+
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.
635
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
644
645 %package plugin-devel
646 Summary:       GNU GCC Plugin development files
647 License:       GPL-3.0+
648 Group:         Development/Languages
649 %description plugin-devel
650 This package contains GCC Plugin development files needed for compiler
651 plugins build.
652
653 %package -n sanitizer-sources
654 Summary:    Sanitizer family tools sources
655 License:       MIT
656 Group:      Development/Tools
657 BuildArch:  noarch
658
659 %description -n sanitizer-sources
660 Sanitizer family tools sources for external tools.
661
662 %prep
663
664 %setup -q -n gcc-%{version}
665 cp %{SOURCE20} .
666
667 tar xf %{SOURCE10}
668 ln -sf gmp-6.1.1 gmp
669 tar xf %{SOURCE11}
670 ln -sf mpfr-3.1.5 mpfr
671 tar xf %{SOURCE12}
672 ln -sf mpc-1.0.3 mpc
673 tar xf %{SOURCE13}
674 ln -sf isl-0.17.1 isl
675
676 echo "" > gcc/DEV-PHASE
677
678 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
679
680 %build
681 %{?asan:
682 %gcc_unforce_options
683 %ifarch armv7l
684 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -marm -Wa,-mimplicit-it=arm -fno-omit-frame-pointer"
685 %endif
686 }
687 %{?esan:%gcc_unforce_options}
688 rm -rf obj
689 mkdir obj
690 cd obj
691
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"`
694 %{?cross:
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'`
697 }
698 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  */ /g'`
699 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
700
701 %ifarch armv7l armv7hl aarch64
702 %undefine gcc_profiledbootstrap
703 %endif
704
705 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
706 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
707 ../configure \
708         --prefix=%{_prefix} \
709         --infodir=%{_infodir} \
710         --mandir=%{_mandir} \
711         --libdir=%{libdir} \
712         --libexecdir=%{libdir} \
713         --enable-languages=c,c++,fortran \
714         --enable-checking=release \
715         --disable-libssp \
716         %{!?gcc_profiledbootstrap:--disable-bootstrap} \
717         --disable-libvtv \
718         --enable-plugin \
719         --disable-libcc1 \
720         --disable-libgcj \
721         --with-slibdir=%{libdir} \
722         --with-system-zlib \
723         --with-sysroot=/ \
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 \
730         --disable-multilib \
731         --enable-lto \
732 %{!?cross: \
733         --enable-libcc1 \
734         --enable-libgfortran \
735         %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
736 %ifarch armv7l
737         --with-arch=armv7-a \
738         --with-tune=cortex-a8 \
739         --disable-sjlj-exceptions \
740 %endif
741 %ifarch armv7hl
742         --with-arch=armv7-a \
743         --with-tune=cortex-a8 \
744         --disable-sjlj-exceptions \
745         --with-float=hard \
746 %endif
747 %ifarch aarch64
748         --with-arch=armv8-a \
749         --disable-sjlj-exceptions \
750 %endif
751 %ifarch %ix86
752         --with-arch-32=i586 \
753         --with-tune=generic \
754         --disable-libmpx \
755 %endif
756 %ifarch x86_64
757         --with-arch-32=i586 \
758         --with-tune=generic \
759         --enable-multilib \
760         --disable-libmpx \
761 %endif
762 } \
763 %{?cross: \
764 %{?armv7l: \
765         --with-arch=armv7-a \
766         --with-tune=cortex-a8 \
767         --disable-sjlj-exceptions \
768 } \
769 %{?armv7hl: \
770         --with-arch=armv7-a \
771         --with-tune=cortex-a8 \
772         --disable-sjlj-exceptions \
773         --with-float=hard \
774 } \
775 %{?aarch64: \
776         --with-arch=armv8-a \
777         --disable-sjlj-exceptions \
778 } \
779         --disable-libgcc \
780         --disable-libgfortran \
781         --disable-libquadmath \
782         --disable-libgomp \
783         --disable-libatomic \
784         --disable-libstdc++-v3 \
785         --disable-libsanitizer \
786         --disable-libitm \
787 } \
788         --with-bugurl="http://bugs.tizen.org/" \
789         --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release}" \
790         --target=%{target_arch} \
791         --host=%{host_arch} \
792         --build=%{host_arch}
793
794 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
795 %{?gcc_run_tests:
796   echo "Run testsuite"
797   # asan needs a whole shadow address space
798   ulimit -v unlimited || true
799   make -k check %{?_smp_mflags} || true
800   mkdir ../testresults
801   ../contrib/test_summary | tee ../testresults/test_summary.txt
802 }
803
804 %install
805 cd obj
806
807 make install DESTDIR=$RPM_BUILD_ROOT
808
809 %{?gcc_run_tests:
810   cp `find . -name "*.sum"` ../testresults/
811   cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
812   chmod 644 ../testresults/*
813 }
814
815 %{remove_docs}
816 rm -rf %{buildroot}/%{_datadir}/locale
817
818 #remove everything we don't need
819 rm -rf %{buildroot}/%{libsubdir}/install-tools
820 find %{buildroot}/ -name "*.la" -delete
821
822 %{!?cross:
823 ln -s gcc %{buildroot}%{_bindir}/cc
824 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
825
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
829
830 # legacy preprocessor
831 mkdir -p %{buildroot}/lib
832 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
833
834 # 32-bit libgcc in multilib configuration
835 %ifarch x86_64
836 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
837 %endif
838
839 # move libraries to libdir
840 for lib in asan atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan esan
841 do
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}/
844 done
845 }
846
847 %{?cross:
848 rm -rf %{buildroot}/%{libsubdir}/include-fixed
849 rm -rf %{buildroot}/%{libsubdir}/include
850 }
851
852 %{!?cross:
853 cd ../
854 tar -czf libsanitizer.tar.bz libsanitizer
855 mkdir -p %{buildroot}/src
856 mv -v libsanitizer.tar.bz %{buildroot}/src
857 }
858
859 %files
860 %manifest gcc.manifest
861 %defattr(-,root,root)
862 %{?cross:
863 %{_bindir}/*
864 %{libsubdir}/*
865 }
866 %{!?cross:
867 %{_bindir}/gcc
868 %{_bindir}/cc
869 %{_bindir}/gcov
870 %{_bindir}/gcov-tool
871 %{_bindir}/gcc-ar
872 %{_bindir}/gcc-nm
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
880 %{libsubdir}/lto1
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
886 %{libsubdir}/*.a
887 %{libsubdir}/*.so
888 %{libsubdir}/*.o
889 %{libsubdir}/*.spec
890 %{libdir}/*.so
891 %{libdir}/*.a
892 %ifarch %cilkrts_arch
893 %{libsubdir}/include/cilk/*
894 %endif
895 %{libsubdir}/include/sanitizer/*
896 %ifarch %asan_arch
897 %exclude %{libdir}/libasan.so
898 %endif
899 %ifarch %lsan_arch
900 %exclude %{libdir}/liblsan.so
901 %endif
902 %ifarch %tsan_arch
903 %exclude %{libdir}/libtsan.so
904 %endif
905 %ifarch %esan_arch
906 %exclude %{libdir}/libesan.so
907 %endif
908
909 %files c++
910 %defattr(-,root,root)
911 %{libsubdir}/cc1plus
912 %{_bindir}/g++
913 %{_bindir}/c++
914 %{_bindir}/%{target_arch}-g++
915 %{_bindir}/%{target_arch}-c++
916
917 %files -n libstdc++
918 %manifest gcc.manifest
919 %license COPYING3 COPYING.RUNTIME
920 %defattr(-,root,root)
921 %{libdir}/libstdc++.so.*
922
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/*
930
931 %files -n libgcc
932 %manifest gcc.manifest
933 %license COPYING3 COPYING.RUNTIME
934 %defattr(-,root,root)
935 %{libdir}/libgcc_s.so.*
936
937 %files -n libgomp
938 %manifest gcc.manifest
939 %license COPYING3 COPYING.RUNTIME
940 %defattr(-,root,root)
941 %{libdir}/libgomp.so.*
942
943 %files -n libcc1
944 %manifest gcc.manifest
945 %defattr(-,root,root)
946 %{libdir}/libcc1.so.*
947
948 %ifarch %asan_arch
949 %files -n libasan
950 %manifest gcc.manifest
951 %license libsanitizer/LICENSE.TXT
952 %defattr(-,root,root)
953 %{libdir}/libasan.so*
954 %endif
955
956 %ifarch %lsan_arch
957 %files -n liblsan
958 %manifest gcc.manifest
959 %license libsanitizer/LICENSE.TXT
960 %defattr(-,root,root)
961 %{libdir}/liblsan.so*
962 %endif
963
964 %ifarch %tsan_arch
965 %files -n libtsan
966 %manifest gcc.manifest
967 %license libsanitizer/LICENSE.TXT
968 %defattr(-,root,root)
969 %{libdir}/libtsan.so*
970 %endif
971
972 %ifarch %esan_arch
973 %files -n libesan
974 %manifest gcc.manifest
975 %license libsanitizer/LICENSE.TXT
976 %defattr(-,root,root)
977 %{libdir}/libesan.so*
978 %endif
979
980 %ifarch %atomic_arch
981 %files -n libatomic
982 %manifest gcc.manifest
983 %license COPYING3 COPYING.RUNTIME
984 %defattr(-,root,root)
985 %{libdir}/libatomic.so.*
986 %endif
987
988 %ifarch %itm_arch
989 %files -n libitm
990 %manifest gcc.manifest
991 %license COPYING3 COPYING.RUNTIME
992 %defattr(-,root,root)
993 %{libdir}/libitm.so.*
994 %endif
995
996 %ifarch %cilkrts_arch
997 %files -n libcilkrts
998 %manifest gcc.manifest
999 %defattr(-,root,root)
1000 %{libdir}/libcilkrts.so.*
1001 %endif
1002
1003 %ifarch %ubsan_arch
1004 %files -n libubsan
1005 %manifest gcc.manifest
1006 %license libsanitizer/LICENSE.TXT
1007 %defattr(-,root,root)
1008 %{libdir}/libubsan.so.*
1009 %endif
1010
1011 %files fortran
1012 %defattr(-,root,root)
1013 %dir %{libsubdir}/finclude
1014 %{_bindir}/gfortran
1015 %{_bindir}/%{target_arch}-gfortran
1016 %{libsubdir}/f951
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
1025 %endif
1026
1027 %files -n libgfortran
1028 %defattr(-,root,root)
1029 %{libdir}/libgfortran.so.*
1030
1031 %ifarch %quadmath_arch
1032 %files -n libquadmath
1033 %manifest gcc.manifest
1034 %license COPYING.LIB
1035 %defattr(-,root,root)
1036 %{libdir}/libquadmath.so.*
1037 %endif
1038
1039 %files -n cpp
1040 %defattr(-,root,root)
1041 %{_bindir}/cpp
1042 %{libsubdir}/cc1
1043 /lib/cpp
1044
1045 %files plugin-devel
1046 %defattr(-,root,root)
1047 %{libsubdir}/plugin/*
1048
1049 %{?gcc_run_tests:
1050 %files testresults
1051 %defattr(-,root,root)
1052 %doc testresults/test_summary.txt
1053 %doc testresults/*.sum
1054 %doc testresults/*.log
1055 }
1056 %ifarch x86_64
1057 %files -n gcc-32bit
1058 %defattr(-,root,root)
1059 %{libsubdir}/32/crt*
1060 %{libsubdir}/32/*.a
1061 %{libsubdir}/32/*.so
1062 %{libsubdir}/32/*.o
1063 %{libsubdir}/32/*.spec
1064
1065 %ifarch %asan_arch
1066 %files -n libasan-32bit
1067 %manifest gcc.manifest
1068 %license libsanitizer/LICENSE.TXT
1069 %defattr(-,root,root)
1070 %{libsubdir}/32/libasan.so.*
1071 %endif
1072
1073 %ifarch %lsan_arch
1074 %files -n liblsan-32bit
1075 %manifest gcc.manifest
1076 %license libsanitizer/LICENSE.TXT
1077 %defattr(-,root,root)
1078 %{libsubdir}/32/liblsan.so.*
1079 %endif
1080
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.*
1087 %endif
1088
1089 %ifarch %cilkrts_arch
1090 %files -n libcilkrts-32bit
1091 %defattr(-,root,root)
1092 %{libsubdir}/32/libcilkrts.so.*
1093 %endif
1094
1095 %files -n libgcc-32bit
1096 %manifest gcc.manifest
1097 %license COPYING3 COPYING.RUNTIME
1098 %defattr(-,root,root)
1099 %{libsubdir}/32/libgcc_s.so.*
1100
1101 %files -n libgomp-32bit
1102 %manifest gcc.manifest
1103 %license COPYING3 COPYING.RUNTIME
1104 %defattr(-,root,root)
1105 %{libsubdir}/32/libgomp.so.*
1106
1107 %ifarch %itm_arch
1108 %files -n libitm-32bit
1109 %license COPYING3 COPYING.RUNTIME
1110 %defattr(-,root,root)
1111 %{libsubdir}/32/libitm.so.*
1112 %endif
1113
1114 %files -n libgfortran-32bit
1115 %defattr(-,root,root)
1116 %dir %{libsubdir}/32/finclude
1117 %{libsubdir}/32/libgfortran.so.*
1118 %{libsubdir}/32/finclude/*
1119
1120 %ifarch %quadmath_arch
1121 %files -n libquadmath-32bit
1122 %license COPYING.LIB
1123 %defattr(-,root,root)
1124 %{libsubdir}/32/libquadmath.so.*
1125 %endif
1126
1127 %ifarch %ubsan_arch
1128 %files -n libubsan-32bit
1129 %manifest gcc.manifest
1130 %license libsanitizer/LICENSE.TXT
1131 %defattr(-,root,root)
1132 %{libsubdir}/32/libubsan.so.*
1133 %endif
1134
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
1141
1142 %files -n libstdc++-devel-32bit
1143 %defattr(-,root,root)
1144 %{libsubdir}/32/libstdc++.so.*-gdb.py
1145 %endif
1146
1147 %files -n sanitizer-sources
1148 %defattr(-,root,root,-)
1149 /src/libsanitizer.tar.bz
1150
1151 }
1152
1153 %changelog