packaging: Add -marm and -fno-omit-frame-pointer
[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 asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
29 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
30 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
31 %define lsan_arch x86_64 %ix86 %arm aarch64
32 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64
33 %define cilkrts_arch x86_64 %ix86
34
35 %ifarch armv7l
36 %define ARCH armv7l
37 %define ABI eabi
38 %endif
39 %ifarch armv7hl
40 %define ARCH armv7hl
41 %define ABI eabihf
42 %endif
43 %ifarch %ix86
44 %define ARCH i586
45 %endif
46 %ifarch x86_64
47 %define ARCH x86_64
48 %endif
49 %ifarch aarch64
50 %define ARCH aarch64
51 %endif
52 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
53
54 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
55 %define target_abi %{?cross:%{?armv7l:eabi}%{?armv7hl:eabihf}}%{!?cross:%{?ABI}}
56
57 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
58 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
59 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
60
61 Name:         gcc%{?cross:-%{cross}}
62 # With generated files in src we could drop the following
63 BuildRequires: bison
64 BuildRequires: flex
65 BuildRequires: gettext-devel
66 BuildRequires: makeinfo
67 ## until here, but at least renaming and patching info files breaks this
68 BuildRequires: gcc-c++
69 BuildRequires: zlib-devel
70 %ifarch x86_64
71 BuildRequires: glibc-devel-32bit
72 %endif
73 BuildRequires: perl
74 %{?cross:BuildRequires: binutils-%{cross}}
75 # here we use %%if because OBS spec parser cannot expand
76 # %%{?macro:...} correctly
77 %if 0%{?gcc_run_tests}
78 BuildRequires: dejagnu
79 BuildRequires: expect
80 BuildRequires: gdb
81 %endif
82 URL:           http://gcc.gnu.org/
83 Version:       6.2.1
84 Release:       0
85 Source:        gcc-%{version}.tar.bz2
86 Source10: gmp-6.1.1.tar.bz2
87 Source11: mpfr-3.1.5.tar.bz2
88 Source12: mpc-1.0.3.tar.gz
89 Source13: isl-0.17.1.tar.bz2
90 Source20: gcc.manifest
91 Group:         Development/Building
92 Summary:       The GNU C Compiler and Support Files
93 License:       GPL-3.0+
94 %{?cross:ExcludeArch: %{cross}}
95 %description
96 Core package for the GNU Compiler Collection, including the C language
97 frontend.
98
99 %package c++
100 Summary:       The GNU C++ Compiler
101 License:       GPL-3.0+
102 Group:         Development/Languages
103 %description c++
104 This package contains the GNU compiler for C++.
105
106 %package -n libstdc++
107 Summary:       The standard C++ shared library
108 License:       GPL-3.0-with-GCC-exception
109 Group:         Development/Building
110 %description -n libstdc++
111 The standard C++ library, needed for dynamically linked C++ programs.
112 %post -n libstdc++ -p /sbin/ldconfig
113 %postun -n libstdc++ -p /sbin/ldconfig
114
115 %package -n libstdc++-devel
116 Summary:       Include Files and Libraries mandatory for Development
117 License:       GPL-3.0-with-GCC-exception
118 Group:         Development/Building
119 %description -n libstdc++-devel
120 This package contains all the headers and libraries of the standard C++
121 library. It is needed for compiling C++ code.
122
123 %package -n libgcc
124 Summary:       C compiler runtime library
125 License:       GPL-3.0-with-GCC-exception
126 Group:         Development/Building
127 %description -n libgcc
128 Libgcc is needed for dynamically linked C programs.
129 %post -n libgcc -p /sbin/ldconfig
130 %postun -n libgcc -p /sbin/ldconfig
131
132 %package -n libgomp
133 Summary:       The GNU compiler collection OpenMP runtime library
134 License:       GPL-3.0-with-GCC-exception
135 Group:         Development/Building
136 %description -n libgomp
137 This is the OpenMP runtime library needed by OpenMP enabled programs
138 that were built with the -fopenmp compiler option and by programs that
139 were auto-parallelized via the -ftree-parallelize-loops compiler
140 option.
141 %post -n libgomp -p /sbin/ldconfig
142 %postun -n libgomp -p /sbin/ldconfig
143
144 %package objc
145 Summary:       GNU Objective C Compiler
146 License:       GPL-3.0+
147 Group:         Development/Languages
148 %description objc
149 This package contains the GNU Objective C compiler. Objective C is an
150 object oriented language, created by Next Inc. and used in their
151 Nextstep OS. The source code is available in the gcc package.
152
153 %package -n libobjc
154 Summary:       Library for the GNU Objective C Compiler
155 License:       GPL-3.0-with-GCC-exception
156 Group:         Development/Building
157 %description -n libobjc
158 The library for the GNU Objective C compiler.
159 %post -n libobjc -p /sbin/ldconfig
160 %postun -n libobjc -p /sbin/ldconfig
161
162 %package -n libcc1
163 Summary:       GNU C Compiler plugin for GDB
164 License:       GPL-3.0-with-GCC-exception
165 Group:         Development/Building
166 %description -n libcc1
167 The GCC plugin for GDB
168 %post -n libcc1 -p /sbin/ldconfig
169 %postun -n libcc1 -p /sbin/ldconfig
170
171 %package obj-c++
172 Summary:       GNU Objective C++ Compiler
173 License:       GPL-3.0+
174 Group:         Development/Languages
175 %description obj-c++
176 This package contains the GNU Objective C++ compiler. Objective C++ is an
177 object oriented language, created by Next Inc. and used in their
178 Nextstep OS. The source code is available in the gcc package.
179
180 %package -n cpp
181 Summary:       The GCC Preprocessor
182 License:       GPL-3.0+
183 Group:         Development/Languages
184 %description -n cpp
185 This Package contains just the preprocessor that is used by the X11
186 packages.
187
188 %package ada
189 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
190 License:       GPL-3.0+
191 Group:         Development/Languages
192 %description ada
193 This package contains an Ada95 compiler and associated development
194 tools based on the GNU GCC technology. Ada95 is the object oriented
195 successor of the Ada83 language. To build this package from source you
196 must have installed a binary version to bootstrap the compiler.
197
198 %package -n libada
199 Summary:      GNU Ada Runtime Libraries
200 License:      GPL-3.0-with-GCC-exception
201 Group:        Development/Languages
202 %description -n libada
203 This package contains the shared libraries required to run programs
204 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
205 shared libraries. It also contains the shared libraries for the
206 Implementation of the Ada Semantic Interface Specification (ASIS), the
207 implementation of Distributed Systems Programming (GLADE) and the Posix
208 1003.5 Binding (Florist).
209 %post -n libada -p /sbin/ldconfig
210 %postun -n libada -p /sbin/ldconfig
211
212 %package fortran
213 Summary:       The GNU Fortran Compiler and Support Files
214 License:       GPL-3.0+
215 Group:         Development/Languages
216 %description fortran
217 This is the Fortran compiler of the GNU Compiler Collection (GCC).
218
219 %package -n libgfortran
220 Summary:       The GNU Fortran Compiler Runtime Library
221 License:       GPL-3.0-with-GCC-exception
222 Group:         Development/Languages
223 %description -n libgfortran
224 The runtime library needed to run programs compiled with the Fortran compiler
225 of the GNU Compiler Collection (GCC).
226 %post -n libgfortran -p /sbin/ldconfig
227 %postun -n libgfortran -p /sbin/ldconfig
228
229 %package -n libquadmath
230 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
231 License:       LGPL-2.1
232 Group:         Development/Languages
233 %description -n libquadmath
234 The runtime library needed to run programs compiled with the Fortran compiler
235 of the GNU Compiler Collection (GCC) and quadruple precision floating point
236 operations.
237 %post -n libquadmath -p /sbin/ldconfig
238 %postun -n libquadmath -p /sbin/ldconfig
239
240 %package -n libitm
241 Summary:       The GNU Compiler Transactional Memory Runtime Library
242 License:       GPL-3.0-with-GCC-exception
243 Group:         Development/Languages
244 %description -n libitm
245 The runtime library needed to run programs compiled with the
246 -fgnu-tm option of the GNU Compiler Collection (GCC).
247 %post -n libitm -p /sbin/ldconfig
248 %postun -n libitm -p /sbin/ldconfig
249
250 %package -n libasan
251 Summary:       The GNU Compiler Address Sanitizer Runtime Library
252 License:       MIT
253 Group:         Development/Languages
254 %description -n libasan
255 The runtime library needed to run programs compiled with the
256 -fsanitize=address option of the GNU Compiler Collection (GCC).
257 %post -n libasan -p /sbin/ldconfig
258 %postun -n libasan -p /sbin/ldconfig
259
260 %package -n libtsan
261 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
262 License:       MIT
263 Group:         Development/Languages
264 %description -n libtsan
265 The runtime library needed to run programs compiled with the
266 -fsanitize=thread option of the GNU Compiler Collection (GCC).
267 %post -n libtsan -p /sbin/ldconfig
268 %postun -n libtsan -p /sbin/ldconfig
269
270 %package -n libatomic
271 Summary:       The GNU Compiler Atomic Operations Runtime Library
272 License:       GPL-3.0-with-GCC-exception
273 Group:         Development/Languages
274 %description -n libatomic
275 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
276 %post -n libatomic -p /sbin/ldconfig
277 %postun -n libatomic -p /sbin/ldconfig
278
279 %package -n libcilkrts
280 Summary:       The GNU Compiler Cilk+ Runtime Library
281 License:       MIT
282 Group:         Development/Languages
283 %description -n libcilkrts
284 The runtime library needed to run programs compiled with the
285 -fcilkplus option of the GNU Compiler Collection (GCC).
286 %post -n libcilkrts -p /sbin/ldconfig
287 %postun -n libcilkrts -p /sbin/ldconfig
288
289 %package -n liblsan
290 Summary:       The GNU Compiler Leak Sanitizer Runtime Library
291 License:       MIT
292 Group:         Development/Languages
293 %description -n liblsan
294 The runtime library needed to run programs compiled with the
295 -fsanitize=leak option of the GNU Compiler Collection (GCC).
296 %post -n liblsan -p /sbin/ldconfig
297 %postun -n liblsan -p /sbin/ldconfig
298
299 %package -n libubsan
300 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
301 License:       MIT
302 Group:         Development/Languages
303 %description -n libubsan
304 The runtime library needed to run programs compiled with the
305 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
306 %post -n libubsan -p /sbin/ldconfig
307 %postun -n libubsan -p /sbin/ldconfig
308
309 %package -n libvtv
310 Summary:       The GNU Compiler Vtable Verifier Runtime Library
311 License:       MIT
312 Group:         Development/Languages
313 %description -n libvtv
314 The runtime library needed to run programs compiled with the
315 -fvtable-verify option of the GNU Compiler Collection (GCC).
316 %post -n libvtv -p /sbin/ldconfig
317 %postun -n libvtv -p /sbin/ldconfig
318
319 %package -n libgcj
320 Summary:       Java Runtime Library for gcc
321 License:       GPL-2.0-with-classpath-exception
322 Group:         Development/Building
323 %description -n libgcj
324 This library is needed if you want to use the GNU Java compiler, gcj.
325 Source code for this package is in gcc.
326 %post -n libgcj -p /sbin/ldconfig
327 %postun -n libgcj -p /sbin/ldconfig
328
329 %package java
330 Summary:       The GNU Java Compiler
331 License:       GPL-3.0+
332 Group:         Development/Languages
333 %description java
334 The Java compiler from the GCC-tools-suite.
335
336 %package -n libgcj_bc
337 Summary:       Fake library for BC-ABI compatibility.
338 License:       GPL-2.0-with-classpath-exception
339 Group:         Development/Languages
340 %description -n libgcj_bc
341 A fake library that is used at link time only. It ensures that
342 binaries built with the BC-ABI link against a constant SONAME.
343 This way, BC-ABI binaries continue to work if the SONAME underlying
344 libgcj.so changes.
345
346 %package -n libgcj-jar
347 Summary:       Java runtime library (jar files).
348 License:       GPL-2.0-with-classpath-exception
349 Group:         Development/Languages
350 %description -n libgcj-jar
351 These are the jar files that go along with the gcj front end to gcc.
352
353 %package -n libgcj-devel
354 Summary:       Include Files and Libraries mandatory for Development.
355 License:       GPL-2.0-with-classpath-exception
356 Group:         Development/Languages
357 %description -n libgcj-devel
358 This package contains all necessary include files and libraries needed
359 to develop applications that require these.
360
361 %package -n gcc-gij
362 Summary:       Java Bytecode Interpreter for gcc
363 License:       GPL-2.0-with-classpath-exception
364 Group:         Development/Languages
365 %description -n gcc-gij
366 This package contains the java bytecode interpreter gij and related tools.
367
368 %package -n libffi
369 Summary:       Foreign Function Interface library
370 License:       BSD-3-Clause
371 Group:         Development/Building
372 %description -n libffi
373 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.
374 %post -n libffi -p /sbin/ldconfig
375 %postun -n libffi -p /sbin/ldconfig
376
377 %package -n libffi-devel
378 Summary:       Foreign Function Interface library development files
379 License:       BSD 3-Clause
380 Group:         Development/Building
381 %description -n libffi-devel
382 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.
383
384 %package go
385 Summary:       GNU Go Compiler
386 License:       GPL-3.0+
387 Group:         Development/Languages
388 %description go
389 This package contains a Go compiler and associated development
390 files based on the GNU GCC technology.
391
392 %package -n libgo
393 Summary:       GNU Go compiler runtime library
394 License:       BSD-3-Clause
395 Group:         Development/Languages
396 %description -n libgo
397 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.
398 %post -n libgo -p /sbin/ldconfig
399 %postun -n libgo -p /sbin/ldconfig
400
401 %package testresults
402 Summary:       Testsuite results
403 License:       SUSE-Public-Domain
404 Group:         Development/Languages
405 %description testresults
406 Results from running the gcc and target library testsuites.
407
408 %package -n gcc-32bit
409 Summary:       The GNU C Compiler 32bit support
410 Group:         Development/Building
411 %description -n gcc-32bit
412 This package contains 32bit support for the GNU Compiler Collection.
413
414 %package -n libstdc++-devel-32bit
415 Summary:       Include Files and Libraries mandatory for Development
416 License:       GPL-3.0-with-GCC-exception
417 Group:         Development/Building
418 %description -n libstdc++-devel-32bit
419 This package contains all the headers and libraries of the standard C++
420 library. It is needed for compiling C++ code.
421
422 %package -n libgcc-32bit
423 Summary:       C compiler runtime library
424 License:       GPL-3.0-with-GCC-exception
425 Group:         Development/Building
426 %description -n libgcc-32bit
427 Libgcc is needed for dynamically linked C programs.
428 %post -n libgcc-32bit -p /sbin/ldconfig
429 %postun -n libgcc-32bit -p /sbin/ldconfig
430
431 %package -n libgomp-32bit
432 Summary:       The GNU compiler collection OpenMP runtime library
433 License:       GPL-3.0-with-GCC-exception
434 Group:         Development/Building
435 %description -n libgomp-32bit
436 This is the OpenMP runtime library needed by OpenMP enabled programs
437 that were built with the -fopenmp compiler option and by programs that
438 were auto-parallelized via the -ftree-parallelize-loops compiler
439 option.
440 %post -n libgomp-32bit -p /sbin/ldconfig
441 %postun -n libgomp-32bit -p /sbin/ldconfig
442
443 %package -n libstdc++-32bit
444 Summary:       The standard C++ shared library
445 License:       GPL-3.0-with-GCC-exception
446 Group:         Development/Building
447 %description -n libstdc++-32bit
448 The standard C++ library, needed for dynamically linked C++ programs.
449 %post -n libstdc++-32bit -p /sbin/ldconfig
450 %postun -n libstdc++-32bit -p /sbin/ldconfig
451
452 %package objc-32bit
453 Summary:       GNU Objective C Compiler
454 License:       GPL-3.0+
455 Group:         Development/Languages
456 %description objc-32bit
457 This package contains the GNU Objective C compiler. Objective C is an
458 object oriented language, created by Next Inc. and used in their
459 Nextstep OS. The source code is available in the gcc package.
460
461 %package -n libobjc-32bit
462 Summary:       Library for the GNU Objective C Compiler
463 License:       GPL-3.0-with-GCC-exception
464 Group:         Development/Building
465 %description -n libobjc-32bit
466 The library for the GNU Objective C compiler.
467 %post -n libobjc-32bit -p /sbin/ldconfig
468 %postun -n libobjc-32bit -p /sbin/ldconfig
469
470 %package ada-32bit
471 Summary:       GNU Ada95 Compiler Based on GCC (GNAT)
472 License:       GPL-3.0+
473 Group:         Development/Languages
474 %description ada-32bit
475 This package contains an Ada95 compiler and associated development
476 tools based on the GNU GCC technology. Ada95 is the object oriented
477 successor of the Ada83 language. To build this package from source you
478 must have installed a binary version to bootstrap the compiler.
479
480 %package -n libada-32bit
481 Summary:       GNU Ada Runtime Libraries
482 License:       GPL-3.0-with-GCC-exception
483 Group:         Development/Languages
484 %description -n libada-32bit
485 This package contains the shared libraries required to run programs
486 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
487 shared libraries. It also contains the shared libraries for the
488 Implementation of the Ada Semantic Interface Specification (ASIS), the
489 implementation of Distributed Systems Programming (GLADE) and the Posix
490 1003.5 Binding (Florist).
491 %post -n libada-32bit -p /sbin/ldconfig
492 %postun -n libada-32bit -p /sbin/ldconfig
493
494 %package fortran-32bit
495 Summary:       The GNU Fortran Compiler and Support Files
496 License:       GPL-3.0+
497 Group:         Development/Languages
498 %description fortran-32bit
499 This is the Fortran compiler of the GNU Compiler Collection (GCC).
500
501 %package -n libgfortran-32bit
502 Summary:       The GNU Fortran Compiler Runtime Library
503 License:       GPL-3.0-with-GCC-exception
504 Group:         Development/Languages
505 %description -n libgfortran-32bit
506 The runtime library needed to run programs compiled with the Fortran compiler
507 of the GNU Compiler Collection (GCC).
508 %post -n libgfortran-32bit -p /sbin/ldconfig
509 %postun -n libgfortran-32bit -p /sbin/ldconfig
510
511 %package -n libquadmath-32bit
512 Summary:       The GNU Fortran Compiler Quadmath Runtime Library
513 License:       LGPL-2.1
514 Group:         Development/Languages
515 %description -n libquadmath-32bit
516 The runtime library needed to run programs compiled with the Fortran compiler
517 of the GNU Compiler Collection (GCC) and quadruple precision floating point
518 operations.
519 %post -n libquadmath-32bit -p /sbin/ldconfig
520 %postun -n libquadmath-32bit -p /sbin/ldconfig
521
522 %package -n libitm-32bit
523 Summary:       The GNU Compiler Transactional Memory Runtime Library
524 License:       GPL-3.0-with-GCC-exception
525 Group:         Development/Languages
526 %description -n libitm-32bit
527 The runtime library needed to run programs compiled with the
528 -fgnu-tm option of the GNU Compiler Collection (GCC).
529 %post -n libitm-32bit -p /sbin/ldconfig
530 %postun -n libitm-32bit -p /sbin/ldconfig
531
532 %package -n libasan-32bit
533 Summary:       The GNU Compiler Address Sanitizer Runtime Library
534 License:       MIT
535 Group:         Development/Languages
536 %description -n libasan-32bit
537 The runtime library needed to run programs compiled with the
538 -fsanitize=address option of the GNU Compiler Collection (GCC).
539 %post -n libasan-32bit -p /sbin/ldconfig
540 %postun -n libasan-32bit -p /sbin/ldconfig
541
542 %package -n liblsan-32bit
543 Summary:       The GNU Compiler Address Sanitizer Runtime Library
544 License:       MIT
545 Group:         Development/Languages
546 %description -n liblsan-32bit
547 The runtime library needed to run programs compiled with the
548 -fsanitize=leak option of the GNU Compiler Collection (GCC).
549 %post -n liblsan-32bit -p /sbin/ldconfig
550 %postun -n liblsan-32bit -p /sbin/ldconfig
551
552 %package -n libtsan-32bit
553 Summary:       The GNU Compiler Thread Sanitizer Runtime Library
554 License:       MIT
555 Group:         Development/Languages
556 %description -n libtsan-32bit
557 The runtime library needed to run programs compiled with the
558 -fsanitize=thread option of the GNU Compiler Collection (GCC).
559 %post -n libtsan-32bit -p /sbin/ldconfig
560 %postun -n libtsan-32bit -p /sbin/ldconfig
561
562 %package -n libatomic-32bit
563 Summary:       The GNU Compiler Atomic Operations Runtime Library
564 License:       GPL-3.0-with-GCC-exception
565 Group:         Development/Languages
566 %description -n libatomic-32bit
567 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
568 %post -n libatomic-32bit -p /sbin/ldconfig
569 %postun -n libatomic-32bit -p /sbin/ldconfig
570
571 %package -n libcilkrts-32bit
572 Summary:       The GNU Compiler Cilk+ Runtime Library
573 License:       MIT
574 Group:         Development/Languages
575 %description -n libcilkrts-32bit
576 The runtime library needed to run programs compiled with the
577 -fcilkplus option of the GNU Compiler Collection (GCC).
578 %post -n libcilkrts-32bit -p /sbin/ldconfig
579 %postun -n libcilkrts-32bit -p /sbin/ldconfig
580
581 %package -n libubsan-32bit
582 Summary:       The GNU Compiler Undefined Sanitizer Runtime Library
583 License:       MIT
584 Group:         Development/Languages
585 %description -n libubsan-32bit
586 The runtime library needed to run programs compiled with the
587 -fsanitize=undefined option of the GNU Compiler Collection (GCC).
588 %post -n libubsan-32bit -p /sbin/ldconfig
589 %postun -n libubsan-32bit -p /sbin/ldconfig
590
591 %package -n libvtv-32bit
592 Summary:       The GNU Compiler Vtable Verifier Runtime Library
593 License:       MIT
594 Group:         Development/Languages
595 %description -n libvtv-32bit
596 The runtime library needed to run programs compiled with the
597 -fvtable-verify option of the GNU Compiler Collection (GCC).
598 %post -n libvtv-32bit -p /sbin/ldconfig
599 %postun -n libvtv-32bit -p /sbin/ldconfig
600
601 %package -n libffi-32bit
602 Summary:       Foreign Function Interface library
603 License:       BSD-3-Clause
604 Group:         Development/Building
605 %description -n libffi-32bit
606 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.
607 %post -n libffi-32bit -p /sbin/ldconfig
608 %postun -n libffi-32bit -p /sbin/ldconfig
609
610 %package -n libffi-devel-32bit
611 Summary:       Foreign Function Interface library development files
612 License:       BSD 3-Clause
613 Group:         Development/Building
614 %description -n libffi-devel-32bit
615 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.
616
617 %package go-32bit
618 Summary:       GNU Go Compiler
619 License:       GPL-3.0+
620 Group:         Development/Languages
621 %description go-32bit
622 This package contains a Go compiler and associated development
623 files based on the GNU GCC technology.
624
625 %package -n libgo-32bit
626 Summary:       GNU Go compiler runtime library
627 License:       BSD-3-Clause
628 Group:         Development/Languages
629 %description -n libgo-32bit
630 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.
631 %post -n libgo-32bit -p /sbin/ldconfig
632 %postun -n libgo-32bit -p /sbin/ldconfig
633
634 %package plugin-devel
635 Summary:       GNU GCC Plugin development files
636 License:       GPL-3.0+
637 Group:         Development/Languages
638 %description plugin-devel
639 This package contains GCC Plugin development files needed for compiler
640 plugins build.
641
642 %package -n sanitizer-sources
643 Summary:    Sanitizer family tools sources
644 License:       MIT
645 Group:      Development/Tools
646 BuildArch:  noarch
647
648 %description -n sanitizer-sources
649 Sanitizer family tools sources for external tools.
650
651 %prep
652
653 %setup -q -n gcc-%{version}
654 cp %{SOURCE20} .
655
656 tar xf %{SOURCE10}
657 ln -sf gmp-6.1.1 gmp
658 tar xf %{SOURCE11}
659 ln -sf mpfr-3.1.5 mpfr
660 tar xf %{SOURCE12}
661 ln -sf mpc-1.0.3 mpc
662 tar xf %{SOURCE13}
663 ln -sf isl-0.17.1 isl
664
665 echo "" > gcc/DEV-PHASE
666
667 %global gcc_release `sed -e 's/^.*-//g' %{_builddir}/gcc-%{version}/gcc/LINARO-VERSION`
668
669 %build
670 %{?asan:
671 %gcc_unforce_options
672 %ifarch armv7l
673 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -marm -Wa,-mimplicit-it=arm -fno-omit-frame-pointer"
674 %endif
675 }
676 rm -rf obj
677 mkdir obj
678 cd obj
679
680 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'
681 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
682 %{?cross:
683 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
684 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(sse\|fpmath\)[^ ]*//g'`
685 }
686 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  */ /g'`
687 %{?asan: RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS -DASAN_INIT_FIRST) }
688
689 %ifarch armv7l armv7hl aarch64
690 %undefine gcc_profiledbootstrap
691 %endif
692
693 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
694 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
695 ../configure \
696         --prefix=%{_prefix} \
697         --infodir=%{_infodir} \
698         --mandir=%{_mandir} \
699         --libdir=%{libdir} \
700         --libexecdir=%{libdir} \
701         --enable-languages=c,c++,fortran \
702         --enable-checking=release \
703         --disable-libssp \
704         %{!?gcc_profiledbootstrap:--disable-bootstrap} \
705         --disable-libvtv \
706         --enable-plugin \
707         --disable-libcc1 \
708         --disable-libgcj \
709         --with-slibdir=%{libdir} \
710         --with-system-zlib \
711         --with-sysroot=/ \
712         --enable-__cxa_atexit \
713         --enable-libstdcxx-allocator=new \
714         --enable-version-specific-runtime-libs \
715         --enable-linker-build-id \
716         --without-system-libunwind \
717         --enable-threads=posix \
718         --disable-multilib \
719         --enable-lto \
720 %{!?cross: \
721         --enable-libcc1 \
722         --enable-libgfortran \
723         %{?asanbootstrap:--enable-bootstrap --with-build-config=bootstrap-asan} \
724 %ifarch armv7l
725         --with-arch=armv7-a \
726         --with-tune=cortex-a8 \
727         --disable-sjlj-exceptions \
728 %endif
729 %ifarch armv7hl
730         --with-arch=armv7-a \
731         --with-tune=cortex-a8 \
732         --disable-sjlj-exceptions \
733         --with-float=hard \
734 %endif
735 %ifarch aarch64
736         --with-arch=armv8-a \
737         --disable-sjlj-exceptions \
738 %endif
739 %ifarch %ix86
740         --with-arch-32=i586 \
741         --with-tune=generic \
742         --disable-libmpx \
743 %endif
744 %ifarch x86_64
745         --with-arch-32=i586 \
746         --with-tune=generic \
747         --enable-multilib \
748         --disable-libmpx \
749 %endif
750 } \
751 %{?cross: \
752 %{?armv7l: \
753         --with-arch=armv7-a \
754         --with-tune=cortex-a8 \
755         --disable-sjlj-exceptions \
756 } \
757 %{?armv7hl: \
758         --with-arch=armv7-a \
759         --with-tune=cortex-a8 \
760         --disable-sjlj-exceptions \
761         --with-float=hard \
762 } \
763 %{?aarch64: \
764         --with-arch=armv8-a \
765         --disable-sjlj-exceptions \
766 } \
767         --disable-libgcc \
768         --disable-libgfortran \
769         --disable-libquadmath \
770         --disable-libgomp \
771         --disable-libatomic \
772         --disable-libstdc++-v3 \
773         --disable-libsanitizer \
774         --disable-libitm \
775 } \
776         --with-bugurl="http://bugs.tizen.org/" \
777         --with-pkgversion="Tizen/Linaro GCC %{version} %{gcc_release}" \
778         --target=%{target_arch} \
779         --host=%{host_arch} \
780         --build=%{host_arch}
781
782 make BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %{!?cross:%{?gcc_profiledbootstrap:profiledbootstrap}}
783 %{?gcc_run_tests:
784   echo "Run testsuite"
785   # asan needs a whole shadow address space
786   ulimit -v unlimited || true
787   make -k check %{?_smp_mflags} || true
788   mkdir ../testresults
789   ../contrib/test_summary | tee ../testresults/test_summary.txt
790 }
791
792 %install
793 cd obj
794
795 make install DESTDIR=$RPM_BUILD_ROOT
796
797 %{?gcc_run_tests:
798   cp `find . -name "*.sum"` ../testresults/
799   cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
800   chmod 644 ../testresults/*
801 }
802
803 %{remove_docs}
804 rm -rf %{buildroot}/%{_datadir}/locale
805
806 #remove everything we don't need
807 rm -rf %{buildroot}/%{libsubdir}/install-tools
808 find %{buildroot}/ -name "*.la" -delete
809
810 %{!?cross:
811 ln -s gcc %{buildroot}%{_bindir}/cc
812 mv %{buildroot}%{libsubdir}/libstdc++.so*-gdb.py %{buildroot}%{_datadir}/gcc-%{version}/python/libstdcxx/
813
814 # expose plugins for ar (required for lto builds)
815 mkdir -p %{buildroot}%{_prefix}/lib/bfd-plugins
816 ln -sf %{libsubdir}/liblto_plugin.so %{buildroot}%{_prefix}/lib/bfd-plugins/liblto_plugin.so
817
818 # legacy preprocessor
819 mkdir -p %{buildroot}/lib
820 ln -s %{_bindir}/cpp %{buildroot}/lib/cpp
821
822 # 32-bit libgcc in multilib configuration
823 %ifarch x86_64
824 mv %{buildroot}%{_prefix}/lib/libgcc_s.so* %{buildroot}%{libsubdir}/32/
825 %endif
826
827 # move libraries to libdir
828 for lib in asan atomic cilkrts gfortran gomp cc1 itm lsan quadmath stdc++ supc++ tsan ubsan
829 do
830   [ -e %{buildroot}%{libsubdir}/lib$lib.a ] && mv %{buildroot}%{libsubdir}/lib$lib.a %{buildroot}%{libdir}/
831   [ -e %{buildroot}%{libsubdir}/lib$lib.so ] && mv %{buildroot}%{libsubdir}/lib$lib.so* %{buildroot}%{libdir}/
832 done
833 }
834
835 %{?cross:
836 rm -rf %{buildroot}/%{libsubdir}/include-fixed
837 rm -rf %{buildroot}/%{libsubdir}/include
838 }
839
840 %{!?cross:
841 cd ../
842 tar -czf libsanitizer.tar.bz libsanitizer
843 mkdir -p %{buildroot}/src
844 mv -v libsanitizer.tar.bz %{buildroot}/src
845 }
846
847 %files
848 %manifest gcc.manifest
849 %defattr(-,root,root)
850 %{?cross:
851 %{_bindir}/*
852 %{libsubdir}/*
853 }
854 %{!?cross:
855 %{_bindir}/gcc
856 %{_bindir}/cc
857 %{_bindir}/gcov
858 %{_bindir}/gcov-tool
859 %{_bindir}/gcc-ar
860 %{_bindir}/gcc-nm
861 %{_bindir}/gcc-ranlib
862 %{_bindir}/%{target_arch}-gcc
863 %{_bindir}/%{target_arch}-gcc-%{version}
864 %{_bindir}/%{target_arch}-gcc-ar
865 %{_bindir}/%{target_arch}-gcc-nm
866 %{_bindir}/%{target_arch}-gcc-ranlib
867 %{libsubdir}/collect2
868 %{libsubdir}/lto1
869 %{libsubdir}/lto-wrapper
870 %{libsubdir}/liblto_plugin.so*
871 %{_prefix}/lib/bfd-plugins/liblto_plugin.so
872 %{libsubdir}/include-fixed/*
873 %{libsubdir}/include/*.h
874 %{libsubdir}/*.a
875 %{libsubdir}/*.so
876 %{libsubdir}/*.o
877 %{libsubdir}/*.spec
878 %{libdir}/*.so
879 %{libdir}/*.a
880 %ifarch %cilkrts_arch
881 %{libsubdir}/include/cilk/*
882 %endif
883 %{libsubdir}/include/sanitizer/*
884 %ifarch %asan_arch
885 %exclude %{libdir}/libasan.so
886 %endif
887 %ifarch %lsan_arch
888 %exclude %{libdir}/liblsan.so
889 %endif
890 %ifarch %tsan_arch
891 %exclude %{libdir}/libtsan.so
892 %endif
893
894 %files c++
895 %defattr(-,root,root)
896 %{libsubdir}/cc1plus
897 %{_bindir}/g++
898 %{_bindir}/c++
899 %{_bindir}/%{target_arch}-g++
900 %{_bindir}/%{target_arch}-c++
901
902 %files -n libstdc++
903 %manifest gcc.manifest
904 %license COPYING3 COPYING.RUNTIME
905 %defattr(-,root,root)
906 %{libdir}/libstdc++.so.*
907
908 %files -n libstdc++-devel
909 %defattr(-,root,root)
910 %{libdir}/libstdc++.so
911 %{libdir}/libstdc++.a
912 %{libdir}/libsupc++.a
913 %{libsubdir}/include/c++/*
914 %{_datadir}/gcc-%{version}/python/libstdcxx/*
915
916 %files -n libgcc
917 %manifest gcc.manifest
918 %license COPYING3 COPYING.RUNTIME
919 %defattr(-,root,root)
920 %{libdir}/libgcc_s.so.*
921
922 %files -n libgomp
923 %manifest gcc.manifest
924 %license COPYING3 COPYING.RUNTIME
925 %defattr(-,root,root)
926 %{libdir}/libgomp.so.*
927
928 %files -n libcc1
929 %manifest gcc.manifest
930 %defattr(-,root,root)
931 %{libdir}/libcc1.so.*
932
933 %ifarch %asan_arch
934 %files -n libasan
935 %manifest gcc.manifest
936 %license libsanitizer/LICENSE.TXT
937 %defattr(-,root,root)
938 %{libdir}/libasan.so*
939 %endif
940
941 %ifarch %lsan_arch
942 %files -n liblsan
943 %manifest gcc.manifest
944 %license libsanitizer/LICENSE.TXT
945 %defattr(-,root,root)
946 %{libdir}/liblsan.so*
947 %endif
948
949 %ifarch %tsan_arch
950 %files -n libtsan
951 %manifest gcc.manifest
952 %license libsanitizer/LICENSE.TXT
953 %defattr(-,root,root)
954 %{libdir}/libtsan.so*
955 %endif
956
957 %ifarch %atomic_arch
958 %files -n libatomic
959 %manifest gcc.manifest
960 %license COPYING3 COPYING.RUNTIME
961 %defattr(-,root,root)
962 %{libdir}/libatomic.so.*
963 %endif
964
965 %ifarch %itm_arch
966 %files -n libitm
967 %manifest gcc.manifest
968 %license COPYING3 COPYING.RUNTIME
969 %defattr(-,root,root)
970 %{libdir}/libitm.so.*
971 %endif
972
973 %ifarch %cilkrts_arch
974 %files -n libcilkrts
975 %manifest gcc.manifest
976 %defattr(-,root,root)
977 %{libdir}/libcilkrts.so.*
978 %endif
979
980 %ifarch %ubsan_arch
981 %files -n libubsan
982 %manifest gcc.manifest
983 %license libsanitizer/LICENSE.TXT
984 %defattr(-,root,root)
985 %{libdir}/libubsan.so.*
986 %endif
987
988 %files fortran
989 %defattr(-,root,root)
990 %dir %{libsubdir}/finclude
991 %{_bindir}/gfortran
992 %{_bindir}/%{target_arch}-gfortran
993 %{libsubdir}/f951
994 %{libsubdir}/finclude/*
995 %{libdir}/libgfortran.a
996 %{libdir}/libgfortran.so
997 %{libsubdir}/libgfortran.spec
998 %{libsubdir}/libcaf_single.a
999 %ifarch %quadmath_arch
1000 %{libdir}/libquadmath.a
1001 %{libdir}/libquadmath.so
1002 %endif
1003
1004 %files -n libgfortran
1005 %defattr(-,root,root)
1006 %{libdir}/libgfortran.so.*
1007
1008 %ifarch %quadmath_arch
1009 %files -n libquadmath
1010 %manifest gcc.manifest
1011 %license COPYING.LIB
1012 %defattr(-,root,root)
1013 %{libdir}/libquadmath.so.*
1014 %endif
1015
1016 %files -n cpp
1017 %defattr(-,root,root)
1018 %{_bindir}/cpp
1019 %{libsubdir}/cc1
1020 /lib/cpp
1021
1022 %files plugin-devel
1023 %defattr(-,root,root)
1024 %{libsubdir}/plugin/*
1025
1026 %{?gcc_run_tests:
1027 %files testresults
1028 %defattr(-,root,root)
1029 %doc testresults/test_summary.txt
1030 %doc testresults/*.sum
1031 %doc testresults/*.log
1032 }
1033 %ifarch x86_64
1034 %files -n gcc-32bit
1035 %defattr(-,root,root)
1036 %{libsubdir}/32/crt*
1037 %{libsubdir}/32/*.a
1038 %{libsubdir}/32/*.so
1039 %{libsubdir}/32/*.o
1040 %{libsubdir}/32/*.spec
1041
1042 %ifarch %asan_arch
1043 %files -n libasan-32bit
1044 %manifest gcc.manifest
1045 %license libsanitizer/LICENSE.TXT
1046 %defattr(-,root,root)
1047 %{libsubdir}/32/libasan.so.*
1048 %endif
1049
1050 %ifarch %lsan_arch
1051 %files -n liblsan-32bit
1052 %manifest gcc.manifest
1053 %license libsanitizer/LICENSE.TXT
1054 %defattr(-,root,root)
1055 %{libsubdir}/32/liblsan.so.*
1056 %endif
1057
1058 %ifarch %atomic_arch
1059 %files -n libatomic-32bit
1060 %manifest gcc.manifest
1061 %license COPYING3 COPYING.RUNTIME
1062 %defattr(-,root,root)
1063 %{libsubdir}/32/libatomic.so.*
1064 %endif
1065
1066 %ifarch %cilkrts_arch
1067 %files -n libcilkrts-32bit
1068 %defattr(-,root,root)
1069 %{libsubdir}/32/libcilkrts.so.*
1070 %endif
1071
1072 %files -n libgcc-32bit
1073 %manifest gcc.manifest
1074 %license COPYING3 COPYING.RUNTIME
1075 %defattr(-,root,root)
1076 %{libsubdir}/32/libgcc_s.so.*
1077
1078 %files -n libgomp-32bit
1079 %manifest gcc.manifest
1080 %license COPYING3 COPYING.RUNTIME
1081 %defattr(-,root,root)
1082 %{libsubdir}/32/libgomp.so.*
1083
1084 %ifarch %itm_arch
1085 %files -n libitm-32bit
1086 %license COPYING3 COPYING.RUNTIME
1087 %defattr(-,root,root)
1088 %{libsubdir}/32/libitm.so.*
1089 %endif
1090
1091 %files -n libgfortran-32bit
1092 %defattr(-,root,root)
1093 %dir %{libsubdir}/32/finclude
1094 %{libsubdir}/32/libgfortran.so.*
1095 %{libsubdir}/32/finclude/*
1096
1097 %ifarch %quadmath_arch
1098 %files -n libquadmath-32bit
1099 %license COPYING.LIB
1100 %defattr(-,root,root)
1101 %{libsubdir}/32/libquadmath.so.*
1102 %endif
1103
1104 %ifarch %ubsan_arch
1105 %files -n libubsan-32bit
1106 %manifest gcc.manifest
1107 %license libsanitizer/LICENSE.TXT
1108 %defattr(-,root,root)
1109 %{libsubdir}/32/libubsan.so.*
1110 %endif
1111
1112 %files -n libstdc++-32bit
1113 %manifest gcc.manifest
1114 %license COPYING3 COPYING.RUNTIME
1115 %defattr(-,root,root)
1116 %{libsubdir}/32/libstdc++.so.*
1117 %exclude %{libsubdir}/32/libstdc++.so.*-gdb.py
1118
1119 %files -n libstdc++-devel-32bit
1120 %defattr(-,root,root)
1121 %{libsubdir}/32/libstdc++.so.*-gdb.py
1122 %endif
1123
1124 %files -n sanitizer-sources
1125 %defattr(-,root,root,-)
1126 /src/libsanitizer.tar.bz
1127
1128 }
1129
1130 %changelog