Updating spec files with new scripts
[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
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 # Also go and objc aren't needed right now
42 %define build_objc 0
43 %define build_objcp 0
44 %define build_go 0
45
46 %define build_cp 1
47 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1}
48
49 %if %{build_objcp}
50 %define build_cp 1
51 %define build_objc 1
52 %endif
53
54 %if %{build_libjava}
55 %define build_cp 1
56 %endif
57
58 # For optional compilers only build C, C++ and Fortran
59 %if 0%{?build_optional_compiler_languages:1}
60 %define build_ada 0
61 %define build_java 0
62 %define build_libjava 0
63 %define build_objc 0
64 %define build_objcp 0
65 %define build_go 0
66 %endif
67
68 # Shared library SONAME versions
69 %ifarch hppa
70 %define libgcc_s 4
71 %else
72 %ifarch m68k
73 %define libgcc_s 2
74 %else
75 %define libgcc_s 1
76 %endif
77 %endif
78 %define libgcj_sover %{nil}
79 %define libgcj_bc_sover %{nil}
80 %define libffi_sover %{nil}
81 %define libgomp_sover %{nil}
82 %define libstdcxx_sover %{nil}
83 %define libobjc_sover %{nil}
84 %define libgfortran_sover %{nil}
85 %define libquadmath_sover %{nil}
86 %define libasan_sover %{nil}
87 %define libtsan_sover %{nil}
88 %define libatomic_sover %{nil}
89 %define libitm_sover %{nil}
90 %define libubsan_sover %{nil}
91 %define liblsan_sover %{nil}
92 %define libvtv_sover %{nil}
93 %define libcilkrts_sover %{nil}
94 %define libgo_sover %{nil}
95
96 # Shared library package suffix
97 # This is used for the "non-standard" set of libraries, the standard
98 # being defined by %product_libs_gcc_ver, the GCC version that should
99 # provide un-suffixed shared library packages following the shared-library
100 # policy.  Even suffixed variants should provide the shared-library policy
101 # mandated names and ensure they conflict with each other.
102 # Note that on SONAME changes of any library the %product_libs_gcc_ver
103 # define needs to be either split or the newest GCC version still providing
104 # the old SONAME needs to unconditionally produce an un-suffixed library
105 # if %product_libs_gcc_ver is newer than it.  Similar the _oldest_ GCC
106 # version first providing a new SONAME needs to unconditionally produce
107 # an un-suffixed library if %product_libs_gcc_ver is lower that it.
108 %if %{!?product_libs_gcc_ver:49}%{?product_libs_gcc_ver} != 49
109 %define pne 1
110 %endif
111 %define libgcc_s_suffix %{?pne:-gcc49}
112 # libgcj SONAME changes with every GCC version
113 %define libgcj_suffix %nil
114 %define libgcj_bc_suffix %{?pne:-gcc49}
115 %define libffi_suffix %{?pne:-gcc49}
116 %define libgomp_suffix %{?pne:-gcc49}
117 %define libstdcxx_suffix %{?pne:-gcc49}
118 %define libobjc_suffix %{?pne:-gcc49}
119 %define libgfortran_suffix %{?pne:-gcc49}
120 %define libquadmath_suffix %{?pne:-gcc49}
121 %define libasan_suffix %{?pne:-gcc49}
122 %define libtsan_suffix %{?pne:-gcc49}
123 %define libatomic_suffix %{?pne:-gcc49}
124 %define libitm_suffix %{?pne:-gcc49}
125
126
127 %define libubsan_suffix %{?pne:-gcc49}
128 %define liblsan_suffix %{?pne:-gcc49}
129 %define libvtv_suffix %{?pne:-gcc49}
130 %define libcilkrts_suffix %{?pne:-gcc49}
131 %define libgo_suffix %{?pne:-gcc49}
132
133 %define selfconflict() %1
134
135 Name: libffi49
136 # With generated files in src we could drop the following
137 BuildRequires: bison
138 BuildRequires: flex
139 BuildRequires: gettext-devel
140 BuildRequires: makeinfo
141 # until here, but at least renaming and patching info files breaks this
142 BuildRequires: gcc-c++
143 BuildRequires: glibc-devel-32bit
144 BuildRequires: mpc-devel
145 BuildRequires: mpfr-devel
146 BuildRequires: perl
147 BuildRequires: zlib-devel
148 %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm aarch64
149 BuildRequires: cloog-isl-devel
150 BuildRequires: isl-devel
151 %endif
152 %if %{build_ada}
153 %define hostsuffix -4.9
154 BuildRequires: gcc49-ada
155 %endif
156 %if 0%{?building_libjava:1}%{?building_testsuite:1}
157 BuildRequires: fastjar
158 %endif
159 %if 0%{?building_libffi:1}
160 BuildRequires: pkg-config
161 %endif
162 %ifarch ia64
163 BuildRequires: libunwind-devel
164 %endif
165 %if 0%{?run_tests:1}
166 BuildRequires: dejagnu
167 BuildRequires: expect
168 BuildRequires: gdb
169 %endif
170
171 %define separate_bi32 0
172 %define separate_bi64 0
173 %ifarch ppc sparcv9
174 # Beware, this does _not_ separate libgcj, as for that one multilibing
175 # is inactive for the time being
176 %define separate_bi64 1
177 %endif
178 %ifarch x86_64 s390x ppc64 sparc64
179 %define separate_bi32 1
180 %endif
181
182 # Define two macros to trigger -32bit or -64bit package variants
183 %define separate_biarch 0
184 %if %{separate_bi32}
185 %define separate_biarch 1
186 %define separate_biarch_suffix -32bit
187 %endif
188 %if %{separate_bi64}
189 %define separate_biarch 1
190 %define separate_biarch_suffix -64bit
191 %endif
192
193 %ifarch x86_64 ia64 s390x alpha ppc64 sparc64 aarch64
194 # 64-bit is primary build target
195 %define build_primary_64bit 1
196 %else
197 %define build_primary_64bit 0
198 %endif
199
200 %define biarch_libjava 0
201
202 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
203
204 URL:          http://gcc.gnu.org/
205 Version: 4.9.1
206 Release:      1
207 %define gcc_dir_version 4.9
208 %define binsuffix -4.9
209
210 %if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
211 Requires: binutils glibc-devel
212 Requires: cpp49 = %{version}-%{release}
213 Requires: libgcc_s%{libgcc_s} >= %{version}-%{release}
214 Requires: libgomp%{libgomp_sover} >= %{version}-%{release}
215 %ifarch %asan_arch
216 Requires: libasan%{libasan_sover} >= %{version}-%{release}
217 %endif
218 %ifarch %tsan_arch
219 Requires: libtsan%{libtsan_sover} >= %{version}-%{release}
220 %endif
221 %ifarch %atomic_arch
222 Requires: libatomic%{libatomic_sover} >= %{version}-%{release}
223 %endif
224 %ifarch %itm_arch
225 Requires: libitm%{libitm_sover} >= %{version}-%{release}
226 %endif
227 %ifarch %cilkrts_arch
228 Requires: libcilkrts%{libcilkrts_sover} >= %{version}-%{release}
229 %endif
230 %ifarch %lsan_arch
231 Requires: liblsan%{liblsan_sover} >= %{version}-%{release}
232 %endif
233 %ifarch %ubsan_arch
234 Requires: libubsan%{libubsan_sover} >= %{version}-%{release}
235 %endif
236 %ifarch %vtv_arch
237 Requires: libvtv%{libvtv_sover} >= %{version}-%{release}
238 %endif
239 Requires: gcc49-info gcc49-locale
240 %endif
241
242 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
243 Source:         gcc-%{version}.tar.bz2
244 Source1:        change_spec
245 Source2:        libffi49-rpmlintrc
246 Source3:        gcc49-rpmlintrc
247 Source4:        ecj.jar
248 Source5:        baselibs.conf
249 Source6:        libgcj49-rpmlintrc
250
251 Group:          Development/Building
252 Summary:        The GNU C Compiler and Support Files
253 License:        GPL-3.0+
254
255 %description
256 Core package for the GNU Compiler Collection, including the C language
257 frontend.
258
259 Language frontends other than C are split to different sub-packages,
260 namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
261 gcc-obj-c++.
262 %package -n libffi%{libffi_sover}%{libffi_suffix}
263 Summary:      Foreign Function Interface library
264 License:        BSD-3-Clause
265 Group:        Development/Building
266 Provides:       libffi%{libffi_sover} = %{version}-%{release}
267
268 %description -n libffi%{libffi_sover}%{libffi_suffix}
269 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.
270
271 %post -n libffi%{libffi_sover}%{libffi_suffix} -p /sbin/ldconfig
272
273 %postun -n libffi%{libffi_sover}%{libffi_suffix} -p /sbin/ldconfig
274 %package -n libffi%{libffi_sover}%{libffi_suffix}-32bit
275 Summary:      Foreign Function Interface library
276 License:        BSD-3-Clause
277 Group:        Development/Building
278 Provides:       libffi%{libffi_sover}-32bit = %{version}-%{release}
279
280 %description -n libffi%{libffi_sover}%{libffi_suffix}-32bit
281 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.
282
283 %post -n libffi%{libffi_sover}%{libffi_suffix}-32bit -p /sbin/ldconfig
284
285 %postun -n libffi%{libffi_sover}%{libffi_suffix}-32bit -p /sbin/ldconfig
286 %package -n libffi%{libffi_sover}%{libffi_suffix}-64bit
287 Summary:      Foreign Function Interface library
288 License:        BSD-3-Clause
289 Group:        Development/Building
290 Provides:       libffi%{libffi_sover}-64bit = %{version}-%{release}
291
292 %description -n libffi%{libffi_sover}%{libffi_suffix}-64bit
293 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.
294
295 %post -n libffi%{libffi_sover}%{libffi_suffix}-64bit -p /sbin/ldconfig
296
297 %postun -n libffi%{libffi_sover}%{libffi_suffix}-64bit -p /sbin/ldconfig
298
299 %package -n libffi49-devel
300 Summary:      Foreign Function Interface library development files
301 License:        BSD 3-Clause
302 Group:        Development/Building
303 Requires: libffi%{libffi_sover} >= %{version}-%{release}
304 Provides: libffi-devel = %{version}-%{release}
305
306 %description -n libffi49-devel
307 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.
308 %package -n libffi49-devel-32bit
309 Summary:      Foreign Function Interface library development files
310 License:        BSD 3-Clause
311 Group:        Development/Building
312 Requires: libffi%{libffi_sover}-32bit >= %{version}-%{release}
313 Provides: libffi-devel-32bit = %{version}-%{release}
314
315 %description -n libffi49-devel-32bit
316 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.
317 %package -n libffi49-devel-64bit
318 Summary:      Foreign Function Interface library development files
319 License:        BSD 3-Clause
320 Group:        Development/Building
321 Requires: libffi%{libffi_sover}-64bit >= %{version}-%{release}
322 Provides: libffi-devel-64bit = %{version}-%{release}
323
324 %description -n libffi49-devel-64bit
325 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.
326
327 %package go
328 Summary:      GNU Go Compiler
329 License:        GPL-3.0+
330 Group:        Development/Languages
331 Requires: gcc49 = %{version}-%{release}
332 Requires: libgo%{libgo_sover} >= %{version}-%{release}
333
334 %description go
335 This package contains a Go compiler and associated development
336 files based on the GNU GCC technology.
337 %package go-32bit
338 Summary:      GNU Go Compiler
339 License:        GPL-3.0+
340 Group:        Development/Languages
341 Requires: gcc49-32bit = %{version}-%{release}
342 Requires: libgo%{libgo_sover}-32bit >= %{version}-%{release}
343
344 %description go-32bit
345 This package contains a Go compiler and associated development
346 files based on the GNU GCC technology.
347 %package go-64bit
348 Summary:      GNU Go Compiler
349 License:        GPL-3.0+
350 Group:        Development/Languages
351 Requires: gcc49-64bit = %{version}-%{release}
352 Requires: libgo%{libgo_sover}-64bit >= %{version}-%{release}
353
354 %description go-64bit
355 This package contains a Go compiler and associated development
356 files based on the GNU GCC technology.
357
358 %package -n libgo%{libgo_sover}%{libgo_suffix}
359 Summary:      GNU Go compiler runtime library
360 License:        BSD-3-Clause
361 Group:        Development/Languages
362 Provides:       libgo%{libgo_sover} = %{version}-%{release}
363
364 %description -n libgo%{libgo_sover}%{libgo_suffix}
365 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.
366
367 %post -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
368
369 %postun -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
370 %package -n libgo%{libgo_sover}%{libgo_suffix}-32bit
371 Summary:      GNU Go compiler runtime library
372 License:        BSD-3-Clause
373 Group:        Development/Languages
374 Provides:       libgo%{libgo_sover}-32bit = %{version}-%{release}
375
376 %description -n libgo%{libgo_sover}%{libgo_suffix}-32bit
377 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.
378
379 %post -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
380
381 %postun -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
382 %package -n libgo%{libgo_sover}%{libgo_suffix}-64bit
383 Summary:      GNU Go compiler runtime library
384 License:        BSD-3-Clause
385 Group:        Development/Languages
386 Provides:       libgo%{libgo_sover}-64bit = %{version}-%{release}
387
388 %description -n libgo%{libgo_sover}%{libgo_suffix}-64bit
389 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.
390
391 %post -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig
392
393 %postun -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig
394
395
396 %package -n gcc49-testresults
397 Summary:      Testsuite results
398 License:        SUSE-Public-Domain
399 Group:        Development/Languages
400
401 %description -n gcc49-testresults
402 Results from running the gcc and target library testsuites.
403
404
405
406
407 # Define the canonical target and host architecture
408 #   %gcc_target_arch  is supposed to be the full target triple
409 #   %TARGET_ARCH      is the canonicalized CPU part
410 #   %CONFIGURE_TARGET is the target triple used for --target=
411 %if 0%{?gcc_target_arch:1}
412 %define CONFIGURE_TARGET %{gcc_target_arch}
413 %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/;")
414 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
415 %define CONFIGURE_TARGET powerpc64-tizen-linux
416 %endif
417 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
418 %define CONFIGURE_TARGET powerpc64-tizen-linux
419 %endif
420 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
421 %define CONFIGURE_TARGET i586-tizen-linux
422 %endif
423 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "aarch64"
424 %define CONFIGURE_TARGET aarch64-tizen-linux
425 %endif
426 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
427 %define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
428 %endif
429 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
430 %define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
431 %endif
432 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
433 %define CONFIGURE_TARGET armv5tel-tizen-linux-gnueabi
434 %endif
435 %else
436 %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
437 %endif
438 %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
439
440 %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
441 %ifarch ppc
442 %define GCCDIST powerpc64-tizen-linux
443 %else
444 %ifarch %sparc
445 %define GCCDIST sparc64-tizen-linux
446 %else
447 %ifarch %arm
448 %define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
449 %else
450 %define GCCDIST %{HOST_ARCH}-tizen-linux
451 %endif
452 %endif
453 %endif
454
455 %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
456 %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
457
458
459 # Versionspecific directories
460 %define versmainlibdir %{libsubdir}
461 %define versmainlibdirbi32 %{libsubdir}/32
462 %define versmainlibdirbi64 %{libsubdir}/64
463 %ifarch ppc
464 %define versmainlibdirbi32 %{libsubdir}
465 %define versmainlibdirbi64 %{libsubdir}/64
466 %endif
467 %if %{build_primary_64bit}
468 %define versmainlibdirbi %{versmainlibdirbi32}
469 %else
470 %define versmainlibdirbi %{versmainlibdirbi64}
471 %endif
472
473 %define mainlibdir %{_libdir}
474 %define mainlibdirbi32 %{_prefix}/lib
475 %define mainlibdirbi64 %{_prefix}/lib64
476 %if %{build_primary_64bit}
477 %define mainlibdirbi %{mainlibdirbi32}
478 %else
479 %define mainlibdirbi %{mainlibdirbi64}
480 %endif
481
482
483 # Now define a few macros that make it easy to package libs and
484 # related files just to the right package, without caring for the
485 # exact path the files are in.
486 #   %mainlib  package X from all dirs that belong to the main package
487 #   %biarchlib   package X from all dirs that belong to the -32/64bit package
488 %define mainlib() %{mainlibdir}/%1\
489 %{nil}
490 %define biarchlib() %{nil}
491 %if %{biarch}
492 %if !%{separate_biarch}
493 %define mainlib() %{mainlibdir}/%1\
494 %{mainlibdirbi}/%1\
495 %{nil}
496 %else
497 %define biarchlib() %{mainlibdirbi}/%1\
498 %{nil}
499 %endif
500 %endif
501
502 %define versmainlib() %{versmainlibdir}/%1\
503 %{nil}
504 %define versbiarchlib() %{nil}
505 %if %{biarch}
506 %if !%{separate_biarch}
507 %define versmainlib() %{versmainlibdir}/%1\
508 %{versmainlibdirbi}/%1\
509 %{nil}
510 %else
511 %define versbiarchlib() %{versmainlibdirbi}/%1\
512 %{nil}
513 %endif
514 %endif
515
516
517
518 %prep
519 %setup -q -n gcc-%{version}
520
521 # We are configuring ppc as ppc64 but with switched multilibs.  Adjust
522 # the libstdc++ abi testsuite baseline files accordingly
523 %ifarch ppc
524 if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
525   mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
526   mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
527         libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
528   mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
529         libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
530 fi
531 %endif
532
533 %build
534 # Avoid rebuilding of generated files
535 contrib/gcc_update --touch
536 # Avoid fucking up testsuite results with Java and indirect dispatch
537 export LD_AS_NEEDED=0
538 # Split version file into version used for directories (X.Y) and
539 # version to report with --version (X.Y.Z).
540 # See also gcc-dir-version.patch.
541 # Also decrement the patchlevel version by one if possible and remove
542 # the 'prerelease' tagging in this case
543 if test `cat gcc/DEV-PHASE` == "prerelease"; then
544   if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
545     : > gcc/DEV-PHASE
546   fi
547   ( 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
548 else
549   mv gcc/BASE-VER gcc/FULL-VER
550 fi
551 cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
552
553 rm -rf obj-%{GCCDIST}
554 mkdir obj-%{GCCDIST}
555 cd obj-%{GCCDIST}
556 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'
557 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
558 %ifarch %ix86
559 # -mcpu is superceded by -mtune but -mtune is not supported by
560 # our bootstrap compiler.  -mcpu gives a warning that stops
561 # the build process, so remove it for now.  Also remove all other
562 # -march and -mtune flags.  They are superseeded by proper
563 # default compiler settings now.
564 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'`
565 %endif
566 %ifarch s390 s390x
567 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
568 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
569 %endif
570 %if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
571 # Kill all -march/tune/cpu because that screws building the target libs
572 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
573 %endif
574 # Replace 2 spaces by one finally
575 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
576
577 languages=c
578 %if %{build_cp}
579 languages=$languages,c++
580 %endif
581 %if %{build_objc}
582 languages=$languages,objc
583 %endif
584 %if %{build_fortran}
585 languages=$languages,fortran
586 %endif
587 %if %{build_objcp}
588 languages=$languages,obj-c++
589 %endif
590 %if %{build_java}
591 languages=$languages,java
592 %endif
593 %if %{build_ada}
594 languages=$languages,ada
595 %endif
596 %if %{build_go}
597 languages=$languages,go
598 %endif
599
600 J=%{?jobs:%jobs}
601 if test -z "$J"; then
602   J=$(getconf _NPROCESSORS_CONF)
603   JL=$(($J * 2))
604 else
605   test 1 -gt "$J" && J=1
606   JL=$(($(getconf _NPROCESSORS_CONF)*2))
607 fi
608 if test "$J" == "0"; then
609   J=1
610 fi
611 if test "$JL" == "0"; then
612   JL=1
613 fi
614 PARALLEL="-j$J -l$JL"
615
616 # we don't want some miscompiles in the testsuite, or some fault in
617 # the compiler to kill the machine.  Hence we limit the amount of memory
618 # by the physical RAM plus half of swap
619 #MEM=$(free -m | awk '/^Mem:/ {print $2}')
620 #SWAP=$(free -m | awk '/^Swap:/ {print $2}')
621 #ulimit -v $(((MEM + SWAP/2)*1024))
622
623 # In general we want to ship release checking enabled compilers
624 # and run BETA with checking enabled.
625 #ENABLE_CHECKING="--enable-checking=yes"
626 ENABLE_CHECKING="--enable-checking=release"
627
628 # Work around tail/head -1 changes
629 export _POSIX2_VERSION=199209
630
631 %if %{build_ada}
632 # Using the host gnatmake like
633 #   CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
634 #   GNATMAKE="gnatmake%{hostsuffix}"
635 # doesn't work due to PR33857, so an un-suffixed gnatmake has to be
636 # available
637 mkdir -p host-tools/bin
638 cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
639 cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
640 cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
641 cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
642 ln -sf /usr/%{_lib} host-tools/%{_lib}
643 export PATH="`pwd`/host-tools/bin:$PATH"
644 %endif
645 #%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
646 #%else
647 #       --enable-threads=posix \
648 #%endif
649 #       --enable-shared \
650 %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
651 # temporary workaround for a miscompilation of hash functions in java code
652 GCJ_EXTRA_FLAGS="-marm"
653 %endif
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         --enable-languages=$languages \
664         $ENABLE_CHECKING \
665         --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
666         --enable-ssp \
667         --disable-libssp \
668         --disable-bootstrap \
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         --enable-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 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