packaging: add packaging files
[platform/upstream/gcc49.git] / packaging / libffi49.spec
1 %define building_libffi 1
2 #
3 # spec file for package gcc49
4 #
5 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
6 #
7 # All modifications and additions to the file contributed by third parties
8 # remain the property of their copyright owners, unless otherwise agreed
9 # upon. The license for this file, and modifications and additions to the
10 # file, is the same license as for the pristine package itself (unless the
11 # license for the pristine package is not an Open Source License, in which
12 # case the license is the MIT License). An "Open Source License" is a
13 # license that conforms to the Open Source Definition (Version 1.9)
14 # published by the Open Source Initiative.
15
16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
17 #
18
19 # norootforbuild
20 # icecream 0
21
22
23 %define build_ada 0
24
25 %define quadmath_arch %ix86 x86_64 ia64 aarch64
26 %define tsan_arch x86_64
27 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm
28 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc
29 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
30 %define lsan_arch x86_64
31 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm
32 %if 0%{?build_libvtv:1}
33 %define vtv_arch x86_64 %ix86
34 %endif
35 %define cilkrts_arch x86_64 %ix86
36
37 # We don't want to build java
38 %define build_java 0
39 %define build_libjava 0
40
41 %define build_cp 1
42 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1}
43 %define build_objc !0%{?building_libjava:1}%{?building_libffi:1}
44 %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
45 %define build_go !0%{?building_libjava:1}%{?building_libffi:1}
46
47 %if %{build_objcp}
48 %define build_cp 1
49 %define build_objc 1
50 %endif
51
52 %if %{build_libjava}
53 %define build_cp 1
54 %endif
55
56 # For optional compilers only build C, C++ and Fortran
57 %if 0%{?build_optional_compiler_languages:1}
58 %define build_ada 0
59 %define build_java 0
60 %define build_libjava 0
61 %define build_objc 0
62 %define build_objcp 0
63 %define build_go 0
64 %endif
65
66 # Shared library SONAME versions
67 %ifarch hppa
68 %define libgcc_s 4
69 %else
70 %ifarch m68k
71 %define libgcc_s 2
72 %else
73 %define libgcc_s 1
74 %endif
75 %endif
76 %define libgcj_sover %{nil}
77 %define libgcj_bc_sover %{nil}
78 %define libffi_sover %{nil}
79 %define libgomp_sover %{nil}
80 %define libstdcxx_sover %{nil}
81 %define libobjc_sover %{nil}
82 %define libgfortran_sover %{nil}
83 %define libquadmath_sover %{nil}
84 %define libasan_sover %{nil}
85 %define libtsan_sover %{nil}
86 %define libatomic_sover %{nil}
87 %define libitm_sover %{nil}
88 %define libubsan_sover %{nil}
89 %define liblsan_sover %{nil}
90 %define libvtv_sover %{nil}
91 %define libcilkrts_sover %{nil}
92 %define libgo_sover %{nil}
93
94 # Shared library package suffix
95 # This is used for the "non-standard" set of libraries, the standard
96 # being defined by %product_libs_gcc_ver, the GCC version that should
97 # provide un-suffixed shared library packages following the shared-library
98 # policy.  Even suffixed variants should provide the shared-library policy
99 # mandated names and ensure they conflict with each other.
100 # Note that on SONAME changes of any library the %product_libs_gcc_ver
101 # define needs to be either split or the newest GCC version still providing
102 # the old SONAME needs to unconditionally produce an un-suffixed library
103 # if %product_libs_gcc_ver is newer than it.  Similar the _oldest_ GCC
104 # version first providing a new SONAME needs to unconditionally produce
105 # an un-suffixed library if %product_libs_gcc_ver is lower that it.
106 %if %{!?product_libs_gcc_ver:49}%{?product_libs_gcc_ver} != 49
107 %define pne 1
108 %endif
109 %define libgcc_s_suffix %{?pne:-gcc49}
110 # libgcj SONAME changes with every GCC version
111 %define libgcj_suffix %nil
112 %define libgcj_bc_suffix %{?pne:-gcc49}
113 %define libffi_suffix %{?pne:-gcc49}
114 %define libgomp_suffix %{?pne:-gcc49}
115 %define libstdcxx_suffix %{?pne:-gcc49}
116 %define libobjc_suffix %{?pne:-gcc49}
117 %define libgfortran_suffix %{?pne:-gcc49}
118 %define libquadmath_suffix %{?pne:-gcc49}
119 %define libasan_suffix %{?pne:-gcc49}
120 %define libtsan_suffix %{?pne:-gcc49}
121 %define libatomic_suffix %{?pne:-gcc49}
122 %define libitm_suffix %{?pne:-gcc49}
123
124
125 %define libubsan_suffix %{?pne:-gcc49}
126 %define liblsan_suffix %{?pne:-gcc49}
127 %define libvtv_suffix %{?pne:-gcc49}
128 %define libcilkrts_suffix %{?pne:-gcc49}
129 %define libgo_suffix %{?pne:-gcc49}
130
131 %define selfconflict() %1
132
133 Name: libffi49
134 # With generated files in src we could drop the following
135 BuildRequires: bison
136 BuildRequires: flex
137 BuildRequires: gettext-devel
138 BuildRequires: makeinfo
139 # until here, but at least renaming and patching info files breaks this
140 BuildRequires: gcc-c++
141 BuildRequires: glibc-devel
142 BuildRequires: mpc-devel
143 BuildRequires: mpfr-devel
144 BuildRequires: perl
145 BuildRequires: zlib-devel
146 %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm aarch64
147 BuildRequires: cloog-isl-devel
148 BuildRequires: isl-devel
149 %endif
150 %if %{build_ada}
151 %define hostsuffix -4.9
152 BuildRequires: gcc49-ada
153 %endif
154 %if 0%{?building_libjava:1}%{?building_testsuite:1}
155 BuildRequires: fastjar
156 %endif
157 %if 0%{?building_libffi:1}
158 BuildRequires: pkg-config
159 %endif
160 %ifarch ia64
161 BuildRequires: libunwind-devel
162 %endif
163 %if 0%{?run_tests:1}
164 BuildRequires: dejagnu
165 BuildRequires: expect
166 BuildRequires: gdb
167 %endif
168
169 %define separate_bi32 0
170 %define separate_bi64 0
171 %ifarch ppc sparcv9
172 # Beware, this does _not_ separate libgcj, as for that one multilibing
173 # is inactive for the time being
174 %define separate_bi64 1
175 %endif
176 %ifarch x86_64 s390x ppc64 sparc64
177 %define separate_bi32 1
178 %endif
179
180 # Define two macros to trigger -32bit or -64bit package variants
181 %define separate_biarch 0
182 %if %{separate_bi32}
183 %define separate_biarch 1
184 %define separate_biarch_suffix -32bit
185 %endif
186 %if %{separate_bi64}
187 %define separate_biarch 1
188 %define separate_biarch_suffix -64bit
189 %endif
190
191 %ifarch x86_64 ia64 s390x alpha ppc64 sparc64 aarch64
192 # 64-bit is primary build target
193 %define build_primary_64bit 1
194 %else
195 %define build_primary_64bit 0
196 %endif
197
198 %define biarch_libjava 0
199
200 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
201
202 URL:          http://gcc.gnu.org/
203 Version: 4.9.1
204 Release:      1
205 %define gcc_dir_version 4.9
206 %define binsuffix -4.9
207
208 %if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
209 Requires: binutils glibc-devel
210 Requires: cpp49 = %{version}-%{release}
211 Requires: libgcc_s%{libgcc_s} >= %{version}-%{release}
212 Requires: libgomp%{libgomp_sover} >= %{version}-%{release}
213 %ifarch %asan_arch
214 Requires: libasan%{libasan_sover} >= %{version}-%{release}
215 %endif
216 %ifarch %tsan_arch
217 Requires: libtsan%{libtsan_sover} >= %{version}-%{release}
218 %endif
219 %ifarch %atomic_arch
220 Requires: libatomic%{libatomic_sover} >= %{version}-%{release}
221 %endif
222 %ifarch %itm_arch
223 Requires: libitm%{libitm_sover} >= %{version}-%{release}
224 %endif
225 %ifarch %cilkrts_arch
226 Requires: libcilkrts%{libcilkrts_sover} >= %{version}-%{release}
227 %endif
228 %ifarch %lsan_arch
229 Requires: liblsan%{liblsan_sover} >= %{version}-%{release}
230 %endif
231 %ifarch %ubsan_arch
232 Requires: libubsan%{libubsan_sover} >= %{version}-%{release}
233 %endif
234 %ifarch %vtv_arch
235 Requires: libvtv%{libvtv_sover} >= %{version}-%{release}
236 %endif
237 Suggests: gcc49-info gcc49-locale
238 %endif
239
240 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
241 Source:         gcc-%{version}.tar.bz2
242 Source1:        change_spec
243 Source2:        libffi49-rpmlintrc
244 Source3:        gcc49-rpmlintrc
245 Source4:        ecj.jar
246 Source5:        baselibs.conf
247 Source6:        libgcj49-rpmlintrc
248
249 Group:          Development/Building
250 Summary:        The GNU C Compiler and Support Files
251 License:        GPL-3.0+
252
253 %description
254 Core package for the GNU Compiler Collection, including the C language
255 frontend.
256
257 Language frontends other than C are split to different sub-packages,
258 namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
259 gcc-obj-c++.
260 %package -n libffi%{libffi_sover}%{libffi_suffix}
261 Summary:      Foreign Function Interface library
262 License:        BSD-3-Clause
263 Group:        Development/Building
264 Provides:       libffi%{libffi_sover} = %{version}-%{release}
265
266 %description -n libffi%{libffi_sover}%{libffi_suffix}
267 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.
268
269 %post -n libffi%{libffi_sover}%{libffi_suffix} -p /sbin/ldconfig
270
271 %postun -n libffi%{libffi_sover}%{libffi_suffix} -p /sbin/ldconfig
272 %package -n libffi%{libffi_sover}%{libffi_suffix}-32bit
273 Summary:      Foreign Function Interface library
274 License:        BSD-3-Clause
275 Group:        Development/Building
276 Provides:       libffi%{libffi_sover}-32bit = %{version}-%{release}
277
278 %description -n libffi%{libffi_sover}%{libffi_suffix}-32bit
279 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.
280
281 %post -n libffi%{libffi_sover}%{libffi_suffix}-32bit -p /sbin/ldconfig
282
283 %postun -n libffi%{libffi_sover}%{libffi_suffix}-32bit -p /sbin/ldconfig
284 %package -n libffi%{libffi_sover}%{libffi_suffix}-64bit
285 Summary:      Foreign Function Interface library
286 License:        BSD-3-Clause
287 Group:        Development/Building
288 Provides:       libffi%{libffi_sover}-64bit = %{version}-%{release}
289
290 %description -n libffi%{libffi_sover}%{libffi_suffix}-64bit
291 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.
292
293 %post -n libffi%{libffi_sover}%{libffi_suffix}-64bit -p /sbin/ldconfig
294
295 %postun -n libffi%{libffi_sover}%{libffi_suffix}-64bit -p /sbin/ldconfig
296
297 %package -n libffi49-devel
298 Summary:      Foreign Function Interface library development files
299 License:        BSD 3-Clause
300 Group:        Development/Building
301 Requires: libffi%{libffi_sover} >= %{version}-%{release}
302 Provides: libffi-devel = %{version}-%{release}
303
304 %description -n libffi49-devel
305 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.
306 %package -n libffi49-devel-32bit
307 Summary:      Foreign Function Interface library development files
308 License:        BSD 3-Clause
309 Group:        Development/Building
310 Requires: libffi%{libffi_sover}-32bit >= %{version}-%{release}
311 Provides: libffi-devel-32bit = %{version}-%{release}
312
313 %description -n libffi49-devel-32bit
314 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.
315 %package -n libffi49-devel-64bit
316 Summary:      Foreign Function Interface library development files
317 License:        BSD 3-Clause
318 Group:        Development/Building
319 Requires: libffi%{libffi_sover}-64bit >= %{version}-%{release}
320 Provides: libffi-devel-64bit = %{version}-%{release}
321
322 %description -n libffi49-devel-64bit
323 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.
324
325 %package go
326 Summary:      GNU Go Compiler
327 License:        GPL-3.0+ 
328 Group:        Development/Languages
329 Requires: gcc49 = %{version}-%{release}
330 Requires: libgo%{libgo_sover} >= %{version}-%{release}
331
332 %description go
333 This package contains a Go compiler and associated development
334 files based on the GNU GCC technology.
335 %package go-32bit
336 Summary:      GNU Go Compiler
337 License:        GPL-3.0+ 
338 Group:        Development/Languages
339 Requires: gcc49-32bit = %{version}-%{release}
340 Requires: libgo%{libgo_sover}-32bit >= %{version}-%{release}
341
342 %description go-32bit
343 This package contains a Go compiler and associated development
344 files based on the GNU GCC technology.
345 %package go-64bit
346 Summary:      GNU Go Compiler
347 License:        GPL-3.0+ 
348 Group:        Development/Languages
349 Requires: gcc49-64bit = %{version}-%{release}
350 Requires: libgo%{libgo_sover}-64bit >= %{version}-%{release}
351
352 %description go-64bit
353 This package contains a Go compiler and associated development
354 files based on the GNU GCC technology.
355
356 %package -n libgo%{libgo_sover}%{libgo_suffix}
357 Summary:      GNU Go compiler runtime library
358 License:        BSD-3-Clause
359 Group:        Development/Languages
360 Provides:       libgo%{libgo_sover} = %{version}-%{release}
361
362 %description -n libgo%{libgo_sover}%{libgo_suffix}
363 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.
364
365 %post -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
366
367 %postun -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
368 %package -n libgo%{libgo_sover}%{libgo_suffix}-32bit
369 Summary:      GNU Go compiler runtime library
370 License:        BSD-3-Clause
371 Group:        Development/Languages
372 Provides:       libgo%{libgo_sover}-32bit = %{version}-%{release}
373
374 %description -n libgo%{libgo_sover}%{libgo_suffix}-32bit
375 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.
376
377 %post -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
378
379 %postun -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
380 %package -n libgo%{libgo_sover}%{libgo_suffix}-64bit
381 Summary:      GNU Go compiler runtime library
382 License:        BSD-3-Clause
383 Group:        Development/Languages
384 Provides:       libgo%{libgo_sover}-64bit = %{version}-%{release}
385
386 %description -n libgo%{libgo_sover}%{libgo_suffix}-64bit
387 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.
388
389 %post -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig
390
391 %postun -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig
392
393
394 %package -n gcc49-testresults
395 Summary:      Testsuite results
396 License:        SUSE-Public-Domain
397 Group:        Development/Languages
398
399 %description -n gcc49-testresults
400 Results from running the gcc and target library testsuites.
401
402
403
404
405 # Define the canonical target and host architecture
406 #   %gcc_target_arch  is supposed to be the full target triple
407 #   %TARGET_ARCH      is the canonicalized CPU part
408 #   %CONFIGURE_TARGET is the target triple used for --target=
409 %if 0%{?gcc_target_arch:1}
410 %define CONFIGURE_TARGET %{gcc_target_arch}
411 %define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
412 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
413 %define CONFIGURE_TARGET powerpc64-tizen-linux
414 %endif
415 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
416 %define CONFIGURE_TARGET powerpc64-tizen-linux
417 %endif
418 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
419 %define CONFIGURE_TARGET i586-tizen-linux
420 %endif
421 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "aarch64"
422 %define CONFIGURE_TARGET aarch64-tizen-linux
423 %endif
424 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
425 %define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
426 %endif
427 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
428 %define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
429 %endif
430 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
431 %define CONFIGURE_TARGET armv5tel-tizen-linux-gnueabi
432 %endif
433 %else
434 %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
435 %endif
436 %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
437
438 %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
439 %ifarch ppc
440 %define GCCDIST powerpc64-tizen-linux
441 %else
442 %ifarch %sparc
443 %define GCCDIST sparc64-tizen-linux
444 %else
445 %ifarch %arm
446 %define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
447 %else
448 %define GCCDIST %{HOST_ARCH}-tizen-linux
449 %endif
450 %endif
451 %endif
452
453 %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
454 %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
455
456
457 # Versionspecific directories
458 %define versmainlibdir %{libsubdir}
459 %define versmainlibdirbi32 %{libsubdir}/32
460 %define versmainlibdirbi64 %{libsubdir}/64
461 %ifarch ppc
462 %define versmainlibdirbi32 %{libsubdir}
463 %define versmainlibdirbi64 %{libsubdir}/64
464 %endif
465 %if %{build_primary_64bit}
466 %define versmainlibdirbi %{versmainlibdirbi32}
467 %else
468 %define versmainlibdirbi %{versmainlibdirbi64}
469 %endif
470
471 %define mainlibdir %{_libdir}
472 %define mainlibdirbi32 %{_prefix}/lib
473 %define mainlibdirbi64 %{_prefix}/lib64
474 %if %{build_primary_64bit}
475 %define mainlibdirbi %{mainlibdirbi32}
476 %else
477 %define mainlibdirbi %{mainlibdirbi64}
478 %endif
479
480
481 # Now define a few macros that make it easy to package libs and
482 # related files just to the right package, without caring for the
483 # exact path the files are in.
484 #   %mainlib  package X from all dirs that belong to the main package
485 #   %biarchlib   package X from all dirs that belong to the -32/64bit package
486 %define mainlib() %{mainlibdir}/%1\
487 %{nil}
488 %define biarchlib() %{nil}
489 %if %{biarch}
490 %if !%{separate_biarch}
491 %define mainlib() %{mainlibdir}/%1\
492 %{mainlibdirbi}/%1\
493 %{nil}
494 %else
495 %define biarchlib() %{mainlibdirbi}/%1\
496 %{nil}
497 %endif
498 %endif
499
500 %define versmainlib() %{versmainlibdir}/%1\
501 %{nil}
502 %define versbiarchlib() %{nil}
503 %if %{biarch}
504 %if !%{separate_biarch}
505 %define versmainlib() %{versmainlibdir}/%1\
506 %{versmainlibdirbi}/%1\
507 %{nil}
508 %else
509 %define versbiarchlib() %{versmainlibdirbi}/%1\
510 %{nil}
511 %endif
512 %endif
513
514
515
516 %prep
517 %setup -q -n gcc-%{version}
518
519 # We are configuring ppc as ppc64 but with switched multilibs.  Adjust
520 # the libstdc++ abi testsuite baseline files accordingly
521 %ifarch ppc
522 if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
523   mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
524   mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
525         libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
526   mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
527         libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
528 fi
529 %endif
530
531 %build
532 # Avoid rebuilding of generated files
533 contrib/gcc_update --touch
534 # Avoid fucking up testsuite results with Java and indirect dispatch
535 export LD_ASNEEDED=0
536 # Split version file into version used for directories (X.Y) and
537 # version to report with --version (X.Y.Z).
538 # See also gcc-dir-version.patch.
539 # Also decrement the patchlevel version by one if possible and remove
540 # the 'prerelease' tagging in this case
541 if test `cat gcc/DEV-PHASE` == "prerelease"; then
542   if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
543     : > gcc/DEV-PHASE
544   fi
545   ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
546 else
547   mv gcc/BASE-VER gcc/FULL-VER
548 fi
549 cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
550
551 rm -rf obj-%{GCCDIST}
552 mkdir obj-%{GCCDIST}
553 cd obj-%{GCCDIST}
554 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
555 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'`
556 %ifarch %ix86
557 # -mcpu is superceded by -mtune but -mtune is not supported by
558 # our bootstrap compiler.  -mcpu gives a warning that stops
559 # the build process, so remove it for now.  Also remove all other
560 # -march and -mtune flags.  They are superseeded by proper
561 # default compiler settings now.
562 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
563 %endif
564 %ifarch s390 s390x
565 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
566 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
567 %endif
568 %if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
569 # Kill all -march/tune/cpu because that screws building the target libs
570 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
571 %endif
572 # Replace 2 spaces by one finally
573 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
574
575 languages=c
576 %if %{build_cp}
577 languages=$languages,c++
578 %endif
579 %if %{build_objc}
580 languages=$languages,objc
581 %endif
582 %if %{build_fortran}
583 languages=$languages,fortran
584 %endif
585 %if %{build_objcp}
586 languages=$languages,obj-c++
587 %endif
588 %if %{build_java}
589 languages=$languages,java
590 %endif
591 %if %{build_ada}
592 languages=$languages,ada
593 %endif
594 %if %{build_go}
595 languages=$languages,go
596 %endif
597
598 J=%{?jobs:%jobs}
599 if test -z "$J"; then
600   J=$(getconf _NPROCESSORS_CONF)
601   JL=$(($J * 2))
602 else
603   test 1 -gt "$J" && J=1
604   JL=$(($(getconf _NPROCESSORS_CONF)*2))
605 fi
606 if test "$J" == "0"; then
607   J=1
608 fi
609 if test "$JL" == "0"; then
610   JL=1
611 fi
612 PARALLEL="-j$J -l$JL"
613
614 # we don't want some miscompiles in the testsuite, or some fault in
615 # the compiler to kill the machine.  Hence we limit the amount of memory
616 # by the physical RAM plus half of swap
617 #MEM=$(free -m | awk '/^Mem:/ {print $2}')
618 #SWAP=$(free -m | awk '/^Swap:/ {print $2}')
619 #ulimit -v $(((MEM + SWAP/2)*1024))
620
621 # In general we want to ship release checking enabled compilers
622 # and run BETA with checking enabled.
623 #ENABLE_CHECKING="--enable-checking=yes"
624 ENABLE_CHECKING="--enable-checking=release"
625
626 # Work around tail/head -1 changes
627 export _POSIX2_VERSION=199209
628
629 %if %{build_ada}
630 # Using the host gnatmake like
631 #   CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
632 #   GNATMAKE="gnatmake%{hostsuffix}"
633 # doesn't work due to PR33857, so an un-suffixed gnatmake has to be
634 # available
635 mkdir -p host-tools/bin
636 cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
637 cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
638 cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
639 cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
640 ln -sf /usr/%{_lib} host-tools/%{_lib}
641 export PATH="`pwd`/host-tools/bin:$PATH"
642 %endif
643 #%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
644 #%else
645 #       --enable-threads=posix \
646 #%endif
647 #       --enable-shared \
648 %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
649 # temporary workaround for a miscompilation of hash functions in java code
650 GCJ_EXTRA_FLAGS="-marm"
651 %endif
652
653 export RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed -e "s/ -Wp,-D_FORTIFY_SOURCE=2 / /g"`"
654
655 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
656 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
657 ../configure \
658         --prefix=%{_prefix} \
659         --infodir=%{_infodir} \
660         --mandir=%{_mandir} \
661         --libdir=%{_libdir} \
662         --libexecdir=%{_libdir} \
663     --disable-bootstrap \
664         --enable-languages=$languages \
665         $ENABLE_CHECKING \
666         --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
667         --enable-ssp \
668         --disable-libssp \
669 %if 0%{!?build_libvtv:1}
670         --disable-libvtv \
671 %endif
672         --disable-plugin \
673         --with-bugurl="http://bugs.tizen.org/" \
674         --with-pkgversion="Tizen" \
675 %if !%{build_fortran}
676         --disable-libquadmath \
677 %endif
678 %if !%{build_libjava}
679         --disable-libgcj \
680 %else
681         --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
682         --with-ecj-jar=%{libsubdir}/ecj.jar \
683         --disable-java-awt \
684 %if !%{biarch_libjava}
685         --disable-libjava-multilib \
686 %endif
687 %endif
688         --with-slibdir=/%{_lib} \
689         --with-system-zlib \
690         --enable-__cxa_atexit \
691         --enable-libstdcxx-allocator=new \
692         --disable-libstdcxx-pch \
693         --enable-version-specific-runtime-libs \
694         --enable-linker-build-id \
695         --enable-linux-futex \
696         --program-suffix=%{binsuffix} \
697 %if 0%{!?gcc_target_arch:1}
698 %ifarch ia64
699         --with-system-libunwind \
700 %else
701         --without-system-libunwind \
702 %endif
703 %endif
704 %if 0%{?gcc_target_arch:1}
705         --program-prefix=%{gcc_target_arch}- \
706         --target=%{gcc_target_arch} \
707         --disable-nls \
708 %if 0%{?sysroot:1}
709         --with-sysroot=%sysroot \
710 %else
711         --with-sysroot=%{_prefix}/%{gcc_target_arch} \
712 %endif
713 %if 0%{?build_sysroot:1}
714         --with-build-sysroot=%{build_sysroot} \
715 %else
716 %if 0%{?sysroot:1}
717         --with-build-sysroot=%{sysroot} \
718 %else
719         --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
720 %endif
721 %endif
722 %if 0%{?canonical_target:1}
723         --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
724 %endif
725 %if "%{TARGET_ARCH}" == "spu"
726         --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
727         --with-newlib \
728 %endif
729 %endif
730 %if "%{TARGET_ARCH}" == "armv5tel"
731         --with-arch=armv5te \
732         --with-float=soft \
733         --with-mode=arm \
734         --with-abi=aapcs-linux \
735         --disable-sjlj-exceptions \
736 %endif
737 %if "%{TARGET_ARCH}" == "armv7l" 
738         --with-arch=armv7-a \
739         --with-tune=cortex-a8 \
740         --with-float=softfp \
741         --with-fpu=vfpv3 \
742         --with-mode=thumb \
743         --disable-sjlj-exceptions \
744 %endif
745 %if "%{TARGET_ARCH}" == "armv7hl"
746         --with-arch=armv7-a \
747         --with-tune=cortex-a9 \
748         --with-float=hard \
749         --with-abi=aapcs-linux \
750         --with-fpu=vfpv3-d16 \
751         --disable-sjlj-exceptions \
752 %endif
753 %if  "%{TARGET_ARCH}" == "aarch64"
754         --with-arch=armv8-a \
755         --disable-sjlj-exceptions \
756 %endif
757 %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64"
758 %if "%{TARGET_ARCH}" == "powerpc"
759         --with-cpu=default32 \
760 %endif
761 %if "%{TARGET_ARCH}" == "powerpc64le"
762         --with-cpu=power7 \
763 %else
764         --with-cpu-64=power4 \
765 %endif
766         --enable-secureplt \
767         --with-long-double-128 \
768 %if "%{TARGET_ARCH}" == "powerpc64le"
769         --disable-multilib \
770 %endif
771 %endif
772 %if "%{TARGET_ARCH}" == "sparc64"
773         --with-cpu=ultrasparc \
774         --with-long-double-128 \
775 %endif
776 %if "%{TARGET_ARCH}" == "sparc"
777         --with-cpu=v8 \
778         --with-long-double-128 \
779 %endif
780 %if "%{TARGET_ARCH}" == "i586"
781         --with-arch-32=i586 \
782         --with-tune=generic \
783 %endif
784 %if "%{TARGET_ARCH}" == "x86_64"
785         --with-arch-32=i586 \
786         --with-tune=generic \
787         --disable-multilib \
788 %endif
789 %if "%{TARGET_ARCH}" == "s390"
790         --with-tune=zEC12 --with-arch=z196 \
791         --with-long-double-128 \
792         --enable-decimal-float \
793 %endif
794 %if "%{TARGET_ARCH}" == "s390x"
795         --with-tune=zEC12 --with-arch=z196 \
796         --with-long-double-128 \
797         --enable-decimal-float \
798 %endif
799 %if "%{TARGET_ARCH}" == "m68k"
800         --disable-multilib \
801 %endif
802         --build=%{GCCDIST} \
803         --host=%{GCCDIST}
804
805
806 %if 0%{?building_libffi:1}
807 make stage1-bubble $PARALLEL
808 make all-target-libffi $PARALLEL
809 %else
810 STAGE1_FLAGS="-g"
811 # Only run profiled bootstrap on archs where it works and matters
812 #%ifarch x86_64 ppc64le s390x
813 #make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
814 #%else
815 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
816 #%endif
817 make info
818 %if 0%{?building_libjava:1}
819 make -C %{GCCDIST}/libstdc++-v3/doc doc-html-doxygen
820 %endif
821 %if 0%{?run_tests:1}
822 echo "Run testsuite"
823 (make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
824 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
825 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
826 # asan needs a whole shadow address space
827 ulimit -v unlimited || true
828 make -k check $PARALLEL || true
829 mkdir ../testresults
830 ../contrib/test_summary | tee ../testresults/test_summary.txt
831 %endif
832 %endif
833
834 %install
835 export NO_BRP_CHECK_BYTECODE_VERSION=true
836 cd obj-%{GCCDIST}
837 # Work around tail/head -1 changes
838 export _POSIX2_VERSION=199209
839 export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
840 %if 0%{?building_libffi:1}
841 make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
842 %else
843 %if 0%{?building_libjava:1}
844 make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
845 make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
846 make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
847 make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
848 # copy the libstdc++ API reference
849 cp -r %{GCCDIST}/libstdc++-v3/doc/doxygen/html ../libstdc++-v3/doc/html/api
850 # install-common also installs collect2, gcov and the g++ and gfortran driver
851 %if %{build_cp}
852 rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
853 %endif
854 %if %{build_fortran}
855 rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
856 %endif
857 rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
858 rm $RPM_BUILD_ROOT%{libsubdir}/collect2
859 %else
860 make install DESTDIR=$RPM_BUILD_ROOT
861 %if %{build_java}
862 make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
863 make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
864 rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
865 rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
866 rm $RPM_BUILD_ROOT%{libsubdir}/jc1
867 rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
868 %endif
869 %endif
870 %endif
871
872 # Remove libffi installed files if we did not want to build it
873 %if !0%{?building_libffi:1}
874 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
875 %if %{biarch}
876   rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
877 %endif
878 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
879 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
880 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
881 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
882 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
883 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3*
884 %endif
885
886 # Remove some useless .la files
887 for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
888     libgomp libstdc++ libsupc++ libgcj-tools libgij libgo \
889     libasan libatomic libitm libtsan libcilkrts liblsan libubsan libvtv; do
890   rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
891 %if %{biarch}
892   rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
893 %endif
894 done
895
896 mkdir -p $RPM_BUILD_ROOT%{_libdir}
897 %if %{biarch}
898 %if %{build_primary_64bit}
899 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
900 %else
901 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
902 %endif
903 %endif
904
905
906 %if %{build_ada}
907 mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
908 ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
909 ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
910 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
911 %if %{biarch}
912 mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
913 ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
914 ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
915 chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
916 %endif
917 %endif
918
919 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
920
921 # Remove some crap from the .la files:
922 for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
923   echo "changing $l"
924 # -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
925   sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
926       -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
927       -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
928       -e '/^dependency_libs/s|-L[^ ]* ||g' \
929 %if %{biarch}
930 %if %{build_primary_64bit}
931       -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
932       -e '/^libdir/s|lib64/\.\./||' \
933 %else
934       -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
935 %endif
936 %endif
937       < $l  > $l.new
938   mv $l.new $l
939 done
940
941 %if 0%{?run_tests:1} 
942 cp `find . -name "*.sum"` ../testresults/
943 cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
944 chmod 644 ../testresults/*
945 %endif
946 # Remove files that we do not need to clean up filelist
947 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
948 rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
949 #rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
950 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
951 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/a.out.h
952 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h
953 # no plugins
954 rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
955 rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
956
957
958 %if 0%{?building_libjava:1}
959 # gcj -static doesn't work properly anyway, unless using --whole-archive
960 # let's save the space instead.
961 find $RPM_BUILD_ROOT -name libgcj.a \
962         -o -name libgcj-tools.a \
963         -o -name libgij.a \
964         -o -name libjvm.a \
965         -o -name libgcj_bc.a \
966   | xargs rm -f
967
968 find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
969   sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
970
971 # security files have broken install locations, also they cause conflicts
972 # between libgcj versions.  Simply delete them here, libgcj will use its
973 # defaults in this case (which is what these files contain anyway).
974 rm -f $RPM_BUILD_ROOT%{libsubdir}/logging.properties
975 rm -r $RPM_BUILD_ROOT%{libsubdir}/security
976 %endif
977
978 %if 0%{?building_libffi:1}
979 # Move libffi headers, remove empty libffi libtool file
980 mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
981 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
982 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
983 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
984 %if %{biarch}
985 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
986 %endif
987 # Generate a simple pkg-config file
988 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
989 echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
990 %endif
991
992 %if %{build_java}
993 %if !%{build_libjava}
994 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
995 rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
996 rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
997 rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
998 rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
999 rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
1000 rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
1001 %endif
1002 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
1003 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
1004 %endif
1005 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
1006 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
1007 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
1008 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
1009 %if %{biarch}
1010 %if %{build_primary_64bit}
1011 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
1012 %else
1013 rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
1014 %endif
1015 %endif
1016 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
1017 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
1018 %if %{build_go}
1019 # gccgo.info isn't properly versioned
1020 rm $RPM_BUILD_ROOT%{_infodir}/gccgo.info*
1021 %endif
1022
1023
1024 %if %{build_java}
1025 %if 0%{?building_libffi:1}
1026 %files -n libffi%{libffi_sover}%{libffi_suffix}
1027 %defattr(-,root,root)
1028 %mainlib libffi.so.%{libffi_sover}*
1029
1030 %if %{separate_biarch}
1031 %files -n libffi%{libffi_sover}%{libffi_suffix}%{separate_biarch_suffix}
1032 %defattr(-,root,root)
1033 %biarchlib libffi.so.%{libffi_sover}*
1034 %endif
1035
1036 %post -n libffi49-devel
1037 %install_info --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
1038 %postun -n libffi49-devel
1039 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
1040
1041 %files -n libffi49-devel
1042 %defattr(-,root,root)
1043 %{_prefix}/include/ffi.h
1044 %{_prefix}/include/ffitarget.h
1045 %mainlib libffi.so
1046 %mainlib libffi.a
1047 %{_libdir}/pkgconfig/libffi.pc
1048 %doc %{_infodir}/libffi%{binsuffix}.info.gz
1049 %doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
1050 %doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
1051 %doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
1052 %doc %{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3.gz
1053
1054 %if %{separate_biarch}
1055 %files -n libffi49-devel%{separate_biarch_suffix}
1056 %defattr(-,root,root)
1057 %biarchlib libffi.so
1058 %biarchlib libffi.a
1059 %endif
1060 %endif
1061 %endif
1062
1063 %if %{build_go}
1064 %files go
1065 %{_prefix}/bin/gccgo%{binsuffix}
1066 %{libsubdir}/go1
1067 %versmainlib libgo.a
1068 %versmainlib libgo.so
1069 %versmainlib libgobegin.a
1070 %dir %mainlibdir/go
1071 %dir %mainlibdir/go/%{gcc_dir_version}
1072 %mainlibdir/go/%{gcc_dir_version}/%{GCCDIST}
1073 %doc %{_mandir}/man1/gccgo%{binsuffix}.1.gz
1074
1075 %if %{separate_biarch}
1076 %files go%{separate_biarch_suffix}
1077 %versbiarchlib libgo.a
1078 %versbiarchlib libgo.so
1079 %versbiarchlib libgobegin.a
1080 %dir %mainlibdirbi/go
1081 %dir %mainlibdirbi/go/%{gcc_dir_version}
1082 %mainlibdirbi/go/%{gcc_dir_version}/%{GCCDIST}
1083 %endif
1084
1085 %files -n libgo%{libgo_sover}%{libgo_suffix}
1086 %defattr(-,root,root)
1087 %mainlib libgo.so.%{libgo_sover}*
1088
1089 %if %{separate_biarch}
1090 %files -n libgo%{libgo_sover}%{libgo_suffix}%{separate_biarch_suffix}
1091 %defattr(-,root,root)
1092 %biarchlib libgo.so.%{libgo_sover}*
1093 %endif
1094 %endif
1095
1096 %if 0%{?run_tests:1}
1097 %files -n gcc49-testresults
1098 %defattr(-,root,root)
1099 %doc testresults/test_summary.txt
1100 %doc testresults/*.sum
1101 %doc testresults/*.log
1102 %endif
1103
1104
1105 %changelog