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