-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
gcc.spec
3545 lines (3072 loc) · 103 KB
/
gcc.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Listed targets are short form and will be expanded by rpm
# gnueabihf variants etc. are inserted by rpm into long_targets
%ifarch %{riscv}
# Still missing a few deps...
%global targets aarch64-linux armv7hnl-linux x86_64-linux x32-linux riscv64-linux aarch64-linuxmusl armv7hnl-linuxmusl i686-linuxmusl x86_64-linuxmusl x32-linuxmusl riscv64-linuxmusl
%global bootstraptargets loongarch64-linux loongarch64-linuxmusl
%else
%ifarch %{arm}
# Also missing a few deps...
%global targets aarch64-linux armv7hnl-linux x32-linux riscv64-linux aarch64-linuxmusl armv7hnl-linuxmusl i686-linuxmusl x32-linuxmusl riscv64-linuxmusl i686-linux
%global bootstraptargets aarch64-linuxuclibc armv7hnl-linuxuclibc i686-linuxuclibc x86_64-linuxuclibc x32-linuxuclibc riscv64-linuxuclibc ppc64-linuxuclibc ppc64le-linuxuclibc ppc64-linuxmusl ppc64-linux ppc64le-linux ppc64le-linuxmusl x86_64-linux x86_64-linuxmusl loongarch64-linux loongarch64-linuxmusl
# FIXME determine why Windoze crosscompilers don't compile on arm32
# i686-mingw32 x86_64-mingw32
%else
%ifarch %{ix86}
# FIXME at some point, we need to figure out why x86_32 to
# x86_64-mingw crosscompilers are broken
%global targets aarch64-linux armv7hnl-linux x32-linux riscv64-linux i686-mingw32
%global bootstraptargets i686-linux aarch64-linuxuclibc armv7hnl-linuxuclibc i686-linuxuclibc riscv64-linuxuclibc ppc64-linux ppc64le-linux x86_64-linux aarch64-linuxmusl armv7hnl-linuxmusl i686-linuxmusl x86_64-linuxmusl x32-linuxmusl riscv64-linuxmusl loongarch64-linux loongarch64-linuxmusl
%else
%global targets aarch64-linux armv7hnl-linux x86_64-linux x32-linux riscv64-linux aarch64-linuxmusl armv7hnl-linuxmusl i686-linuxmusl x86_64-linuxmusl x32-linuxmusl riscv64-linuxmusl i686-mingw32 x86_64-mingw32 i686-linux ppc64le-linux ppc64le-linuxmusl ppc64-linux ppc64-linuxmusl
%global bootstraptargets loongarch64-linux loongarch64-linuxmusl aarch64-linuxuclibc armv7hnl-linuxuclibc i686-linuxuclibc x86_64-linuxuclibc x32-linuxuclibc riscv64-linuxuclibc ppc64-linuxuclibc ppc64le-linuxuclibc
%endif
%endif
%endif
%global offloadtargets amdgcn-amdhsa nvptx-none
# Once bionic is built, add: aarch64-android armv7l-android armv8l-android
%global long_targets %(
for i in %{targets}; do
CPU=$(echo $i |cut -d- -f1)
OS=$(echo $i |cut -d- -f2)
echo -n "$(rpm --target=${CPU}-${OS} -E %%{_target_platform}) "
done
)
%global long_bootstraptargets %(
for i in %{bootstraptargets}; do
CPU=$(echo $i |cut -d- -f1)
OS=$(echo $i |cut -d- -f2)
echo -n "$(rpm --target=${CPU}-${OS} -E %%{_target_platform}) "
done
)
%bcond_without crosscompilers
%bcond_without offloading
# functions with printf format attribute but with special parser and also
# receiving non constant format strings
%define Werror_cflags %{nil}
# avoid failures when testing if compiler used to build gcc can generate
# shared objects (regardless of unresolved symbols)
%define _disable_ld_no_undefined 1
# avoid build failure due to configure built with different autoconf version
%define _disable_libtoolize 1
# -flto in compiler flags breaks things, but --with-build-config=bootstrap-lto
# does the right thing
%define _disable_lto 1
# (tpg) optimize it a bit
%global optflags %{optflags} -O3
#-----------------------------------------------------------------------
%define nof_arches noarch
%define biarches %{x86_64} mips64 mips64el mips mipsel
%define system_gcc 1
%if %{system_gcc}
%define cross_prefix %{nil}
%define cross_program_prefix %{nil}
%define package_suffix %{nil}
%define program_prefix %{nil}
%define program_suffix %{nil}
%define program_long_suffix -%{version}
%else
%define cross_prefix %{nil}
%define cross_program_prefix %{nil}
%define package_suffix %{branch}
%define program_prefix %{nil}
%define program_suffix %{branch}
%define program_long_suffix %{branch}
%endif
# Define GCC target platform, and arch we built for
%define arch %(echo %{_target_cpu}|sed -e "s/\\(i.86\\|athlon\\)/i386/" -e "s/amd64/x86_64/")
%define target_cpu %{arch}
%define gcc_target_platform %{_target_platform}
%define isarch() %(case " %* " in (*" %{arch} "*) echo 1;; (*) echo 0;; esac)
%if %isarch %{x86_64}
%define multilib_32_arch i686
%endif
%if %isarch mips64
%define multilib_32_arch mips
%endif
%if %isarch mips64el
%define multilib_32_arch mipsel
%endif
%if %isarch %{biarches}
%define gcc32_target_platform %{multilib_32_arch}-%{_target_vendor}-%{_target_os}%{?_gnu}
%endif
%define default_compiler 0
%define majorver %(echo %{version} |cut -d. -f1)
%define branch %(echo %{version} |cut -d. -f1-2)
%define prerelease 20240518
#define beta RC
%define gcclibexecdirparent %{_libexecdir}/gcc/%{gcc_target_platform}/
%define gcclibexecdir %{gcclibexecdirparent}/%{version}
%define gccdirparent %{_libdir}/gcc/%{gcc_target_platform}/
%define gccdir %{gccdirparent}/%{version}
%define multigccdir %{_libdir}/gcc/%{gcc_target_platform}/%{version}/32
%define multigccdirn32 %{_libdir}/gcc/%{gcc_target_platform}/%{version}/n32
%define multigccdir64 %{_libdir}/gcc/%{gcc_target_platform}/%{version}/64
%define multilibdir %{_prefix}/lib
#-----------------------------------------------------------------------
%define gcc_major 1
%define libgcc %mklibname gcc %{gcc_major}
%define multilibgcc libgcc%{gcc_major}
%define libx32gcc libx32gcc%{gcc_major}
%define libgcc_devel %mklibname gcc -d
%define libgcc_static_devel %mklibname gcc -d -s
%define stdcxx_major 6
%define libstdcxx %mklibname stdc++ %{stdcxx_major}
%define libstdcxx_devel %mklibname stdc++ -d
%define libstdcxx_static_devel %mklibname stdc++ -d -s
%define multilibstdcxx libstdc++%{stdcxx_major}
%define d_major 2
%define libgdruntime %mklibname gdruntime %{d_major}
%define libgdruntime_devel %mklibname gdruntime -d
%define libgdruntime_static_devel %mklibname gdruntime -d -s
%define multilibgdruntime libgdruntime%{d_major}
%define gfortran_major 5
%define libgfortran %mklibname gfortran %{gfortran_major}
%define libgfortran_devel %mklibname gfortran -d
%define libgfortran_static_devel %mklibname gfortran -d -s
%define multilibgfortran libgfortran%{gfortran_major}
%define ffi_major 4
%define libffi %mklibname ffi %{ffi_major}
%define libffi_devel %mklibname ffi -d
%define libffi_static_devel %mklibname ffi -d -s
%define multilibffi libffi%{ffi_major}
%define mpx_major 2
%define libmpx %mklibname mpx %{mpx_major}
%define libmpx_devel %mklibname mpx -d
%define libmpx_static_devel %mklibname mpx -d -s
%define multilibmpx libmpx%{mpx_major}
%define mpxwrappers_major 2
%define libmpxwrappers %mklibname mpxwrappers %{mpxwrappers_major}
%define libmpxwrappers_devel %mklibname mpxwrappers -d
%define libmpxwrappers_static_devel %mklibname mpxwrappers -d -s
%define multilibmpxwrappers libmpxwrappers%{mpxwrappers_major}
%define gnat_major 1
%define libgnat %mklibname gnat %{gnat_major}
%define libgnat_devel %mklibname gnat -d
%define libgnat_static_devel %mklibname gnat -d -s
%define multilibgnat libgnat%{gnat_major}
%define go_major 19
%define libgo %mklibname go %{go_major}
%define libgo_devel %mklibname go -d
%define libgo_static_devel %mklibname go -d -s
%define multilibgo libgo%{go_major}
%define cc1_major 0
%define libcc1 %mklibname cc1 %{cc1_major}
%define libcc1_devel %mklibname cc1 -d
%define libcc1_static_devel %mklibname cc1 -d -s
%define gomp_major 1
%define libgomp %mklibname gomp %{gomp_major}
%define libgomp_devel %mklibname gomp -d
%define libgomp_static_devel %mklibname gomp -d -s
%define multilibgomp libgomp%{gomp_major}
%define objc_major 4
%define libobjc %mklibname objc %{objc_major}
%define libobjc_devel %mklibname gccobjc -d
%define libobjc_static_devel %mklibname gccobjc -d -s
%define multilibobjc libgccobjc%{objc_major}
%define quadmath_major 0
%define libquadmath %mklibname quadmath %{quadmath_major}
%define libquadmath_devel %mklibname quadmath -d
%define libquadmath_static_devel %mklibname quadmath -d -s
%define multilibquadmath libquadmath%{quadmath_major}
%define ssp_major 0
%define libssp %mklibname ssp %{ssp_major}
%define libssp_devel %mklibname ssp -d
%define libssp_static_devel %mklibname ssp -d -s
%define multilibssp libssp%{ssp_major}
%define itm_major 1
%define libitm %mklibname itm %{itm_major}
%define libitm_devel %mklibname itm -d
%define libitm_static_devel %mklibname itm -d -s
%define multilibitm libitm%{itm_major}
%define asan_major 8
%define libasan %mklibname asan %{asan_major}
%define libasan_devel %mklibname asan -d
%define libasan_static_devel %mklibname asan -d -s
%define multilibasan libasan%{asan_major}
%define tsan_major 2
%define libtsan %mklibname tsan %{tsan_major}
%define libtsan_devel %mklibname tsan -d
%define libtsan_static_devel %mklibname tsan -d -s
%define atomic_major 1
%define libatomic %mklibname atomic %{atomic_major}
%define libatomic_devel %mklibname atomic -d
%define libatomic_static_devel %mklibname atomic -d -s
%define multilibatomic libatomic%{atomic_major}
%define ubsan_major 1
%define libubsan %mklibname ubsan %{ubsan_major}
%define libubsan_devel %mklibname ubsan -d
%define libubsan_static_devel %mklibname ubsan -d -s
%define multilibubsan libubsan%{ubsan_major}
%define vtv_major 0
%define libvtv %mklibname vtv %{vtv_major}
%define libvtv_devel %mklibname vtv -d
%define libvtv_static_devel %mklibname vtv -d -s
%define multilibvtv libvtv%{vtv_major}
%define lsan_major 0
%define liblsan %mklibname lsan %{lsan_major}
%define liblsan_devel %mklibname lsan -d
%define liblsan_static_devel %mklibname lsan -d -s
#-----------------------------------------------------------------------
%define build_ada 0
%define build_asan 0
%define build_check 0
%define build_multilib 0
%define build_go 0
# FIXME This should be re-enabled, for a yet undetermined reason
# "make install" fails on broken *.Po files when building gcc
# 12.0-20220313 with gcc 11.2.1
%define build_d 0
%define build_lto 1
%define build_atomic 1
%define build_objc 0
%define build_objcxx 0
%define build_rust 0
%define build_quadmath 0
%define build_ssp 0
%define build_ubsan %{system_gcc}
%if %isarch %{ix86} %{x86_64} %{arm}
%define build_itm 1
%else
# aarch64 libitm support not implemented yet
%define build_itm 0
%endif
%define build_cloog %{system_gcc}
%define build_cxx %{system_gcc}
%define build_doc 0
%define build_ffi %{system_gcc}
%define build_fortran %{system_gcc}
%define build_gomp %{system_gcc}
# need to build if major does not conflict with current system_gcc
%define build_libgcc %{system_gcc}
%define build_pdf %{build_doc}
%define build_plugin %{system_gcc}
%if %isarch %{x86_64} %{armx}
%define build_tsan %{system_gcc}
%define build_lsan %{system_gcc}
%if %isarch %{x86_64}
%define build_multilib %{system_gcc}
%endif
%endif
%if %isarch %{ix86} %{x86_64}
%define build_quadmath %{system_gcc}
%define build_doc 1
%define build_vtv %{system_gcc}
%endif
%if %isarch %{ix86} %{x86_64}
%define build_ada %{system_gcc}
%endif
%if %isarch %{ix86} %{x86_64} %{armx}
%define build_objc %{system_gcc}
%define build_objcxx %{system_gcc}
#define build_rust %{system_gcc}
# FIXME restore go when it's fixed
# As of 12.0: No rule to make target '../libbacktrace/libbacktrace.la', needed by 'libgo.la'.
%define build_go 0
%if %isarch %{ix86} %{x86_64} %{arm} %{aarch64} %{riscv}
%define build_asan %{system_gcc}
%else
%define build_asan 0
%endif
%endif
%define build_doc 0
%define build_pdf 0
%define package_ffi 0
# Some versions of gcc build shared libgnat/libgnarl, some don't...
%define shared_libgnat 1
# Define C library to use
%define libc glibc
%define libc_shared 1
%define build_minimal 0
%if %{build_minimal}
%define build_ada 0
%define build_asan 0
%define build_atomic 0
%define build_check 0
%define build_go 0
%define build_d 0
%define build_lto 0
%define build_lsan 0
%define build_objc 0
%define build_objcxx 0
%define build_rust 0
%define build_quadmath 0
%define build_ssp 0
%define build_tsan 0
%define build_ubsan 0
%define build_vtv 0
%define build_itm 0
%define build_cloog 0
%define build_cxx 0
%define build_doc 0
%define build_ffi 0
%define build_fortran 0
%define build_gomp 0
%define build_libgcc 0
%define build_pdf 0
%define build_plugin 0
%define package_ffi 0
%define shared_libgnat 0
%endif
#-----------------------------------------------------------------------
Summary: GNU Compiler Collection
%if %{system_gcc}
Name: gcc
%else
Name: gcc%{package_suffix}
%endif
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Group: Development/C
Url: http://gcc.gnu.org/
Version: 14.1.1
Release: %{?prerelease:0.%(echo %{prerelease} |sed -e 's,-,_,g').}1
%if 0%{?prerelease:1}
%define srcname gcc-%{?beta:%{version}}%{!?beta:%{majorver}}-%{?beta:%{beta}-}%{prerelease}
Source0: https://mirrorservice.org/sites/sourceware.org/pub/gcc/snapshots/%{?beta:%{version}}%{!?beta:%{majorver}}-%{?beta:%{beta}-}%{prerelease}/%{srcname}.tar.xz
Source1: https://mirrorservice.org/sites/sourceware.org/pub/gcc/snapshots/%{?beta:%{version}}%{!?beta:%{majorver}}-%{?beta:%{beta}-}%{prerelease}/sha512.sum
%else
# http://www.gnu.org/prep/ftp.html ...
Source0: http://mirror.koddos.net/gcc/releases/gcc-%{version}/gcc-%{version}.tar.xz
Source1: http://mirror.koddos.net/gcc/releases/gcc-%{version}/sha512.sum
%define srcname gcc-%{version}
%endif
%if %{with offloading}
Source2: https://sourceware.org/pub/newlib/newlib-4.4.0.20231231.tar.gz
BuildRequires: nvptx-tools
BuildRequires: llvm
%endif
Source4: c89
Source5: c99
# environment variables for enabling/disabling colorized gcc output
Source10: gcc.sysconfig
Source11: gcc.sh
Source12: gcc.csh
Source100: gcc.rpmlintrc
%ifarch %{x86_64}
# 32-bit glibc needed for 32-bit libstdc++ and friends
BuildRequires: libc6
%endif
BuildRequires: binutils >= 2.20.51.0.2
BuildRequires: dejagnu
BuildRequires: elfutils-devel >= 0.147
BuildRequires: bison
BuildRequires: flex
BuildRequires: gdb
BuildRequires: gettext
BuildRequires: sharutils
BuildRequires: diffutils
BuildRequires: texinfo
BuildRequires: locales-en
BuildRequires: pkgconfig(libtirpc)
BuildRequires: locales-extra-charsets
# For calculating number of CPUs to use
BuildRequires: bc
# For py_puresitedir
%if ! %{build_minimal}
BuildRequires: python >= 3.4
%endif
%if %{build_doc}
BuildRequires: texi2html
%endif
%if %{build_pdf}
BuildRequires: texlive
%endif
BuildRequires: gmp-devel
BuildRequires: mpfr-devel
BuildRequires: libmpc-devel
BuildRequires: pkgconfig(zlib)
%if %{build_cloog}
BuildRequires: ppl-devel >= 0.11
BuildRequires: ppl_c-devel >= 0.11
BuildRequires: pkgconfig(cloog-isl)
BuildRequires: pkgconfig(isl)
%endif
%if %{system_gcc}
Requires: %{name}-cpp >= %{EVRD}
Requires: %{libgcc} >= %{EVRD}
Requires: %{libgcc_devel} >= %{EVRD}
Requires: %{libgomp} >= %{EVRD}
Requires: %{libcc1} >= %{EVRD}
# as gcc now has it's own output color support, let's obsolete the old
# colorgcc with it's perl wrapper script which is slightly buggy with it's
# it's output redirection anyways...
Obsoletes: colorgcc <= 1.3.2-17
%endif
Requires: binutils >= 2.20.51.0.2
Obsoletes: %{_lib}mudflap0 < 4.9.1_2014.05
Obsoletes: %{_lib}mudflap-devel < 4.9.1_2014.05
Obsoletes: %{_lib}mudflap-static-devel < 4.9.1_2014.05
# Presence of a previous cross-mingw toolchain results in libstdc++
# linking against libgcc from that toolchain, potentially causing ABI
# issues.
BuildConflicts: cross-i686-w64-mingw32-gcc
BuildConflicts: cross-x86_64-w64-mingw32-gcc
# Allow "lazy dependencies" (without having to check if a needed
# compiler is a cross-compiler or native). Obviously a native
# compiler is a "cross-compiler" to its own architecture.
Provides: cross-%{gcc_target_platform}-gcc = %{EVRD}
Provides: cross-%{gcc_target_platform}-gcc-bootstrap = %{EVRD}
%patchlist
gcc-13.1.0-crosscompiler-lld-mold.patch
libstdc++-workaround-clang-bug-50248.patch
libstdc++-workaround-clang-bug-80210.patch
libstdc++-12.0-mingw-crosscompilers.patch
gcc-12-fix-stage1-ada-linkage.patch
gcn-run-more-arches.patch
# When we want to start building wine stuff on aarch64
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/0c7e3b486772d9020e82fa53e2f824b5a7d59b11.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/f7b7f5752bf1c5ca3cb0fec1e6c6bf7254b87bf1.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/dfeacdb168fa3ff3df329784e029e5603c6958d6.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/84bbe00ac831c47b54095f0d7e23b2895f437b79.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/275e2096cbfe0cb33e6e30ba15b68ee19ee01fe2.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/8317547abfece2921d6d11aa114d4c56dbc86081.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/1da99bca196950246ba09bd17b4d10242d33dfc0.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/d10f00df67210ce62d5614e3b1b4bc825ee63ce2.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/236d782cb638db02a7a2f3a83745e05903472d05.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/bfb934fbf050ad143d7bd305db8ec441385af04b.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/f9fbd303067ca9a70eb29b02eccc41cef0280c66.patch
#https://github.com/Windows-on-ARM-Experiments/gcc-woarm64/commit/627c4859ee73a975fde71458055c787def775bf0.patch
%description
The gcc package contains the GNU Compiler Collection version %{branch}.
%if %{system_gcc}
%files -f gcc.lang
%else
%files
%endif
%{_bindir}/%{gcc_target_platform}-gcc
%{_bindir}/%{gcc_target_platform}-gcc-ar
%{_bindir}/%{gcc_target_platform}-gcc-nm
%{_bindir}/%{gcc_target_platform}-gcc-ranlib
%{_bindir}/lto-dump
%(
if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
echo "%%optional %{_bindir}/${shortplatform}-gcc"
echo "%%optional %{_bindir}/${shortplatform}-gcc-%{version}"
echo "%%optional %{_bindir}/${shortplatform}-gcc-ar"
echo "%%optional %{_bindir}/${shortplatform}-gcc-nm"
echo "%%optional %{_bindir}/${shortplatform}-gcc-ranlib"
fi
)
%config(noreplace) %{_sysconfdir}/sysconfig/gcc
%{_sysconfdir}/profile.d/90gcc.sh
%{_sysconfdir}/profile.d/90gcc.csh
%if %{default_compiler}
%{_bindir}/c++
%{_bindir}/c89
%{_bindir}/c99
%{_bindir}/cc
%endif
%{_bindir}/gcc
%{_bindir}/gcc-ar
%{_bindir}/gcc-nm
%{_bindir}/gcc-ranlib
%{_bindir}/gcov
%{_bindir}/gcov-dump
%{_bindir}/gcov-tool
%doc %{_mandir}/man1/gcc.1*
%doc %{_mandir}/man1/gcov.1*
%doc %{_mandir}/man1/gcov-dump.1*
%doc %{_mandir}/man1/gcov-tool.1*
%doc %{_mandir}/man1/lto-dump.1*
%doc %{_mandir}/man7/*
%doc %{_infodir}/gcc.info*
%doc %{_infodir}/gccint.info*
%doc %{_infodir}/gccinstall.info*
# Marked optional because of weird failure on armv7hnl
%optional %doc %{_infodir}/libquadmath.info*
%{_bindir}/gcc-%{version}
%{_bindir}/%{gcc_target_platform}-gcc-%{version}
%dir %{_libdir}/gcc
%dir %{gccdirparent}
%dir %{gccdir}
%dir %{gcclibexecdirparent}
%dir %{gcclibexecdir}
%{gcclibexecdir}/cc1
%{gcclibexecdir}/collect2
%{gccdir}/libgcov.a
%{_libdir}/libgcov.a
%{gcclibexecdir}/lto*
%if %{build_lto}
%{gcclibexecdir}/liblto*
%{_libdir}/bfd-plugins/liblto_plugin.so
%endif
%dir %{gccdir}/include
%{gccdir}/include/*.h
%{gcclibexecdir}/install-tools
%if "%{gcclibexecdir}" != "%{gccdir}"
%{gccdir}/install-tools
%endif
%if %{build_quadmath}
%exclude %{gccdir}/include/quadmath*.h
%endif
%if %{build_gomp}
%exclude %{gccdir}/include/omp*.h
%endif
%if %{build_multilib}
%if %isarch mips mipsel
%dir %{multigccdirn32}
%{multigccdirn32}/libgcov.a
%dir %{multigccdir64}
%{multigccdir64}/libgcov.a
%else
%dir %{multigccdir}
%{multigccdir}/libgcov.a
%endif
%endif
%if %{build_doc}
%doc %{_docdir}/gcc
%endif
%if %{build_check}
%doc %{_docdir}/gcc/test_summary.log
%endif
%if %{with offloading}
%exclude %{_prefix}/lib/gcc/*/*/accel
%exclude %{_prefix}/lib/gcc/amdgcn-amdhsa
%exclude %{_prefix}/lib/gcc/nvptx-none
%endif
########################################################################
%if %{build_libgcc}
#-----------------------------------------------------------------------
%package -n %{libgcc}
Summary: GNU C library
Group: System/Libraries
%if "%{libgcc}" != "libgcc"
Provides: libgcc = %{EVRD}
%endif
%description -n %{libgcc}
The %{libgcc} package contains GCC shared libraries for gcc %{branch}
%files -n %{libgcc}
%{_libdir}/libgcc_s.so.%{gcc_major}
#-----------------------------------------------------------------------
%package -n %{libgcc_devel}
Summary: Development files for libgcc
Group: System/Libraries
Requires: %{libgcc} = %{EVRD}
%description -n %{libgcc_devel}
The %{libgcc} package contains header files and object files needed to
build applications with libgcc.
%files -n %{libgcc_devel}
%{_libdir}/libgcc_s.so
%if %{build_multilib}
%{_prefix}/lib/libgcc_s.so
%endif
%{gccdir}/*.o
%{gccdir}/libgcc*.a
%{_libdir}/*.o
%{_libdir}/libgcc*.a
%if %{build_multilib}
%ifarch mips mipsel
%dir %{multigccdirn32}
%{multigccdirn32}/*.o
%{multigccdirn32}/libgcc*.a
%dir %{multigccdir64}
%{multigccdir64}/*.o
%{multigccdir64}/libgcc*.a
%else
%dir %{multigccdir}
%{multigccdir}/*.o
%{multigccdir}/libgcc*.a
%endif
%endif
#-----------------------------------------------------------------------
%if %{build_multilib}
%package -n %{multilibgcc}
Summary: GNU C library
Group: System/Libraries
Conflicts: %{libgcc} < 4.6.2-11
%description -n %{multilibgcc}
The %{multilibgcc} package contains GCC shared libraries for gcc %{branch}
%files -n %{multilibgcc}
%{_prefix}/lib/libgcc_s.so.%{gcc_major}
%endif
#-----------------------------------------------------------------------
# build libgcc
%endif
########################################################################
%if %{build_plugin}
#-----------------------------------------------------------------------
%package plugin-devel
Summary: Headers to build gcc plugins
Group: Development/C
Requires: %{name} = %{EVRD}
Requires: gmp-devel
Requires: mpfr-devel
Requires: libmpc-devel
Requires: ppl-devel
Requires: ppl_c-devel
%description plugin-devel
This package contains header files and other support files
for compiling GCC plugins. The GCC plugin ABI is currently
not stable, so plugins must be rebuilt any time GCC is updated.
%files plugin-devel
%{gccdir}/plugin
%if "%{gccdir}" != "%{gcclibexecdir}"
%{gcclibexecdir}/plugin
%endif
#-----------------------------------------------------------------------
# build_plugin
%endif
########################################################################
%if %{system_gcc}
#-----------------------------------------------------------------------
%package cpp
Summary: The C Preprocessor
Group: Development/C
Requires: %{name} = %{EVRD}
%description cpp
Cpp is the GNU C-Compatible Compiler Preprocessor.
Cpp is a macro processor which is used automatically
by the C compiler to transform your program before actual
compilation. It is called a macro processor because it allows
you to define macros, abbreviations for longer
constructs.
The C preprocessor provides four separate functionalities:
* Inclusion of header files. These are files of declarations that can be
substituted into your program.
* Macro expansion. You can define 'macros,' which are abbreviations for
arbitrary fragments of C code, and then the C preprocessor will replace
the macros with their definitions throughout the program.
* Conditional compilation. Using special preprocessing directives,
you can include or exclude parts of the program according to various
conditions.
* Line control. If you use a program to combine or rearrange source files
into an intermediate file which is then compiled, you can use line
control to inform the compiler about where each source line originated.
%if %{system_gcc}
%files cpp -f cpplib.lang
%else
%files cpp
%endif
%{_bindir}/cpp
%{_bindir}/%{gcc_target_platform}-cpp
%{_bindir}/%{gcc_target_platform}-cpp-%{version}
%(
if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
echo "%%optional %{_bindir}/${shortplatform}-cpp"
echo "%%optional %{_bindir}/${shortplatform}-cpp-%{version}"
fi
)
%if %{system_gcc}
%{_prefix}/lib/cpp
%doc %{_mandir}/man1/cpp.1*
%doc %{_infodir}/cpp*
%if %{build_doc}
%doc %{_docdir}/gcc-cpp
%endif
%endif
#-----------------------------------------------------------------------
# system_gcc
%endif
########################################################################
%if %{build_cxx}
#-----------------------------------------------------------------------
%package c++
Summary: C++ support for gcc
Group: Development/C++
Requires: %{name} = %{EVRD}
%if %{system_gcc}
Requires: %{libstdcxx_devel} = %{version}
%endif
%description c++
This package adds C++ support to the GNU Compiler Collection.
It includes support for most of the current C++ specification,
including templates and exception handling.
%files c++
%if %{system_gcc}
%{_bindir}/g++
%doc %{_mandir}/man1/g++.1*
%endif
%if %{system_gcc}
%{_bindir}/%{gcc_target_platform}-c++
%{_bindir}/%{gcc_target_platform}-g++
%endif
%{_bindir}/c++-%{version}
%{_bindir}/g++-%{version}
%{_libexecdir}/gcc/%{gcc_target_platform}/%{version}/g++-mapper-server
%{_bindir}/%{gcc_target_platform}-g++-%{version}
%(
if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
echo "%%optional %{_bindir}/${shortplatform}-c++"
echo "%%optional %{_bindir}/${shortplatform}-g++"
echo "%%optional %{_bindir}/${shortplatform}-g++-%{version}"
fi
)
%{gcclibexecdir}/cc1plus
#-----------------------------------------------------------------------
%package -n %{libstdcxx}
Summary: GNU Standard C++ library
Group: System/Libraries
%if "%{libstdcxx}" != "libstdc++"
Provides: libstdc++ = %{EVRD}
%endif
%if %{build_doc}
BuildRequires: doxygen
BuildRequires: graphviz
%endif
%description -n %{libstdcxx}
The libstdc++ package contains a rewritten standard compliant
GCC Standard C++ Library.
%if %{system_gcc}
%files -n %{libstdcxx} -f libstdc++.lang
%else
%files -n %{libstdcxx}
%endif
%{_libdir}/libstdc++.so.%{stdcxx_major}*
#-----------------------------------------------------------------------
%if %{build_multilib}
%package -n %{multilibstdcxx}
Summary: GNU Standard C++ library
Group: System/Libraries
Conflicts: %{libstdcxx} < 4.6.2-11
%description -n %{multilibstdcxx}
The libstdc++ package contains a rewritten standard compliant
GCC Standard C++ Library.
%files -n %{multilibstdcxx}
%{multilibdir}/libstdc++.so.%{stdcxx_major}*
%endif
#-----------------------------------------------------------------------
%package -n %{libstdcxx_devel}
Summary: Header files and libraries for C++ development
Group: Development/C++
Requires: %{libstdcxx} = %{EVRD}
%if %{build_multilib}
Requires: %{multilibstdcxx} = %{EVRD}
%endif
%if "%{libstdcxx_devel}" != "libstdc++-devel"
Provides: libstdc++-devel = %{EVRD}
%endif
Provides: stdc++-devel = %{EVRD}
# We don't want to pull in an entire Python environment just because of
# libstdc++'s python based gdb plugin...
%define __requires_exclude_from ^(%{py_puresitedir}|%{_datadir}/gdb/).*$
%description -n %{libstdcxx_devel}
This is the GNU implementation of the standard C++ libraries. This
package includes the header files and libraries needed for C++
development. This includes rewritten implementation of STL.
%files -n %{libstdcxx_devel}
%{_includedir}/c++/%{version}
%{_libdir}/libstdc++.so
%if ! %{cross_compiling}
%{_datadir}/gdb/auto-load%{_libdir}/libstdc++.*.py
%endif
%if %{build_multilib}
%{multilibdir}/libstdc++.so
%if ! %{cross_compiling}
%{_datadir}/gdb/auto-load%{multilibdir}/libstdc++.*.py
%endif
%endif
%{py_puresitedir}/libstdcxx
%if %{build_doc}
%doc %{_docdir}/libstdc++
%endif
#-----------------------------------------------------------------------
%package -n %{libstdcxx_static_devel}
Summary: Static libraries for the GNU standard C++ library
Group: Development/C++
Requires: %{libstdcxx_devel} = %{EVRD}
%if "%{libstdcxx_static_devel}" != "libstdc++-static-devel"
Provides: libstdc++-static-devel = %{EVRD}
%endif
Provides: stdc++-static-devel = %{EVRD}
%description -n %{libstdcxx_static_devel}
Static libraries for the GNU standard C++ library.
%files -n %{libstdcxx_static_devel}
%{_libdir}/libstdc++.*a
%{_libdir}/libstdc++exp.*a
%{_libdir}/libstdc++fs.*a
%{_libdir}/libsupc++.*a
%if %{build_multilib}
%{multilibdir}/libstdc++.*a
%{multilibdir}/libstdc++exp.*a
%{multilibdir}/libstdc++fs.*a
%{multilibdir}/libsupc++.*a
%endif
#-----------------------------------------------------------------------
# build_cxx
%endif
########################################################################
%if %{build_d}
#-----------------------------------------------------------------------
%package d
Summary: D support for gcc
Group: Development/C++
Requires: %{name} = %{EVRD}
%if %{system_gcc}
Requires: %{libgdruntime_devel} = %{version}
%endif
%description d
This package adds D support to the GNU Compiler Collection.
%files d
%if %{system_gcc}
%{_bindir}/gdc
%doc %{_mandir}/man1/gdc.1*
%doc %{_infodir}/gdc.info*
%endif
%if %{system_gcc}
%{_bindir}/%{gcc_target_platform}-gdc
%endif
%(
if [ -n "$(echo %{gcc_target_platform} |cut -d- -f4-)" ]; then
shortplatform="$(echo %{gcc_target_platform} |cut -d- -f1)-$(echo %{gcc_target_platform} |cut -d- -f3-)"
echo "%%optional %{_bindir}/${shortplatform}-gdc"
fi
)
%{gcclibexecdir}/d21
#-----------------------------------------------------------------------
%package -n %{libgdruntime}
Summary: D standard library
Group: System/Libraries
%if "%{libgdruntime}" != "libgdruntime"
Provides: libgdruntime = %{EVRD}
%endif
%description -n %{libgdruntime}
The libphobos package contains a version of the
D Standard Library.
%files -n %{libgdruntime}
%{_libdir}/libgdruntime.so.%{d_major}*
%{_libdir}/libgphobos.so.%{d_major}*
#-----------------------------------------------------------------------
%if %{build_multilib}
%package -n %{multilibgdruntime}
Summary: D Standard library
Group: System/Libraries
%description -n %{multilibgdruntime}
The libphobos package contains a version of the
D Standard Library.
%files -n %{multilibgdruntime}
%{multilibdir}/libgdruntime.so.%{d_major}*
%{multilibdir}/libgphobos.so.%{d_major}*
%endif
#-----------------------------------------------------------------------
%package -n %{libgdruntime_devel}
Summary: Header files and libraries for D development
Group: Development/D
Requires: %{libgdruntime} = %{EVRD}
%if %{build_multilib}
Requires: %{multilibgdruntime} = %{EVRD}
%endif
%if "%{libgdruntime_devel}" != "libgdruntime-devel"
Provides: libgdruntime-devel = %{EVRD}
%endif
%description -n %{libgdruntime_devel}
This is the GNU implementation of the D standard libraries. This
package includes the header files and libraries needed for D
development.
%files -n %{libgdruntime_devel}
%{_libdir}/libgdruntime.so
%{_libdir}/libgphobos.so
%{_libdir}/libgphobos.spec
%{gccdir}/include/d
%if %{build_multilib}
%{multilibdir}/libgdruntime.so
%{multilibdir}/libgphobos.so
%{multilibdir}/libgphobos.spec
%endif
#-----------------------------------------------------------------------
%package -n %{libgdruntime_static_devel}
Summary: Static libraries for the D standard library
Group: Development/D
Requires: %{libgdruntime_devel} = %{EVRD}
%if "%{libgdruntime_static_devel}" != "libgdruntime-static-devel"
Provides: libgdruntime-static-devel = %{EVRD}
%endif
Provides: gdruntime-static-devel = %{EVRD}
%description -n %{libgdruntime_static_devel}
Static libraries for the GNU standard D library.
%files -n %{libgdruntime_static_devel}
%{_libdir}/libgdruntime.*a
%{_libdir}/libgphobos.*a
%if %{build_multilib}
%{multilibdir}/libgdruntime.*a
%{multilibdir}/libgphobos.*a
%endif
#-----------------------------------------------------------------------
# build_d
%endif
########################################################################
%if %{build_ada}
#-----------------------------------------------------------------------
%package gnat
Summary: Ada 95 support for gcc
Group: Development/Other
Requires: %{name} = %{EVRD}
Requires: %{libgnat_devel} = %{EVRD}
# no bootstrap support
BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1