SHA256
7
0
forked from pool/gcc11

163 Commits

Author SHA256 Message Date
Richard Biener
c16c00a72c Remove new fixed includes to fix build in openSUSE:Factory 2025-07-30 13:37:58 +02:00
97724818d9 - Add gcc11-pr116029.patch to fix architecture flags overflow
on aarch64.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=415
2024-07-23 07:04:20 +00:00
ca1eedf9c1 - Update to GCC 11.5 release (5cc4c42a0d4de08715c2eef8715), git3328
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=414
2024-07-19 06:35:20 +00:00
bd0b0f0c1e - Update to gcc-11 branch head (30ffca55041518b76cfd59877), git3317
* includes GCC 11.5 RC1

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=413
2024-07-12 13:11:35 +00:00
6c378c02c6 - Update to gcc-11 branch head (f03b182f7f23e14d587cfa1da), git2630
* includes GCC 11.4 release

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=412
2023-06-30 08:02:46 +00:00
037088ab2c - Update to gcc-11 branch head (fcf62b96ec9ae32d56530ba86), git2550
* includes GCC 11.4 RC1

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=410
2023-05-22 12:28:07 +00:00
0137f905ef - Backport _multibuild auto-generation. Remove redundant
.changes files.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=408
2023-05-09 13:27:51 +00:00
bad25994d4 Accepting request 1085141 from home:dimstar:Factory
- Add _multibuild to define 2nd spec file as additional flavor.
  Eliminates the need for source package links in OBS.

OBS-URL: https://build.opensuse.org/request/show/1085141
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=407
2023-05-09 13:23:08 +00:00
722a9ce4f5 Accepting request 1055809 from home:lnussel:usrmerge
Replace transitional %usrmerged macro with regular version check (boo#1206798)

OBS-URL: https://build.opensuse.org/request/show/1055809
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=405
2023-01-09 08:25:59 +00:00
b58fc8fcaa - Update to gcc-11 branch head (bd0c76a2329e7fe6d6612c225), git2076
* includes fix for -Wmismatched-tags ICE  [bsc#1204599]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=403
2022-10-24 10:35:06 +00:00
df6d4edf38 - Remove fixed sys/mount.h
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=401
2022-08-31 14:21:49 +00:00
1e5e9517ee Accepting request 993837 from home:marxin:branches:devel:gcc
- Remove workaround for obs-service-format_spec_file.

OBS-URL: https://build.opensuse.org/request/show/993837
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=400
2022-08-09 07:25:48 +00:00
e861c433bb - Update to gcc-11 branch head (a55184ada8e2887ca94c0ab070, git1902
* includes build fixes when building against glibc 2.33.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=398
2022-07-21 13:48:47 +00:00
c5e2da250d OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=397 2022-05-16 07:40:10 +00:00
20553ccc27 * includes SLS hardening backport on x86_64. [bsc#1195283]
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=396
2022-04-26 07:18:35 +00:00
d5c3159cc6 - Update to the GCC 11.3.0 release.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=394
2022-04-21 08:25:25 +00:00
7f188da7e9 - Update to gcc-11 branch head (691af15031e00227ba6d5935c), git1635
* includes fix for Firefox ICE  [gcc#105256]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=393
2022-04-20 07:04:15 +00:00
5a6717a7cc - Update to gcc-11 branch head (53254184bda6305ac38e6e374), git1623
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=392
2022-04-14 06:23:01 +00:00
859f3a0bd0 - Update to gcc-11 branch head (5b87d9f50b421e18be2a4ef95), git1593
* includes gcc11-pr104931.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=391
2022-04-13 07:02:22 +00:00
d549c561b4 - Update to gcc-11 branch head (faba16dd683750fc82c49fdd4), git1543
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=390
2022-04-08 06:14:53 +00:00
5d9a333a33 - Add provides/conflicts to libgccjit.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=388
2022-04-01 11:56:19 +00:00
b00855e212 - Add provides/conflicts to glibc crosses since only one GCC version
for the same target can be installed at the same time.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=387
2022-04-01 09:54:23 +00:00
4d1f47ccfb - Update to gcc-11 branch head (6a1150d1524aeda3381b21717), git1406
* includes change to adjust gnats idea of the target, fixing
    the build of gprbuild.  [bsc#1196861]
- Add gcc11-pr104931.patch to fix miscompile of embedded premake
  in 0ad on i586.  [bsc#1197065]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=385
2022-03-16 15:18:58 +00:00
2d37b01d80 Accepting request 960276 from home:dirkmueller:Factory
- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune 

- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune

OBS-URL: https://build.opensuse.org/request/show/960276
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=384
2022-03-10 07:45:25 +00:00
dde1b80596 - Add a list of Obsoletes to libstdc++6-pp-gcc11 so updates from
packages provided by older GCC work.  Add a requires from that
  package to the corresponding libstc++6 package to keep those
  at the same version.  [bsc#1196107]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=382
2022-03-07 12:24:25 +00:00
b99de3149e OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=381 2022-02-10 14:23:14 +00:00
0d43036d5c - Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=380
2022-02-10 12:35:38 +00:00
69a491454a - Put libstdc++6-pp Requires on the shared library and drop
to Recoomends.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=379
2022-02-09 15:12:50 +00:00
9fc1ae8253 Accepting request 947216 from home:Andreas_Schwab:Factory
- Remove sys/rseq.h from include-fixed

OBS-URL: https://build.opensuse.org/request/show/947216
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=378
2022-01-19 07:48:34 +00:00
8a60e8a770 * Fix ICE in is_this_parameter with coroutines. [boo#1193659]
* Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]
  * Fix ICE in is_this_parameter with coroutines.  [boo#1193659]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=377
2022-01-03 10:06:00 +00:00
544b91716e Accepting request 943547 from home:marxin:branches:devel:gcc
- Update to gcc-11 branch head (d4a1d3c4b377f1d4acb), git1173
  * Fix D memory corruption in -M output.

OBS-URL: https://build.opensuse.org/request/show/943547
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=376
2022-01-03 10:02:53 +00:00
bdd3e97408 - Enable some cross compilers also in rings
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=375
2021-11-26 15:26:13 +00:00
85144fa81e - Remove cross compilers for i386 target
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=374
2021-11-26 15:07:14 +00:00
6a237edb87 - Enable the cross compilers also on i586
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=373
2021-11-26 15:03:08 +00:00
61ef3e354e - Update to gcc-11 branch head (7510c23c1ec53aa4a62705f03), git1018
* fixes libgccjit issue showing up in emacs build  [boo#1192951]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=372
2021-11-24 10:44:39 +00:00
4701db690b - Update to gcc-11 branch head (fb1bc2c0865f2b15a219e1127), git1005
* fixes issue with debug dumping together with -o /dev/null
- Package mwaitintrin.h

- Remove spurious exit from change_spec.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=371
2021-11-22 08:59:14 +00:00
971c4d6b20 - Remove spurious exit from change_spec.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=370
2021-10-20 13:59:46 +00:00
21f9309a80 - Enable the full cross compiler, cross-aarch64-gcc11 and
cross-riscv64-gcc11 now provide a fully hosted C (and C++)
  cross compiler, not just a freestanding one.  I.e. with a cross
  glibc.  They don't yet support the sanitizer libraries.
  Part of [jsc#OBS-124].

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=369
2021-09-20 17:20:17 +00:00
8b580d39f7 Accepting request 913043 from home:Andreas_Schwab:Factory
- Require libgccjit%{libgccjit_sover}%{libgccjit_suffix} from
  libgccjit%{libgccjit_sover}-devel%{libdevel_suffix}.

OBS-URL: https://build.opensuse.org/request/show/913043
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=368
2021-08-19 12:57:18 +00:00
5e1e60b925 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=367 2021-08-16 10:26:34 +00:00
b9aaa4ec26 - Refresh gcc10-foffload-default.patch
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=365
2021-07-21 09:23:11 +00:00
bc90dc1121 - Update to gcc-11 branch head (076930b9690ac3564638636f6b), git536
* Includes GCC 11.2 RC1.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=364
2021-07-21 09:10:22 +00:00
000df02af5 - Properly adjust GPL-3.0 WITH GCC-exception-3.1 to
GPL-3.0-or-later WITH GCC-exception-3.1

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=363
2021-07-21 09:06:53 +00:00
ade144d8ab Accepting request 907275 from home:Andreas_Schwab:glibc:rebuild
- Remove bits/unistd_ext.h from include-fixed

OBS-URL: https://build.opensuse.org/request/show/907275
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=362
2021-07-21 08:53:30 +00:00
ae8bb97c0f - Add BuildRequires on netcfg for the testsuite when testing Go.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=361
2021-07-09 07:35:35 +00:00
b2c409295f Fix unpackages files in the cross newlib -bootstrap packages.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=360
2021-07-07 14:05:50 +00:00
2761f829ac - Provide a libc-bootstrap cross compiler for aarch64 and riscv64
- More preparation for a full glibc cross compiler (not yet active)

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=359
2021-07-06 15:53:20 +00:00
ed30af4be1 - Update to gcc-11 branch head (62bbb113ae68a7e724255e1714), git400
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=358
2021-06-25 12:07:16 +00:00
1fdc95c44f - Update to gcc-11 branch head (f9fc20f0a535c36ab494fb1e5e), git370
* Fixes issue with legacy Fortran code.  [gcc#101123, boo#1187273]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=357
2021-06-21 06:16:05 +00:00
520f3236d9 - Update to gcc-11 branch head (79c1185de4a05fdea13b6b0207), git340
* Fixes ceph build failure.  [gcc#101078]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=355
2021-06-17 07:23:28 +00:00
8dca648493 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=354 2021-06-16 06:36:14 +00:00
db39cbe3ae - Change disable_32bit to only disable multilibs for arhcs subject
to 32bit/64bit handling and make it effective on x86_64.
- Remove the duplicate spec header from cross.spec.in

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=353
2021-06-15 09:18:00 +00:00
5d73b0ce85 - Add newlib-4.1.0-aligned_alloc.patch to fix nvptx cross build
fail.  [bsc#1187153]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=352
2021-06-11 06:10:00 +00:00
41195b1f73 - Update to gcc-11 branch head (c6d2487098f9dde4f9ac59e5be), git273
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=351
2021-06-09 09:40:36 +00:00
66c84a8a45 Accepting request 898551 from home:dirkmueller:Factory
- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
   needed by arm-trusted-firmware

- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
   needed by arm-trusted-firmware

- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
   needed by arm-trusted-firmware

- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
   needed by arm-trusted-firmware

- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
   needed by arm-trusted-firmware

- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
   needed by arm-trusted-firmware

- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
   needed by arm-trusted-firmware

- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,

OBS-URL: https://build.opensuse.org/request/show/898551
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=350
2021-06-09 08:49:57 +00:00
56b4d16e91 Accepting request 895524 from home:Andreas_Schwab:Factory
- Fix value of %slibdir64 for usrmerge

OBS-URL: https://build.opensuse.org/request/show/895524
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=348
2021-05-26 12:24:09 +00:00
1408ab1785 - Disable build-id generation on non-glibc targeting cross compilers.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=346
2021-05-10 13:47:43 +00:00
d938669f8d - Update to gcc-11 branch head (23855a176609fe8dda6abaf2b2), git121
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=345
2021-05-10 12:12:03 +00:00
14eb11b5e6 - Drop upstreamed gcc11-no-offload.patch.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=344
2021-04-29 09:11:53 +00:00
9104e418b5 - Update to gcc-11 branch head (cd0a059bd384da58d43674496a7), git67
* Includes GCC 11.1 release

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=343
2021-04-29 08:41:53 +00:00
9a5610a042 - Update to gcc-11 branch head (7a7fc01b9d20afb1a2b805d93cb), git31
* Includes GCC 11.1 RC2
- Add gcc11-no-offload.patch and
- Add gcc11-gdwarf-4-default.patch to default to DWARF4 generation
  in SLES15 and older.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=342
2021-04-23 13:04:02 +00:00
d44d3544ac yet work. Package expanded symlinks so concurrent installs do
not pull in another llvm-mc.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=341
2021-04-22 14:03:19 +00:00
b6938623fe - Force using llvm11 for amdgcn offloading since llvm12 doesn't
yet work.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=340
2021-04-22 12:42:04 +00:00
8aea7971d2 - BuildRequire procps from gcc11-testresults if we test go.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=339
2021-04-22 10:29:28 +00:00
5306059b50 - Add gcc11-testsuite-fixes.patch, gcc11-no-offload.patch and
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=338
2021-04-22 07:57:16 +00:00
c553beb476 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=337 2021-04-21 14:12:06 +00:00
441a7601cf - Enable gfortran for offload compilers.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=336
2021-04-21 14:07:56 +00:00
31e8a6806f - Add gcc11-testsuite-fixes.patch and
gcc11-amdgcn-disable-hot-cold-partitioning.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=335
2021-04-21 12:32:16 +00:00
f6ae87ecef - Update to gcc-11 branch head (27350b77a92062667427100afb4), git10
* Includes GCC 11.1 RC1

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=334
2021-04-20 15:00:45 +00:00
Martin Liška
5c2c94d114 Bump to 49813aad3292f7f2bef69206274da78a9a7116ed
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=333
2021-04-16 19:54:27 +00:00
Martin Liška
a04480bf49 Bump to 2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=332
2021-04-15 19:51:48 +00:00
8e094f69ed - Disable nvptx offloading on aarch64 since it doesn't work.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=331
2021-04-15 11:23:42 +00:00
Martin Liška
5e422bdcbf Bump to a87d3f964df31d4fbceb822c6d293e85c117d992
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=330
2021-04-14 19:51:33 +00:00
Martin Liška
434d1c0a90 Bump to 527bc0181d3ea36f11dcaa8aea7704466bd0f01b
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=329
2021-04-14 14:01:50 +00:00
Martin Liška
cf546e4cc7 Bump to 8084ab15a3e300e3b2c537e56e0f3a1b00778aec
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=328
2021-04-13 19:57:53 +00:00
Martin Liška
d302a84744 Bump to 8f17d44ad986e0ae7e81c81179463000ee9d7f43
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=327
2021-04-12 19:55:17 +00:00
Martin Liška
c50028fd43 Bump to a0ecde220da1edf7062ec429aa2c7a5b4103e92f
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=326
2021-04-12 05:32:27 +00:00
Martin Liška
5200cb311f Bump to b04093adb28bd6ee8b0390e840219fd2bba134db
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=325
2021-04-09 19:53:48 +00:00
8300535335 - Remove gcc48-remove-mpfr-2.4.0-requirement.patch which does no
longer apply.
- Arrange for a C++ 11 capable host compiler to be available.
- Do not require ISL for cross compiler builds on old distros.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=324
2021-04-09 12:37:35 +00:00
Martin Liška
af6d60ccb1 Bump to 123b3e03c911a43054c1f88f5d3110e1d084dd4e
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=323
2021-04-08 19:52:27 +00:00
Martin Liška
f9f7e96b0b Bump to a528594cf9a74e5a0fbac13ef673064ed73e1b89
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=322
2021-04-07 19:53:56 +00:00
Martin Liška
bc2e0bbf75 Bump to 8685348075d91945066dea9b564bd42cbc1d22bd
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=321
2021-04-06 19:54:01 +00:00
Martin Liška
33aadeb2fb Bump to 9f4c41147a41d08a74990eafe69a1064a3c13435
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=320
2021-04-05 19:51:15 +00:00
Martin Liška
43038219f0 Bump to fc27115d6107f219e6f3dc610c99210005fe9dc5
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=319
2021-04-03 14:11:24 +00:00
Martin Liška
ad9de4fb6b Bump to 2a26351b598242c2fbce95d2a0baacce0084aec6
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=318
2021-04-02 19:50:45 +00:00
Martin Liška
c4bfe48f5a Bump to af78514a18ca5c9aaa10813bb4dc639d7ccdf0cc
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=317
2021-04-01 19:54:08 +00:00
Martin Liška
452c4fb10a Bump to ea9a39e63eba1ba72aa3608317d1c40ae6bcef55
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=316
2021-03-31 19:52:20 +00:00
Martin Liška
5b6aa077fe Bump to 5f3c6027257118469a722816e228394b5978ddb0
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=315
2021-03-30 19:57:05 +00:00
Martin Liška
b4b038a60b Bump to 645bfc161987a12395869728b63ed01084d23c00
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=314
2021-03-29 21:02:59 +00:00
Martin Liška
7c4ad94273 Bump to c453a817129c2c362726a9773390419f1df7dda3
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=313
2021-03-26 20:52:28 +00:00
Martin Liška
f193359101 Bump to 6081d8994ed1a0aef6b7f5fb34f091faa3580416
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=312
2021-03-26 09:38:04 +00:00
Martin Liška
0ab3d256b5 Bump to 990a123ef7ca42fe7bb019b68eafdff80f6241aa
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=311
2021-03-25 20:52:04 +00:00
Martin Liška
aec045e04b Bump to 4f00c4d40a539360938607561460904663c64cda
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=310
2021-03-24 20:54:28 +00:00
Martin Liška
74a752e89d Bump to 7af8ec508f8105a4c4ea94246c1c4c25596cf6a5
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=309
2021-03-23 20:53:24 +00:00
Martin Liška
fc7eed18a9 Bump to 2bfd081f1bce3fb7f791591e741723dce4e884ed
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=308
2021-03-22 20:53:39 +00:00
Martin Liška
55284cf471 Bump to 19ff0b0d816e6e7d7657a8559e9957d79dc1d77f
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=307
2021-03-20 20:02:47 +00:00
Martin Liška
eb2b7a3dbe Bump to e1df2c343633ed27b7a7bd9f6b5989c75b38f1d4
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=306
2021-03-19 21:34:27 +00:00
Martin Liška
656c6de144 Bump to a4670f58ebff805e35268542aac35f9791980954
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=305
2021-03-18 20:53:07 +00:00
Martin Liška
9089d8bcc1 Bump to 0cc218d42c241ed286cc5af9fb7d2e45386f7a24
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=304
2021-03-18 11:57:36 +00:00
Martin Liška
1cc5f11ea6 Update copyright lines and bufixes link.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=303
2021-03-18 11:54:56 +00:00
Martin Liška
9b72a17a5f Bump to f3e9c98a9f40fc24bb4ecef6aaa94ff799c8d587
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=302
2021-03-17 20:54:13 +00:00
Martin Liška
1605cf575d Bump to adf14bdbc10d4114865a08cf20020a2616039057
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=301
2021-03-17 14:42:36 +00:00
Martin Liška
370701feff Clean up Bumps in the changes files.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=300
2021-03-17 14:31:58 +00:00
Martin Liška
7a50c97a2b Bump to 0251051db64f13c9a31a05c8133c31dc50b2b235
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=299
2021-03-16 21:02:40 +00:00
Martin Liška
453c023349 Remove duplicite License tag.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=298
2021-03-16 14:54:42 +00:00
Martin Liška
ccced0791f Bump to 1973beaf92c629f26df98eff33ab1bce7f3ea4ef
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=297
2021-03-16 08:30:14 +00:00
Martin Liška
a4fd3cb17f Fix spec file.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=296
2021-03-16 08:26:01 +00:00
Martin Liška
a0f1ada9e6 Bump to 7b843d4716698957606c05219a66d3fc4b44ba83
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=295
2021-03-15 20:52:32 +00:00
Martin Liška
b2555f32cc Bump to 52b67943d1dc713712c8afd09b64a2eddfd731fe
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=294
2021-03-15 08:00:44 +00:00
Martin Liška
667a98b519 Bump to 6e885ad3287388192e52e9b524dbaa408507c0a4
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=293
2021-03-12 20:55:08 +00:00
Martin Liška
166801a568 Bump to 5643f6f396ef7f60d317aef07dd98978cec6afd0
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=292
2021-03-11 20:59:34 +00:00
Martin Liška
417171942b Bump to 8f316f41ce0fd90570f4d4444c29c639a322a0be
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=291
2021-03-10 20:53:35 +00:00
Martin Liška
1287155918 Bump to 0455cd76b687621f28488393c81d0854200a220a
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=290
2021-03-09 22:01:15 +00:00
Martin Liška
583a953089 Bump to bd85b4dd2dd7b00b6342ed1e33fb48035a3dcb61
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=289
2021-03-08 22:10:35 +00:00
72e5f65453 - Update embedded newlib version from 3.3.0 to 4.1.0.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=288
2021-03-08 14:11:48 +00:00
Martin Liška
bd9861dfae Bump to a18ebd6c439227b048a91fbfa66f5983f884c157
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=287
2021-03-07 19:30:43 +00:00
Martin Liška
389f24b538 Bump to a3ad6489d38982434faef3bc5f33e3c28c5f7c74
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=286
2021-03-05 21:58:05 +00:00
Martin Liška
eb01c9e7fc Bump to 331763de7d4850702a0f67298f36017c73cdb103
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=285
2021-03-05 11:56:27 +00:00
Martin Liška
1637aafeb3 Bump to 0d737ed2171165ba39ab5647f8a94c588fc9a898
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=284
2021-03-04 21:56:30 +00:00
Martin Liška
4065f0a9f9 Bump to f3641ac70eb0ae9f8983b7ddb1660c92439565de
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=283
2021-03-04 03:36:06 +00:00
Martin Liška
cf9aecc15b Bump to 5a233ae4d8c978a3c863c8199d6c3050389a84d1
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=282
2021-03-02 18:05:48 +00:00
Martin Liška
fd4176ee46 Bump to 4ed0a92f6cfc647e2ad8ceaa1e5709545c915465
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=281
2021-03-01 18:05:12 +00:00
Martin Liška
d00067e781 Bump to 4ed0a92f6cfc647e2ad8ceaa1e5709545c915465
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=280
2021-03-01 14:54:25 +00:00
Martin Liška
ab4ee07ce8 Bump to 9d5b4b60bdfcebec4c5075d22b7913540698af64
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=279
2021-02-26 18:05:07 +00:00
Martin Liška
3106c7821d Bump to 44ab1cc1df6ec4ff50210401acdcb26e80343541
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=278
2021-02-25 18:08:08 +00:00
Martin Liška
ac60845897 Bump to 9e0d8a375bae07486c839228a520eaed9004a4f3
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=277
2021-02-24 18:08:17 +00:00
Martin Liška
8596d5f4a6 Bump to 47145e6916f58e1cd4f562c06fa7289da49f690c
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=276
2021-02-23 18:05:12 +00:00
Martin Liška
22daaf7ab8 Bump to f4a3cea3fb025735c09af5c7f14d61152c4c5794
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=275
2021-02-23 08:15:33 +00:00
a36ddd6985 Accepting request 874371 from home:marxin:branches:devel:gcc
- Pack %{GCCDIST}-gcc%{binsuffix}.
- Add a new dependency for libgccjit.

OBS-URL: https://build.opensuse.org/request/show/874371
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=274
2021-02-23 08:03:44 +00:00
Martin Liška
ba6164b822 Bump to a7de0ffa34a9559919b14094b804175d7d9b446f
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=273
2021-02-22 18:06:49 +00:00
Martin Liška
1a488de7a8 Bump to bfe83ae38e871a2e4205ce63fd9d3247dff412bd
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=272
2021-02-19 18:05:17 +00:00
Martin Liška
c7e5d2f066 Bump to 1a2a7096e5e20d736c6138179470b21aa5a74864
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=271
2021-02-19 15:04:14 +00:00
Martin Liška
73b5c571f3 Bump to 3bfa96895b3219afd93a7038850baef4b63c1f82
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=270
2021-02-18 18:05:35 +00:00
Martin Liška
a03a54a1fd Bump to e0139b2a912585496f23c352f0e2c56895f78fbf
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=269
2021-02-17 18:06:17 +00:00
Martin Liška
956a1401db Bump to 799478b8914c438f7a33eb319efbae69c81f2111
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=268
2021-02-16 18:05:49 +00:00
Martin Liška
3bf1b3a9ef Bump to a33927c9ab4af3f4595251ce0c8ba54db821b039
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=267
2021-02-15 18:06:22 +00:00
Martin Liška
de7db32022 Bump to 0631e008adc759cc801d0d034224ee6b4bcf31aa
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=266
2021-02-12 18:05:53 +00:00
Martin Liška
e5438afb74 Bump to bc0f7db7ebb649fc4c290cb7327fba5c17d4ed28
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=265
2021-02-11 18:07:13 +00:00
Martin Liška
ca3a43024c Bump to 22a6d99d0a0d383856440ea479b4a9edabf23961
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=264
2021-02-11 12:22:52 +00:00
Martin Liška
2f42158ee9 Bump to 0f39fb7b001df7cdba56cd5c572d0737667acd2c
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=262
2021-02-10 19:20:11 +00:00
Martin Liška
3761f863f8 Bump to 73e52926b6c5f02fb3f34706b4afb2d8bcd86638
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=261
2021-02-09 18:05:49 +00:00
Martin Liška
a98999b4e1 Bump to efcd941e86b507d77e90a1b13f621e036eacdb45
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=260
2021-02-08 17:42:10 +00:00
Martin Liška
8c24e4b239 Bump to 7a18bc4ae62081021f4fd90d591a588cac931f77
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=259
2021-02-05 18:05:11 +00:00
Martin Liška
d62049bdf6 - New package, inherits from gcc10
* gcc-add-defaultsspec.diff, add the ability to provide a specs
    file that is read by default
  * tls-no-direct.diff, avoid direct %fs references on x86 to not
    slow down Xen
  * gcc43-no-unwind-tables.diff, do not produce unwind tables for
    CRT files
  * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr
    for ppc, just a testcase
  * gcc44-textdomain.patch, make translation files version specific
    and adjust textdomain to find them
  * gcc44-rename-info-files.patch, fix cross-references in info files
    when renaming them to be version specific
  * gcc48-libstdc++-api-reference.patch, fix link in the installed
    libstdc++ html documentation
  * gcc48-remove-mpfr-2.4.0-requirement.patch, make GCC work with
    earlier mpfr versions on old products
  * gcc5-no-return-gcc43-workaround.patch, make build work with
    host gcc 4.3
  * gcc7-remove-Wexpansion-to-defined-from-Wextra.patch, removes
    new warning from -Wextra
  * gcc7-avoid-fixinc-error.diff
  * gcc9-reproducible-builds-buildid-for-checksum.patch
  * gcc9-reproducible-builds.patch
  * gcc10-amdgcn-llvm-as.patch
  * gcc10-foffload-default.patch
- libgccjit subpackage is added.
- HWASAN is built for aarch64 target.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=258
2021-02-05 08:44:14 +00:00
Martin Liška
f616afde94 Bump to 072f20c555907cce38a424da47b6c1baa8330169
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=257
2021-02-05 08:04:48 +00:00
Martin Liška
3cc4f52498 Bump to 5c62e4f255bfac65e18213fd93ee1c9908b4a750
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=255
2021-02-03 18:05:30 +00:00
Martin Liška
2542b5a56c Bump to fc130ab54fd9a254f07426f9c180c367b039d7f9
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=254
2021-02-03 10:20:20 +00:00
Martin Liška
ae98afdacc Sync with gcc10 spec file.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=253
2021-02-03 10:18:50 +00:00
Martin Liška
bea457b88a Remove Remove include-fixed/pthread.h.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=252
2021-02-03 10:14:35 +00:00
Martin Liška
fdb7676a11 Bump to 709718d4d89e5976257f53e67dcb8ba704574c56
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=251
2021-02-02 18:05:46 +00:00
Martin Liška
b8feaa567e Bump to 8bfdf51d8595537937f990947a7a36d3a63dca5f
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=250
2021-02-01 18:05:53 +00:00
Martin Liška
7ae660f578 Bump to 91a95ad2ae0e0f2fa953fafe55ff2ec32c8277d5
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=249
2021-01-29 18:05:36 +00:00
Martin Liška
b86e1414f7 Bump to 31a0ab9213f780d2fa1da6e4879df214c0f247f9
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=248
2021-01-28 18:05:26 +00:00
Martin Liška
7500e28d6d Bump to 3670dbe49059ab1746ac2e3b77940160c05db6c2
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=247
2021-01-27 18:05:19 +00:00
Martin Liška
dfffe31e84 Bump to 6e44c09b2df7282e0b519f241cf54438ab183b5e
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=246
2021-01-26 18:05:19 +00:00
Martin Liška
70b8371568 Bump to 0194e2f02d72731e444ae2076db339ffb1448435
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=245
2021-01-25 18:05:59 +00:00
Martin Liška
1a56a639ea Bump to 25fc4d01a8ed1888e6a65597a3387349eb3c950c
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=244
2021-01-22 18:05:12 +00:00
Martin Liška
592fac7c19 Fix %files for jit subpackages.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=243
2021-01-22 10:22:07 +00:00
Martin Liška
f958d225ca Bump to 0fb7aa205afebe178c06683037ccd4c41104337a
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=242
2021-01-21 18:05:12 +00:00
Martin Liška
6a85018210 Bump to 27c792895bd809115c1f70672835b7fdff74d318
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=241
2021-01-20 18:05:17 +00:00
Martin Liška
05b867c3ab Bump to 7ab1abf3b82a3bcfff9b7bc596166fef6a0d83ab
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=240
2021-01-20 07:52:40 +00:00
Martin Liška
b262d0579f Bump to 6a2a38620cf178b53b217051f32d1d7bbba86fc9
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=239
2021-01-19 18:05:31 +00:00
Martin Liška
f74140a647 Bump to 76c1dd15e4a056a59a13b2208af23a6bd67c2682
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc11?expand=0&rev=238
2021-01-18 18:05:09 +00:00
70 changed files with 5664 additions and 2790 deletions

29
_multibuild Normal file
View File

@@ -0,0 +1,29 @@
<multibuild>
<flavor>gcc11-testresults</flavor>
<flavor>cross-aarch64-gcc11-bootstrap</flavor>
<flavor>cross-aarch64-gcc11</flavor>
<flavor>cross-riscv64-gcc11-bootstrap</flavor>
<flavor>cross-riscv64-gcc11</flavor>
<flavor>cross-arm-gcc11</flavor>
<flavor>cross-avr-gcc11-bootstrap</flavor>
<flavor>cross-avr-gcc11</flavor>
<flavor>cross-x86_64-gcc11</flavor>
<flavor>cross-s390x-gcc11</flavor>
<flavor>cross-sparc-gcc11</flavor>
<flavor>cross-sparc64-gcc11</flavor>
<flavor>cross-ppc64-gcc11</flavor>
<flavor>cross-ppc64le-gcc11</flavor>
<flavor>cross-m68k-gcc11</flavor>
<flavor>cross-mips-gcc11</flavor>
<flavor>cross-hppa-gcc11</flavor>
<flavor>cross-arm-none-gcc11-bootstrap</flavor>
<flavor>cross-arm-none-gcc11</flavor>
<flavor>cross-epiphany-gcc11-bootstrap</flavor>
<flavor>cross-epiphany-gcc11</flavor>
<flavor>cross-riscv64-elf-gcc11-bootstrap</flavor>
<flavor>cross-riscv64-elf-gcc11</flavor>
<flavor>cross-rx-gcc11-bootstrap</flavor>
<flavor>cross-rx-gcc11</flavor>
<flavor>cross-nvptx-gcc11</flavor>
<flavor>cross-amdgcn-gcc11</flavor>
</multibuild>

View File

@@ -55,10 +55,9 @@ p
gcc.spec.in \
| sed -e 's%@base_ver@%'$base_ver'%g' \
>> gcc$base_ver-testresults.spec
test -f gcc$base_ver.changes \
&& ( ln -f gcc$base_ver.changes gcc$base_ver-testresults.changes; )
echo '<multibuild>' > _multibuild
echo '<flavor>'gcc$base_ver-testresults'</flavor>' >> _multibuild
add_cross() {
local pkgname="$1"; shift
@@ -77,7 +76,8 @@ add_cross() {
sed -e "s#@base_ver@#$base_ver#" \
-e "s/^\(ExclusiveArch.*\) $rpmtarget[^ \r]*/\1 /" \
>> $pkgname.spec
test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes $pkgname.changes
echo '<flavor>'$pkgname'</flavor>' >> _multibuild
}
add_newlib_cross() {
@@ -86,6 +86,11 @@ add_newlib_cross() {
add_cross $1 $2 $3 "%define gcc_target_newlib 1"
}
add_glibc_cross() {
add_cross $1-bootstrap $2 $3 "%define gcc_libc_bootstrap 1"
add_cross $1 $2 $3 "%define gcc_target_glibc 1"
}
# We now support "proper" cross-compilers to suse targets via a
# cross-glibc package, enable that via for example
#
@@ -93,11 +98,11 @@ add_newlib_cross() {
#
# For now keep the old way of doing things
if test "$do_crosses" = 1 ; then
add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux %define gcc_icecream 1
add_glibc_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux
add_glibc_cross cross-riscv64-gcc$base_ver riscv64 riscv64-suse-linux
add_cross cross-arm-gcc$base_ver arm arm-suse-linux-gnueabi %define gcc_icecream 1
add_cross cross-avr-gcc$base_ver-bootstrap avr avr "%define gcc_libc_bootstrap 1"
add_cross cross-avr-gcc$base_ver avr avr
add_cross cross-i386-gcc$base_ver i386 i586-suse-linux %define gcc_icecream 1
add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1
add_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux %define gcc_icecream 1
add_cross cross-sparc-gcc$base_ver sparcv9 sparc-suse-linux %define gcc_icecream 1
@@ -107,7 +112,6 @@ add_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux %define gcc_
add_cross cross-m68k-gcc$base_ver m68k m68k-suse-linux %define gcc_icecream 1
add_cross cross-mips-gcc$base_ver mips mips-suse-linux %define gcc_icecream 1
add_cross cross-hppa-gcc$base_ver hppa hppa-suse-linux %define gcc_icecream 1
add_cross cross-riscv64-gcc$base_ver riscv64 riscv64-suse-linux %define gcc_icecream 1
add_newlib_cross cross-arm-none-gcc$base_ver arm-none arm-none-eabi
add_newlib_cross cross-epiphany-gcc$base_ver epiphany epiphany-elf
#add_newlib_cross cross-nds32le-gcc$base_ver nds32le nds32le-elf
@@ -123,6 +127,6 @@ for f in *.spec; do
sed -i -e '/^# .*-\(BEGIN\|END\)$/d' $f
done
osc service localrun format_spec_file
echo '</multibuild>' >> _multibuild
exit 0
osc service localrun format_spec_file

View File

@@ -0,0 +1,980 @@
#
# spec file for package cross-aarch64-gcc11-bootstrap
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pkgname cross-aarch64-gcc11-bootstrap
%define cross_arch aarch64
%define gcc_target_arch aarch64-suse-linux
%define gcc_libc_bootstrap 1
# nospeccleaner
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define build_nvptx 0
%define build_gcn 0
%define build_d 0
%define enable_plugins 0
%define build_jit 0
%define use_lto_bootstrap 0
%define binutils_target %{cross_arch}
%if "%{cross_arch}" == "armv7l" || "%{cross_arch}" == "armv7hl"
%define binutils_target arm
%endif
%if "%{cross_arch}" == "armv6l" || "%{cross_arch}" == "armv6hl"
%define binutils_target arm
%endif
%if "%{cross_arch}" == "armv5tel"
%define binutils_target arm
%endif
%if "%{cross_arch}" == "arm-none"
%define binutils_target arm
%endif
%if "%{cross_arch}" == "riscv64-elf"
%define binutils_target riscv64
%endif
%if "%{cross_arch}" == "sparcv9"
%define binutils_target sparc
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu"
%define binutils_os %{canonical_target}
%else
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
%define binutils_os %{canonical_target}-elf
%else
%if "%{binutils_target}" == "arm"
%define binutils_os %{canonical_target}-suse-linux-gnueabi
%else
%if 0%{?gcc_accel:1}
%define binutils_os %{gcc_target_arch}
%else
%define binutils_os %{canonical_target}-suse-linux
%endif
%endif
%endif
%endif
%if 0%{?gcc_icecream:1}
%define sysroot %{_prefix}/%{gcc_target_arch}
%else
# offloading builds newlib in-tree and can install in
# the GCC private path without extra sysroot
%if 0%{!?gcc_accel:1}
# use same sysroot as in binutils.spec
%define sysroot %{_prefix}/%{binutils_os}/sys-root
%endif
%endif
%if %{suse_version} >= 1220
%define selfconflict() %1
%else
%define selfconflict() otherproviders(%1)
%endif
Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -11
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
# %%cross_arch is supposed to be the rpm target variant arch
# %%TARGET_ARCH will be the canonicalized target CPU part
# %%HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%if 0%{?disable_32bit:1}
%define biarch 0
%else
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%endif
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%if "%{cross_arch}" != "nvptx"
%if "%{cross_arch}" != "amdgcn"
BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
BuildRequires: bison
BuildRequires: flex
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
ExclusiveArch: x86_64
%else
ExclusiveArch: do-not-build
%endif
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
# file conflicts with it and is no longer packaged
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
Conflicts: %selfconflict %{gcc_target_arch}-gcc
%endif
%if 0%{?gcc_libc_bootstrap:1}
# The -bootstrap packages file-conflict with the non-bootstrap variants.
# Even if we don't actually (want to) distribute the bootstrap variants
# the following avoids repo-checker spamming us endlessly.
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
%if 0%{?gcc_icecream:1}
Note this is only useful for building freestanding things like the
kernel since it fails to include target libraries and headers.
%endif
%if 0%{?gcc_libc_bootstrap:1}
This is a package that is necessary for bootstrapping another package
only, it is not intended for any other use.
%endif
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch -P 18 -p1
%endif
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
%build
%define _lto_cflags %{nil}
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# SLE11 does not allow empty rpms
%if %{suse_version} < 1310
echo "This is a dummy package to provide a dependency." > README
%endif
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
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'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
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'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
%if %{build_d}
languages=$languages,d
%endif
%if %{build_jit}
languages=$languages,jit
%endif
# In general we want to ship release checking enabled compilers
# which is the default for released compilers
#ENABLE_CHECKING="--enable-checking=yes"
ENABLE_CHECKING="--enable-checking=release"
#ENABLE_CHECKING=""
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p target-tools/bin
ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar
ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as
ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld
ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm
ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
%if %{build_nvptx} || %{build_gcn}
--enable-offload-targets=\
%if %{build_nvptx}
nvptx-none,\
%endif
%if %{build_gcn}
amdgcn-amdhsa,\
%endif
%endif
%if %{build_nvptx}
--without-cuda-driver \
%endif
%if %{build_jit}
--enable-host-shared \
%endif
$ENABLE_CHECKING \
--disable-werror \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
%if 0%{suse_version} >= 1500
--enable-cet=auto \
%else
--disable-cet \
%endif
--disable-libcc1 \
%if %{enable_plugins}
--enable-plugin \
%else
--disable-plugin \
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
%if 0%{suse_version} <= 1320
--with-default-libstdcxx-abi=gcc4-compatible \
%endif
%if %{build_d}
--enable-libphobos \
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
--enable-gnu-indirect-function \
%endif
%endif
--program-suffix=%{binsuffix} \
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%endif
%endif
%if 0%{?binutils_os:1}
--with-build-time-tools=/usr/%{binutils_os}/bin \
%endif
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%if "%{TARGET_ARCH}" == "nvptx"
--enable-as-accelerator-for=%{GCCDIST} \
--disable-sjlj-exceptions \
--enable-newlib-io-long-long \
%endif
%if "%{TARGET_ARCH}" == "amdgcn"
--enable-as-accelerator-for=%{GCCDIST} \
--enable-libgomp \
%endif
%if "%{TARGET_ARCH}" == "avr"
--enable-lto \
--without-gxx-include-dir \
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
--disable-decimal-float \
--disable-libffi \
--disable-libgomp \
--disable-libmudflap \
--disable-libquadmath \
--disable-shared \
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "aarch64"
--enable-fix-cortex-a53-835769 \
--enable-fix-cortex-a53-843419 \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
%if %{suse_version} >= 1350
--with-cpu=power8 \
--with-tune=power9 \
%else
%if %{suse_version} >= 1315 && %{suse_version} != 1320
--with-cpu=power8 \
--with-tune=power8 \
%else
--with-cpu=power7 \
--with-tune=power7 \
%endif
%endif
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--enable-targets=powerpcle-linux \
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
%if 0%{?sle_version:%sle_version} >= 150000
--with-arch-32=x86-64 \
%else
--with-arch-32=i586 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
%else
--with-tune=z9-109 --with-arch=z900 \
%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
%if %{suse_version} >= 1310
--with-tune=zEC12 --with-arch=z196 \
%else
--with-tune=z9-109 --with-arch=z900 \
%endif
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
%if "%{TARGET_ARCH}" == "riscv64"
--disable-multilib \
%endif
%if %{use_lto_bootstrap} && !0%{?building_testsuite:1}
--with-build-config=bootstrap-lto-lean \
--enable-link-mutex \
%endif
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
%endif
%if 0%{?gcc_icecream:%gcc_icecream}
%package -n cross-%cross_arch-gcc11-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc11-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%endif
%if 0%{?nvptx_newlib:1}
%package -n cross-nvptx-newlib11-devel
Summary: Newlib for the nvptx offload target
Group: Development/Languages/C and C++
Provides: cross-nvptx-newlib-devel = %{version}-%{release}
Conflicts: cross-nvptx-newlib-devel
%description -n cross-nvptx-newlib11-devel
Newlib development files for the nvptx offload target compiler.
%endif
%if 0%{?amdgcn_newlib:1}
%package -n cross-amdgcn-newlib11-devel
Summary: Newlib for the amdgcn offload target
Group: Development/Languages/C and C++
Provides: cross-amdgcn-newlib-devel = %{version}-%{release}
Conflicts: cross-amdgcn-newlib-devel
%description -n cross-amdgcn-newlib11-devel
Newlib development files for the amdgcn offload target compiler.
%endif
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
%if "%{TARGET_ARCH}" == "amdgcn"
# libtool needs to be able to call ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# install and fixup target parts
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
make DESTDIR=$RPM_BUILD_ROOT install-target
%if %{build_cp}
# So we installed libstdc++ headers into %prefix where they conflict
# with other host compilers. Rip out the non-target specific parts
# again. Note not all cross targets support libstdc++, so create the
# directory to make things easier.
mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version}
find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r
find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm
# And also remove installed pretty printers which conflict in similar ways
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
ln -s /usr/%{binutils_os}/bin/$prog $RPM_BUILD_ROOT%{targetlibsubdir}/
done
%endif
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# for accelerators remove all frontends but lto1 and also install-tools
%if 0%{?gcc_accel:1}
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
rm -rf $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
# also move things from target directories into the accel path since
# that is the place where we later search for (only)
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm
ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib
%endif
%if 0%{?gcc_icecream:%gcc_icecream}
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{binutils_os}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar --no-recursion --mtime @${SOURCE_DATE_EPOCH:-$(date +%s)} --format=gnu -cv `find *|LC_ALL=C sort` |\
gzip -n9 > ../%{name}_%{_arch}.tar.gz
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%endif
# we provide update-alternatives for selecting a compiler version for
# crosses
%if 0%{!?gcc_accel:1}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
%post
%{_sbindir}/update-alternatives \
--install %{_bindir}/%{gcc_target_arch}-gcc %{gcc_target_arch}-gcc %{_bindir}/%{gcc_target_arch}-gcc%{binsuffix} 11 \
--slave %{_bindir}/%{gcc_target_arch}-cpp %{gcc_target_arch}-cpp %{_bindir}/%{gcc_target_arch}-cpp%{binsuffix} \
%if %{build_cp}
--slave %{_bindir}/%{gcc_target_arch}-c++ %{gcc_target_arch}-c++ %{_bindir}/%{gcc_target_arch}-c++%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-g++ %{gcc_target_arch}-g++ %{_bindir}/%{gcc_target_arch}-g++%{binsuffix} \
%endif
--slave %{_bindir}/%{gcc_target_arch}-gcc-ar %{gcc_target_arch}-gcc-ar %{_bindir}/%{gcc_target_arch}-gcc-ar%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
%{_sbindir}/update-alternatives --remove %{gcc_target_arch}-gcc %{_bindir}/%{gcc_target_arch}-gcc%{binsuffix}
fi
%endif
%files
%defattr(-,root,root)
%if 0%{?gcc_accel:1}
%{_prefix}/bin/%{GCCDIST}-accel-%{gcc_target_arch}-*
%dir %{libsubdir}
%dir %{libsubdir}/accel
%{libsubdir}/accel/%{gcc_target_arch}
%else
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-c++
%{_prefix}/bin/%{gcc_target_arch}-g++
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
%if 0%{!?gcc_libc_bootstrap:1}
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
%{_prefix}/include/c++
%endif
%endif
%endif
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%endif
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1} && 0%{?sysroot:1}
%{sysroot}
%endif
%if 0%{?gcc_icecream:%gcc_icecream}
%files -n cross-%cross_arch-gcc11-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%endif
%if 0%{?nvptx_newlib:1}
%files -n cross-nvptx-newlib11-devel
%defattr(-,root,root)
%{_prefix}/%{gcc_target_arch}
%endif
%if 0%{?amdgcn_newlib:1}
%files -n cross-amdgcn-newlib11-devel
%defattr(-,root,root)
%{_prefix}/%{gcc_target_arch}
%{_prefix}/bin/amdgcn-amdhsa-ar
%{_prefix}/bin/amdgcn-amdhsa-as
%{_prefix}/bin/amdgcn-amdhsa-ld
%{_prefix}/bin/amdgcn-amdhsa-nm
%{_prefix}/bin/amdgcn-amdhsa-ranlib
%endif
%changelog

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-aarch64-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,31 +19,26 @@
%define pkgname cross-aarch64-gcc11
%define cross_arch aarch64
%define gcc_target_arch aarch64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define gcc_target_glibc 1
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,20 +208,25 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
@@ -224,12 +236,13 @@ ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-amdgcn-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch amdgcn
%define gcc_target_arch amdgcn-amdhsa
%define gcc_accel 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-arm-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch arm
%define gcc_target_arch arm-suse-linux-gnueabi
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-arm-none-gcc11-bootstrap
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,30 +21,25 @@
%define gcc_target_arch arm-none-eabi
%define gcc_target_newlib 1
%define gcc_libc_bootstrap 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -115,7 +110,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -123,28 +118,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -186,7 +187,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -202,35 +209,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -241,8 +254,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -250,7 +263,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -263,12 +276,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -284,31 +303,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -391,21 +416,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -451,7 +485,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -463,7 +501,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -471,7 +515,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -501,7 +545,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -523,14 +574,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -543,24 +586,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -614,8 +648,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -649,10 +685,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -710,7 +754,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -728,7 +771,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -752,13 +794,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -819,7 +862,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -836,9 +883,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -860,27 +909,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-arm-none-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch arm-none
%define gcc_target_arch arm-none-eabi
%define gcc_target_newlib 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-avr-gcc11-bootstrap
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch avr
%define gcc_target_arch avr
%define gcc_libc_bootstrap 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-avr-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch avr
%define gcc_target_arch avr
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-epiphany-gcc11-bootstrap
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,30 +21,25 @@
%define gcc_target_arch epiphany-elf
%define gcc_target_newlib 1
%define gcc_libc_bootstrap 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -115,7 +110,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -123,28 +118,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -186,7 +187,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -202,35 +209,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -241,8 +254,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -250,7 +263,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -263,12 +276,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -284,31 +303,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -391,21 +416,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -451,7 +485,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -463,7 +501,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -471,7 +515,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -501,7 +545,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -523,14 +574,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -543,24 +586,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -614,8 +648,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -649,10 +685,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -710,7 +754,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -728,7 +771,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -752,13 +794,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -819,7 +862,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -836,9 +883,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -860,27 +909,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-epiphany-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch epiphany
%define gcc_target_arch epiphany-elf
%define gcc_target_newlib 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-hppa-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch hppa
%define gcc_target_arch hppa-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-m68k-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch m68k
%define gcc_target_arch m68k-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-mips-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch mips
%define gcc_target_arch mips-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-nvptx-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch nvptx
%define gcc_target_arch nvptx-none
%define gcc_accel 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-ppc64-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch ppc64
%define gcc_target_arch powerpc64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-ppc64le-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch ppc64le
%define gcc_target_arch powerpc64le-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-riscv64-elf-gcc11-bootstrap
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,30 +21,25 @@
%define gcc_target_arch riscv64-elf
%define gcc_target_newlib 1
%define gcc_libc_bootstrap 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -115,7 +110,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -123,28 +118,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -186,7 +187,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -202,35 +209,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -241,8 +254,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -250,7 +263,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -263,12 +276,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -284,31 +303,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -391,21 +416,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -451,7 +485,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -463,7 +501,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -471,7 +515,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -501,7 +545,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -523,14 +574,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -543,24 +586,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -614,8 +648,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -649,10 +685,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -710,7 +754,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -728,7 +771,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -752,13 +794,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -819,7 +862,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -836,9 +883,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -860,27 +909,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-riscv64-elf-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch riscv64
%define gcc_target_arch riscv64-elf
%define gcc_target_newlib 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-i386-gcc11
# spec file for package cross-riscv64-gcc11-bootstrap
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,34 +16,29 @@
#
%define pkgname cross-i386-gcc11
%define cross_arch i386
%define gcc_target_arch i586-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define pkgname cross-riscv64-gcc11-bootstrap
%define cross_arch riscv64
%define gcc_target_arch riscv64-suse-linux
%define gcc_libc_bootstrap 1
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-riscv64-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,31 +19,26 @@
%define pkgname cross-riscv64-gcc11
%define cross_arch riscv64
%define gcc_target_arch riscv64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define gcc_target_glibc 1
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-rx-gcc11-bootstrap
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,30 +21,25 @@
%define gcc_target_arch rx-elf
%define gcc_target_newlib 1
%define gcc_libc_bootstrap 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -115,7 +110,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -123,28 +118,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -186,7 +187,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -202,35 +209,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -241,8 +254,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -250,7 +263,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -263,12 +276,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -284,31 +303,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -391,21 +416,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -451,7 +485,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -463,7 +501,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -471,7 +515,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -501,7 +545,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -523,14 +574,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -543,24 +586,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -614,8 +648,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -649,10 +685,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -710,7 +754,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -728,7 +771,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -752,13 +794,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -819,7 +862,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -836,9 +883,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -860,27 +909,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-rx-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch rx
%define gcc_target_arch rx-elf
%define gcc_target_newlib 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-s390x-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch s390x
%define gcc_target_arch s390x-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-sparc-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch sparcv9
%define gcc_target_arch sparc-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-sparc64-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch sparc64
%define gcc_target_arch sparc64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package cross-x86_64-gcc11
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,30 +20,25 @@
%define cross_arch x86_64
%define gcc_target_arch x86_64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -114,7 +109,7 @@ Name: %{pkgname}
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
@@ -122,28 +117,34 @@ Release: 0
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@@ -185,7 +186,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -201,35 +208,41 @@ BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: isl-devel
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
Requires: nvptx-tools
ExclusiveArch: aarch64
ExclusiveArch:
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
BuildRequires: llvm
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
Requires: lld
Requires: llvm
Requires: llvm11
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
# technically also SLE12 SP5 but do not bother there
%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100
@@ -240,8 +253,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -249,7 +262,7 @@ ExclusiveArch: ppc64le ppc64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -262,12 +275,18 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc11
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc11
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@@ -283,31 +302,37 @@ only, it is not intended for any other use.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -390,21 +415,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -450,7 +484,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -462,7 +500,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -470,7 +514,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -500,7 +544,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -522,14 +573,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -542,24 +585,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -613,8 +647,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -648,10 +684,18 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -709,7 +753,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -727,7 +770,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -751,13 +793,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -818,7 +861,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -835,9 +882,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -859,27 +908,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,28 +1,22 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# nospeccleaner
# In the staging/ring projects, we don't want to build the cross-* packages, but by default, we do:
# In the staging/ring projects, we don't want to build the unneeded
# cross-* packages, but by default, we do:
%bcond_with ringdisabled
%if %{with ringdisabled}
%if "%{cross_arch}" != "arm-none" && "%{cross_arch}" != "arm" && "%{cross_arch}" != "aarch64" && "%{cross_arch}" != "riscv64" && %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
%define build_cp 0%{!?gcc_accel:1}
%if 0%{?gcc_libc_bootstrap:1}
%define build_cp 0
%endif
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_fortran 0%{?gcc_accel:1}
%define build_objc 0
%define build_objcp 0
%define build_go 0
@@ -98,7 +92,13 @@ BuildRequires: cross-%{binutils_target}-binutils
Requires: cross-%{binutils_target}-binutils
%endif
%endif
%define hostsuffix %{nil}
%if 0%{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%else
BuildRequires: gcc-c++
%endif
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
@@ -115,32 +115,38 @@ BuildRequires: makeinfo
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
%if 0%{?gcc_target_newlib:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_libc_bootstrap:1}
%if 0%{?gcc_target_newlib:1}
BuildRequires: cross-%cross_arch-newlib-devel
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" == "avr"
%if "%{cross_arch}" == "avr"
BuildRequires: avr-libc
%endif
%if 0%{?gcc_target_glibc:1}
BuildRequires: cross-%cross_arch-glibc-devel
Requires: cross-%cross_arch-glibc-devel
%endif
%endif
%if "%{cross_arch}" == "nvptx"
BuildRequires: nvptx-tools
Requires: nvptx-tools
Requires: cross-nvptx-newlib-devel >= %{version}-%{release}
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64
%define nvptx_newlib 1
%endif
%if "%{cross_arch}" == "amdgcn"
# amdgcn uses the llvm assembler and linker
BuildRequires: llvm
# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't
# work at the moment so require llvm11
BuildRequires: llvm11
BuildRequires: lld
Requires: llvm
Requires: llvm11
Requires: lld
Requires: cross-amdgcn-newlib-devel >= %{version}-%{release}
# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does
@@ -153,8 +159,8 @@ ExclusiveArch: do-not-build
%define amdgcn_newlib 1
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if 0%{?gcc_icecream:1}%{?gcc_target_glibc:1}%{?gcc_libc_bootstrap:1}
ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@@ -162,7 +168,7 @@ ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
@@ -175,6 +181,13 @@ Conflicts: %selfconflict %{gcc_target_arch}-gcc
Conflicts: cross-%{cross_arch}-gcc@base_ver@
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc@base_ver@
%endif
AutoReqProv: off
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
@@ -195,7 +208,7 @@ only, it is not intended for any other use.
# BUILD-COMMON-BEGIN
# BUILD-COMMON-END
%if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1}
%if 0%{!?gcc_icecream:1}
make %{?_smp_mflags}
%else
make %{?_smp_mflags} all-host
@@ -257,7 +270,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%if 0%{?gcc_icecream:1}
# so expect the sysroot to be populated from natively built binaries
%else
%if 0%{!?gcc_libc_bootstrap:1}
# We want shared libraries to reside in the sysroot but the .so symlinks
# on the host. Once we have a cross target that has shared libs we need
# to manually fix up things here like we do for non-cross compilers
@@ -275,7 +287,6 @@ find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f
rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix}
%endif
%endif
%endif
%if 0%{?binutils_os:1}
for prog in as ld; do
@@ -299,13 +310,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
%if "%{TARGET_ARCH}" == "amdgcn"
mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin
ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar
ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as
ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld
ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm
ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib
ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar
ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as
ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld
@@ -366,7 +378,11 @@ for ex in gcc cpp \
%if %{build_cp}
c++ g++ \
%endif
gcc-ar gcc-nm gcc-ranlib lto-dump gcov gcov-dump gcov-tool; do
gcc-ar gcc-nm gcc-ranlib lto-dump \
%if 0%{!?gcc_libc_bootstrap:1}
gcov gcov-dump gcov-tool \
%endif
; do
ln -s %{_sysconfdir}/alternatives/%{gcc_target_arch}-$ex \
%{buildroot}%{_bindir}/%{gcc_target_arch}-$ex
done
@@ -383,9 +399,11 @@ done
--slave %{_bindir}/%{gcc_target_arch}-gcc-nm %{gcc_target_arch}-gcc-nm %{_bindir}/%{gcc_target_arch}-gcc-nm%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-lto-dump %{gcc_target_arch}-lto-dump %{_bindir}/%{gcc_target_arch}-lto-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcc-ranlib %{gcc_target_arch}-gcc-ranlib %{_bindir}/%{gcc_target_arch}-gcc-ranlib%{binsuffix} \
%if 0%{!?gcc_libc_bootstrap:1}
--slave %{_bindir}/%{gcc_target_arch}-gcov %{gcc_target_arch}-gcov %{_bindir}/%{gcc_target_arch}-gcov%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-dump %{gcc_target_arch}-gcov-dump %{_bindir}/%{gcc_target_arch}-gcov-dump%{binsuffix} \
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix}
--slave %{_bindir}/%{gcc_target_arch}-gcov-tool %{gcc_target_arch}-gcov-tool %{_bindir}/%{gcc_target_arch}-gcov-tool%{binsuffix} \
%endif
%postun
if [ ! -f %{_bindir}/%{gcc_target_arch}-gcc ] ; then
@@ -407,27 +425,31 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%if 0%{!?gcc_libc_bootstrap:1}
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcc
%{_prefix}/bin/%{gcc_target_arch}-cpp
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-nm
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ranlib
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-lto-dump
%if 0%{!?gcc_libc_bootstrap:1}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27962ebd714c96c6986502aed1b5063dfda10b805d7e1e277ed38fdb830d94be
size 79068404

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f13503fb4ccd340fe9faeb9b9c56853cc37dba787f375bdf948e0c30bed63339
size 79368292

View File

@@ -1,7 +1,7 @@
#
# spec file for package gcc9
# spec file for package gcc${version}
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,6 +17,16 @@
# nospeccleaner
%if 0%{?suse_version} < 1550
%define _slibdir /%{_lib}
%define slibdir /lib
%define slibdir64 /lib64
%else
%define _slibdir %{_libdir}
%define slibdir %{_prefix}/lib
%define slibdir64 %{_prefix}/lib64
%define usrmerged 1
%endif
# Ada currently fails to build on a few platforms, enable it only
# on those that work
@@ -71,7 +81,7 @@
%define build_d 0
%endif
%ifarch x86_64 aarch64
%ifarch x86_64
%define build_nvptx 1
%else
%define build_nvptx 0
@@ -177,6 +187,16 @@
%define selfconflict() otherproviders(%1)
%endif
# SRC-COMMON-BEGIN
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.5.0+git3328
Release: 1
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -@base_ver@
# SRC-COMMON-END
Name: gcc@base_ver@
BuildRequires: xz
@@ -206,6 +226,7 @@ BuildRequires: systemtap-headers
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%define hostsuffix %{nil}
%if %{build_ada}
%if 0%{?gcc_version:%{gcc_version}} > @base_ver@
%define hostsuffix %{binsuffix}
@@ -222,6 +243,11 @@ BuildRequires: gcc-ada
%endif
%endif
%endif
# We now require a C++ 11 capable compiler for bootstrapping
%if %{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%endif
%if 0%{?building_testsuite:1}
# For building the libstdc++ API reference
BuildRequires: doxygen
@@ -234,6 +260,10 @@ BuildRequires: libunwind-devel
BuildRequires: dejagnu
BuildRequires: expect
BuildRequires: gdb
%if %{build_go}
BuildRequires: procps
BuildRequires: netcfg
%endif
%if %{build_nvptx}
BuildRequires: cross-nvptx-gcc@base_ver@
BuildRequires: cross-nvptx-newlib@base_ver@-devel
@@ -254,6 +284,9 @@ BuildRequires: cross-amdgcn-newlib@base_ver@-devel
%ifarch x86_64 s390x ppc64 sparc64
%define separate_bi32 1
%endif
%define disable_multilib_arch %{nil}
%else
%define disable_multilib_arch ppc sparcv9 x86_64 s390x ppc64 sparc64
%endif
# Define two macros to trigger -32bit or -64bit package variants
@@ -274,17 +307,6 @@ BuildRequires: cross-amdgcn-newlib@base_ver@-devel
%define build_primary_64bit 0
%endif
# SRC-COMMON-BEGIN
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Release: 1
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -@base_ver@
# SRC-COMMON-END
%if !0%{?building_testsuite:1}
Requires: binutils glibc-devel
Requires: cpp@base_ver@ = %{version}-%{release}
@@ -331,27 +353,32 @@ Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
# GCC-TESTSUITE-DELETE-BEGIN
License: GPL-3.0-or-later
# SRC-COMMON-END
License: GPL-3.0-or-later
Summary: The GNU C Compiler and Support Files
%description
@@ -448,6 +475,19 @@ Locale data for the GNU Compiler Collection (GCC) to give error message
in the current locale.
%package PIE
Summary: A default configuration to build all binaries in PIE mode
License: GPL-3.0-or-later
Group: Development/Languages/Other
Requires: gcc@base_ver@ = %{version}-%{release}
%description PIE
This package contains a configuration file (spec) that changes the
compilers default setting to build all ELF binaries in the Position
Independend Executable (PIE) variant. This enables better address
space randomization (ASLR).
# PACKAGE-BEGIN
%package c++@variant@
Summary: The GNU C++ Compiler
@@ -465,17 +505,13 @@ This package contains the GNU compiler for C++.
# PACKAGE-BEGIN
%package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}@variant@
Summary: Include Files and Libraries mandatory for Development
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Requires: libstdc++%{libstdcxx_sover}@variant@ >= %{version}-%{release}
Requires: glibc-devel@variant@
%ifarch ia64
Requires: libunwind-devel
%endif
# Fallback for non-existing Supplements support
%if %{suse_version} < 1500
Requires: libstdc++%{libstdcxx_sover}-pp@variant@ = %{version}-%{release}
%endif
%description -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}@variant@
This package contains all the headers and libraries of the standard C++
@@ -487,8 +523,13 @@ library. It is needed for compiling C++ code.
Summary: GDB pretty printers for the C++ standard library
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
# The -pp packages are tied to a specific shared library
Requires: libstdc++%{libstdcxx_sover}@variant@ = %{version}-%{release}
Requires: libstdc++%{libstdcxx_sover}-pp%{libdevel_suffix} = %{version}-%{release}
Provides: libstdc++%{libstdcxx_sover}-pp@variant@ = %{version}-%{release}
# To allow updates from libstdc++6-pp-gccM to libstdc++6-pp-gccN we need
# enumerates Obsoletes, the separate -pp package was introduced with GCC9.
Obsoletes: libstdc++6-pp-gcc9@variant@ libstdc++6-pp-gcc10@variant@
# Only one package may provide this - allows multiple gcc versions
# to co-exist without an overly large list of provides/obsoletes
Conflicts: %selfconflict libstdc++%{libstdcxx_sover}-pp@variant@
@@ -507,7 +548,7 @@ from GDB.
# PACKAGE-BEGIN
%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@
Summary: C compiler runtime library
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: System/Base
Provides: libgcc_s%{libgcc_s}@variant@ = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@@ -525,7 +566,7 @@ Libgcc is needed for dynamically linked C programs.
# PACKAGE-BEGIN
%package -n libgomp%{libgomp_sover}%{libgomp_suffix}@variant@
Summary: The GNU compiler collection OpenMP runtime library
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: System/Base
Provides: libgomp%{libgomp_sover}@variant@ = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@@ -547,13 +588,17 @@ option.
# PACKAGE-BEGIN
%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@
Summary: The standard C++ shared library
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: System/Libraries
Suggests: libstdc++%{libstdcxx_sover}-locale
Provides: libstdc++%{libstdcxx_sover}@variant@ = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
# to co-exist without an overly large list of provides/obsoletes
Conflicts: %selfconflict libstdc++%{libstdcxx_sover}@variant@
# Fallback for non-existing Supplements support
%if %{suse_version} < 1500
Recommends: libstdc++%{libstdcxx_sover}-pp@variant@ = %{version}-%{release}
%endif
%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@
The standard C++ library, needed for dynamically linked C++ programs.
@@ -566,7 +611,7 @@ The standard C++ library, needed for dynamically linked C++ programs.
%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale
Summary: Standard C++ Library Locales
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: System/Libraries
Provides: libstdc++%{libstdcxx_sover}-locale = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@@ -609,7 +654,7 @@ Nextstep OS. The source code is available in the gcc package.
# PACKAGE-BEGIN
%package -n libobjc%{libobjc_sover}%{libobjc_suffix}@variant@
Summary: Library for the GNU Objective C Compiler
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: Development/Libraries/Other
Provides: libobjc%{libobjc_sover}@variant@ = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@@ -667,7 +712,7 @@ tools based on the GNU GCC technology.
# PACKAGE-BEGIN
%package -n libada@base_ver@@variant@
Summary: GNU Ada Runtime Libraries
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: System/Libraries
Provides: libgnarl-@base_ver@@variant@ = %{version}-%{release}
Conflicts: %selfconflict libgnarl-@base_ver@@variant@
@@ -706,7 +751,7 @@ This is the Fortran compiler of the GNU Compiler Collection (GCC).
# PACKAGE-BEGIN
%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}@variant@
Summary: The GNU Fortran Compiler Runtime Library
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: Development/Languages/Fortran
%ifarch %quadmath_arch
Requires: libquadmath%{libquadmath_sover}@variant@ >= %{version}-%{release}
@@ -825,7 +870,7 @@ The runtime library needed to run programs compiled with the
# PACKAGE-BEGIN
%package -n libatomic%{libatomic_sover}%{libatomic_suffix}@variant@
Summary: The GNU Compiler Atomic Operations Runtime Library
License: GPL-3.0-with-GCC-exception
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Provides: libatomic%{libatomic_sover}@variant@ = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@@ -995,7 +1040,12 @@ Runtime library for the GNU D language.
%package -n libgccjit%{libgccjit_sover}%{libgccjit_suffix}
Summary: The GNU Compiler Collection JIT library
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Provides: libgccjit%{libgccjit_sover} = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
# to co-exist without an overly large list of provides/obsoletes
Conflicts: %selfconflict libgccjit%{libgccjit_sover}
Requires: gcc@base_ver@
%description -n libgccjit%{libgccjit_sover}%{libgccjit_suffix}
Support for embedding GCC inside programs and libraries
@@ -1008,6 +1058,11 @@ Support for embedding GCC inside programs and libraries
Summary: Support for embedding GCC inside programs and libraries
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Provides: libgccjit%{libgccjit_sover}-devel = %{version}-%{release}
# Only one gccjit package can be installed at the same time since
# header files conflict
Conflicts: %selfconflict libgccjit%{libgccjit_sover}-devel
Requires: libgccjit%{libgccjit_sover}%{libgccjit_suffix}
%description -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix}
Package contains header files and documentation for GCC JIT front-end.
@@ -1016,6 +1071,7 @@ Package contains header files and documentation for GCC JIT front-end.
# GCC-TESTSUITE-DELETE-END
Summary: Testsuite results
License: SUSE-Public-Domain
Group: Development/Languages/C and C++
%description -n gcc@base_ver@-testresults
Results from running the gcc and target library testsuites.
@@ -1123,31 +1179,37 @@ Results from running the gcc and target library testsuites.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -1230,21 +1292,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -1290,7 +1361,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -1302,7 +1377,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -1310,7 +1391,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -1340,7 +1421,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -1362,14 +1450,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -1382,24 +1462,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -1453,8 +1524,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -1488,8 +1561,17 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
# BUILD-COMMON-END
@@ -1696,6 +1778,9 @@ else
mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/
fi
chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s}
%if 0%{?usrmerged}
mv %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{_slibdir}/libgcc_s.so.%{libgcc_s}
%endif
%if %{biarch}
%if %{build_primary_64bit}
if test -L %{buildroot}/lib/libgcc_s.so; then
@@ -1706,6 +1791,9 @@ else
fi
ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so
chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s}
%if 0%{?usrmerged}
mv %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir}/libgcc_s.so.%{libgcc_s}
%endif
%else
# 32-bit biarch systems
if test -L %{buildroot}/lib64/libgcc_s.so; then
@@ -1716,6 +1804,9 @@ else
fi
ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so
chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s}
%if 0%{?usrmerged}
mv %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir64}/libgcc_s.so.%{libgcc_s}
%endif
%endif
%endif
@@ -1753,6 +1844,12 @@ for l in `find %{buildroot} -name '*.la'`; do
mv $l.new $l
done
# The spec for the PIE subpackage
cat > %{buildroot}/%{libsubdir}/defaults.spec <<EOF
*default_spec:
%%{pie|fpic|fPIC|fpie|fPIE|no-pie|fno-pic|fno-PIC|fno-pie|fno-PIE|shared|static|nostdlib|nodefaultlibs|nostartfiles:;:-fPIE}%%{fno-pic|fno-PIC|fno-pie|fno-PIE|pie|no-pie|shared|static|nostdlib|nodefaultlibs|nostartfiles:;: -pie}
EOF
# GCC-TESTSUITE-DELETE-END
%if 0%{?run_tests:1}
cp `find . -name "*.sum"` ../testresults/
@@ -1761,15 +1858,25 @@ chmod 644 ../testresults/*
%endif
# GCC-TESTSUITE-DELETE-BEGIN
# Remove files that we do not need to clean up filelist
# Preserve %{GCCDIST}-gcc%{binsuffix} binary for libgccjit as it is used as a driver
mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot}
rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-*
mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/
rm -rf %{buildroot}/%{libsubdir}/install-tools
rm -f %{buildroot}/%{libsubdir}/include-fixed/zutil.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/a.out.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/vt.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/asm-generic/socket.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/bits/mathdef.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/bits/unistd_ext.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/sys/ucontext.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/bits/statx.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/pthread.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/sys/rseq.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/sys/mount.h
rm -f %{buildroot}/%{libsubdir}/include-fixed/sys/sched.h
%if !%{enable_plugins}
# no plugins
rm -rf %{buildroot}/%{libsubdir}/plugin
@@ -1880,6 +1987,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
%endif
%endif
%{_prefix}/bin/gcc%{binsuffix}
%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix}
%{_prefix}/bin/gcov%{binsuffix}
%{_prefix}/bin/gcov-dump%{binsuffix}
%{_prefix}/bin/gcov-tool%{binsuffix}
@@ -2055,6 +2163,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
%{libsubdir}/include/uintrintrin.h
%{libsubdir}/include/keylockerintrin.h
%{libsubdir}/include/avxvnniintrin.h
%{libsubdir}/include/mwaitintrin.h
%endif
%ifarch m68k
%{libsubdir}/include/math-68881.h
@@ -2194,6 +2303,11 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
%files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale -f libstdc++.lang
%files PIE
%defattr(-,root,root)
%dir %{libsubdir}
%{libsubdir}/defaults.spec
%if %{build_cp}
%files c++
%defattr(-,root,root)
@@ -2258,15 +2372,15 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
%files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}
%defattr(-,root,root)
/%{_lib}/libgcc_s.so.%{libgcc_s}
%{_slibdir}/libgcc_s.so.%{libgcc_s}
%if %{biarch}
%if %{build_primary_64bit}
%if !%{separate_bi32}
/lib/libgcc_s.so.%{libgcc_s}
%{slibdir}/libgcc_s.so.%{libgcc_s}
%endif
%else
%if !%{separate_bi64}
/lib64/libgcc_s.so.%{libgcc_s}
%{slibdir64}/libgcc_s.so.%{libgcc_s}
%endif
%endif
%endif
@@ -2274,13 +2388,13 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
%if %{separate_bi64}
%files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit
%defattr(-,root,root)
/lib64/libgcc_s.so.%{libgcc_s}
%{slibdir64}/libgcc_s.so.%{libgcc_s}
%endif
%if %{separate_bi32}
%files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit
%defattr(-,root,root)
/lib/libgcc_s.so.%{libgcc_s}
%{slibdir}/libgcc_s.so.%{libgcc_s}
%endif
@@ -2674,16 +2788,19 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
%endif
%endif
%if %{build_jit}
%files -n libgccjit%{libgccjit_sover}%{libgccjit_suffix}
%defattr(-,root,root)
%{_prefix}/%{_lib}/libgccjit.so.%{libgccjit_sover}*
%files -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix}
%defattr(-,root,root)
%doc gcc/jit/docs/examples
%{_prefix}/%{_lib}/libgccjit.so
%{_prefix}/include/libgccjit.h
%{_prefix}/include/libgccjit++.h
%{_infodir}/libgccjit.info.gz
%endif
# GCC-TESTSUITE-DELETE-END

View File

@@ -1,8 +1,8 @@
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 10bc9881aed..3082a91f9dc 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -319,6 +319,10 @@ static const char *spec_host_machine = DEFAULT_REAL_TARGET_MACHINE;
Index: gcc-11.1.1+git536/gcc/gcc.c
===================================================================
--- gcc-11.1.1+git536.orig/gcc/gcc.c
+++ gcc-11.1.1+git536/gcc/gcc.c
@@ -319,6 +319,10 @@ static const char *spec_host_machine = D
static char *offload_targets = NULL;
@@ -13,7 +13,7 @@ index 10bc9881aed..3082a91f9dc 100644
/* Nonzero if cross-compiling.
When -b is used, the value comes from the `specs' file. */
@@ -4711,7 +4715,10 @@ process_command (unsigned int decoded_options_count,
@@ -4830,7 +4834,10 @@ process_command (unsigned int decoded_op
/* If the user didn't specify any, default to all configured offload
targets. */
if (ENABLE_OFFLOADING && offload_targets == NULL)
@@ -23,9 +23,9 @@ index 10bc9881aed..3082a91f9dc 100644
+ offload_targets_default = true;
+ }
if (output_file
&& strcmp (output_file, "-") != 0
@@ -8367,6 +8374,8 @@ driver::maybe_putenv_OFFLOAD_TARGETS () const
/* Handle -gtoggle as it would later in toplev.c:process_options to
make the debug-level-gt spec function work as expected. */
@@ -8498,6 +8505,8 @@ driver::maybe_putenv_OFFLOAD_TARGETS ()
obstack_grow (&collect_obstack, offload_targets,
strlen (offload_targets) + 1);
xputenv (XOBFINISH (&collect_obstack, char *));
@@ -34,11 +34,11 @@ index 10bc9881aed..3082a91f9dc 100644
}
free (offload_targets);
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 82cfa6bd67e..f5185f9c69f 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see
Index: gcc-11.1.1+git536/gcc/lto-wrapper.c
===================================================================
--- gcc-11.1.1+git536.orig/gcc/lto-wrapper.c
+++ gcc-11.1.1+git536/gcc/lto-wrapper.c
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.
/* Environment variable, used for passing the names of offload targets from GCC
driver to lto-wrapper. */
#define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES"
@@ -46,7 +46,7 @@ index 82cfa6bd67e..f5185f9c69f 100644
/* By default there is no special suffix for target executables. */
#ifdef TARGET_EXECUTABLE_SUFFIX
@@ -906,6 +907,12 @@ compile_offload_image (const char *target, const char *compiler_path,
@@ -907,6 +908,12 @@ compile_offload_image (const char *targe
break;
}
@@ -59,7 +59,7 @@ index 82cfa6bd67e..f5185f9c69f 100644
if (!compiler)
fatal_error (input_location,
"could not find %s in %s (consider using %<-B%>)",
@@ -990,8 +997,13 @@ compile_images_for_offload_targets (unsigned in_argc, char *in_argv[],
@@ -991,8 +998,13 @@ compile_images_for_offload_targets (unsi
compiler_opts, compiler_opt_count,
linker_opts, linker_opt_count);
if (!offload_names[i])
@@ -75,11 +75,11 @@ index 82cfa6bd67e..f5185f9c69f 100644
}
out:
diff --git a/libgomp/target.c b/libgomp/target.c
index 3e292eb8c62..060758bb826 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -3015,7 +3015,7 @@ gomp_load_plugin_for_device (struct gomp_device_descr *device,
Index: gcc-11.1.1+git536/libgomp/target.c
===================================================================
--- gcc-11.1.1+git536.orig/libgomp/target.c
+++ gcc-11.1.1+git536/libgomp/target.c
@@ -3173,7 +3173,7 @@ gomp_load_plugin_for_device (struct gomp
void *plugin_handle = dlopen (plugin_name, RTLD_LAZY);
if (!plugin_handle)

View File

@@ -0,0 +1,22 @@
diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c
index 9660ca6eaa4..7635644a7b7 100644
--- a/gcc/config/gcn/gcn.c
+++ b/gcc/config/gcn/gcn.c
@@ -6251,9 +6251,17 @@ gcn_dwarf_register_span (rtx rtl)
return p;
}
+static void
+gcn_override_options_after_change (void)
+{
+ flag_reorder_blocks_and_partition = 0;
+}
+
/* }}} */
/* {{{ TARGET hook overrides. */
+#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
+#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE gcn_override_options_after_change
#undef TARGET_ADDR_SPACE_ADDRESS_MODE
#define TARGET_ADDR_SPACE_ADDRESS_MODE gcn_addr_space_address_mode
#undef TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P

View File

@@ -0,0 +1,29 @@
diff --git a/gcc/common.opt b/gcc/common.opt
index a75b44ee47e..2d33861ad1f 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -3175,7 +3175,7 @@ Common Driver JoinedOrMissing Negative(gdwarf-)
Generate debug information in default version of DWARF format.
gdwarf-
-Common Driver Joined UInteger Var(dwarf_version) Init(5) Negative(gstabs)
+Common Driver Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
Generate debug information in DWARF v2 (or later) format.
gdwarf32
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4a87b9ef8e8..4f1adcfe621 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9638,9 +9638,8 @@ possible.
@opindex gdwarf
Produce debugging information in DWARF format (if that is supported).
The value of @var{version} may be either 2, 3, 4 or 5; the default
-version for most targets is 5 (with the exception of VxWorks, TPF and
-Darwin/Mac OS X, which default to version 2, and AIX, which defaults
-to version 4).
+version for most targets is 4 (with the exception of VxWorks, TPF and
+Darwin/Mac OS X, which default to version 2).
Note that with DWARF Version 2, some ports require and always
use some non-conflicting DWARF 3 extensions in the unwind tables.

115
gcc11-pr116029.patch Normal file
View File

@@ -0,0 +1,115 @@
From 5522dec054cb940fe83661b96249aa12c54c1d77 Mon Sep 17 00:00:00 2001
From: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Fri, 8 Apr 2022 15:12:23 +0100
Subject: [PATCH] aarch64: PR target/105157 Increase number of cores
TARGET_CPU_DEFAULT can encode
To: gcc-patches@gcc.gnu.org
This addresses the compile-time increase seen in the PR target/105157. This was
being caused by selecting the wrong core tuning, as when we added the latest
AArch64 the TARGET_CPU_generic tuning was pushed beyond the 0x3f mask we used
to encode both target cpu and attributes into TARGET_CPU_DEFAULT.
gcc/ChangeLog:
PR target/105157
* config.gcc: Shift ext_mask by TARGET_CPU_NBITS.
* config/aarch64/aarch64.h (TARGET_CPU_NBITS): New macro.
(TARGET_CPU_MASK): Likewise.
(TARGET_CPU_DEFAULT): Use TARGET_CPU_NBITS.
* config/aarch64/aarch64.c (aarch64_get_tune_cpu): Use TARGET_CPU_MASK.
(aarch64_get_arch): Likewise.
(aarch64_override_options): Use TARGET_CPU_NBITS.
---
gcc/config.gcc | 2 +-
gcc/config/aarch64/aarch64.c | 14 +++++++++-----
gcc/config/aarch64/aarch64.h | 8 +++++++-
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 7b58e1314ff..5382788e267 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4261,7 +4261,7 @@ case "${target}" in
ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
done
- ext_mask="(("$ext_mask") << 6)"
+ ext_mask="(("$ext_mask") << TARGET_CPU_NBITS)"
if [ x"$base_id" != x ]; then
target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
fi
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 3e2a6fb6472..cf62bdd023b 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -18053,6 +18053,9 @@ aarch64_validate_mtune (const char *str, const struct processor **res)
return false;
}
+static_assert (TARGET_CPU_generic < TARGET_CPU_MASK,
+ "TARGET_CPU_NBITS is big enough");
+
/* Return the CPU corresponding to the enum CPU.
If it doesn't specify a cpu, return the default. */
@@ -18062,12 +18065,12 @@ aarch64_get_tune_cpu (enum aarch64_processor cpu)
if (cpu != aarch64_none)
return &all_cores[cpu];
- /* The & 0x3f is to extract the bottom 6 bits that encode the
- default cpu as selected by the --with-cpu GCC configure option
+ /* The & TARGET_CPU_MASK is to extract the bottom TARGET_CPU_NBITS bits that
+ encode the default cpu as selected by the --with-cpu GCC configure option
in config.gcc.
???: The whole TARGET_CPU_DEFAULT and AARCH64_CPU_DEFAULT_FLAGS
flags mechanism should be reworked to make it more sane. */
- return &all_cores[TARGET_CPU_DEFAULT & 0x3f];
+ return &all_cores[TARGET_CPU_DEFAULT & TARGET_CPU_MASK];
}
/* Return the architecture corresponding to the enum ARCH.
@@ -18079,7 +18082,8 @@ aarch64_get_arch (enum aarch64_arch arch)
if (arch != aarch64_no_arch)
return &all_architectures[arch];
- const struct processor *cpu = &all_cores[TARGET_CPU_DEFAULT & 0x3f];
+ const struct processor *cpu
+ = &all_cores[TARGET_CPU_DEFAULT & TARGET_CPU_MASK];
return &all_architectures[cpu->arch];
}
@@ -18166,7 +18170,7 @@ aarch64_override_options (void)
{
/* Get default configure-time CPU. */
selected_cpu = aarch64_get_tune_cpu (aarch64_none);
- aarch64_isa_flags = TARGET_CPU_DEFAULT >> 6;
+ aarch64_isa_flags = TARGET_CPU_DEFAULT >> TARGET_CPU_NBITS;
}
if (selected_tune)
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index efa46ac0b87..359b6e8561f 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -813,10 +813,16 @@ enum target_cpus
TARGET_CPU_generic
};
+/* Define how many bits are used to represent the CPU in TARGET_CPU_DEFAULT.
+ This needs to be big enough to fit the value of TARGET_CPU_generic.
+ All bits after this are used to represent the AARCH64_CPU_DEFAULT_FLAGS. */
+#define TARGET_CPU_NBITS 8
+#define TARGET_CPU_MASK ((1 << TARGET_CPU_NBITS) - 1)
+
/* If there is no CPU defined at configure, use generic as default. */
#ifndef TARGET_CPU_DEFAULT
#define TARGET_CPU_DEFAULT \
- (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
+ (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << TARGET_CPU_NBITS))
#endif
/* If inserting NOP before a mult-accumulate insn remember to adjust the
--
2.35.3

View File

@@ -1,4 +0,0 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
- New packages inherits from gcc10 package.

View File

@@ -1,7 +1,7 @@
#
# spec file for package gcc11-testresults
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,8 +19,9 @@
%define building_testsuite 1
%define run_tests 1
#
# spec file for package gcc9
# spec file for package gcc${version}
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -36,6 +37,17 @@
# nospeccleaner
%if 0%{?suse_version} < 1550
%define _slibdir /%{_lib}
%define slibdir /lib
%define slibdir64 /lib64
%else
%define _slibdir %{_libdir}
%define slibdir %{_prefix}/lib
%define slibdir64 %{_prefix}/lib64
%define usrmerged 1
%endif
# Ada currently fails to build on a few platforms, enable it only
# on those that work
%if %{suse_version} >= 1310
@@ -89,7 +101,7 @@
%define build_d 0
%endif
%ifarch x86_64 aarch64
%ifarch x86_64
%define build_nvptx 1
%else
%define build_nvptx 0
@@ -193,6 +205,15 @@
%define selfconflict() otherproviders(%1)
%endif
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.5.0+git3328
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -11
Name: gcc11-testresults
BuildRequires: xz
%if %{suse_version} > 1500
@@ -221,6 +242,7 @@ BuildRequires: systemtap-headers
%if %{suse_version} >= 1230
BuildRequires: isl-devel
%endif
%define hostsuffix %{nil}
%if %{build_ada}
%if 0%{?gcc_version:%{gcc_version}} > 11
%define hostsuffix %{binsuffix}
@@ -237,6 +259,11 @@ BuildRequires: gcc-ada
%endif
%endif
%endif
# We now require a C++ 11 capable compiler for bootstrapping
%if %{suse_version} < 1220
%define hostsuffix -4.8
BuildRequires: gcc48-c++
%endif
%if 0%{?building_testsuite:1}
# For building the libstdc++ API reference
BuildRequires: doxygen
@@ -249,6 +276,10 @@ BuildRequires: libunwind-devel
BuildRequires: dejagnu
BuildRequires: expect
BuildRequires: gdb
%if %{build_go}
BuildRequires: netcfg
BuildRequires: procps
%endif
%if %{build_nvptx}
BuildRequires: cross-nvptx-gcc11
BuildRequires: cross-nvptx-newlib11-devel
@@ -269,6 +300,9 @@ BuildRequires: cross-amdgcn-newlib11-devel
%ifarch x86_64 s390x ppc64 sparc64
%define separate_bi32 1
%endif
%define disable_multilib_arch %{nil}
%else
%define disable_multilib_arch ppc sparcv9 x86_64 s390x ppc64 sparc64
%endif
# Define two macros to trigger -32bit or -64bit package variants
@@ -289,15 +323,6 @@ BuildRequires: cross-amdgcn-newlib11-devel
%define build_primary_64bit 0
%endif
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
Version: 11.0.0+git182924
Release: 0
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1)
%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -11
%if !0%{?building_testsuite:1}
Requires: binutils
Requires: cpp11 = %{version}-%{release}
@@ -338,28 +363,34 @@ Suggests: gcc11-info gcc11-locale
%if %{suse_version} < 1310
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Group: Development/Languages/C and C++
Source: gcc-%{version}.tar.xz
Source1: change_spec
Source2: gcc11-rpmlintrc
Source3: gcc11-testresults-rpmlintrc
Source4: README.First-for.SuSE.packagers
Source5: newlib-3.3.0.tar.xz
Source5: newlib-4.1.0.tar.xz
Patch2: gcc-add-defaultsspec.diff
Patch5: tls-no-direct.diff
Patch6: gcc43-no-unwind-tables.diff
Patch7: gcc48-libstdc++-api-reference.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch
Patch15: gcc7-avoid-fixinc-error.diff
Patch16: gcc9-reproducible-builds.patch
Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
# r12-8060-g5522dec054cb940fe83661b96249aa12c54c1d77
Patch21: gcc11-pr116029.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
Patch52: gcc10-foffload-default.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
# Patches for embedded newlib
Patch100: newlib-4.1.0-aligned_alloc.patch
Summary: Testsuite results
License: SUSE-Public-Domain
@@ -464,31 +495,37 @@ Results from running the gcc and target library testsuites.
%prep
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
%setup -q -n gcc-%{version} -a 5
ln -s newlib-3.3.0/newlib .
ln -s newlib-4.1.0/newlib .
cd newlib
%patch -P 100 -p1
cd ..
%else
%setup -q -n gcc-%{version}
%endif
#test patching start
%patch2
%patch5
%patch6
%patch7
%if %{suse_version} < 1310
%patch9
%endif
%patch11
%patch15
%patch16
%patch17 -p1
%patch -P 2
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 11
%patch -P 15
%patch -P 16
%patch -P 17 -p1
%if "%{TARGET_ARCH}" == "amdgcn"
%patch18 -p1
%patch -P 18 -p1
%endif
%patch51
%patch52 -p1
%patch60 -p1
%patch61
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
%patch -P 19 -p1
%endif
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 51
%patch -P 52 -p1
%patch -P 60 -p1
%patch -P 61
#test patching end
@@ -571,21 +608,30 @@ ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib
export PATH="`pwd`/target-tools/bin:$PATH"
%endif
%if %{build_ada}
%if "%{hostsuffix}" != ""
mkdir -p host-tools/bin
# Using the host gnatmake like
# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}"
# GNATMAKE="gnatmake%%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
%if %{build_ada}
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
%endif
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
# libsanitizer needs <crypt.h> and since the glibc/libxcrypt split
# we don't have that yet in a pure cross environment
%if 0%{?gcc_target_arch:1}
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
@@ -631,7 +677,11 @@ amdgcn-amdhsa,\
%endif
--with-bugurl="https://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if 0%{?sysroot:1}
--with-slibdir=%{sysroot}/%{_lib} \
%else
--with-slibdir=/%{_lib} \
%endif
--with-system-zlib \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
@@ -643,7 +693,13 @@ amdgcn-amdhsa,\
%endif
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
%if 0%{!?gcc_target_arch:1}
--enable-linker-build-id \
%else
%if 0%{?gcc_target_glibc:1}
--enable-linker-build-id \
%endif
%endif
--enable-linux-futex \
%if %{suse_version} >= 1315
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
@@ -651,7 +707,7 @@ amdgcn-amdhsa,\
%endif
%endif
--program-suffix=%{binsuffix} \
%if 0%{?disable_32bit:1}
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
@@ -681,7 +737,14 @@ amdgcn-amdhsa,\
%if 0%{?gcc_target_newlib}
--with-newlib \
%if 0%{?gcc_libc_bootstrap:1}
--without-headers \
--disable-gcov \
%endif
%else
%if 0%{?gcc_libc_bootstrap:1}
--disable-gcov --disable-threads --disable-shared \
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libquadmath --disable-libatomic \
--without-headers --with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "spu"
@@ -703,14 +766,6 @@ amdgcn-amdhsa,\
--with-native-system-header-dir=/include \
%endif
%endif
%if "%{TARGET_ARCH}" == "arm"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "arm-none"
--enable-multilib \
--with-multilib-list=aprofile,rmprofile \
@@ -723,24 +778,15 @@ amdgcn-amdhsa,\
--disable-threads \
--disable-tls \
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
%if "%{TARGET_ARCH}" == "armv6hl" || "%{TARGET_ARCH}" == "arm"
--with-cpu=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--with-fpu=vfpv2 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-cpu=generic-armv7-a \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
@@ -794,8 +840,10 @@ amdgcn-amdhsa,\
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
%ifnarch %{disable_multilib_arch}
--enable-multilib \
--with-arch-32=x86-64 \
%endif
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
@@ -829,8 +877,16 @@ amdgcn-amdhsa,\
%ifarch riscv64
--enable-link-mutex \
%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST}
--host=%{GCCDIST} || \
{
rc=$?;
echo "------- BEGIN config.log ------";
%{__cat} config.log;
echo "------- END config.log ------";
exit $rc;
}
STAGE1_FLAGS="-g -O2"
%if 0%{?do_profiling} && !0%{?building_testsuite:1}

View File

@@ -1,4 +1,356 @@
-------------------------------------------------------------------
Mon Jan 18 10:42:28 UTC 2021 - Martin Liška <mliska@suse.cz>
Wed Jul 30 11:34:42 UTC 2025 - Richard Biener <rguenther@suse.com>
- New packages inherits from gcc10 package.
- Remove include-fixed/bits/sched.h
-------------------------------------------------------------------
Tue Jul 23 06:53:38 UTC 2024 - Richard Biener <rguenther@suse.com>
- Add gcc11-pr116029.patch to fix architecture flags overflow
on aarch64.
-------------------------------------------------------------------
Fri Jul 19 06:34:12 UTC 2024 - Richard Biener <rguenther@suse.com>
- Update to GCC 11.5 release (5cc4c42a0d4de08715c2eef8715), git3328
-------------------------------------------------------------------
Fri Jul 12 12:59:56 UTC 2024 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (30ffca55041518b76cfd59877), git3317
* includes GCC 11.5 RC1
-------------------------------------------------------------------
Fri Jun 30 08:00:24 UTC 2023 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (f03b182f7f23e14d587cfa1da), git2630
* includes GCC 11.4 release
-------------------------------------------------------------------
Mon May 22 12:23:38 UTC 2023 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (fcf62b96ec9ae32d56530ba86), git2550
* includes GCC 11.4 RC1
-------------------------------------------------------------------
Tue May 9 13:24:23 UTC 2023 - Richard Biener <rguenther@suse.com>
- Backport _multibuild auto-generation. Remove redundant
.changes files.
-------------------------------------------------------------------
Fri May 5 15:04:54 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Add _multibuild to define 2nd spec file as additional flavor.
Eliminates the need for source package links in OBS.
-------------------------------------------------------------------
Tue Dec 27 10:41:18 UTC 2022 - Ludwig Nussel <lnussel@suse.com>
- Don't rely on %usrmerged, set it based on standard %suse_version
-------------------------------------------------------------------
Mon Oct 24 08:56:14 UTC 2022 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (bd0c76a2329e7fe6d6612c225), git2076
* includes fix for -Wmismatched-tags ICE [bsc#1204599]
-------------------------------------------------------------------
Wed Aug 31 14:21:03 UTC 2022 - Richard Biener <rguenther@suse.com>
- Remove fixed sys/mount.h
-------------------------------------------------------------------
Mon Aug 8 18:29:27 UTC 2022 - Martin Liška <mliska@suse.cz>
- Remove workaround for obs-service-format_spec_file.
-------------------------------------------------------------------
Thu Jul 21 13:44:44 UTC 2022 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (a55184ada8e2887ca94c0ab070, git1902
* includes build fixes when building against glibc 2.33.
-------------------------------------------------------------------
Thu Apr 21 08:22:12 UTC 2022 - Richard Biener <rguenther@suse.com>
- Update to the GCC 11.3.0 release.
* includes SLS hardening backport on x86_64. [bsc#1195283]
-------------------------------------------------------------------
Wed Apr 20 07:01:09 UTC 2022 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (691af15031e00227ba6d5935c), git1635
* includes gcc11-pr104931.patch
* includes fix for Firefox ICE [gcc#105256]
-------------------------------------------------------------------
Fri Apr 1 09:52:40 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add provides/conflicts to glibc crosses since only one GCC version
for the same target can be installed at the same time.
- Add provides/conflicts to libgccjit.
-------------------------------------------------------------------
Wed Mar 16 15:10:15 UTC 2022 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (6a1150d1524aeda3381b21717), git1406
* includes change to adjust gnats idea of the target, fixing
the build of gprbuild. [bsc#1196861]
- Add gcc11-pr104931.patch to fix miscompile of embedded premake
in 0ad on i586. [bsc#1197065]
-------------------------------------------------------------------
Mon Mar 7 22:43:44 UTC 2022 - Dirk Müller <dmueller@suse.com>
- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune
-------------------------------------------------------------------
Wed Mar 2 09:14:45 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add a list of Obsoletes to libstdc++6-pp-gcc11 so updates from
packages provided by older GCC work. Add a requires from that
package to the corresponding libstc++6 package to keep those
at the same version. [bsc#1196107]
-------------------------------------------------------------------
Thu Feb 10 12:31:01 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add gcc11-PIE, similar to gcc-PIE but affecting gcc11 [bsc#1195628]
-------------------------------------------------------------------
Wed Feb 9 15:11:40 UTC 2022 - Richard Biener <rguenther@suse.com>
- Put libstdc++6-pp Requires on the shared library and drop
to Recoomends.
-------------------------------------------------------------------
Tue Jan 18 10:30:23 UTC 2022 - Andreas Schwab <schwab@suse.de>
- Remove sys/rseq.h from include-fixed
-------------------------------------------------------------------
Wed Dec 15 10:39:51 UTC 2021 - Martin Liška <mliska@suse.cz>
- Update to gcc-11 branch head (d4a1d3c4b377f1d4acb), git1173
* Fix D memory corruption in -M output.
* Fix ICE in is_this_parameter with coroutines. [boo#1193659]
-------------------------------------------------------------------
Fri Nov 26 15:01:01 UTC 2021 - Michael Matz <matz@suse.com>
- Enable the cross compilers also on i586
- Enable some cross compilers also in rings
- Remove cross compilers for i386 target
-------------------------------------------------------------------
Wed Nov 24 10:41:45 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (7510c23c1ec53aa4a62705f03), git1018
* fixes issue with debug dumping together with -o /dev/null
* fixes libgccjit issue showing up in emacs build [boo#1192951]
- Package mwaitintrin.h
-------------------------------------------------------------------
Wed Oct 20 13:59:09 UTC 2021 - Richard Biener <rguenther@suse.com>
- Remove spurious exit from change_spec.
-------------------------------------------------------------------
Mon Sep 20 17:15:19 UTC 2021 - Michael Matz <matz@suse.com>
- Enable the full cross compiler, cross-aarch64-gcc11 and
cross-riscv64-gcc11 now provide a fully hosted C (and C++)
cross compiler, not just a freestanding one. I.e. with a cross
glibc. They don't yet support the sanitizer libraries.
Part of [jsc#OBS-124].
-------------------------------------------------------------------
Wed Aug 18 15:07:05 UTC 2021 - Andreas Schwab <schwab@suse.de>
- Require libgccjit%{libgccjit_sover}%{libgccjit_suffix} from
libgccjit%{libgccjit_sover}-devel%{libdevel_suffix}.
-------------------------------------------------------------------
Mon Aug 16 06:34:40 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (056e324ce46a7924b5cf10f610), git610
* Includes GCC 11.2 release
* Includes fix for opie build with glibc 2.34 [boo#1188623]
-------------------------------------------------------------------
Wed Jul 21 09:08:04 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (076930b9690ac3564638636f6b), git536
* Includes GCC 11.2 RC1.
- Refresh gcc10-foffload-default.patch
-------------------------------------------------------------------
Wed Jul 21 09:06:11 UTC 2021 - Richard Biener <rguenther@suse.com>
- Properly adjust GPL-3.0 WITH GCC-exception-3.1 to
GPL-3.0-or-later WITH GCC-exception-3.1
-------------------------------------------------------------------
Mon Jul 19 14:49:07 UTC 2021 - Andreas Schwab <schwab@suse.de>
- Remove bits/unistd_ext.h from include-fixed
-------------------------------------------------------------------
Fri Jul 9 07:34:24 UTC 2021 - Richard Biener <rguenther@suse.com>
- Add BuildRequires on netcfg for the testsuite when testing Go.
-------------------------------------------------------------------
Tue Jul 6 15:51:37 UTC 2021 - Michael Matz <matz@suse.com>
- Provide a libc-bootstrap cross compiler for aarch64 and riscv64
- More preparation for a full glibc cross compiler (not yet active)
-------------------------------------------------------------------
Fri Jun 25 11:23:02 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (62bbb113ae68a7e724255e1714), git400
* Fixes issue with legacy Fortran code. [gcc#101123, boo#1187273]
-------------------------------------------------------------------
Thu Jun 17 06:28:18 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (79c1185de4a05fdea13b6b0207), git340
* Fixes ceph build failure. [gcc#101078]
-------------------------------------------------------------------
Tue Jun 15 09:16:11 UTC 2021 - Richard Biener <rguenther@suse.com>
- Change disable_32bit to only disable multilibs for arhcs subject
to 32bit/64bit handling and make it effective on x86_64.
- Remove the duplicate spec header from cross.spec.in
-------------------------------------------------------------------
Thu Jun 10 10:03:37 UTC 2021 - Richard Biener <rguenther@suse.com>
- Add newlib-4.1.0-aligned_alloc.patch to fix nvptx cross build
fail. [bsc#1187153]
-------------------------------------------------------------------
Wed Jun 9 08:50:44 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (c6d2487098f9dde4f9ac59e5be), git273
-------------------------------------------------------------------
Tue Jun 8 08:22:22 UTC 2021 - Dirk Müller <dmueller@suse.com>
- tune armv7 to generic-armv7-a
- enable build for arm-none cross builders in rings,
needed by arm-trusted-firmware
-------------------------------------------------------------------
Tue May 25 19:21:01 UTC 2021 - Andreas Schwab <schwab@suse.de>
- Fix value of %slibdir64 for usrmerge
-------------------------------------------------------------------
Mon May 10 12:08:19 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (23855a176609fe8dda6abaf2b2), git121
- Disable build-id generation on non-glibc targeting cross compilers.
-------------------------------------------------------------------
Thu Apr 29 08:39:32 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (cd0a059bd384da58d43674496a7), git67
* Includes GCC 11.1 release
- Drop upstreamed gcc11-no-offload.patch.
-------------------------------------------------------------------
Wed Apr 21 12:31:23 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (7a7fc01b9d20afb1a2b805d93cb), git31
* Includes GCC 11.1 RC2
- Add gcc11-no-offload.patch and
gcc11-amdgcn-disable-hot-cold-partitioning.patch.
- Enable gfortran for offload compilers.
- BuildRequire procps from gcc11-testresults if we test go.
- Force using llvm11 for amdgcn offloading since llvm12 doesn't
yet work. Package expanded symlinks so concurrent installs do
not pull in another llvm-mc.
- Add gcc11-gdwarf-4-default.patch to default to DWARF4 generation
in SLES15 and older.
-------------------------------------------------------------------
Tue Apr 20 14:57:07 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update to gcc-11 branch head (27350b77a92062667427100afb4), git10
* Includes GCC 11.1 RC1
-------------------------------------------------------------------
Fri Apr 16 19:54:03 UTC 2021 - Martin Liška <mliska@suse.cz>
- Bump to 49813aad3292f7f2bef69206274da78a9a7116ed.
-------------------------------------------------------------------
Thu Apr 15 11:22:19 UTC 2021 - Richard Biener <rguenther@suse.com>
- Disable nvptx offloading on aarch64 since it doesn't work.
-------------------------------------------------------------------
Wed Apr 14 19:51:08 UTC 2021 - Martin Liška <mliska@suse.cz>
- Bump to a87d3f964df31d4fbceb822c6d293e85c117d992.
-------------------------------------------------------------------
Fri Apr 9 12:25:39 UTC 2021 - Richard Biener <rguenther@suse.com>
- Remove gcc48-remove-mpfr-2.4.0-requirement.patch which does no
longer apply.
- Arrange for a C++ 11 capable host compiler to be available.
- Do not require ISL for cross compiler builds on old distros.
-------------------------------------------------------------------
Thu Apr 8 19:52:03 UTC 2021 - Martin Liška <mliska@suse.cz>
- Bump to 123b3e03c911a43054c1f88f5d3110e1d084dd4e.
-------------------------------------------------------------------
Mon Mar 8 14:10:15 UTC 2021 - Richard Biener <rguenther@suse.com>
- Update embedded newlib version from 3.3.0 to 4.1.0.
-------------------------------------------------------------------
Mon Feb 22 10:44:40 UTC 2021 - Martin Liška <mliska@suse.cz>
- Pack %{GCCDIST}-gcc%{binsuffix}.
- Add a new dependency for libgccjit.
-------------------------------------------------------------------
Fri Feb 5 08:40:22 UTC 2021 - Martin Liška <mliska@suse.cz>
- New package, inherits from gcc10
* gcc-add-defaultsspec.diff, add the ability to provide a specs
file that is read by default
* tls-no-direct.diff, avoid direct %fs references on x86 to not
slow down Xen
* gcc43-no-unwind-tables.diff, do not produce unwind tables for
CRT files
* gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr
for ppc, just a testcase
* gcc44-textdomain.patch, make translation files version specific
and adjust textdomain to find them
* gcc44-rename-info-files.patch, fix cross-references in info files
when renaming them to be version specific
* gcc48-libstdc++-api-reference.patch, fix link in the installed
libstdc++ html documentation
* gcc48-remove-mpfr-2.4.0-requirement.patch, make GCC work with
earlier mpfr versions on old products
* gcc5-no-return-gcc43-workaround.patch, make build work with
host gcc 4.3
* gcc7-remove-Wexpansion-to-defined-from-Wextra.patch, removes
new warning from -Wextra
* gcc7-avoid-fixinc-error.diff
* gcc9-reproducible-builds-buildid-for-checksum.patch
* gcc9-reproducible-builds.patch
* gcc10-amdgcn-llvm-as.patch
* gcc10-foffload-default.patch
- libgccjit subpackage is added.
- HWASAN is built for aarch64 target.

File diff suppressed because it is too large Load Diff

View File

@@ -1,247 +0,0 @@
Index: configure.ac
===================================================================
--- configure.ac (revision 216911)
+++ configure.ac (working copy)
@@ -1454,7 +1454,7 @@ if test -d ${srcdir}/gcc && test "x$have
AC_MSG_CHECKING([for the correct version of mpfr.h])
AC_TRY_COMPILE([#include <gmp.h>
#include <mpfr.h>],[
- #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1)
choke me
#endif
], [AC_TRY_COMPILE([#include <gmp.h>
Index: configure
===================================================================
--- configure (revision 216911)
+++ configure (working copy)
@@ -5524,7 +5524,7 @@ int
main ()
{
- #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1)
choke me
#endif
Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c (revision 216911)
+++ gcc/fortran/simplify.c (working copy)
@@ -4278,10 +4278,7 @@ gfc_simplify_mod (gfc_expr *a, gfc_expr
return &gfc_bad_expr;
}
- gfc_set_model_kind (kind);
- mpfr_fmod (result->value.real, a->value.real, p->value.real,
- GFC_RND_MODE);
- break;
+ return NULL;
default:
gfc_internal_error ("gfc_simplify_mod(): Bad arguments");
@@ -4327,19 +4324,7 @@ gfc_simplify_modulo (gfc_expr *a, gfc_ex
return &gfc_bad_expr;
}
- gfc_set_model_kind (kind);
- mpfr_fmod (result->value.real, a->value.real, p->value.real,
- GFC_RND_MODE);
- if (mpfr_cmp_ui (result->value.real, 0) != 0)
- {
- if (mpfr_signbit (a->value.real) != mpfr_signbit (p->value.real))
- mpfr_add (result->value.real, result->value.real, p->value.real,
- GFC_RND_MODE);
- }
- else
- mpfr_copysign (result->value.real, result->value.real,
- p->value.real, GFC_RND_MODE);
- break;
+ return NULL;
default:
gfc_internal_error ("gfc_simplify_modulo(): Bad arguments");
Index: gcc/ubsan.c
===================================================================
--- gcc/ubsan.c.orig 2015-06-01 14:52:11.717105684 +0200
+++ gcc/ubsan.c 2015-06-01 14:52:26.945253071 +0200
@@ -1564,40 +1564,6 @@
min = build_real (expr_type, minval2);
}
}
- else if (REAL_MODE_FORMAT (mode)->b == 10)
- {
- /* For _Decimal128 up to 34 decimal digits, - sign,
- dot, e, exponent. */
- char buf[64];
- mpfr_t m;
- int p = REAL_MODE_FORMAT (mode)->p;
- REAL_VALUE_TYPE maxval, minval;
-
- /* Use mpfr_snprintf rounding to compute the smallest
- representable decimal number greater or equal than
- 1 << (prec - !uns_p). */
- mpfr_init2 (m, prec + 2);
- mpfr_set_ui_2exp (m, 1, prec - !uns_p, GMP_RNDN);
- mpfr_snprintf (buf, sizeof buf, "%.*RUe", p - 1, m);
- decimal_real_from_string (&maxval, buf);
- max = build_real (expr_type, maxval);
-
- /* For unsigned, assume -1.0 is always representable. */
- if (uns_p)
- min = build_minus_one_cst (expr_type);
- else
- {
- /* Use mpfr_snprintf rounding to compute the largest
- representable decimal number less or equal than
- (-1 << (prec - 1)) - 1. */
- mpfr_set_si_2exp (m, -1, prec - 1, GMP_RNDN);
- mpfr_sub_ui (m, m, 1, GMP_RNDN);
- mpfr_snprintf (buf, sizeof buf, "%.*RDe", p - 1, m);
- decimal_real_from_string (&minval, buf);
- min = build_real (expr_type, minval);
- }
- mpfr_clear (m);
- }
else
return NULL_TREE;
Index: gcc/gimple-ssa-sprintf.c
===================================================================
--- gcc/gimple-ssa-sprintf.c (revision 257728)
+++ gcc/gimple-ssa-sprintf.c (working copy)
@@ -1637,18 +1637,7 @@ get_mpfr_format_length (mpfr_ptr x, cons
p = 1024;
}
- len = mpfr_snprintf (NULL, 0, fmtstr, (int)p, x);
-
- /* Handle the unlikely (impossible?) error by returning more than
- the maximum dictated by the function's return type. */
- if (len < 0)
- return target_dir_max () + 1;
-
- /* Adjust the return value by the difference. */
- if (p < prec)
- len += prec - p;
-
- return len;
+ return target_dir_max () + 1;
}
/* Return the number of bytes to format using the format specifier
Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c (revision 257983)
+++ gcc/fortran/simplify.c (working copy)
@@ -1745,51 +1745,6 @@ simplify_trig_call (gfc_expr *icall)
}
}
-/* Convert a floating-point number from radians to degrees. */
-
-static void
-degrees_f (mpfr_t x, mp_rnd_t rnd_mode)
-{
- mpfr_t tmp;
- mpfr_init (tmp);
-
- /* Set x = x % 2pi to avoid offsets with large angles. */
- mpfr_const_pi (tmp, rnd_mode);
- mpfr_mul_ui (tmp, tmp, 2, rnd_mode);
- mpfr_fmod (tmp, x, tmp, rnd_mode);
-
- /* Set x = x * 180. */
- mpfr_mul_ui (x, x, 180, rnd_mode);
-
- /* Set x = x / pi. */
- mpfr_const_pi (tmp, rnd_mode);
- mpfr_div (x, x, tmp, rnd_mode);
-
- mpfr_clear (tmp);
-}
-
-/* Convert a floating-point number from degrees to radians. */
-
-static void
-radians_f (mpfr_t x, mp_rnd_t rnd_mode)
-{
- mpfr_t tmp;
- mpfr_init (tmp);
-
- /* Set x = x % 360 to avoid offsets with large angles. */
- mpfr_set_ui (tmp, 360, rnd_mode);
- mpfr_fmod (tmp, x, tmp, rnd_mode);
-
- /* Set x = x * pi. */
- mpfr_const_pi (tmp, rnd_mode);
- mpfr_mul (x, x, tmp, rnd_mode);
-
- /* Set x = x / 180. */
- mpfr_div_ui (x, x, 180, rnd_mode);
-
- mpfr_clear (tmp);
-}
-
/* Convert argument to radians before calling a trig function. */
@@ -1803,12 +1758,7 @@ gfc_simplify_trigd (gfc_expr *icall)
if (arg->ts.type != BT_REAL)
gfc_internal_error ("in gfc_simplify_trigd(): Bad type");
- if (arg->expr_type == EXPR_CONSTANT)
- /* Convert constant to radians before passing off to simplifier. */
- radians_f (arg->value.real, GFC_RND_MODE);
-
- /* Let the usual simplifier take over - we just simplified the arg. */
- return simplify_trig_call (icall);
+ return NULL;
}
/* Convert result of an inverse trig function to degrees. */
@@ -1816,21 +1766,9 @@ gfc_simplify_trigd (gfc_expr *icall)
gfc_expr *
gfc_simplify_atrigd (gfc_expr *icall)
{
- gfc_expr *result;
-
if (icall->value.function.actual->expr->ts.type != BT_REAL)
gfc_internal_error ("in gfc_simplify_atrigd(): Bad type");
- /* See if another simplifier has work to do first. */
- result = simplify_trig_call (icall);
-
- if (result && result->expr_type == EXPR_CONSTANT)
- {
- /* Convert constant to degrees after passing off to actual simplifier. */
- degrees_f (result->value.real, GFC_RND_MODE);
- return result;
- }
-
/* Let gfc_resolve_atrigd take care of the non-constant case. */
return NULL;
}
@@ -1840,21 +1778,9 @@ gfc_simplify_atrigd (gfc_expr *icall)
gfc_expr *
gfc_simplify_atan2d (gfc_expr *y, gfc_expr *x)
{
- gfc_expr *result;
-
if (x->ts.type != BT_REAL || y->ts.type != BT_REAL)
gfc_internal_error ("in gfc_simplify_atan2d(): Bad type");
- if (x->expr_type == EXPR_CONSTANT && y->expr_type == EXPR_CONSTANT)
- {
- result = gfc_simplify_atan2 (y, x);
- if (result != NULL)
- {
- degrees_f (result->value.real, GFC_RND_MODE);
- return result;
- }
- }
-
/* Let gfc_resolve_atan2d take care of the non-constant case. */
return NULL;
}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8ec25c9336d1e78698b46fc200c3889058e5b29396008243b05fc0b73a67b52d
size 5684864

View File

@@ -0,0 +1,10 @@
--- newlib/libc/stdlib/aligned_alloc.c.orig 2021-06-10 12:01:10.692582985 +0200
+++ newlib/libc/stdlib/aligned_alloc.c 2021-06-10 12:01:20.960708060 +0200
@@ -28,6 +28,7 @@
#include <reent.h>
#include <stdlib.h>
+#include <malloc.h>
void *
aligned_alloc (size_t align, size_t size)

3
newlib-4.1.0.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:181a90099c547a4816537e8b7da25e477370cb99438f8fe7163d077e83e90186
size 5710104

0
pre_checkin.sh Normal file → Executable file
View File