summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/autoconf-archive/Manifest2
-rw-r--r--sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild21
-rw-r--r--sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild18
-rw-r--r--sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild20
-rw-r--r--sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch36
-rw-r--r--sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch70
-rw-r--r--sys-devel/autoconf-wrapper/Manifest1
-rw-r--r--sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild28
-rw-r--r--sys-devel/autoconf-wrapper/metadata.xml8
-rw-r--r--sys-devel/autoconf/Manifest4
-rw-r--r--sys-devel/autoconf/autoconf-2.13-r2.ebuild50
-rw-r--r--sys-devel/autoconf/autoconf-2.69-r5.ebuild58
-rw-r--r--sys-devel/autoconf/autoconf-2.71-r1.ebuild79
-rw-r--r--sys-devel/autoconf/autoconf-9999.ebuild58
-rw-r--r--sys-devel/autoconf/files/autoconf-2.13-destdir.patch26
-rw-r--r--sys-devel/autoconf/files/autoconf-2.13-gentoo.patch36
-rw-r--r--sys-devel/autoconf/files/autoconf-2.13-perl-5.26.patch12
-rw-r--r--sys-devel/autoconf/files/autoconf-2.13-test-fixes.patch18
-rw-r--r--sys-devel/autoconf/files/autoconf-2.61-darwin.patch11
-rw-r--r--sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch31
-rw-r--r--sys-devel/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch63
-rw-r--r--sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch30
-rw-r--r--sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch28
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-darwin.patch11
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-time.patch49
-rw-r--r--sys-devel/autoconf/metadata.xml8
-rw-r--r--sys-devel/autogen/autogen-5.18.16-r3.ebuild (renamed from sys-devel/autogen/autogen-5.18.16-r1.ebuild)39
-rw-r--r--sys-devel/autogen/autogen-5.18.16-r4.ebuild76
-rw-r--r--sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch100
-rw-r--r--sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch42
-rw-r--r--sys-devel/autogen/files/autogen-5.18.16-no-which.patch15
-rw-r--r--sys-devel/autogen/metadata.xml17
-rw-r--r--sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild32
-rw-r--r--sys-devel/automake-wrapper/files/am-wrapper-11.sh186
-rw-r--r--sys-devel/automake-wrapper/metadata.xml8
-rw-r--r--sys-devel/automake/Manifest4
-rw-r--r--sys-devel/automake/automake-1.11.6-r3.ebuild98
-rw-r--r--sys-devel/automake/automake-1.13.4-r2.ebuild90
-rw-r--r--sys-devel/automake/automake-1.15.1-r2.ebuild111
-rw-r--r--sys-devel/automake/automake-1.16.5.ebuild131
-rw-r--r--sys-devel/automake/automake-9999.ebuild130
-rw-r--r--sys-devel/automake/files/automake-1.10-perl-5.16.patch128
-rw-r--r--sys-devel/automake/files/automake-1.11-install-sh-avoid-low-risk-race-in-tmp.patch77
-rw-r--r--sys-devel/automake/files/automake-1.13-dyn-ithreads.patch59
-rw-r--r--sys-devel/automake/files/automake-1.13-hash-order-workaround.patch14
-rw-r--r--sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket-r1.patch37
-rw-r--r--sys-devel/automake/files/automake-1.14-install-sh-avoid-low-risk-race-in-tmp.patch77
-rw-r--r--sys-devel/automake/files/automake-1.15-install-sh-avoid-low-risk-race-in-tmp.patch82
-rw-r--r--sys-devel/automake/files/automake-1.16.2-fix-instmany-python.sh-test.patch26
-rw-r--r--sys-devel/automake/files/automake-1.16.2-fix-py-compile-basedir.sh-test.patch26
-rw-r--r--sys-devel/automake/files/automake-1.16.2-py3-compile.patch73
-rw-r--r--sys-devel/automake/metadata.xml11
-rw-r--r--sys-devel/bc/bc-1.07.1-r6.ebuild (renamed from sys-devel/bc/bc-1.07.1-r4.ebuild)35
-rw-r--r--sys-devel/bin86/bin86-0.16.21-r2.ebuild36
-rw-r--r--sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch145
-rw-r--r--sys-devel/binutils-apple/Manifest2
-rw-r--r--sys-devel/binutils-apple/binutils-apple-3.2.6-r1.ebuild (renamed from sys-devel/binutils-apple/binutils-apple-3.2.6.ebuild)46
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild (renamed from sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild)18
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild (renamed from sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild)72
-rw-r--r--sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch24
-rw-r--r--sys-devel/binutils-apple/metadata.xml3
-rw-r--r--sys-devel/binutils-config/Manifest3
-rw-r--r--sys-devel/binutils-config/binutils-config-5.4.ebuild43
-rw-r--r--sys-devel/binutils-config/binutils-config-5.5.ebuild (renamed from sys-devel/binutils-config/binutils-config-5.4.1.ebuild)10
-rw-r--r--sys-devel/binutils-config/binutils-config-9999.ebuild8
-rw-r--r--sys-devel/binutils-config/metadata.xml4
-rw-r--r--sys-devel/binutils-hppa64/Manifest14
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild432
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild432
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild21
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild21
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild (renamed from sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild)157
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild (renamed from sys-devel/binutils/binutils-2.37_p1-r3.ebuild)172
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild (renamed from sys-devel/binutils/binutils-2.38-r1.ebuild)153
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild497
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild534
-rw-r--r--sys-devel/binutils-hppa64/metadata.xml7
-rw-r--r--sys-devel/binutils/Manifest11
-rw-r--r--sys-devel/binutils/binutils-2.32-r2.ebuild23
-rw-r--r--sys-devel/binutils/binutils-2.33.1-r1.ebuild23
-rw-r--r--sys-devel/binutils/binutils-2.34-r2.ebuild23
-rw-r--r--sys-devel/binutils/binutils-2.35.2.ebuild25
-rw-r--r--sys-devel/binutils/binutils-2.36.1-r2.ebuild25
-rw-r--r--sys-devel/binutils/binutils-2.37_p1-r2.ebuild25
-rw-r--r--sys-devel/binutils/binutils-2.38-r2.ebuild27
-rw-r--r--sys-devel/binutils/binutils-2.39-r5.ebuild (renamed from sys-devel/binutils/binutils-2.38-r3.ebuild)151
-rw-r--r--sys-devel/binutils/binutils-2.40-r9.ebuild499
-rw-r--r--sys-devel/binutils/binutils-2.41-r2.ebuild517
-rw-r--r--sys-devel/binutils/binutils-2.41-r3.ebuild517
-rw-r--r--sys-devel/binutils/binutils-2.41-r4.ebuild524
-rw-r--r--sys-devel/binutils/binutils-2.41-r5.ebuild524
-rw-r--r--sys-devel/binutils/binutils-2.42-r1.ebuild551
-rw-r--r--sys-devel/binutils/binutils-9999.ebuild207
-rw-r--r--sys-devel/binutils/files/binutils-2.40-linker-search-path.patch38
-rw-r--r--sys-devel/binutils/files/binutils-2.41-linker-prefix.patch56
-rw-r--r--sys-devel/binutils/files/binutils-configure-LANG.patch65
-rw-r--r--sys-devel/binutils/metadata.xml2
-rw-r--r--sys-devel/bison/Manifest2
-rw-r--r--sys-devel/bison/bison-3.7.6.ebuild91
-rw-r--r--sys-devel/bison/bison-3.8.2-r2.ebuild (renamed from sys-devel/bison/bison-3.8.2.ebuild)44
-rw-r--r--sys-devel/bison/metadata.xml12
-rw-r--r--sys-devel/bmake/Manifest3
-rw-r--r--sys-devel/bmake/bmake-20220418.ebuild58
-rw-r--r--sys-devel/bmake/bmake-20220612.ebuild58
-rw-r--r--sys-devel/bmake/files/bmake-20210206-tests.patch18
-rw-r--r--sys-devel/bmake/files/bmake-20210314-mk-fixes.patch66
-rw-r--r--sys-devel/bmake/files/bmake-20220418-warnings.patch38
-rw-r--r--sys-devel/bmake/metadata.xml12
-rw-r--r--sys-devel/boost-m4/Manifest1
-rw-r--r--sys-devel/boost-m4/boost-m4-0.4_p20160328.ebuild29
-rw-r--r--sys-devel/boost-m4/metadata.xml8
-rw-r--r--sys-devel/clang-common/Manifest19
-rw-r--r--sys-devel/clang-common/clang-common-12.0.1.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-13.0.1.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-14.0.1.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-14.0.3.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-14.0.4.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-14.0.5.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-14.0.6.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-15.0.0.9999.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-15.0.7-r8.ebuild185
-rw-r--r--sys-devel/clang-common/clang-common-16.0.6-r4.ebuild191
-rw-r--r--sys-devel/clang-common/clang-common-17.0.6-r5.ebuild303
-rw-r--r--sys-devel/clang-common/clang-common-18.1.4-r3.ebuild297
-rw-r--r--sys-devel/clang-common/clang-common-19.0.0.9999.ebuild304
-rw-r--r--sys-devel/clang-common/clang-common-19.0.0_pre20240410.ebuild304
-rw-r--r--sys-devel/clang-common/clang-common-19.0.0_pre20240420.ebuild304
-rw-r--r--sys-devel/clang-common/metadata.xml20
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild43
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild43
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild44
-rw-r--r--sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild44
-rw-r--r--sys-devel/clang-crossdev-wrappers/metadata.xml10
-rw-r--r--sys-devel/clang-runtime/clang-runtime-12.0.1.ebuild24
-rw-r--r--sys-devel/clang-runtime/clang-runtime-13.0.1.ebuild24
-rw-r--r--sys-devel/clang-runtime/clang-runtime-14.0.1.ebuild26
-rw-r--r--sys-devel/clang-runtime/clang-runtime-14.0.3.ebuild26
-rw-r--r--sys-devel/clang-runtime/clang-runtime-14.0.4.ebuild26
-rw-r--r--sys-devel/clang-runtime/clang-runtime-14.0.5.ebuild26
-rw-r--r--sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild26
-rw-r--r--sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild (renamed from sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild)5
-rw-r--r--sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild40
-rw-r--r--sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild40
-rw-r--r--sys-devel/clang-runtime/clang-runtime-18.1.4.ebuild40
-rw-r--r--sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild39
-rw-r--r--sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild39
-rw-r--r--sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild39
-rw-r--r--sys-devel/clang-runtime/metadata.xml3
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild59
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild59
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild59
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild59
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild58
-rw-r--r--sys-devel/clang-toolchain-symlinks/metadata.xml26
-rw-r--r--sys-devel/clang/Manifest41
-rw-r--r--sys-devel/clang/clang-12.0.1.ebuild432
-rw-r--r--sys-devel/clang/clang-13.0.1.ebuild422
-rw-r--r--sys-devel/clang/clang-14.0.1-r1.ebuild433
-rw-r--r--sys-devel/clang/clang-15.0.0.9999.ebuild440
-rw-r--r--sys-devel/clang/clang-15.0.7-r3.ebuild (renamed from sys-devel/clang/clang-14.0.5.ebuild)214
-rw-r--r--sys-devel/clang/clang-16.0.6.ebuild (renamed from sys-devel/clang/clang-14.0.3.ebuild)229
-rw-r--r--sys-devel/clang/clang-17.0.6.ebuild (renamed from sys-devel/clang/clang-14.0.4.ebuild)240
-rw-r--r--sys-devel/clang/clang-18.1.4.ebuild476
-rw-r--r--sys-devel/clang/clang-19.0.0.9999.ebuild (renamed from sys-devel/clang/clang-14.0.6.ebuild)255
-rw-r--r--sys-devel/clang/clang-19.0.0_pre20240410.ebuild475
-rw-r--r--sys-devel/clang/clang-19.0.0_pre20240420.ebuild475
-rw-r--r--sys-devel/clang/metadata.xml8
-rw-r--r--sys-devel/cons/Manifest1
-rw-r--r--sys-devel/cons/cons-2.3.0-r1.ebuild31
-rw-r--r--sys-devel/cons/metadata.xml8
-rw-r--r--sys-devel/cproc/Manifest1
-rw-r--r--sys-devel/cproc/cproc-0_pre20240413.ebuild33
-rw-r--r--sys-devel/cproc/cproc-9999.ebuild33
-rw-r--r--sys-devel/cproc/metadata.xml16
-rw-r--r--sys-devel/crossdev/Manifest5
-rw-r--r--sys-devel/crossdev/crossdev-20211121.ebuild36
-rw-r--r--sys-devel/crossdev/crossdev-20220205.ebuild36
-rw-r--r--sys-devel/crossdev/crossdev-20220424.ebuild35
-rw-r--r--sys-devel/crossdev/crossdev-20240209.ebuild (renamed from sys-devel/crossdev/crossdev-20220617.ebuild)17
-rw-r--r--sys-devel/crossdev/crossdev-99999999.ebuild17
-rw-r--r--sys-devel/crossdev/metadata.xml4
-rw-r--r--sys-devel/crosstool-ng/Manifest3
-rw-r--r--sys-devel/crosstool-ng/crosstool-ng-1.24.0-r3.ebuild75
-rw-r--r--sys-devel/crosstool-ng/crosstool-ng-1.25.0-r1.ebuild75
-rw-r--r--sys-devel/crosstool-ng/crosstool-ng-1.26.0.ebuild75
-rw-r--r--sys-devel/crosstool-ng/crosstool-ng-9999.ebuild75
-rw-r--r--sys-devel/crosstool-ng/metadata.xml25
-rw-r--r--sys-devel/ct-ng/Manifest1
-rw-r--r--sys-devel/ct-ng/ct-ng-1.24.0.ebuild28
-rw-r--r--sys-devel/ct-ng/metadata.xml17
-rw-r--r--sys-devel/dev86/metadata.xml3
-rw-r--r--sys-devel/distcc/Manifest1
-rw-r--r--sys-devel/distcc/distcc-3.4-r1.ebuild6
-rw-r--r--sys-devel/distcc/distcc-3.4-r2.ebuild (renamed from sys-devel/distcc/distcc-3.4.ebuild)18
-rw-r--r--sys-devel/distcc/distcc-3.4-r3.ebuild (renamed from sys-devel/distcc/distcc-3.3.3-r3.ebuild)42
-rw-r--r--sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch112
-rw-r--r--sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch28
-rw-r--r--sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch28
-rw-r--r--sys-devel/distcc/files/distcc-3.3.3-py38.patch53
-rw-r--r--sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch65
-rw-r--r--sys-devel/distcc/files/distcc-3.4-rewrite-chost.patch79
-rw-r--r--sys-devel/distcc/metadata.xml3
-rw-r--r--sys-devel/dwz/Manifest2
-rw-r--r--sys-devel/dwz/dwz-0.15-r1.ebuild (renamed from sys-devel/dwz/dwz-0.14.ebuild)24
-rw-r--r--sys-devel/dwz/metadata.xml10
-rw-r--r--sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild6
-rw-r--r--sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild6
-rw-r--r--sys-devel/flex/Manifest1
-rw-r--r--sys-devel/flex/files/flex-2.6.4-fix-apple-m1-crash-by-explicit-pointer-cast.patch48
-rw-r--r--sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch219
-rw-r--r--sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.6+.patch767
-rw-r--r--sys-devel/flex/flex-2.6.4-r1.ebuild83
-rw-r--r--sys-devel/flex/flex-2.6.4-r6.ebuild (renamed from sys-devel/flex/flex-2.6.4-r2.ebuild)41
-rw-r--r--sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch20
-rw-r--r--sys-devel/gcc-apple/files/libstdc++-16.patch11
-rw-r--r--sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r3.ebuild19
-rw-r--r--sys-devel/gcc-config/Manifest3
-rw-r--r--sys-devel/gcc-config/gcc-config-2.11.ebuild (renamed from sys-devel/gcc-config/gcc-config-2.5-r1.ebuild)6
-rw-r--r--sys-devel/gcc-config/gcc-config-2.4.ebuild52
-rw-r--r--sys-devel/gcc-config/gcc-config-9999.ebuild8
-rw-r--r--sys-devel/gcc-config/metadata.xml4
-rw-r--r--sys-devel/gcc/Manifest82
-rw-r--r--sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch26
-rw-r--r--sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch21
-rw-r--r--sys-devel/gcc/files/gcc-14.0.1_pre20240324-PR114439.patch112
-rw-r--r--sys-devel/gcc/files/gcc-configure-LANG.patch64
-rw-r--r--sys-devel/gcc/gcc-10.3.0-r2.ebuild25
-rw-r--r--sys-devel/gcc/gcc-10.3.1_p20211126.ebuild27
-rw-r--r--sys-devel/gcc/gcc-10.3.1_p20220623.ebuild58
-rw-r--r--sys-devel/gcc/gcc-10.4.1_p20220630.ebuild58
-rw-r--r--sys-devel/gcc/gcc-10.5.0.ebuild (renamed from sys-devel/gcc/gcc-10.4.0.ebuild)35
-rw-r--r--sys-devel/gcc/gcc-10.5.9999.ebuild48
-rw-r--r--sys-devel/gcc/gcc-11.2.0.ebuild26
-rw-r--r--sys-devel/gcc/gcc-11.2.1_p20220115.ebuild27
-rw-r--r--sys-devel/gcc/gcc-11.3.0.ebuild27
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20220624.ebuild52
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20220701.ebuild52
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240111.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240208.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240328.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240404.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240411.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240418.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240425.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.9999.ebuild50
-rw-r--r--sys-devel/gcc/gcc-11.5.9999.ebuild62
-rw-r--r--sys-devel/gcc/gcc-12.1.0.ebuild31
-rw-r--r--sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild31
-rw-r--r--sys-devel/gcc/gcc-12.1.1_p20220625.ebuild30
-rw-r--r--sys-devel/gcc/gcc-12.1.1_p20220702.ebuild31
-rw-r--r--sys-devel/gcc/gcc-12.2.9999.ebuild49
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240112.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240209.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240329.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240405.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240412.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240419.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.4.9999.ebuild62
-rw-r--r--sys-devel/gcc/gcc-13.0.0_pre20220619.ebuild52
-rw-r--r--sys-devel/gcc/gcc-13.0.9999.ebuild51
-rw-r--r--sys-devel/gcc/gcc-13.2.1_p20240113-r1.ebuild66
-rw-r--r--sys-devel/gcc/gcc-13.2.1_p20240210.ebuild66
-rw-r--r--sys-devel/gcc/gcc-13.2.1_p20240330.ebuild66
-rw-r--r--sys-devel/gcc/gcc-13.2.1_p20240406.ebuild66
-rw-r--r--sys-devel/gcc/gcc-13.2.1_p20240413.ebuild66
-rw-r--r--sys-devel/gcc/gcc-13.2.1_p20240420.ebuild66
-rw-r--r--sys-devel/gcc/gcc-13.3.9999.ebuild62
-rw-r--r--sys-devel/gcc/gcc-14.0.1_pre20240317.ebuild66
-rw-r--r--sys-devel/gcc/gcc-14.0.1_pre20240324-r1.ebuild67
-rw-r--r--sys-devel/gcc/gcc-14.0.1_pre20240331.ebuild66
-rw-r--r--sys-devel/gcc/gcc-14.0.1_pre20240407.ebuild66
-rw-r--r--sys-devel/gcc/gcc-14.0.1_pre20240414.ebuild66
-rw-r--r--sys-devel/gcc/gcc-14.0.1_pre20240421.ebuild66
-rw-r--r--sys-devel/gcc/gcc-14.0.9999.ebuild51
-rw-r--r--sys-devel/gcc/gcc-8.5.0-r1.ebuild8
-rw-r--r--sys-devel/gcc/gcc-9.5.0.ebuild35
-rw-r--r--sys-devel/gcc/metadata.xml112
-rw-r--r--sys-devel/gdb-apple/Manifest1
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch87
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch128
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch11
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch10
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch23
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1752.ebuild95
-rw-r--r--sys-devel/gdb-apple/metadata.xml8
-rw-r--r--sys-devel/gdb/Manifest2
-rw-r--r--sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch32
-rw-r--r--sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch29
-rw-r--r--sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch13
-rw-r--r--sys-devel/gdb/gdb-11.2.ebuild286
-rw-r--r--sys-devel/gdb/gdb-12.1-r1.ebuild296
-rw-r--r--sys-devel/gdb/gdb-12.1.ebuild285
-rw-r--r--sys-devel/gdb/gdb-9999.ebuild295
-rw-r--r--sys-devel/gdb/metadata.xml21
-rw-r--r--sys-devel/gettext/Manifest8
-rw-r--r--sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch37
-rw-r--r--sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch100
-rw-r--r--sys-devel/gettext/gettext-0.21.1.ebuild (renamed from sys-devel/gettext/gettext-0.21-r3.ebuild)39
-rw-r--r--sys-devel/gettext/gettext-0.22.4.ebuild189
-rw-r--r--sys-devel/gettext/gettext-0.22.5.ebuild199
-rw-r--r--sys-devel/gettext/metadata.xml27
-rw-r--r--sys-devel/gnuconfig/Manifest3
-rw-r--r--sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch64
-rw-r--r--sys-devel/gnuconfig/gnuconfig-20210107.ebuild63
-rw-r--r--sys-devel/gnuconfig/gnuconfig-20230731.ebuild (renamed from sys-devel/gnuconfig/gnuconfig-20220508.ebuild)18
-rw-r--r--sys-devel/gnuconfig/gnuconfig-99999999.ebuild18
-rw-r--r--sys-devel/gnuconfig/metadata.xml3
-rw-r--r--sys-devel/icecream/Manifest1
-rw-r--r--sys-devel/icecream/icecream-1.3.1.ebuild79
-rw-r--r--sys-devel/icecream/icecream-1.4.ebuild4
-rw-r--r--sys-devel/kgcc64/Manifest26
-rw-r--r--sys-devel/kgcc64/files/gcc-12.3-ccache-ICE.patch67
-rw-r--r--sys-devel/kgcc64/files/gcc-configure-LANG.patch64
-rw-r--r--sys-devel/kgcc64/kgcc64-10.5.0.ebuild (renamed from sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild)13
-rw-r--r--sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild (renamed from sys-devel/kgcc64/kgcc64-10.3.0.ebuild)18
-rw-r--r--sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild (renamed from sys-devel/kgcc64/kgcc64-9.4.0.ebuild)18
-rw-r--r--sys-devel/kgcc64/kgcc64-12.3.1_p20240112.ebuild51
-rw-r--r--sys-devel/kgcc64/kgcc64-12.3.1_p20240209.ebuild51
-rw-r--r--sys-devel/kgcc64/kgcc64-13.2.1_p20240113-r1.ebuild (renamed from sys-devel/kgcc64/kgcc64-11.2.1_p20220115.ebuild)11
-rw-r--r--sys-devel/kgcc64/kgcc64-13.2.1_p20240210.ebuild (renamed from sys-devel/kgcc64/kgcc64-11.3.0.ebuild)11
-rw-r--r--sys-devel/libtool/Manifest2
-rw-r--r--sys-devel/libtool/files/libtool-2.2.10-eprefix.patch11
-rw-r--r--sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch24
-rw-r--r--sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch38
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch13
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-darwin20.patch13
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch53
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch118
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch46
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch43
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-link-specs.patch45
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-mint.patch46
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-ppc64le.patch111
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-pthread.patch43
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch21
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch253
-rw-r--r--sys-devel/libtool/libtool-2.4.6-r6.ebuild115
-rw-r--r--sys-devel/libtool/libtool-2.4.7.ebuild115
-rw-r--r--sys-devel/libtool/libtool-9999.ebuild115
-rw-r--r--sys-devel/libtool/metadata.xml11
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild38
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild38
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild38
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild38
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild37
-rw-r--r--sys-devel/lld-toolchain-symlinks/metadata.xml21
-rw-r--r--sys-devel/lld/Manifest20
-rw-r--r--sys-devel/lld/lld-12.0.1.ebuild68
-rw-r--r--sys-devel/lld/lld-13.0.1.ebuild73
-rw-r--r--sys-devel/lld/lld-14.0.1.ebuild73
-rw-r--r--sys-devel/lld/lld-15.0.0.9999.ebuild78
-rw-r--r--sys-devel/lld/lld-15.0.7.ebuild (renamed from sys-devel/lld/lld-14.0.3.ebuild)31
-rw-r--r--sys-devel/lld/lld-16.0.6.ebuild92
-rw-r--r--sys-devel/lld/lld-17.0.6.ebuild93
-rw-r--r--sys-devel/lld/lld-18.1.4.ebuild94
-rw-r--r--sys-devel/lld/lld-19.0.0.9999.ebuild (renamed from sys-devel/lld/lld-14.0.4.ebuild)43
-rw-r--r--sys-devel/lld/lld-19.0.0_pre20240410.ebuild (renamed from sys-devel/lld/lld-14.0.5.ebuild)43
-rw-r--r--sys-devel/lld/lld-19.0.0_pre20240420.ebuild (renamed from sys-devel/lld/lld-14.0.6.ebuild)43
-rw-r--r--sys-devel/lld/metadata.xml3
-rw-r--r--sys-devel/llvm-common/Manifest19
-rw-r--r--sys-devel/llvm-common/llvm-common-12.0.1.ebuild27
-rw-r--r--sys-devel/llvm-common/llvm-common-13.0.1.ebuild27
-rw-r--r--sys-devel/llvm-common/llvm-common-14.0.1.ebuild27
-rw-r--r--sys-devel/llvm-common/llvm-common-14.0.3.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-14.0.4.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-14.0.5.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-14.0.6.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-15.0.7.ebuild54
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.6.ebuild54
-rw-r--r--sys-devel/llvm-common/llvm-common-17.0.6.ebuild54
-rw-r--r--sys-devel/llvm-common/llvm-common-18.1.4.ebuild54
-rw-r--r--sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild53
-rw-r--r--sys-devel/llvm-common/llvm-common-19.0.0_pre20240410.ebuild53
-rw-r--r--sys-devel/llvm-common/llvm-common-19.0.0_pre20240420.ebuild53
-rw-r--r--sys-devel/llvm-common/metadata.xml3
-rw-r--r--sys-devel/llvm-roc/Manifest12
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch20
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch32
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-3.9.0-tensorflow.patch35
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch84
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch29
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.1.0-fix-missing-include.patch21
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch11
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch28
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.2.0-cyclades.patch86
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch198
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.5.2-add_libraries.patch11
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.5.2-hip-location.patch197
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch14
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch206
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch11
-rw-r--r--sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild70
-rw-r--r--sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild63
-rw-r--r--sys-devel/llvm-roc/llvm-roc-3.8.0.ebuild69
-rw-r--r--sys-devel/llvm-roc/llvm-roc-3.9.0.ebuild70
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild93
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild91
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild93
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild93
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.1.1.ebuild94
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild94
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.3.0-r1.ebuild95
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.5.2.ebuild97
-rw-r--r--sys-devel/llvm-roc/llvm-roc-5.0.2.ebuild97
-rw-r--r--sys-devel/llvm-roc/metadata.xml14
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild47
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild47
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild47
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18.ebuild47
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild46
-rw-r--r--sys-devel/llvm-toolchain-symlinks/metadata.xml22
-rw-r--r--sys-devel/llvm/Manifest41
-rw-r--r--sys-devel/llvm/llvm-12.0.1.ebuild517
-rw-r--r--sys-devel/llvm/llvm-13.0.1.ebuild513
-rw-r--r--sys-devel/llvm/llvm-14.0.1.ebuild515
-rw-r--r--sys-devel/llvm/llvm-14.0.3.ebuild526
-rw-r--r--sys-devel/llvm/llvm-15.0.7-r3.ebuild (renamed from sys-devel/llvm/llvm-15.0.0.9999.ebuild)103
-rw-r--r--sys-devel/llvm/llvm-16.0.6.ebuild (renamed from sys-devel/llvm/llvm-14.0.5.ebuild)153
-rw-r--r--sys-devel/llvm/llvm-17.0.6.ebuild (renamed from sys-devel/llvm/llvm-14.0.6.ebuild)172
-rw-r--r--sys-devel/llvm/llvm-18.1.4.ebuild548
-rw-r--r--sys-devel/llvm/llvm-19.0.0.9999.ebuild (renamed from sys-devel/llvm/llvm-14.0.4.ebuild)197
-rw-r--r--sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild547
-rw-r--r--sys-devel/llvm/llvm-19.0.0_pre20240420.ebuild547
-rw-r--r--sys-devel/llvm/metadata.xml6
-rw-r--r--sys-devel/llvmgold/llvmgold-15.ebuild3
-rw-r--r--sys-devel/llvmgold/llvmgold-16.ebuild (renamed from sys-devel/llvmgold/llvmgold-12.ebuild)16
-rw-r--r--sys-devel/llvmgold/llvmgold-17.ebuild (renamed from sys-devel/llvmgold/llvmgold-13-r1.ebuild)18
-rw-r--r--sys-devel/llvmgold/llvmgold-18.ebuild23
-rw-r--r--sys-devel/llvmgold/llvmgold-19.ebuild (renamed from sys-devel/llvmgold/llvmgold-14.ebuild)3
-rw-r--r--sys-devel/llvmgold/metadata.xml3
-rw-r--r--sys-devel/m4/files/m4-1.4.19-fortify-source.patch50
-rw-r--r--sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch38
-rw-r--r--sys-devel/m4/files/m4-1.4.19-race-condition-tests.patch34
-rw-r--r--sys-devel/m4/m4-1.4.19-r2.ebuild (renamed from sys-devel/m4/m4-1.4.19.ebuild)13
-rw-r--r--sys-devel/m4/metadata.xml11
-rw-r--r--sys-devel/make/Manifest2
-rw-r--r--sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch17
-rw-r--r--sys-devel/make/files/make-4.2-default-cxx.patch11
-rw-r--r--sys-devel/make/make-4.3.ebuild54
-rw-r--r--sys-devel/make/metadata.xml11
-rw-r--r--sys-devel/mold/Manifest7
-rw-r--r--sys-devel/mold/files/mold-1.2.1-install-nopython.patch34
-rw-r--r--sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch28
-rw-r--r--sys-devel/mold/files/mold-2.3.0-no-pch.patch12
-rw-r--r--sys-devel/mold/mold-2.1.0.ebuild (renamed from sys-devel/mold/mold-1.3.0.ebuild)72
-rw-r--r--sys-devel/mold/mold-2.30.0.ebuild (renamed from sys-devel/mold/mold-1.3.1.ebuild)82
-rw-r--r--sys-devel/mold/mold-2.4.0.ebuild103
-rw-r--r--sys-devel/mold/mold-2.4.1.ebuild (renamed from sys-devel/mold/mold-1.2.1-r1.ebuild)86
-rw-r--r--sys-devel/mold/mold-9999.ebuild82
-rw-r--r--sys-devel/native-cctools/files/aix-2/ld143
-rw-r--r--sys-devel/native-cctools/files/aix-2/mkexpfile70
-rw-r--r--sys-devel/native-cctools/files/aix-2/nm6
-rw-r--r--sys-devel/native-cctools/native-cctools-4.ebuild114
-rw-r--r--sys-devel/native-cctools/native-cctools-5-r1.ebuild (renamed from sys-devel/native-cctools/native-cctools-5.ebuild)21
-rw-r--r--sys-devel/nvptx-tools/Manifest1
-rw-r--r--sys-devel/nvptx-tools/metadata.xml (renamed from sys-devel/autoconf-archive/metadata.xml)8
-rw-r--r--sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild52
-rw-r--r--sys-devel/nvptx-tools/nvptx-tools-9999.ebuild52
-rw-r--r--sys-devel/parity/Manifest1
-rw-r--r--sys-devel/parity/metadata.xml20
-rw-r--r--sys-devel/parity/parity-2.0.1.ebuild77
-rw-r--r--sys-devel/patch/patch-2.7.6-r4.ebuild6
-rw-r--r--sys-devel/patch/patch-2.7.6-r5.ebuild59
-rw-r--r--sys-devel/pmake/Manifest2
-rw-r--r--sys-devel/pmake/files/pmake-1.111.1-ldflags.patch13
-rw-r--r--sys-devel/pmake/files/pmake-1.98-skipdots.patch12
-rw-r--r--sys-devel/pmake/metadata.xml5
-rw-r--r--sys-devel/pmake/pmake-1.111.3.3.ebuild76
-rw-r--r--sys-devel/qbe/Manifest5
-rw-r--r--sys-devel/qbe/metadata.xml (renamed from sys-devel/qconf/metadata.xml)9
-rw-r--r--sys-devel/qbe/qbe-1.1-r1.ebuild46
-rw-r--r--sys-devel/qbe/qbe-1.2.ebuild41
-rw-r--r--sys-devel/qbe/qbe-9999.ebuild41
-rw-r--r--sys-devel/qconf/Manifest1
-rw-r--r--sys-devel/qconf/qconf-2.5.ebuild39
-rw-r--r--sys-devel/reflex/Manifest2
-rw-r--r--sys-devel/reflex/metadata.xml12
-rw-r--r--sys-devel/reflex/reflex-20230523.ebuild22
-rw-r--r--sys-devel/remake/Manifest1
-rw-r--r--sys-devel/remake/files/remake-4.3.1.1.5-fno-common.patch103
-rw-r--r--sys-devel/remake/metadata.xml9
-rw-r--r--sys-devel/remake/remake-4.3.1.1.5.ebuild40
-rw-r--r--sys-devel/rust-std/Manifest9
-rw-r--r--sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch45
-rw-r--r--sys-devel/rust-std/metadata.xml10
-rw-r--r--sys-devel/rust-std/rust-std-1.68.2.ebuild (renamed from sys-devel/rust-std/rust-std-1.59.0.ebuild)4
-rw-r--r--sys-devel/rust-std/rust-std-1.71.1.ebuild155
-rw-r--r--sys-devel/rust-std/rust-std-1.72.0.ebuild155
-rw-r--r--sys-devel/rust-std/rust-std-1.73.0.ebuild155
-rw-r--r--sys-devel/rust-std/rust-std-1.74.1.ebuild155
-rw-r--r--sys-devel/rust-std/rust-std-1.75.0.ebuild159
-rw-r--r--sys-devel/rust-std/rust-std-1.76.0.ebuild159
-rw-r--r--sys-devel/rust-std/rust-std-1.77.1.ebuild155
-rw-r--r--sys-devel/slibtool/Manifest2
-rw-r--r--sys-devel/slibtool/metadata.xml16
-rw-r--r--sys-devel/slibtool/slibtool-0.5.34.ebuild37
-rw-r--r--sys-devel/slibtool/slibtool-9999.ebuild37
-rw-r--r--sys-devel/ucpp/Manifest1
-rw-r--r--sys-devel/ucpp/metadata.xml15
-rw-r--r--sys-devel/ucpp/ucpp-1.3.5.ebuild25
501 files changed, 19297 insertions, 18633 deletions
diff --git a/sys-devel/autoconf-archive/Manifest b/sys-devel/autoconf-archive/Manifest
deleted file mode 100644
index 0b98e1289137..000000000000
--- a/sys-devel/autoconf-archive/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST autoconf-archive-2021.02.19.tar.xz 667304 BLAKE2B bc99cfd2b507a0c7fc37a001cc9e090fa037cc3626f5f5201c9a62ef06ee8ca4532ca8f21e1422f9dff9f67f64409ae560117c3161809f2d3bc3a39469910485 SHA512 a968c355c3cf66d74dc5b452141afbdf763e84a6c43b12c25da9a08482910d6d57ba3952aaf270d8cd5fd8b9d2dadf2d7d943ae2e1b067d68b71d2738d881aa0
-DIST autoconf-archive-2022.02.11.tar.xz 675264 BLAKE2B b9ff928186312969ffd09fd0523367857e7072e867f6b43689a4a5130db9f5fe19a8337875f5186409e7b0bd200491e3d1f612739499c89547a47862c59ba07f SHA512 243e06a356ea2c0fddc527febd4241da49fe4c11fb64b548873744a54e079860739d7a1da842833b99540acde3f6a2ebfddc41897306cc2e61e2c6037a7d22ff
diff --git a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild
deleted file mode 100644
index d9ba9d3bedf3..000000000000
--- a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-DESCRIPTION="GNU Autoconf Macro Archive"
-HOMEPAGE="https://www.gnu.org/software/autoconf-archive/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-# File collisions. #540246
-RDEPEND="!=gnome-base/gnome-common-3.14.0-r0
- !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2021.02.19-python310.patch
- "${FILESDIR}"/${PN}-2021.02.19-revert-ax_pthreads.patch
-)
diff --git a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild
deleted file mode 100644
index 87b98f88cd12..000000000000
--- a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-DESCRIPTION="GNU Autoconf Macro Archive"
-HOMEPAGE="https://www.gnu.org/software/autoconf-archive/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE=""
-
-# File collisions. #540246
-RDEPEND="!=gnome-base/gnome-common-3.14.0-r0
- !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]"
-DEPEND=""
diff --git a/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild
deleted file mode 100644
index bce68764f863..000000000000
--- a/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-DESCRIPTION="GNU Autoconf Macro Archive"
-HOMEPAGE="https://www.gnu.org/software/autoconf-archive/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-# File collisions. #540246
-RDEPEND="!=gnome-base/gnome-common-3.14.0-r0
- !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2021.02.19-python310.patch
-)
diff --git a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch
deleted file mode 100644
index d76605eb5c1d..000000000000
--- a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Ensure configure tests don't fail with Python 3.10, 3.11.
-
-https://github.com/autoconf-archive/autoconf-archive/pull/235
-
-From: Yaakov Selkowitz <yselkowi@redhat.com>
-Date: Thu, 5 Aug 2021 11:12:47 -0400
-Subject: [PATCH 1/2] AX_PYTHON_DEVEL: fix for Python 3.10+
-
---- a/m4/ax_python_devel.m4
-+++ b/m4/ax_python_devel.m4
-@@ -208,7 +208,7 @@ EOD`
- ac_python_version=$PYTHON_VERSION
- else
- ac_python_version=`$PYTHON -c "import sys; \
-- print (sys.version[[:3]])"`
-+ print ("%d.%d" % sys.version_info[[:2]])"`
- fi
- fi
-
-
-From: Yaakov Selkowitz <yselkowi@redhat.com>
-Date: Thu, 5 Aug 2021 11:27:24 -0400
-Subject: [PATCH 2/2] AX_PYTHON: Add 3.10 and 3.11
-
---- a/m4/ax_python.m4
-+++ b/m4/ax_python.m4
-@@ -55,7 +55,7 @@
- AC_DEFUN([AX_PYTHON],
- [AC_MSG_CHECKING(for python build information)
- AC_MSG_RESULT([])
--for python in python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
-+for python in python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
- AC_CHECK_PROGS(PYTHON_BIN, [$python])
- ax_python_bin=$PYTHON_BIN
- if test x$ax_python_bin != x; then
-
diff --git a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch
deleted file mode 100644
index 3800fd292a6d..000000000000
--- a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-This is an upstream revert which hasn't yet landed in a release.
-
-https://github.com/autoconf-archive/autoconf-archive/commit/59008cc7f85e1982eb298e1c424c2e6ad5942c4a
-https://github.com/autoconf-archive/autoconf-archive/pull/233
-https://github.com/autoconf-archive/autoconf-archive/commit/2567e0ce0f3a11b535c6b527386197fb49ff172b
-
-From: David Seifert <soap@gentoo.org>
-Date: Sat, 12 Jun 2021 22:29:03 +0200
-Subject: [PATCH] Revert "AX_PTHREAD: target > host"
-
-This reverts commit 2567e0ce0f3a11b535c6b527386197fb49ff172b.
-
-* `AC_CANONICAL_HOST` is the system on which the actual binary will run,
- `AC_CANONICAL_TARGET` is the system for which code is generated. The
- Autoconf manual even mentions that
-
- --target=target-type
- the type of system for which any compiler tools in the package produce code (**rarely needed**).
---- a/m4/ax_pthread.m4
-+++ b/m4/ax_pthread.m4
-@@ -87,11 +87,11 @@
- # modified version of the Autoconf Macro, you may extend this special
- # exception to the GPL to apply to your modified version as well.
-
--#serial 30
-+#serial 31
-
- AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
- AC_DEFUN([AX_PTHREAD], [
--AC_REQUIRE([AC_CANONICAL_TARGET])
-+AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_PROG_SED])
- AC_LANG_PUSH([C])
-@@ -158,7 +158,7 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --
- # --thread-safe: KAI C++
- # pthread-config: use pthread-config program (for GNU Pth library)
-
--case $target_os in
-+case $host_os in
-
- freebsd*)
-
-@@ -248,7 +248,7 @@ AS_IF([test "x$ax_pthread_clang" = "xyes"],
- # definitions is, on some systems, a strong hint that pthreads support is
- # correctly enabled
-
--case $target_os in
-+case $host_os in
- darwin* | hpux* | linux* | osf* | solaris*)
- ax_pthread_check_macro="_REENTRANT"
- ;;
-@@ -450,7 +450,7 @@ if test "x$ax_pthread_ok" = "xyes"; then
- AC_CACHE_CHECK([whether more special flags are required for pthreads],
- [ax_cv_PTHREAD_SPECIAL_FLAGS],
- [ax_cv_PTHREAD_SPECIAL_FLAGS=no
-- case $target_os in
-+ case $host_os in
- solaris*)
- ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
- ;;
-@@ -480,7 +480,7 @@ if test "x$ax_pthread_ok" = "xyes"; then
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != "xyes"; then
-- case $target_os in
-+ case $host_os in
- aix*)
- AS_CASE(["x/$CC"],
- [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
diff --git a/sys-devel/autoconf-wrapper/Manifest b/sys-devel/autoconf-wrapper/Manifest
deleted file mode 100644
index 72082a2b2d48..000000000000
--- a/sys-devel/autoconf-wrapper/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST autotools-wrappers-at-20220130.tar.gz 3625 BLAKE2B c587d778a0c3331d14498308ae720dabdbcf27349ef0a3a2d5db56bb0ef597a5b1ab43388f1456e7888b40f043d68b0d89b420ac7404008f9a813ef78ae7e96f SHA512 700204b6024636dc808339aac15fb19bb645b654d4777ba8bf0febded5eb6af98659d04ed23819a8a638b6ee905e62292995bf2f838c30dedacb1a6bc0d04f1a
diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild
deleted file mode 100644
index 7b58c31e8bd1..000000000000
--- a/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-MY_P="autotools-wrappers-at-${PV}"
-
-DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions"
-HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
-#SRC_URI="https://gitweb.gentoo.org/proj/autotools-wrappers.git/snapshot/${MY_P}.tar.gz"
-SRC_URI="https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-S="${WORKDIR}/${MY_P}"
-
-src_install() {
- exeinto /usr/$(get_libdir)/misc
- newexe ac-wrapper.sh ac-wrapper.sh
-
- dodir /usr/bin
- local x=
- for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do
- dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x}
- done
-}
diff --git a/sys-devel/autoconf-wrapper/metadata.xml b/sys-devel/autoconf-wrapper/metadata.xml
deleted file mode 100644
index 73dda144f9ac..000000000000
--- a/sys-devel/autoconf-wrapper/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>
diff --git a/sys-devel/autoconf/Manifest b/sys-devel/autoconf/Manifest
deleted file mode 100644
index e7e8a8d234f7..000000000000
--- a/sys-devel/autoconf/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST autoconf-2.13.tar.gz 443844 BLAKE2B ade10f9d4a0b1a0e8b752eee817cfe100d77b074192b9892330402ddc5b62dda1a3485ce0c36e72191daa9fd49382b99851cb6aa3a13aca8cf2ae6e884638fb6 SHA512 602584f4c77b7a554aaa068eda5409b68eb0b3229e9c224bffb91c83c4314d25de15bd560a323626ff78f6df339c79e1ef8938c54b78ecadf4dc75c5241290ad
-DIST autoconf-2.69-runstatedir_patches.tar.xz 257096 BLAKE2B ae765e0ca7fe8261117f6f6b75611c232fc3d4016c22c86346afa72f2b7e6c3b7ccc1f9dfe134b2443f8bde6d578b503d79cf88472f76ce75b6c2e843ef55b8e SHA512 55f93299fe5243151f6bb782986a7935270f06d5065929f4d365a37aba05703e3ce66ecf7981d30413db50ee6b4f77d81d10a71b539c8a366c5c5a156c5443da
-DIST autoconf-2.69.tar.xz 1214744 BLAKE2B 71d33d72a06e9a05fbed0eda73bc9d8a3805c7c90bf082959862f93f3c5f01192114176e84d84ecb58fa99512eafbc0ab21ad1407be18c8c63bb3dc1117c482d SHA512 995d3e5a8eb1eb37e2b7fae53c6ec7a9b4df997286b7d643344818f94636756b1bf5ff5ea9155e755cb9461149a853dfbf2886fc6bd7132e5afa9c168e306e9b
-DIST autoconf-2.71.tar.xz 1292296 BLAKE2B 7fd4b98b4cfff10720e8da6ee91045637991643b50fcb3e47a0ecfcc01600f7b7b36fd1c0a5f08b68a418f1bdbd8d5a98de1008157595dd37cc3a31facb61416 SHA512 73d32b4adcbe24e3bafa9f43f59ed3b6efbd3de0f194e5ec90375f35da1199c583f5d3e89139b7edbad35171403709270e339ffa56a2ecb9b3123e9285021ff0
diff --git a/sys-devel/autoconf/autoconf-2.13-r2.ebuild b/sys-devel/autoconf/autoconf-2.13-r2.ebuild
deleted file mode 100644
index e84a401dd1b0..000000000000
--- a/sys-devel/autoconf/autoconf-2.13-r2.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-autoconf
-
-DESCRIPTION="Used to create autoconfiguration files"
-HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="${PV:0:3}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-
-BDEPEND="
- sys-devel/m4
- dev-lang/perl"
-RDEPEND="${BDEPEND}
- sys-apps/texinfo
- >=sys-devel/autoconf-wrapper-13"
-
-PATCHES=(
- "${FILESDIR}"/${P}-gentoo.patch
- "${FILESDIR}"/${P}-destdir.patch
- "${FILESDIR}"/${P}-test-fixes.patch #146592
- "${FILESDIR}"/${PN}-2.13-perl-5.26.patch
-)
-
-src_configure() {
- # make sure configure is newer than configure.in
- touch configure || die
-
- # need to include --exec-prefix and --bindir or our
- # DESTDIR patch will trigger sandbox hate :(
- #
- # need to force locale to C to avoid bugs in the old
- # configure script breaking the install paths #351982
- #
- # force to `awk` so that we don't encode another awk that
- # happens to currently be installed, but might later be
- # uninstalled (like mawk). same for m4.
- ac_cv_path_M4="m4" \
- ac_cv_prog_AWK="awk" \
- LC_ALL=C \
- econf \
- --exec-prefix="${EPREFIX}"/usr \
- --bindir="${EPREFIX}"/usr/bin \
- --program-suffix="-${PV}"
-}
diff --git a/sys-devel/autoconf/autoconf-2.69-r5.ebuild b/sys-devel/autoconf/autoconf-2.69-r5.ebuild
deleted file mode 100644
index c85719fd173a..000000000000
--- a/sys-devel/autoconf/autoconf-2.69-r5.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
- inherit git-r3
-else
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~polynomial-c/dist/${P}-runstatedir_patches.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-inherit toolchain-autoconf
-
-DESCRIPTION="Used to create autoconfiguration files"
-HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
-
-LICENSE="GPL-3"
-SLOT="${PV}"
-IUSE="emacs"
-
-BDEPEND=">=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.6"
-RDEPEND="${BDEPEND}
- !~sys-devel/${P}:2.5
- >=sys-devel/autoconf-wrapper-13"
-[[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
-PDEPEND="emacs? ( app-emacs/autoconf-mode )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.69-perl-5.26.patch
- "${FILESDIR}"/${P}-fix-libtool-test.patch
- "${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch
- "${FILESDIR}"/${P}-make-tests-bash5-compatible.patch
-
- "${WORKDIR}"/patches/${P}-runstatedir.patch
- "${WORKDIR}"/patches/${P}-texinfo.patch
- "${WORKDIR}"/patches/${P}-runstatedir_info.patch
-)
-
-src_prepare() {
- # usr/bin/libtool is provided by binutils-apple, need gnu libtool
- if [[ ${CHOST} == *-darwin* ]] ; then
- PATCHES+=( "${FILESDIR}"/${PN}-2.61-darwin.patch )
- fi
-
- # Save timestamp to avoid later makeinfo call
- touch -r doc/{,old_}autoconf.texi || die
-
- toolchain-autoconf_src_prepare
-
- # Restore timestamp to avoid makeinfo call
- # We already have an up to date autoconf.info page at this point.
- touch -r doc/{old_,}autoconf.texi || die
-}
diff --git a/sys-devel/autoconf/autoconf-2.71-r1.ebuild b/sys-devel/autoconf/autoconf-2.71-r1.ebuild
deleted file mode 100644
index 21a979c791b3..000000000000
--- a/sys-devel/autoconf/autoconf-2.71-r1.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
- inherit git-r3
-else
- # For _beta handling replace with real version number
- MY_PV="${PV}"
- MY_P="${PN}-${MY_PV}"
- #PATCH_TARBALL_NAME="${PN}-2.70-patches-01"
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
- https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${PATCH_TARBALL_NAME}.tar.xz"
-
- if ! [[ ${PV} == *_beta* ]] ; then
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- fi
- S="${WORKDIR}"/${MY_P}
-fi
-
-inherit toolchain-autoconf
-
-DESCRIPTION="Used to create autoconfiguration files"
-HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
-
-LICENSE="GPL-3"
-SLOT="${PV/_*}"
-IUSE="emacs"
-
-BDEPEND=">=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.6"
-RDEPEND="${BDEPEND}
- >=sys-devel/autoconf-wrapper-15
- sys-devel/gnuconfig
- !~sys-devel/${P}:2.5"
-[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
-PDEPEND="emacs? ( app-emacs/autoconf-mode )"
-
-PATCHES=( "${FILESDIR}/${P}-time.patch" )
-
-src_prepare() {
- # usr/bin/libtool is provided by binutils-apple, need gnu libtool
- if [[ ${CHOST} == *-darwin* ]] ; then
- PATCHES+=( "${FILESDIR}"/${PN}-2.71-darwin.patch )
- fi
-
- # Save timestamp to avoid later makeinfo call
- touch -r doc/{,old_}autoconf.texi || die
-
- local pdir
- for pdir in "${WORKDIR}"/{upstream_,}patches ; do
- if [[ -d "${pdir}" ]] ; then
- eapply ${pdir}
- fi
- done
-
- toolchain-autoconf_src_prepare
-
- # Restore timestamp to avoid makeinfo call
- # We already have an up to date autoconf.info page at this point.
- touch -r doc/{old_,}autoconf.texi || die
-}
-
-src_test() {
- emake check
-}
-
-src_install() {
- toolchain-autoconf_src_install
-
- local f
- for f in config.{guess,sub} ; do
- ln -fs ../../gnuconfig/${f} \
- "${ED}"/usr/share/autoconf-*/build-aux/${f} || die
- done
-}
diff --git a/sys-devel/autoconf/autoconf-9999.ebuild b/sys-devel/autoconf/autoconf-9999.ebuild
deleted file mode 100644
index cb3d17704c68..000000000000
--- a/sys-devel/autoconf/autoconf-9999.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
- inherit git-r3
-else
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
-fi
-
-inherit toolchain-autoconf
-
-DESCRIPTION="Used to create autoconfiguration files"
-HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
-
-LICENSE="GPL-3"
-SLOT="${PV}"
-IUSE="emacs"
-
-BDEPEND=">=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.6"
-RDEPEND="${BDEPEND}
- >=sys-devel/autoconf-wrapper-14
- sys-devel/gnuconfig
- !~sys-devel/${P}:2.5"
-[[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
-PDEPEND="emacs? ( app-emacs/autoconf-mode )"
-
-src_prepare() {
- if [[ ${PV} == *9999 ]] ; then
- # Avoid the "dirty" suffix in the git version by generating it
- # before we run later stages which might modify source files.
- local ver=$(./build-aux/git-version-gen .tarball-version)
- echo "${ver}" > .tarball-version || die
-
- autoreconf -f -i || die
- fi
-
- toolchain-autoconf_src_prepare
-}
-
-src_test() {
- emake check
-}
-
-src_install() {
- default
-
- local f
- for f in config.{guess,sub} ; do
- ln -fs ../../gnuconfig/${f} \
- "${ED}"/usr/share/autoconf-*/build-aux/${f} || die
- done
-}
diff --git a/sys-devel/autoconf/files/autoconf-2.13-destdir.patch b/sys-devel/autoconf/files/autoconf-2.13-destdir.patch
deleted file mode 100644
index 47605af5f59c..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.13-destdir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -41,18 +41,18 @@
-
- transform=@program_transform_name@
-
--prefix = @prefix@
-+prefix = $(DESTDIR)@prefix@
--exec_prefix = @exec_prefix@
-+exec_prefix = $(DESTDIR)@exec_prefix@
-
- # Directory in which to install scripts.
--bindir = @bindir@
-+bindir = $(DESTDIR)@bindir@
-
- # Directory in which to install library files.
--datadir = @datadir@
-+datadir = $(DESTDIR)@datadir@
- acdatadir = $(datadir)/autoconf
-
- # Directory in which to install documentation info files.
--infodir = @infodir@
-+infodir = $(DESTDIR)@infodir@
-
- #### End of system configuration section. ####
-
diff --git a/sys-devel/autoconf/files/autoconf-2.13-gentoo.patch b/sys-devel/autoconf/files/autoconf-2.13-gentoo.patch
deleted file mode 100644
index 44f09cba92f0..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.13-gentoo.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -654,12 +654,10 @@
- echo "$ac_t""no" 1>&6
- fi
-
--if test "$PERL" != no; then
-- SCRIPTS=autoscan
--else
-- echo "configure: warning: autoscan will not be built since perl is not found" 1>&2
-+if test "$PERL" = no; then
-+ PERL=/usr/bin/perl
- fi
--
-+SCRIPTS=autoscan
- ac_aux_dir=
- for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
---- a/configure.in
-+++ b/configure.in
-@@ -14,12 +14,10 @@
- AC_PATH_PROG(PERL, perl, no)
- AC_SUBST(PERL)dnl
- AC_SUBST(SCRIPTS)dnl
--if test "$PERL" != no; then
-- SCRIPTS=autoscan
--else
-- AC_MSG_WARN(autoscan will not be built since perl is not found)
-+if test "$PERL" = no; then
-+ PERL=/usr/bin/perl
- fi
--
-+SCRIPTS=autoscan
- AC_PROG_INSTALL
-
- # Work with the GNU or Cygnus source tree layout.
diff --git a/sys-devel/autoconf/files/autoconf-2.13-perl-5.26.patch b/sys-devel/autoconf/files/autoconf-2.13-perl-5.26.patch
deleted file mode 100644
index 6fbc0cd1bc89..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.13-perl-5.26.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN autoconf-2.13.orig/autoscan.pl autoconf-2.13/autoscan.pl
---- autoconf-2.13.orig/autoscan.pl 1999-01-05 14:28:42.000000000 +0100
-+++ autoconf-2.13/autoscan.pl 2018-12-22 19:55:10.986732296 +0100
-@@ -232,7 +232,7 @@
- # Strip out comments and variable references.
- s/#.*//;
- s/\$\([^\)]*\)//g;
-- s/\${[^\}]*}//g;
-+ s/\$\{[^\}]*}//g;
- s/@[^@]*@//g;
-
- # Variable assignments.
diff --git a/sys-devel/autoconf/files/autoconf-2.13-test-fixes.patch b/sys-devel/autoconf/files/autoconf-2.13-test-fixes.patch
deleted file mode 100644
index b8a7e3b8ce99..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.13-test-fixes.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-newer gcc versions don't provide g77, so if it doesn't exist,
-don't bother trying to test it (and failing)
-
-http://bugs.gentoo.org/146592
-
---- autoconf-2.13/testsuite/autoconf.s/syntax.exp
-+++ autoconf-2.13/testsuite/autoconf.s/syntax.exp
-@@ -5,6 +5,10 @@
- set macros [exec sed -n $script $srcdir/../acspecific.m4]
-
- foreach mac $macros {
-+ if { [string match "*F77*" "$mac"] && [catch {exec which g77} ignore_output] } then {
-+ send_user "XFAIL: $mac\n"
-+ continue
-+ }
- send_user "$mac\n"
- autoconf_test $mac $mac
- }
diff --git a/sys-devel/autoconf/files/autoconf-2.61-darwin.patch b/sys-devel/autoconf/files/autoconf-2.61-darwin.patch
deleted file mode 100644
index 83f450e6f5af..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.61-darwin.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/bin/autoreconf.in
-+++ b/bin/autoreconf.in
-@@ -110,7 +110,7 @@
- my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@';
- my $automake = $ENV{'AUTOMAKE'} || 'automake';
- my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
--my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
-+my $libtoolize = $ENV{'LIBTOOLIZE'} || 'glibtoolize';
- my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
-
- # --install -- as --add-missing in other tools.
diff --git a/sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch b/sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch
deleted file mode 100644
index e75eba621606..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 247b02e5a5bb79ca6666e91de02ae2d3cb0cd325 Mon Sep 17 00:00:00 2001
-From: "Gary V. Vaughan" <gary@gnu.org>
-Date: Mon, 3 Nov 2014 07:25:03 +0100
-Subject: tests: avoid spurious test failure with libtool 2.4.3
-
-Based on a report by Bruce Dubbs.
-
-* tests/foreign.at (Libtool): Be tolerant of 'quote' replacing the
-older `quote'.
-
-Signed-off-by: Eric Blake <eblake@redhat.com>
----
- tests/foreign.at | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/foreign.at b/tests/foreign.at
-index a9dc33c..d4702cd 100644
---- a/tests/foreign.at
-+++ b/tests/foreign.at
-@@ -57,7 +57,7 @@ AT_CHECK([./config.guess || exit 77], [], [ignore], [ignore])
- # Make sure at-path contains something valid, and let the test suite
- # display it when verbose. And fail, skipping would too easily hide
- # problems.
--AT_CHECK([sed -n ["s,^.*\`\\(/[^']*\\)'.*,\\1,p"] stdout], [0], [stdout])
-+AT_CHECK([sed -n ["s,^[^']*[\`']\\(/[^']*\\)'.*,\\1,p"] stdout], [0], [stdout])
- AT_CHECK([test -f "`sed -n 1p stdout`"])
-
- # Older libtoolize installed everything but install-sh...
---
-cgit v1.0-41-gc330
-
diff --git a/sys-devel/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch b/sys-devel/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch
deleted file mode 100644
index 1afcec15bb4f..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 5b9db67786a428164abafe626ab11a2754aad528 Mon Sep 17 00:00:00 2001
-From: Ondrej Dubaj <odubaj@redhat.com>
-Date: Wed, 28 Aug 2019 07:39:50 +0200
-Subject: Port tests to Bash 5
-
-* tests/local.at (AT_CHECK_ENV, AT_CONFIG_CMP):
-Add BASH_ARGC, BASH_ARGV to list of variables to be ignored when
-comparing variable space dumps.
-(AT_CONFIG_CMP): Also ignore LINENO.
-* tests/m4sh.at: Also unset LINENO in 'reference' and 'test/test-1'.
----
- tests/local.at | 5 ++++-
- tests/m4sh.at | 4 ++--
- 2 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/tests/local.at b/tests/local.at
-index a22958c0..852be285 100644
---- a/tests/local.at
-+++ b/tests/local.at
-@@ -325,7 +325,7 @@ if test -f state-env.before && test -f state-env.after; then
- [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC],
- [GREP|[EF]GREP|SED],
- [[_@]|.[*#?$].],
-- [argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \
-+ [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \
- $act_file ||
- test $? -eq 1 || echo failed >&2
- ) 2>stderr-$act_file |
-@@ -382,6 +382,9 @@ do
- /'\'\\\$\''=/ d
- /^argv=/ d
- /^ARGC=/ d
-+ /^BASH_ARGC=/ d
-+ /^BASH_ARGV=/ d
-+ /^LINENO=/ d
- ' $act_file >at_config_vars-$act_file
- done
- AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl
-diff --git a/tests/m4sh.at b/tests/m4sh.at
-index e9d70b02..cbdfcb62 100644
---- a/tests/m4sh.at
-+++ b/tests/m4sh.at
-@@ -254,7 +254,7 @@ AT_CHECK([autom4te -l m4sh $1.as -o $1])
- # `_oline_', once processed and ran, produces our reference.
- # We check that we find ourselves by looking at a string which is
- # available only in the original script: `_oline_'.
--AT_DATA_LINENO([reference], [false], [__OLINE__], [_oline__])
-+AT_DATA_LINENO([reference], [true], [__OLINE__], [_oline__])
- AT_CHECK([./reference], 0, [stdout])
-
- # The reference:
-@@ -264,7 +264,7 @@ mv stdout expout
- # Be sure to be out of the PATH.
- AT_CHECK([mkdir test || exit 77])
-
--AT_DATA_LINENO([test/test-1], [false], [__LINENO__], [LINENO])
-+AT_DATA_LINENO([test/test-1], [true], [__LINENO__], [LINENO])
- AT_CHECK([./test/test-1], 0, [expout])
- AT_CHECK([(PATH=test$PATH_SEPARATOR$PATH; export PATH; exec test-1)],
- 0, [expout])
---
-cgit v1.2.1
-
diff --git a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch b/sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch
deleted file mode 100644
index 6becf807c43e..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://bugs.gentoo.org/625576
-
---- autoconf-2.69/bin/autoheader.in
-+++ autoconf-2.69/bin/autoheader.in
-@@ -173,6 +173,12 @@
- # Source what the traces are trying to tell us.
- verb "$me: running $autoconf to trace from $ARGV[0]";
- my $quoted_tmp = shell_quote ($tmp);
-+my $perl_tmp;
-+if ( $tmp =~ /^\// ) {
-+ $perl_tmp=$tmp;
-+} else {
-+ $perl_tmp="./".$tmp;
-+}
- xsystem ("$autoconf"
- # If you change this list, update the
- # `Autoheader-preselections' section of autom4te.in.
-@@ -182,9 +188,9 @@
- . " " . shell_quote ($ARGV[0]) . " >$quoted_tmp/traces.pl");
-
- local (%verbatim, %symbol);
--debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`;
--do "$tmp/traces.pl";
--warn "couldn't parse $tmp/traces.pl: $@" if $@;
-+debug "$me: \`do'ing $perl_tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`;
-+do "$perl_tmp/traces.pl";
-+warn "couldn't parse $perl_tmp/traces.pl: $@" if $@;
- unless ($config_h)
- {
- error "error: AC_CONFIG_HEADERS not found in $ARGV[0]";
diff --git a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch b/sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch
deleted file mode 100644
index b3d7888ca722..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e5654a5591884b92633c7785f325626711e7f7aa Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Tue, 29 Jan 2013 13:46:48 -0800
-Subject: [PATCH] autoscan: port to perl 5.17
-
-* bin/autoscan.in (scan_sh_file): Escape '{'. This avoids a
-feature that is deprecated in Perl 5.17. Reported by Ray Lauff in
-<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00059.html>.
----
- bin/autoscan.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bin/autoscan.in b/bin/autoscan.in
-index 993a750..db1df79 100644
---- a/bin/autoscan.in
-+++ b/bin/autoscan.in
-@@ -358,7 +358,7 @@ sub scan_sh_file ($)
- {
- # Strip out comments and variable references.
- s/#.*//;
-- s/\${[^\}]*}//g;
-+ s/\$\{[^\}]*}//g;
- s/@[^@]*@//g;
-
- # Tokens in the code.
---
-1.9.1
-
diff --git a/sys-devel/autoconf/files/autoconf-2.71-darwin.patch b/sys-devel/autoconf/files/autoconf-2.71-darwin.patch
deleted file mode 100644
index c122aee4b22d..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.71-darwin.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/bin/autoreconf.in
-+++ b/bin/autoreconf.in
-@@ -122,7 +122,7 @@
- my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
- my $automake = $ENV{'AUTOMAKE'} || 'automake';
- my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
--my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
-+my $libtoolize = $ENV{'LIBTOOLIZE'} || 'glibtoolize';
- my $intltoolize = $ENV{'INTLTOOLIZE'} || 'intltoolize';
- my $gtkdocize = $ENV{'GTKDOCIZE'} || 'gtkdocize';
- my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
diff --git a/sys-devel/autoconf/files/autoconf-2.71-time.patch b/sys-devel/autoconf/files/autoconf-2.71-time.patch
deleted file mode 100644
index 8ecfe10f40a3..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.71-time.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From e194b3c7e00429612a9d40e78ea571687fd25b91 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
-Date: Sun, 1 Aug 2021 19:07:48 +0200
-Subject: [PATCH] Use stat from Time::HiRes (instead of File::stat)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
----
- lib/Autom4te/FileUtils.pm | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
-index a182031b..27a5fd91 100644
---- a/lib/Autom4te/FileUtils.pm
-+++ b/lib/Autom4te/FileUtils.pm
-@@ -34,12 +34,12 @@ This perl module provides various general purpose file handling functions.
-
- =cut
-
--use 5.006;
-+use 5.008;
- use strict;
- use warnings FATAL => 'all';
-
- use Exporter;
--use File::stat;
-+use Time::HiRes qw(stat);
- use IO::File;
-
- use Autom4te::Channels;
-@@ -115,10 +115,11 @@ sub mtime ($)
- return 0
- if $file eq '-' || ! -f $file;
-
-- my $stat = stat ($file)
-+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
-+ $atime,$mtime,$ctime,$blksize,$blocks) = stat ($file)
- or fatal "cannot stat $file: $!";
-
-- return $stat->mtime;
-+ return $mtime;
- }
-
-
---
-2.31.1
-
diff --git a/sys-devel/autoconf/metadata.xml b/sys-devel/autoconf/metadata.xml
deleted file mode 100644
index 73dda144f9ac..000000000000
--- a/sys-devel/autoconf/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>
diff --git a/sys-devel/autogen/autogen-5.18.16-r1.ebuild b/sys-devel/autogen/autogen-5.18.16-r3.ebuild
index e6ca874bac9c..e908a1837ef5 100644
--- a/sys-devel/autogen/autogen-5.18.16-r1.ebuild
+++ b/sys-devel/autogen/autogen-5.18.16-r3.ebuild
@@ -1,23 +1,29 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit toolchain-funcs
+inherit flag-o-matic autotools toolchain-funcs
DESCRIPTION="Program and text file generation"
HOMEPAGE="https://www.gnu.org/software/autogen/"
-SRC_URI="mirror://gnu/${PN}/rel${PV}/${P}.tar.xz
- https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h"
+SRC_URI="
+ mirror://gnu/${PN}/rel${PV}/${P}.tar.xz
+ https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h
+"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="libopts static-libs"
-RDEPEND=">=dev-scheme/guile-2.0:=
- dev-libs/libxml2"
+RDEPEND="
+ >=dev-scheme/guile-2.0:=
+ dev-libs/libxml2
+"
DEPEND="${RDEPEND}"
+# TODO: investigate & drop this!
+BDEPEND="sys-apps/which"
# We don't pass the flag explicitly, bug #796776.
# Let's fix it upstream after next autogen release if it happens.
@@ -29,21 +35,18 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch
"${FILESDIR}"/${PN}-5.18.16-make-4.3.patch
"${FILESDIR}"/${PN}-5.18.16-guile-3.patch
+ "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch
+ "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch
)
src_prepare() {
- # no-werror.patch fixes both configure{.ac,}
- # avoid configure echeck
- touch -r configure.ac orig.configure.ac || die
- touch -r configure orig.configure || die
-
default
- touch -r orig.configure.ac configure.ac || die
- touch -r orig.configure configure || die
-
# missing tarball file
cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die
+
+ # May be able to drop this on next release (>5.18.16)
+ eautoreconf
}
src_configure() {
@@ -57,12 +60,16 @@ src_configure() {
export libopts_cv_with_libregex=yes
fi
+ # bug 920174
+ use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
econf $(use_enable static-libs static)
}
src_install() {
default
- find "${D}" -name '*.la' -delete || die
+
+ find "${ED}" -name '*.la' -delete || die
if ! use libopts ; then
rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die
diff --git a/sys-devel/autogen/autogen-5.18.16-r4.ebuild b/sys-devel/autogen/autogen-5.18.16-r4.ebuild
new file mode 100644
index 000000000000..d767e53a32bf
--- /dev/null
+++ b/sys-devel/autogen/autogen-5.18.16-r4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic autotools toolchain-funcs
+
+DESCRIPTION="Program and text file generation"
+HOMEPAGE="https://www.gnu.org/software/autogen/"
+SRC_URI="
+ mirror://gnu/${PN}/rel${PV}/${P}.tar.xz
+ https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="libopts static-libs"
+
+RDEPEND="
+ >=dev-scheme/guile-2.0:=
+ dev-libs/libxml2
+"
+DEPEND="${RDEPEND}"
+
+# We don't pass the flag explicitly, bug #796776.
+# Let's fix it upstream after next autogen release if it happens.
+QA_CONFIGURE_OPTIONS+=" --enable-snprintfv-convenience"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.18.16-no-werror.patch
+ "${FILESDIR}"/${PN}-5.18.16-rpath.patch
+ "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch
+ "${FILESDIR}"/${PN}-5.18.16-make-4.3.patch
+ "${FILESDIR}"/${PN}-5.18.16-guile-3.patch
+ "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch
+ "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch
+ "${FILESDIR}"/${PN}-5.18.16-no-which.patch
+)
+
+src_prepare() {
+ default
+
+ # missing tarball file
+ cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die
+
+ # May be able to drop this on next release (>5.18.16)
+ eautoreconf
+}
+
+src_configure() {
+ # suppress possibly incorrect -R flag
+ export ag_cv_test_ldflags=
+
+ # autogen requires run-time sanity of regex and string functions.
+ # Use defaults of linux-glibc until we need somethig more advanced.
+ if tc-is-cross-compiler ; then
+ export ag_cv_run_strcspn=no
+ export libopts_cv_with_libregex=yes
+ fi
+
+ # bug 920174
+ use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+
+ if ! use libopts ; then
+ rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die
+ fi
+}
diff --git a/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch
new file mode 100644
index 000000000000..b8108c1c0ed1
--- /dev/null
+++ b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch
@@ -0,0 +1,100 @@
+https://bugs.gentoo.org/889394
+https://sourceforge.net/p/autogen/bugs/212/
+https://bugzilla.redhat.com/2173623
+https://siddhesh.in/posts/that-is-not-a-number-that-is-a-freed-object.html
+https://gcc.gnu.org/PR105217
+https://src.fedoraproject.org/rpms/autogen/blob/684b717191dd8bcd4e01a7775e62d50bc41b8ccb/f/autogen-fortify.patch
+
+commit 772b282a4e858a27af610bcdcc8b66925cbf1a83
+Author: Tomas Korbar <tkorbar@redhat.com>
+Date: Tue Feb 28 16:08:13 2023 +0100
+
+ avoid GCC code analysis bug
+
+--- a/agen5/defLoad.c
++++ b/agen5/defLoad.c
+@@ -448,17 +448,28 @@ read_defs(void)
+ FILE * fp;
+ def_input_mode_t in_mode = ready_def_input(&def_fname, &data_sz);
+
++ /*
++ * "ready_def_input" has a lot of side effects. It's possible that
++ * there are no definitions, so "in_mode" is set to DONE and there's
++ * nothing to do.
++ */
+ if (in_mode == INPUT_DONE)
+ return;
+
+ /*
+ * Allocate the space we need for our definitions.
++ * "data_sz" was set by read_def_input to the size of the
++ * definitions file (or 4096 if we're reading from a fifo file).
++ * In that alternate case, we'll start the input size at 4096 bytes.
++ * The allocation includes space for context and a NUL byte or two
+ */
+- rem_sz = data_sz+4+sizeof(*base_ctx);
+- base_ctx = (scan_ctx_t *)AGALOC(rem_sz, "file buf");
+- memset(VOIDP(base_ctx), 0, rem_sz);
++ {
++ size_t sz = data_sz + sizeof(long) + sizeof(*base_ctx);
++ base_ctx = (scan_ctx_t *)AGALOC(sz, "file buf");
++ memset(VOIDP(base_ctx), 0, sz);
++ }
+ base_ctx->scx_line = 1;
+- rem_sz = data_sz;
++ rem_sz = data_sz; // size available for storing def text
+
+ /*
+ * Our base context will have its currency pointer set to this
+@@ -482,6 +493,9 @@ read_defs(void)
+ if (fp == NULL)
+ AG_CANT(READ_DEF_OPEN, def_fname);
+
++ /*
++ * If we're emitting dependency information, then do so.
++ */
+ if (dep_fp != NULL)
+ add_source_file(def_fname);
+ }
+@@ -516,8 +530,7 @@ read_defs(void)
+ * See if there is any space left
+ */
+ if (rem_sz == 0) {
+- scan_ctx_t * p;
+- off_t dataOff;
++ off_t scan_off;
+
+ /*
+ * IF it is a regular file, then we are done
+@@ -527,24 +540,16 @@ read_defs(void)
+
+ /*
+ * We have more data and we are out of space.
+- * Try to reallocate our input buffer.
++ * AGREALOC will succeed or not return.
+ */
+ data_sz += (rem_sz = 0x1000);
+- dataOff = data - base_ctx->scx_data;
+- p = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx),
+- "expand f buf");
++ scan_off = data - base_ctx->scx_data;
++ base_ctx = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx),
++ "expand f buf");
+
+- /*
+- * The buffer may have moved. Set the data pointer at an
+- * offset within the new buffer and make sure our base pointer
+- * has been corrected as well.
+- */
+- if (p != base_ctx) {
+- p->scx_scan = \
+- p->scx_data = (char *)(p + 1);
+- data = p->scx_data + dataOff;
+- base_ctx = p;
+- }
++ base_ctx->scx_scan = \
++ base_ctx->scx_data = (char *)(base_ctx + 1);
++ data = base_ctx->scx_data + scan_off;
+ }
+ }
+
diff --git a/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch
new file mode 100644
index 000000000000..75e2e760a792
--- /dev/null
+++ b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch
@@ -0,0 +1,42 @@
+https://bugs.gentoo.org/898590
+https://src.fedoraproject.org/rpms/autogen/c/7d157d98e73dcd1602111309a690643faa80e207?branch=rawhide
+--- a/config/ag_macros.m4
++++ b/config/ag_macros.m4
+@@ -113,7 +113,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[
+ fi
+
+ AC_CACHE_CHECK([for static inline], [snv_cv_static_inline], [
+- AC_TRY_COMPILE([static inline foo(bar) int bar; { return bar; }],
++ AC_TRY_COMPILE([static inline int foo(bar) int bar; { return bar; }],
+ [return foo(0);],
+ [snv_cv_static_inline='static inline'],
+ [snv_cv_static_inline='static'])
+@@ -428,7 +428,7 @@ int main (int argc, char ** argv) {
+ char zRej@<:@@:>@ = reject;
+ char zAcc@<:@@:>@ = "a-ok-eject";
+ return strcspn( zAcc, zRej ) - 5;
+-}] )]
++}] )],
+ [ag_cv_run_strcspn=yes],[ag_cv_run_strcspn=no],[ag_cv_run_strcspn=no]
+ ) # end of RUN_IFELSE
+ ]) # end of AC_CACHE_VAL for ag_cv_run_strcspn
+--- a/configure
++++ b/configure
+@@ -17338,7 +17338,7 @@ int main (int argc, char ** argv) {
+ char zAcc[] = "a-ok-eject";
+ return strcspn( zAcc, zRej ) - 5;
+ }
+- ag_cv_run_strcspn=yes
++#error
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ ag_cv_run_strcspn=no
+@@ -18406,7 +18405,7 @@ else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-static inline foo(bar) int bar; { return bar; }
++static inline int foo(bar) int bar; { return bar; }
+ int
+ main ()
+ {
diff --git a/sys-devel/autogen/files/autogen-5.18.16-no-which.patch b/sys-devel/autogen/files/autogen-5.18.16-no-which.patch
new file mode 100644
index 000000000000..c4b462cba420
--- /dev/null
+++ b/sys-devel/autogen/files/autogen-5.18.16-no-which.patch
@@ -0,0 +1,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -149,9 +149,9 @@ GDnam=getdefs${ac_exeext}
+ CLnam=columns${ac_exeext}
+ if test "X$cross_compiling" = Xyes
+ then
+- AGexe=`which ${AGnam}`
+- GDexe=`which ${GDnam}`
+- CLexe=`which ${CLnam}`
++ AGexe=`command -v ${AGnam}`
++ GDexe=`command -v ${GDnam}`
++ CLexe=`command -v ${CLnam}`
+ else
+ AGexe=${ag_top_builddir}/agen5/${AGnam}
+ GDexe=${ag_top_builddir}/getdefs/${GDnam}
diff --git a/sys-devel/autogen/metadata.xml b/sys-devel/autogen/metadata.xml
index ab5727db0a55..8f3ef98f5bc0 100644
--- a/sys-devel/autogen/metadata.xml
+++ b/sys-devel/autogen/metadata.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
-</maintainer>
-<use>
- <flag name="libopts">install the libopts tarball (a few packages want this for developing)</flag>
-</use>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <use>
+ <flag name="libopts">install the libopts tarball (a few packages want this for developing)</flag>
+ </use>
+ <upstream>
+ <remote-id type="savannah">autogen</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild b/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild
deleted file mode 100644
index e65eb87b26c7..000000000000
--- a/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="wrapper for automake to manage multiple automake versions"
-HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
-S="${WORKDIR}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-src_unpack() {
- cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die
-}
-
-src_prepare() {
- default
-
- # usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell
- if use prefix ; then
- sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' am-wrapper-${PV}.sh || die
- fi
-}
-
-src_install() {
- newbin am-wrapper-${PV}.sh automake
- dosym automake /usr/bin/aclocal
-
- keepdir /usr/share/aclocal
-}
diff --git a/sys-devel/automake-wrapper/files/am-wrapper-11.sh b/sys-devel/automake-wrapper/files/am-wrapper-11.sh
deleted file mode 100644
index 290762680d22..000000000000
--- a/sys-devel/automake-wrapper/files/am-wrapper-11.sh
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/bin/sh
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Executes the correct automake version.
-#
-# If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions):
-# - attempt to find an installed version using those
-# - if magic keyword 'latest' is found, pick the latest version that exists
-# - if nothing found, warn, and proceed as if WANT_AUTOMAKE was not set (below)
-# If WANT_AUTOMAKE is not set:
-# - Try to detect the version of automake used to generate things (look at
-# Makefile.in and aclocal.m4 and any other useful file)
-# - If detected version is not found, warn and proceed as if blank slate
-# - Try to locate the latest version of automake that exists and run it
-
-(set -o posix) 2>/dev/null && set -o posix
-
-_stderr() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; }
-warn() { _stderr "warning: $*"; }
-err() { _stderr "error: $*"; exit 1; }
-unset IFS
-which() {
- local p
- IFS=: # we don't use IFS anywhere, so don't bother saving/restoring
- for p in ${PATH} ; do
- p="${p}/$1"
- [ -e "${p}" ] && echo "${p}" && return 0
- done
- unset IFS
- return 1
-}
-
-#
-# Sanitize argv[0] since it isn't always a full path #385201
-#
-argv0=${0##*/}
-case $0 in
- ${argv0})
- # find it in PATH
- if ! full_argv0=$(which "${argv0}") ; then
- err "could not locate ${argv0}; file a bug"
- fi
- ;;
- *)
- # re-use full/relative paths
- full_argv0=$0
- ;;
-esac
-
-if ! seq 0 0 2>/dev/null 1>&2 ; then #338518
- seq() {
- local f l i
- case $# in
- 1) f=1 i=1 l=$1;;
- 2) f=$1 i=1 l=$2;;
- 3) f=$1 i=$2 l=$3;;
- esac
- while :; do
- [ $l -lt $f -a $i -gt 0 ] && break
- [ $f -lt $l -a $i -lt 0 ] && break
- echo $f
- : $(( f += i ))
- done
- return 0
- }
-fi
-
-#
-# Set up bindings between actual version and WANT_AUTOMAKE;
-# Start with last known versions to speed up lookup process.
-#
-LAST_KNOWN_AUTOMAKE_VER="16"
-vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`)
-
-#
-# Helper to scan for a usable program based on version.
-#
-binary=
-all_vers=
-find_binary() {
- local v
- all_vers="${all_vers} $*" # For error messages.
- for v ; do
- if [ -x "${full_argv0}-${v}" ] ; then
- binary="${full_argv0}-${v}"
- binary_ver=${v}
- return 0
- fi
- done
- return 1
-}
-
-#
-# Try and find a usable automake version. First check the WANT_AUTOMAKE
-# setting (whitespace delimited list), then fallback to the latest.
-#
-find_latest() {
- if ! find_binary ${vers} ; then
- # Brute force it.
- find_binary $(printf '1.%s ' `seq 99 -1 ${LAST_KNOWN_AUTOMAKE_VER}`)
- fi
-}
-for wx in ${WANT_AUTOMAKE:-latest} ; do
- if [ "${wx}" = "latest" ] ; then
- find_latest && break
- else
- find_binary ${wx} && break
- fi
-done
-
-if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then
- warn "could not locate installed version for WANT_AUTOMAKE='${WANT_AUTOMAKE}'; ignoring"
- unset WANT_AUTOMAKE
- find_latest
-fi
-
-if [ -z "${binary}" ] ; then
- err "Unable to locate any usuable version of automake.\n" \
- "\tI tried these versions:${all_vers}\n" \
- "\tWith a base name of '${full_argv0}'."
-fi
-
-#
-# autodetect helpers
-#
-do_awk() {
- local file=$1 ; shift
- local v=$(awk -v regex="$*" '{
- if (ret = match($0, regex)) {
- s = substr($0, ret, RLENGTH)
- ret = match(s, "[0-9]\\.[0-9]+")
- print substr(s, ret, RLENGTH)
- exit
- }
- }' "${file}")
- case " ${auto_vers} " in
- *" ${v} "*) ;;
- *) auto_vers="${auto_vers:+${auto_vers} }${v}" ;;
- esac
-}
-
-#
-# autodetect routine
-#
-if [ -z "${WANT_AUTOMAKE}" ] ; then
- auto_vers=
- if [ -r "Makefile.in" ] ; then
- do_awk Makefile.in '^# Makefile.in generated (automatically )?by automake [0-9]\\.[0-9]+'
- fi
- if [ -r "aclocal.m4" ] ; then
- do_awk aclocal.m4 'generated automatically by aclocal [0-9]\\.[0-9]+'
- do_awk aclocal.m4 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?[0-9]\\.[0-9]+[^)]*\\]?\\)'
- fi
- # We don't need to set $binary here as it has already been setup for us
- # earlier to the latest available version.
- if [ -n "${auto_vers}" ] ; then
- if ! find_binary ${auto_vers} ; then
- warn "auto-detected versions not found (${auto_vers}); falling back to latest available"
- fi
- fi
-fi
-
-if [ -n "${WANT_AMWRAPPER_DEBUG}" ] ; then
- if [ -n "${WANT_AUTOMAKE}" ] ; then
- warn "DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}"
- fi
- warn "DEBUG: will execute <${binary}>"
-fi
-
-#
-# for further consistency
-#
-export WANT_AUTOMAKE="${binary_ver}"
-
-#
-# Now try to run the binary
-#
-if [ ! -x "${binary}" ] ; then
- # this shouldn't happen
- err "${binary} is missing or not executable.\n" \
- "\tPlease try installing the correct version of automake."
-fi
-
-exec "${binary}" "$@"
-# The shell will error out if `exec` failed.
diff --git a/sys-devel/automake-wrapper/metadata.xml b/sys-devel/automake-wrapper/metadata.xml
deleted file mode 100644
index 73dda144f9ac..000000000000
--- a/sys-devel/automake-wrapper/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>
diff --git a/sys-devel/automake/Manifest b/sys-devel/automake/Manifest
deleted file mode 100644
index e73efe278587..000000000000
--- a/sys-devel/automake/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST automake-1.11.6.tar.xz 1092908 BLAKE2B 17254d81d6920c32aa877b6c892025de8e4060b8bcbe50fff841ada513dd462ddde8fc6838b4976098a812f8fda047e7186cb62cea8175df615dde75a9959144 SHA512 6e4cdf69f07734954f770fd4a7211a8c9dc69fe25a7746bd3c1e01d3139c94cab2900399e87371548833e99687e0d2b59c5e746ab2fdfbc7d47f2c1d439137ba
-DIST automake-1.13.4.tar.xz 1449608 BLAKE2B 03dee42d65362a6f36e81c83d516c85faba1aac59bdc0d941077fde9be7742da0f57b48d678169e7a0e8b652c3ef46c314cdd3efb0fc489c389852fed1c39a02 SHA512 c9b145c1b822a4d83f2899f4280a76ccae932301b273f4c9718dc7f53161aa03dc1be2c1fb1a61083c54186e1908ae2c8284250aa1d8f6dea484767aca1344d3
-DIST automake-1.15.1.tar.xz 1509496 BLAKE2B e6ade31089f969140472004cd9854318470228c64e4f8e829d48c5379f62d2c5f8ef9509131c577653e81868d94544ecf6520f86b5d582ebb6ed65c832039f30 SHA512 02f661b2676f1d44334ce1c7188f9913a6874bf46ba487708ad8090ad57905f14aead80fefed815e21effacfbb925e23b944ea7dd32563dca39c1a4174eda688
-DIST automake-1.16.5.tar.xz 1601740 BLAKE2B 87408abc57e1d4317a2b518fb3606d0f6d156522e7333016dd84747cd8922f27ef7fcc93220b11f794ce52bf8fd9a788d0166a4d1964d7c283905f269977ac7c SHA512 3084ae543aa3fb5a05104ffb2e66cfa9a53080f2343c44809707fd648516869511500dba50dae67ff10f92a1bf3b5a92b2a0fa01cda30adb69b9da03994d9d88
diff --git a/sys-devel/automake/automake-1.11.6-r3.ebuild b/sys-devel/automake/automake-1.11.6-r3.ebuild
deleted file mode 100644
index 8b96c4f83141..000000000000
--- a/sys-devel/automake/automake-1.11.6-r3.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="Used to generate Makefile.in from Makefile.am"
-HOMEPAGE="https://www.gnu.org/software/automake/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-# Use Gentoo versioning for slotting.
-SLOT="${PV:0:4}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE=""
-RESTRICT="test"
-
-RDEPEND="dev-lang/perl
- >=sys-devel/automake-wrapper-10
- >=sys-devel/autoconf-2.69:*
- sys-devel/gnuconfig"
-DEPEND="${RDEPEND}
- sys-apps/help2man"
-BDEPEND="app-arch/gzip"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.10-perl-5.16.patch #424453
- "${FILESDIR}"/${PN}-1.11-install-sh-avoid-low-risk-race-in-tmp.patch
- "${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket-r1.patch
-)
-
-src_prepare() {
- default
- export WANT_AUTOCONF=2.5
- export HELP2MAN=true
- sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
- export TZ="UTC" #589138
-}
-
-src_compile() {
- default
-
- local x
- for x in aclocal automake; do
- help2man "perl -Ilib ${x}" > doc/${x}-${SLOT}.1
- done
-}
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- pushd "${ED}"/usr/share/info >/dev/null || die
- rm -f dir || die
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null || die
-}
-
-src_install() {
- default
- slot_info_pages
-
- rm \
- "${ED}"/usr/bin/{aclocal,automake} \
- "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
-
- # remove all config.guess and config.sub files replacing them
- # w/a symlink to a specific gnuconfig version
- local x
- for x in guess sub ; do
- dosym ../gnuconfig/config.${x} \
- /usr/share/${PN}-${SLOT}/config.${x}
- done
-
- # Avoid QA message about pre-compressed file in docs
- local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
- if [[ -f "${tarfile}" ]] ; then
- gunzip "${tarfile}" || die
- fi
-}
diff --git a/sys-devel/automake/automake-1.13.4-r2.ebuild b/sys-devel/automake/automake-1.13.4-r2.ebuild
deleted file mode 100644
index 286477158c2a..000000000000
--- a/sys-devel/automake/automake-1.13.4-r2.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="Used to generate Makefile.in from Makefile.am"
-HOMEPAGE="https://www.gnu.org/software/automake/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-# Use Gentoo versioning for slotting.
-SLOT="${PV:0:4}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE=""
-RESTRICT="test"
-
-RDEPEND="dev-lang/perl
- >=sys-devel/automake-wrapper-10
- >=sys-devel/autoconf-2.69:*
- sys-devel/gnuconfig"
-DEPEND="${RDEPEND}
- sys-apps/help2man"
-BDEPEND="app-arch/gzip"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.13-dyn-ithreads.patch
- "${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket-r1.patch
- "${FILESDIR}"/${PN}-1.13-hash-order-workaround.patch
- "${FILESDIR}"/${PN}-1.14-install-sh-avoid-low-risk-race-in-tmp.patch
-)
-
-src_prepare() {
- default
- export WANT_AUTOCONF=2.5
- sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
-}
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- pushd "${ED}"/usr/share/info >/dev/null || die
- rm -f dir || die
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null || die
-}
-
-src_install() {
- default
-
- slot_info_pages
- rm "${ED}"/usr/share/aclocal/README || die
- rmdir "${ED}"/usr/share/aclocal || die
- rm \
- "${ED}"/usr/bin/{aclocal,automake} \
- "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
-
- # remove all config.guess and config.sub files replacing them
- # w/a symlink to a specific gnuconfig version
- local x
- for x in guess sub ; do
- dosym ../gnuconfig/config.${x} \
- /usr/share/${PN}-${SLOT}/config.${x}
- done
-
- # Avoid QA message about pre-compressed file in docs
- local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
- if [[ -f "${tarfile}" ]] ; then
- gunzip "${tarfile}" || die
- fi
-}
diff --git a/sys-devel/automake/automake-1.15.1-r2.ebuild b/sys-devel/automake/automake-1.15.1-r2.ebuild
deleted file mode 100644
index 61626303e82b..000000000000
--- a/sys-devel/automake/automake-1.15.1-r2.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
-
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- if [[ ${PV/_beta} == ${PV} ]]; then
- MY_P=${P}
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- else
- MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
- MY_P="${PN}-${MY_PV}"
-
- # Alpha/beta releases are not distributed on the usual mirrors.
- SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- fi
- S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Used to generate Makefile.in from Makefile.am"
-HOMEPAGE="https://www.gnu.org/software/automake/"
-
-LICENSE="GPL-2"
-# Use Gentoo versioning for slotting.
-SLOT="${PV:0:4}"
-IUSE=""
-RESTRICT="test"
-
-RDEPEND="dev-lang/perl
- >=sys-devel/automake-wrapper-10
- >=sys-devel/autoconf-2.69:*
- sys-devel/gnuconfig"
-DEPEND="${RDEPEND}
- sys-apps/help2man"
-BDEPEND="app-arch/gzip"
-
-PATCHES=( "${FILESDIR}"/${PN}-1.15-install-sh-avoid-low-risk-race-in-tmp.patch )
-
-src_prepare() {
- default
- export WANT_AUTOCONF=2.5
- # Don't try wrapping the autotools this thing runs as it tends
- # to be a bit esoteric, and the script does `set -e` itself.
- ./bootstrap || die
- sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
-
- # Bug 628912
- if ! has_version sys-apps/texinfo ; then
- touch doc/{stamp-vti,version.texi,automake.info} || die
- fi
-}
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- pushd "${ED}"/usr/share/info >/dev/null || die
- rm -f dir || die
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null || die
-}
-
-src_install() {
- default
-
- slot_info_pages
- rm "${ED}"/usr/share/aclocal/README || die
- rmdir "${ED}"/usr/share/aclocal || die
- rm \
- "${ED}"/usr/bin/{aclocal,automake} \
- "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
-
- # remove all config.guess and config.sub files replacing them
- # w/a symlink to a specific gnuconfig version
- local x
- for x in guess sub ; do
- dosym ../gnuconfig/config.${x} \
- /usr/share/${PN}-${SLOT}/config.${x}
- done
-
- # Avoid QA message about pre-compressed file in docs
- local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
- if [[ -f "${tarfile}" ]] ; then
- gunzip "${tarfile}" || die
- fi
-}
diff --git a/sys-devel/automake/automake-1.16.5.ebuild b/sys-devel/automake/automake-1.16.5.ebuild
deleted file mode 100644
index df393e3b1078..000000000000
--- a/sys-devel/automake/automake-1.16.5.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{8,9,10} )
-
-inherit python-any-r1
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
-
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- if [[ ${PV/_beta} == ${PV} ]]; then
- MY_P="${P}"
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- else
- MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
- MY_P="${PN}-${MY_PV}"
-
- # Alpha/beta releases are not distributed on the usual mirrors.
- SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- fi
- S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Used to generate Makefile.in from Makefile.am"
-HOMEPAGE="https://www.gnu.org/software/automake/"
-
-LICENSE="GPL-2"
-# Use Gentoo versioning for slotting.
-SLOT="${PV:0:4}"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-lang/perl
- >=sys-devel/automake-wrapper-11
- >=sys-devel/autoconf-2.69:*
- sys-devel/gnuconfig"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/gzip
- sys-apps/help2man
- test? ( ${PYTHON_DEPS} )
-"
-
-PATCHES=(
- "${FILESDIR}"/automake-1.16.2-py3-compile.patch
- "${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch
- "${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
-)
-
-pkg_setup() {
- # Avoid python-any-r1_pkg_setup
- :
-}
-
-src_prepare() {
- default
- export WANT_AUTOCONF=2.5
- # Don't try wrapping the autotools this thing runs as it tends
- # to be a bit esoteric, and the script does `set -e` itself.
- ./bootstrap || die
- sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
-
- # Bug 628912
- if ! has_version sys-apps/texinfo ; then
- touch doc/{stamp-vti,version.texi,automake.info} || die
- fi
-}
-
-src_configure() {
- use test && python_setup
- default
-}
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- pushd "${ED}"/usr/share/info >/dev/null || die
- rm -f dir
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null || die
-}
-
-src_install() {
- default
-
- slot_info_pages
- rm "${ED}"/usr/share/aclocal/README || die
- rmdir "${ED}"/usr/share/aclocal || die
- rm \
- "${ED}"/usr/bin/{aclocal,automake} \
- "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
-
- # remove all config.guess and config.sub files replacing them
- # w/a symlink to a specific gnuconfig version
- local x
- for x in guess sub ; do
- dosym ../gnuconfig/config.${x} \
- /usr/share/${PN}-${SLOT}/config.${x}
- done
-
- # Avoid QA message about pre-compressed file in docs
- local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
- if [[ -f "${tarfile}" ]] ; then
- gunzip "${tarfile}" || die
- fi
-}
diff --git a/sys-devel/automake/automake-9999.ebuild b/sys-devel/automake/automake-9999.ebuild
deleted file mode 100644
index d5f464992b96..000000000000
--- a/sys-devel/automake/automake-9999.ebuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-
-inherit python-any-r1
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
- inherit git-r3
-else
- if [[ ${PV/_beta} == ${PV} ]]; then
- MY_P="${P}"
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- else
- MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
- MY_P="${PN}-${MY_PV}"
-
- # Alpha/beta releases are not distributed on the usual mirrors.
- SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- fi
- S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Used to generate Makefile.in from Makefile.am"
-HOMEPAGE="https://www.gnu.org/software/automake/"
-
-LICENSE="GPL-2"
-# Use Gentoo versioning for slotting.
-SLOT="${PV:0:4}"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-lang/perl
- >=sys-devel/automake-wrapper-11
- >=sys-devel/autoconf-2.69:*
- sys-devel/gnuconfig"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/gzip
- sys-apps/help2man
- test? ( ${PYTHON_DEPS} )
-"
-
-PATCHES=(
- "${FILESDIR}"/automake-1.16.2-py3-compile.patch
-)
-# All patches have been submitted upstream.
-
-pkg_setup() {
- # Avoid python-any-r1_pkg_setup
- :
-}
-
-src_prepare() {
- default
- export WANT_AUTOCONF=2.5
- # Don't try wrapping the autotools this thing runs as it tends
- # to be a bit esoteric, and the script does `set -e` itself.
- ./bootstrap || die
- sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
-
- # Bug 628912
- if ! has_version sys-apps/texinfo ; then
- touch doc/{stamp-vti,version.texi,automake.info} || die
- fi
-}
-
-src_configure() {
- use test && python_setup
- default
-}
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- pushd "${ED}"/usr/share/info >/dev/null || die
- rm -f dir
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null || die
-}
-
-src_install() {
- default
-
- slot_info_pages
- rm "${ED}"/usr/share/aclocal/README || die
- rmdir "${ED}"/usr/share/aclocal || die
- rm \
- "${ED}"/usr/bin/{aclocal,automake} \
- "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
-
- # remove all config.guess and config.sub files replacing them
- # w/a symlink to a specific gnuconfig version
- local x
- for x in guess sub ; do
- dosym ../gnuconfig/config.${x} \
- /usr/share/${PN}-${SLOT}/config.${x}
- done
-
- # Avoid QA message about pre-compressed file in docs
- local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
- if [[ -f "${tarfile}" ]] ; then
- gunzip "${tarfile}" || die
- fi
-}
diff --git a/sys-devel/automake/files/automake-1.10-perl-5.16.patch b/sys-devel/automake/files/automake-1.10-perl-5.16.patch
deleted file mode 100644
index 19fe249e0c00..000000000000
--- a/sys-devel/automake/files/automake-1.10-perl-5.16.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-https://bugs.gentoo.org/424453
-
-From 6bf58a59a1f3803e57e3f0378aa9344686707b75 Mon Sep 17 00:00:00 2001
-From: Stefano Lattarini <stefano.lattarini@gmail.com>
-Date: Mon, 28 May 2012 13:32:03 +0200
-Subject: [PATCH] aclocal: declare function prototypes, do not use '&' in
- function calls
-
-This change will also fix automake bug#11543 (from a report by Matt
-Burgess).
-
-* aclocal.in: Declare prototypes for almost all functions early, before
-any actual function definition (but omit the prototype for the dynamically
-generated '&search' function). Add prototypes to any function definition.
-Remove '&' from function invocations (i.e., simply use "func(ARGS..)"
-instead of "&func(ARGS...)").
-* THANKS, NEWS: Update.
-
-Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
----
- NEWS | 4 ++++
- THANKS | 1 +
- aclocal.in | 42 ++++++++++++++++++++++++++++++++++--------
- 3 files changed, 39 insertions(+), 8 deletions(-)
-
-diff --git a/aclocal.in b/aclocal.in
-index dfb851b..e8855d5 100644
---- a/aclocal.in
-+++ b/aclocal.in
-@@ -152,8 +152,34 @@ my $erase_me;
-
- ################################################################
-
-+# Prototypes for all subroutines.
-+
-+sub unlink_tmp (;$);
-+sub xmkdir_p ($);
-+sub check_acinclude ();
-+sub reset_maps ();
-+sub install_file ($$);
-+sub list_compare (\@\@);
-+sub scan_m4_dirs ($@);
-+sub scan_m4_files ();
-+sub add_macro ($);
-+sub scan_configure_dep ($);
-+sub add_file ($);
-+sub scan_file ($$$);
-+sub strip_redundant_includes (%);
-+sub trace_used_macros ();
-+sub scan_configure ();
-+sub write_aclocal ($@);
-+sub usage ($);
-+sub version ();
-+sub handle_acdir_option ($$);
-+sub parse_arguments ();
-+sub parse_ACLOCAL_PATH ();
-+
-+################################################################
-+
- # Erase temporary file ERASE_ME. Handle signals.
--sub unlink_tmp
-+sub unlink_tmp (;$)
- {
- my ($sig) = @_;
-
-@@ -350,7 +376,7 @@ sub scan_m4_dirs ($@)
- next if $file eq 'aclocal.m4';
-
- my $fullfile = File::Spec->canonpath ("$m4dir/$file");
-- &scan_file ($type, $fullfile, 'aclocal');
-+ scan_file ($type, $fullfile, 'aclocal');
- }
- closedir (DIR);
- }
-@@ -361,12 +387,12 @@ sub scan_m4_files ()
- {
- # First, scan configure.ac. It may contain macro definitions,
- # or may include other files that define macros.
-- &scan_file (FT_USER, $configure_ac, 'aclocal');
-+ scan_file (FT_USER, $configure_ac, 'aclocal');
-
- # Then, scan acinclude.m4 if it exists.
- if (-f 'acinclude.m4')
- {
-- &scan_file (FT_USER, 'acinclude.m4', 'aclocal');
-+ scan_file (FT_USER, 'acinclude.m4', 'aclocal');
- }
-
- # Finally, scan all files in our search paths.
-@@ -380,7 +406,7 @@ sub scan_m4_files ()
- my $search = "sub search {\nmy \$found = 0;\n";
- foreach my $key (reverse sort keys %map)
- {
-- $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { & add_macro ("' . $key
-+ $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { add_macro ("' . $key
- . '"); $found = 1; }' . "\n");
- }
- $search .= "return \$found;\n};\n";
-@@ -403,7 +429,7 @@ sub add_macro ($)
-
- verb "saw macro $macro";
- $macro_seen{$macro} = 1;
-- &add_file ($map{$macro});
-+ add_file ($map{$macro});
- }
-
- # scan_configure_dep ($file)
-@@ -465,7 +491,7 @@ sub scan_configure_dep ($)
- }
-
- add_macro ($_) foreach (@rlist);
-- &scan_configure_dep ($_) foreach @ilist;
-+ scan_configure_dep ($_) foreach @ilist;
- }
-
- # add_file ($FILE)
-@@ -931,7 +957,7 @@ EOF
- }
-
- # Print version and exit.
--sub version()
-+sub version ()
- {
- print <<EOF;
- aclocal (GNU $PACKAGE) $VERSION
---
-2.1.3
-
diff --git a/sys-devel/automake/files/automake-1.11-install-sh-avoid-low-risk-race-in-tmp.patch b/sys-devel/automake/files/automake-1.11-install-sh-avoid-low-risk-race-in-tmp.patch
deleted file mode 100644
index c435b9004f8d..000000000000
--- a/sys-devel/automake/files/automake-1.11-install-sh-avoid-low-risk-race-in-tmp.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Sat, 15 Aug 2015 04:40:57 -0400
-Subject: install-sh: avoid (low risk) race in /tmp
-
-Ensure that nobody can cross privilege boundaries by pre-creating
-symlink on '$tmpdir' path.
-
-Just testing 'mkdir -p' by creating '/tmp/ins$RANDOM-$$/d' is not
-safe because '/tmp' directory is usually world-writeable and
-'/tmp/ins$RANDOM-$$' content could be pretty easily guessed by
-attacker (at least for shells where $RANDOM is not supported).
-So, as the first step, create the '/tmp/ins$RANDOM-$$' without -p.
-This step would fail early if somebody wanted catch us.
-
-Note that systems that implement (and have enabled)
-fs.protected_symlinks kernel feature are not affected even without
-this commit.
-
-References:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760455
-https://bugzilla.redhat.com/show_bug.cgi?id=1140725
-
-* lib/install-sh: Implement safer 'mkdir -p' test by running
-'$mkdirprog $mkdir_mode "$tmpdir"' first.
-(scriptversion): Bump.
-
---- a/lib/install-sh
-+++ b/lib/install-sh
-@@ -345,34 +345,41 @@ do
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
-+ # $RANDOM is not portable (e.g. dash); use it when possible to
-+ # lower collision chance
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
-+ # create the $tmpdir first (and fail if unsuccessful) to make sure
-+ # that nobody tries to guess the $tmpdir name.
- if (umask $mkdir_umask &&
-- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-+ $mkdirprog $mkdir_mode "$tmpdir" &&
-+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-- ls_ld_tmpdir=`ls -ld "$tmpdir"`
-+ test_tmpdir="$tmpdir/a"
-+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
-- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
-- rmdir "$tmpdir/d" "$tmpdir"
-+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
-- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
- fi
- trap '' 0;;
- esac;;
diff --git a/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch b/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch
deleted file mode 100644
index f790e7724c93..000000000000
--- a/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-https://bugs.gentoo.org/343439
-
-From 182626687f2640609f8eb28ad1b04b078342f2c7 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 12 Jan 2013 00:19:40 -0500
-Subject: [PATCH] ithreads: use runtime (not configure time) detection of perl
- threads
-
-I can't imagine the runtime checks being a big runtime penalty, so there
-shouldn't be a need to do the checks at configure check and hardcode the
-result in the generated automake.
-
-With the current system, it means if you change your perl config (build
-perl w/threads, build automake, build perl w/out threads), or deploy a
-compiled automake package on a different system (build had threads, but
-deployed system does not), you get errors when trying to run automake.
-
-So take the logic from configure.ac and move it to the one place where
-PERL_THREADS is used (lib/Automake/Config.in) and do the version/config
-checking at runtime.
-
-* bootstrap.sh (PERL_THREADS): Delete assignment and use in sed.
-* configure.ac (am_cv_prog_PERL_ithreads, PERL_THREADS): Delete all code
-related to these two variables.
-* lib/Automake/Config.in (perl_threads): Initialize to 0, and only set to
-1 if the perl version is at least 5.007_002, and useithreads is in Config.
-
-Copyright-paperwork-exempt: yes
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
----
- bootstrap.sh | 2 --
- configure.ac | 26 --------------------------
- lib/Automake/Config.in | 9 ++++++++-
- 3 files changed, 8 insertions(+), 29 deletions(-)
-
-diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in
-index fe6ef9d..885e74e 100644
---- a/lib/Automake/Config.in
-+++ b/lib/Automake/Config.in
-@@ -33,7 +33,14 @@ our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
- our $VERSION = '@VERSION@';
- our $RELEASE_YEAR = '@RELEASE_YEAR@';
- our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
--our $perl_threads = @PERL_THREADS@;
-+
-+our $perl_threads = 0;
-+# We need at least this version for CLONE support.
-+if (eval { require 5.007_002; })
-+ {
-+ use Config;
-+ $perl_threads = $Config{useithreads};
-+ }
-
- 1;
-
---
-1.8.0.2
-
diff --git a/sys-devel/automake/files/automake-1.13-hash-order-workaround.patch b/sys-devel/automake/files/automake-1.13-hash-order-workaround.patch
deleted file mode 100644
index 79b81e6fa407..000000000000
--- a/sys-devel/automake/files/automake-1.13-hash-order-workaround.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/t/primary-prefix-invalid-couples.tap
-+++ b/t/primary-prefix-invalid-couples.tap
-@@ -186,8 +186,10 @@ grep -v 'dir.* not a legitimate directory' stderr && exit 1
- # Check that the same failures are present without the '--add-missing'
- # option.
- mv stderr stderr.old
-+cat stderr.old | sort > a
- AUTOMAKE_fails -d "automake error out on mismatched prefix/primary couples"
-+cat stderr | sort > b
- command_ok_ "... and with the same diagnostic of 'automake -a'" \
-- diff stderr.old stderr
-+ diff a b
-
- :
diff --git a/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket-r1.patch b/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket-r1.patch
deleted file mode 100644
index bf8819adcf4c..000000000000
--- a/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket-r1.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001
-
-From 34163794a58b5bd91c5d6bd9adf5437571c7a479 Mon Sep 17 00:00:00 2001
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Tue, 7 Jul 2015 10:54:24 +0200
-Subject: [PATCH] bin/automake: escape '{' in regexp pattern
-
-Based on perlre(1) documentation:
-.. in Perl v5.26, literal uses of a curly bracket will be required
-to be escaped, say by preceding them with a backslash ("\{" ) or
-enclosing them within square brackets ("[{]") ..
-
-References:
-https://bugzilla.redhat.com/1239379
-
-* bin/automake.in (substitute_ac_subst_variables): Escape the
-occurrence of '{' character.
----
- bin/automake.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bin/automake.in b/bin/automake.in
-index 0c29184..c294ced 100644
---- a/automake.in
-+++ b/automake.in
-@@ -3898,7 +3898,7 @@ sub substitute_ac_subst_variables_worker
- sub substitute_ac_subst_variables ($)
- {
- my ($text) = @_;
-- $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
-+ $text =~ s/\$\{([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
- return $text;
- }
-
---
-2.1.0
-
diff --git a/sys-devel/automake/files/automake-1.14-install-sh-avoid-low-risk-race-in-tmp.patch b/sys-devel/automake/files/automake-1.14-install-sh-avoid-low-risk-race-in-tmp.patch
deleted file mode 100644
index 679370686aaf..000000000000
--- a/sys-devel/automake/files/automake-1.14-install-sh-avoid-low-risk-race-in-tmp.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Sat, 15 Aug 2015 04:40:57 -0400
-Subject: install-sh: avoid (low risk) race in /tmp
-
-Ensure that nobody can cross privilege boundaries by pre-creating
-symlink on '$tmpdir' path.
-
-Just testing 'mkdir -p' by creating '/tmp/ins$RANDOM-$$/d' is not
-safe because '/tmp' directory is usually world-writeable and
-'/tmp/ins$RANDOM-$$' content could be pretty easily guessed by
-attacker (at least for shells where $RANDOM is not supported).
-So, as the first step, create the '/tmp/ins$RANDOM-$$' without -p.
-This step would fail early if somebody wanted catch us.
-
-Note that systems that implement (and have enabled)
-fs.protected_symlinks kernel feature are not affected even without
-this commit.
-
-References:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760455
-https://bugzilla.redhat.com/show_bug.cgi?id=1140725
-
-* lib/install-sh: Implement safer 'mkdir -p' test by running
-'$mkdirprog $mkdir_mode "$tmpdir"' first.
-(scriptversion): Bump.
-
---- a/lib/install-sh
-+++ b/lib/install-sh
-@@ -345,34 +345,41 @@ do
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
-+ # $RANDOM is not portable (e.g. dash); use it when possible to
-+ # lower collision chance
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
-+ # create the $tmpdir first (and fail if unsuccessful) to make sure
-+ # that nobody tries to guess the $tmpdir name.
- if (umask $mkdir_umask &&
-- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-+ $mkdirprog $mkdir_mode "$tmpdir" &&
-+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-- ls_ld_tmpdir=`ls -ld "$tmpdir"`
-+ test_tmpdir="$tmpdir/a"
-+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
-- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
-- rmdir "$tmpdir/d" "$tmpdir"
-+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
-- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
- fi
- trap '' 0;;
- esac;;
diff --git a/sys-devel/automake/files/automake-1.15-install-sh-avoid-low-risk-race-in-tmp.patch b/sys-devel/automake/files/automake-1.15-install-sh-avoid-low-risk-race-in-tmp.patch
deleted file mode 100644
index 1fabdd5fb3e1..000000000000
--- a/sys-devel/automake/files/automake-1.15-install-sh-avoid-low-risk-race-in-tmp.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Sat, 15 Aug 2015 04:40:57 -0400
-Subject: install-sh: avoid (low risk) race in /tmp
-
-Ensure that nobody can cross privilege boundaries by pre-creating
-symlink on '$tmpdir' path.
-
-Just testing 'mkdir -p' by creating '/tmp/ins$RANDOM-$$/d' is not
-safe because '/tmp' directory is usually world-writeable and
-'/tmp/ins$RANDOM-$$' content could be pretty easily guessed by
-attacker (at least for shells where $RANDOM is not supported).
-So, as the first step, create the '/tmp/ins$RANDOM-$$' without -p.
-This step would fail early if somebody wanted catch us.
-
-Note that systems that implement (and have enabled)
-fs.protected_symlinks kernel feature are not affected even without
-this commit.
-
-References:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760455
-https://bugzilla.redhat.com/show_bug.cgi?id=1140725
-
-* lib/install-sh: Implement safer 'mkdir -p' test by running
-'$mkdirprog $mkdir_mode "$tmpdir"' first.
-(scriptversion): Bump.
----
- lib/install-sh | 23 +++++++++++++++--------
- 1 file changed, 15 insertions(+), 8 deletions(-)
-
-diff --git a/lib/install-sh b/lib/install-sh
-index 0b0fdcb..59990a1 100755
---- a/lib/install-sh
-+++ b/lib/install-sh
-@@ -324,34 +324,41 @@ do
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
-+ # $RANDOM is not portable (e.g. dash); use it when possible to
-+ # lower collision chance
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
-+ # create the $tmpdir first (and fail if unsuccessful) to make sure
-+ # that nobody tries to guess the $tmpdir name.
- if (umask $mkdir_umask &&
-- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-+ $mkdirprog $mkdir_mode "$tmpdir" &&
-+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-- ls_ld_tmpdir=`ls -ld "$tmpdir"`
-+ test_tmpdir="$tmpdir/a"
-+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
-- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
-- rmdir "$tmpdir/d" "$tmpdir"
-+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
-- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
- fi
- trap '' 0;;
- esac;;
diff --git a/sys-devel/automake/files/automake-1.16.2-fix-instmany-python.sh-test.patch b/sys-devel/automake/files/automake-1.16.2-fix-instmany-python.sh-test.patch
deleted file mode 100644
index 5cddb4cfb83f..000000000000
--- a/sys-devel/automake/files/automake-1.16.2-fix-instmany-python.sh-test.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 50daac4f15d207b6b69011b9cdde62b56c1c8b10 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Fri, 20 Nov 2020 02:17:31 +0100
-Subject: [PATCH 2/2] tests: fix instmany-python.sh: increase limit
-
-Still failing with 4500 on Gentoo. Passing with 7000...
----
- t/instmany-python.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/t/instmany-python.sh b/t/instmany-python.sh
-index dce3594b5..1c482520d 100644
---- a/t/instmany-python.sh
-+++ b/t/instmany-python.sh
-@@ -21,7 +21,7 @@
- required='python'
- . test-init.sh
-
--limit=4500
-+limit=7000
- subdir=long_subdir_name_with_many_characters
- nfiles=81
- list=$(seq_ 1 $nfiles)
---
-2.29.2
-
diff --git a/sys-devel/automake/files/automake-1.16.2-fix-py-compile-basedir.sh-test.patch b/sys-devel/automake/files/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
deleted file mode 100644
index f49dd253c2d6..000000000000
--- a/sys-devel/automake/files/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From e3db5b8038a902501a354b6921dcebcb4180f50a Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Fri, 20 Nov 2020 02:13:56 +0100
-Subject: [PATCH 1/2] tests: fix py-compile-basedir.sh: add missing test call
-
-Fixes: b279a0d46 ("tests: in python tests, do not require .pyo files (for python3)")
----
- t/py-compile-basedir.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
-index 13a22ff1d..1a16ee2d7 100644
---- a/t/py-compile-basedir.sh
-+++ b/t/py-compile-basedir.sh
-@@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
- py_installed "$d2/sub/$f.pyc"
- files=$(find "$d2" | grep '\.py[co]$')
- # with new-enough Python3, there are six files.
-- test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6
-+ test $(echo "$files" | wc -l) -eq 4 || test $(echo "$files" | wc -l) -eq 6
- case $d2 in
- .|..) rm -f $files;;
- *) rm -rf "$d2";;
---
-2.29.2
-
diff --git a/sys-devel/automake/files/automake-1.16.2-py3-compile.patch b/sys-devel/automake/files/automake-1.16.2-py3-compile.patch
deleted file mode 100644
index 7924f204ad4f..000000000000
--- a/sys-devel/automake/files/automake-1.16.2-py3-compile.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From aa449bd4c836abf0320033c5077259fc760b622d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 3 Nov 2019 11:51:19 +0100
-Subject: [PATCH] py-compile: Support -OO for py3.5+, and -O&-OO for pypy3
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Michał Górny <mgorny@gentoo.org>
----
- lib/py-compile | 29 +++++++++++++++++++++++++----
- 1 file changed, 25 insertions(+), 4 deletions(-)
-
-diff --git a/lib/py-compile b/lib/py-compile
-index e56d98d6e..5b9ae5d5d 100755
---- a/lib/py-compile
-+++ b/lib/py-compile
-@@ -126,12 +126,10 @@ if test "$python_major" -le 2; then
- import_lib=imp
- import_test="hasattr(imp, 'get_tag')"
- import_call=imp.cache_from_source
-- import_arg2=', False' # needed in one call and not the other
- else
- import_lib=importlib
- import_test="hasattr(sys.implementation, 'cache_tag')"
- import_call=importlib.util.cache_from_source
-- import_arg2=
- fi
-
- $PYTHON -c "
-@@ -159,7 +157,7 @@ $PYTHON -O -c "
- import sys, os, py_compile, $import_lib
-
- # pypy does not use .pyo optimization
--if hasattr(sys, 'pypy_translation_info'):
-+if hasattr(sys, 'pypy_translation_info') and sys.hexversion < 0x03050000:
- sys.exit(0)
-
- files = '''$files'''
-@@ -173,7 +171,30 @@ for file in files.split():
- sys.stdout.write(file)
- sys.stdout.flush()
- if $import_test:
-- py_compile.compile(filepath, $import_call(filepath$import_arg2), path)
-+ py_compile.compile(filepath, $import_call(filepath), path)
-+ else:
-+ py_compile.compile(filepath, filepath + 'o', path)
-+sys.stdout.write('\n')" 2>/dev/null || :
-+
-+$PYTHON -OO -c "
-+import sys, os, py_compile, $import_lib
-+
-+# python<3.5 does not have split files for -O and -OO
-+if sys.hexversion < 0x03050000:
-+ sys.exit(0)
-+
-+files = '''$files'''
-+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
-+for file in files.split():
-+ $pathtrans
-+ $filetrans
-+ if not os.path.exists(filepath) or not (len(filepath) >= 3
-+ and filepath[-3:] == '.py'):
-+ continue
-+ sys.stdout.write(file)
-+ sys.stdout.flush()
-+ if $import_test:
-+ py_compile.compile(filepath, $import_call(filepath), path)
- else:
- py_compile.compile(filepath, filepath + 'o', path)
- sys.stdout.write('\n')" 2>/dev/null || :
---
-2.25.2
diff --git a/sys-devel/automake/metadata.xml b/sys-devel/automake/metadata.xml
deleted file mode 100644
index f671901dcb0b..000000000000
--- a/sys-devel/automake/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:automake</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-devel/bc/bc-1.07.1-r4.ebuild b/sys-devel/bc/bc-1.07.1-r6.ebuild
index b0ba700abde5..b3c954931a8e 100644
--- a/sys-devel/bc/bc-1.07.1-r4.ebuild
+++ b/sys-devel/bc/bc-1.07.1-r6.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit flag-o-matic toolchain-funcs
@@ -9,9 +9,9 @@ DESCRIPTION="Handy console-based calculator utility"
HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
SRC_URI="mirror://gnu/bc/${P}.tar.gz"
-LICENSE="GPL-2 LGPL-2.1"
+LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="libedit readline static"
RDEPEND="
@@ -23,7 +23,8 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/flex
- virtual/yacc"
+ app-alternatives/yacc"
+PDEPEND="app-alternatives/bc"
PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
@@ -37,14 +38,29 @@ src_prepare() {
src_configure() {
local myconf=(
$(use_with readline)
+ --program-suffix=-reference
)
+
if use readline ; then
myconf+=( --without-libedit )
else
myconf+=( $(use_with libedit) )
fi
+
use static && append-ldflags -static
+ # The libedit code isn't compatible currently. #830101
+ use libedit && append-flags -fcommon
+
+ # AC_SYS_LARGEFILE in configure.ac would handle this, but we don't patch
+ # autotools otherwise currently. This change has been sent upstream, but
+ # who knows when they'll make another release.
+ append-lfs-flags
+
+ # configure dies with other lexes:
+ # "configure: error: readline works only with flex."
+ export LEX=flex
+
econf "${myconf[@]}"
# Do not regen docs -- configure produces a small fragment that includes
@@ -55,3 +71,14 @@ src_configure() {
src_compile() {
emake AR="$(tc-getAR)"
}
+
+pkg_postinst() {
+ # ensure to preserve the symlinks before app-alternatives/bc
+ # is installed
+ local x
+ for x in bc dc ; do
+ if [[ ! -h ${EROOT}/usr/bin/${x} ]] ; then
+ ln -s "${x}-reference" "${EROOT}/usr/bin/${x}" || die
+ fi
+ done
+}
diff --git a/sys-devel/bin86/bin86-0.16.21-r2.ebuild b/sys-devel/bin86/bin86-0.16.21-r2.ebuild
new file mode 100644
index 000000000000..c7be6fd8af00
--- /dev/null
+++ b/sys-devel/bin86/bin86-0.16.21-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Assembler and loader used to create kernel bootsector"
+HOMEPAGE="http://v3.sk/~lkundrak/dev86/"
+SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.16.21-amd64-build.patch
+ "${FILESDIR}"/${PN}-0.16.21-fix-build-for-clang16.patch
+)
+
+src_prepare() {
+ use elibc_musl && CPPFLAGS="${CPPFLAGS} -U__linux__"
+ sed -i \
+ -e '/^PREFIX/s|=.*|=$(DESTDIR)/usr|' \
+ -e '/^MANDIR/s|)/man/man1|)/share/man/man1|' \
+ -e '/^INSTALL_OPTS/s|-s||' \
+ -e "/^CFLAGS/s|=.*|=${CFLAGS} -D_POSIX_SOURCE ${CPPFLAGS}|" \
+ -e "/^LDFLAGS/s|=.*|=${LDFLAGS}|" \
+ Makefile || die
+ tc-export CC
+ default
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/man/man1
+ default
+}
diff --git a/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch b/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch
new file mode 100644
index 000000000000..9b821ca35850
--- /dev/null
+++ b/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch
@@ -0,0 +1,145 @@
+Subject: [PATCH] fix build for clang 16
+
+clang 16 does not allow implicit int in function declarations
+
+Bug: https://bugs.gentoo.org/880797
+Upstream PR: https://github.com/lkundrak/dev86/pull/26
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+---
+ ld/catimage.c | 32 +++++++++++++++++++-------------
+ ld/objchop.c | 16 ++++++++--------
+ 2 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/ld/catimage.c b/ld/catimage.c
+index 1f5e160..47161b9 100644
+--- a/ld/catimage.c
++++ b/ld/catimage.c
+@@ -24,6 +24,7 @@
+ #ifdef __STDC__
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <string.h>
+ #endif
+ #include "x86_aout.h"
+
+@@ -39,9 +40,14 @@ FILE * ofd;
+ FILE * ifd = 0;
+ struct exec header;
+
+-main(argc, argv)
+-int argc;
+-char ** argv;
++void open_obj(char * fname);
++void copy_segment(long out_offset,long in_offset,long length);
++void patch_bin(long file_off, int value);
++void read_symtable(void);
++void fatal(char * str);
++
++int
++main(int argc, char ** argv)
+ {
+ long image_offset, text_off;
+ int image_id;
+@@ -100,8 +106,8 @@ char ** argv;
+ exit(0);
+ }
+
+-open_obj(fname)
+-char * fname;
++void
++open_obj(char * fname)
+ {
+ input_file = fname;
+
+@@ -117,8 +123,8 @@ char * fname;
+ fatal("Input file has bad magic number");
+ }
+
+-copy_segment(out_offset, in_offset, length)
+-long out_offset, in_offset, length;
++void
++copy_segment(long out_offset,long in_offset,long length)
+ {
+ char buffer[1024];
+ int ssize;
+@@ -143,9 +149,8 @@ long out_offset, in_offset, length;
+ }
+ }
+
+-patch_bin(file_off, value)
+-long file_off;
+-int value;
++void
++patch_bin(long file_off, int value)
+ {
+ char wbuf[4];
+ if( file_off > 0 )
+@@ -163,7 +168,8 @@ int value;
+ }
+ }
+
+-read_symtable()
++void
++read_symtable(void)
+ {
+ struct nlist item;
+ int nitems;
+@@ -234,8 +240,8 @@ read_symtable()
+ }
+ }
+
+-fatal(str)
+-char * str;
++void
++fatal(char * str)
+ {
+ fprintf(stderr, "catimage:%s: %s\n", input_file, str);
+ exit(2);
+diff --git a/ld/objchop.c b/ld/objchop.c
+index c7631c1..495df75 100644
+--- a/ld/objchop.c
++++ b/ld/objchop.c
+@@ -16,12 +16,13 @@ main()
+
+ #else
+
++void fatal(char* str);
++void write_file(char *fname, long bsize);
++
+ FILE * ifd;
+ struct exec header;
+
+-main(argc, argv)
+-int argc;
+-char ** argv;
++int main(int argc, char** argv)
+ {
+ FILE * ofd;
+ if( argc != 5 ) fatal("Usage: objchop a.out text.bin data.bin sizes.asm");
+@@ -56,9 +57,8 @@ char ** argv;
+ exit(0);
+ }
+
+-write_file(fname, bsize)
+-char * fname;
+-long bsize;
++void
++write_file(char *fname, long bsize)
+ {
+ char buffer[1024];
+ int ssize;
+@@ -81,8 +81,8 @@ long bsize;
+ fclose(ofd);
+ }
+
+-fatal(str)
+-char * str;
++void
++fatal(char* str)
+ {
+ fprintf(stderr, "objchop: %s\n", str);
+ exit(2);
+--
+2.41.0
+
diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest
index 718995f313cf..22c77453207c 100644
--- a/sys-devel/binutils-apple/Manifest
+++ b/sys-devel/binutils-apple/Manifest
@@ -5,7 +5,7 @@ DIST binutils-apple-patches-7.3-r2.tar.bz2 44551 BLAKE2B 036cd2a2e4a66b046467f29
DIST binutils-apple-patches-8.2-r1.tar.bz2 10830 BLAKE2B 345db8619873e9e91b79c3fdc0685fc46f82366df0b6153c1a59fbe5c122622e799754397e980e8752ef01ef25bbac81bb8f0339e92168790211b1d9c03bef2d SHA512 e7ca8cbac75671846c044abcd5415cfcf5832ff71acd5a2799b643369b02f2f7148990398c51913a3758e589f9fbff875e333aadf568e2a8a2defeafaa2aca95
DIST cctools-795.tar.gz 1993795 BLAKE2B dc0915f8647eecba5352e34dfc5752b679df39ead9a4734c49955a824d2cc127308eed46a614665dfe08a9d3036eb37f587e1b765a7df727facc42a33befacb0 SHA512 5a34a73dc71d3574a357f6b0f26a48a99dd0995d62695b309cdfe85c4960934b410455b1ba6bdbc9a4e32106bb45b35555604975d2a80ad1be21f5d4eac69254
DIST cctools-895.tar.gz 1716126 BLAKE2B 9706a6b243518693888e5e21dfe8d83b217380b47db621a7f1b35105eb72fb8997353ff85133224b0856f6b6ec710f54a4fe79076d9e228f89c98b6f517de309 SHA512 4ef9db870385cc2c4263bcbe42ff0de80386771f5acbc7082a1818ecd6b8d7bb1bfa02a7fcfecd3e7281481aeaaac4c331359aca3564bfe7a4c7dea1e0d06126
-DIST darwin-xtools-8.2.1-r101.tar.gz 3105898 BLAKE2B 3516cd252d4880b1e80c76365efef6f96830578bb5512befe33f86decdeb026fbad17fd3b27e9c3cf20d100897002e86ec08822041baa0291bb53e0b0ecf4d10 SHA512 f84cbde0853c14f03af40a124133d71d3e1710da021a593336eb4351c60edbca5753af0780f269ed4716cd194973f5437d428c5ff9615d9ce025dba3b7daef77
+DIST darwin-xtools-8.2.1-r103.tar.gz 3106189 BLAKE2B f13e77f796eefc393389206d5663c98d55c3fe0eb5123b366155e7c993cea421a039121d705cab2aa5fcdab2ef08d2b17dd5b9d6e0b2c50c97db067b0ec10283 SHA512 241f402ac368606eb9b89421a3e0a2ebbde1ea79d6e84cc55680a7f3dbc31dfa402ee7b20f605627c1bfd9097bbe824dea466339a7ff9026810911ef70940bda
DIST dyld-132.13.tar.gz 342690 BLAKE2B 011418ba5b91a28bb7c5f8188af2fac5478bad53581396b7c1c4623a854a8f0d5ecb92d023246157830ed2db83bbf28e23225a255188e2d07eeb6c933814bda6 SHA512 2c9d50fc32868b696d88730eb6ea6afa9bb9f56883cc2ea4f1d41f370f311b7487a29ce0eff6761e1eeb086a18e2513953989d8d5d3ef1043bb662e86baadd3f
DIST dyld-421.2.tar.gz 625173 BLAKE2B 8f8325314861ae2ea10fbe78c74c7199b547973ac61a8e9cb76fb874a0e53395ea31c04e489f85ac7cfdb5715ae5051679453de75eb195e313113e7bbbc70340 SHA512 75f2fb840da980d44649aa3e045f50c4e37d4403fbdb1e2e5f1a85bf6d8859e1130053c3806f7ef992fdfc6573f7f18146263c690144bdd3df31452c6bdd8bd8
DIST ld64-274.2.tar.gz 671652 BLAKE2B f45bb65bbe65c7baff54dec633a49b8ea472a59a7978aa050b329132963b26e4a2b3ef3dd034b04247531a11a07de5135b3726a429165cbfcae50e06c09531f4 SHA512 7b4e17f199909450b697bf719564c6841d46f5116c48dd47ff483ae7ddfe2965db1b7c024ed8ebeeaf90cd983ed353b95f7f23c93c8971536977dc892e6d6a9d
diff --git a/sys-devel/binutils-apple/binutils-apple-3.2.6.ebuild b/sys-devel/binutils-apple/binutils-apple-3.2.6-r1.ebuild
index 49c5ce262a52..22d10d9f7b20 100644
--- a/sys-devel/binutils-apple/binutils-apple-3.2.6.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-3.2.6-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
-inherit eutils flag-o-matic toolchain-funcs
+inherit flag-o-matic toolchain-funcs
RESTRICT="test" # the test suite will test what's installed.
@@ -34,7 +34,7 @@ S=${WORKDIR}
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-prepare_ld64() {
+eprepare_ld64() {
cd "${S}"/${LD64}/src
cp "${WORKDIR}"/Makefile Makefile || die
@@ -90,14 +90,14 @@ prepare_ld64() {
}
src_prepare() {
- prepare_ld64
+ eprepare_ld64
cd "${S}"/${CCTOOLS}
- epatch "${WORKDIR}"/${PN}-3.2.6-as-dir.patch
- epatch "${WORKDIR}"/${PN}-3.1.1-libtool-ranlib.patch
- epatch "${WORKDIR}"/${PN}-3.1.1-nmedit.patch
- epatch "${WORKDIR}"/${PN}-3.1.1-no-headers.patch
- epatch "${WORKDIR}"/${PN}-3.1.1-no-oss-dir.patch
+ eapply -p1 "${WORKDIR}"/${PN}-3.2.6-as-dir.patch
+ eapply -p1 "${WORKDIR}"/${PN}-3.1.1-libtool-ranlib.patch
+ eapply -p1 "${WORKDIR}"/${PN}-3.1.1-nmedit.patch
+ eapply -p1 "${WORKDIR}"/${PN}-3.1.1-no-headers.patch
+ eapply -p1 "${WORKDIR}"/${PN}-3.1.1-no-oss-dir.patch
# drop as targets which are not suported by anything
sed -i \
@@ -109,8 +109,8 @@ src_prepare() {
as/Makefile || die
cd "${S}"/${LD64}
- epatch "${WORKDIR}"/${PN}-3.1.1-testsuite.patch
- epatch "${WORKDIR}"/${PN}-3.2.6-lto.patch
+ eapply -p1 "${WORKDIR}"/${PN}-3.1.1-testsuite.patch
+ eapply -p1 "${WORKDIR}"/${PN}-3.2.6-lto.patch
cd "${S}"
ebegin "cleaning Makefiles from unwanted CFLAGS"
@@ -200,19 +200,19 @@ install_cctools() {
COMMON_SUBDIRS='ar misc otool' \
SUBDIRS_32= \
RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \
- DSTROOT=\"${D}\" \
- BINDIR=\"${EPREFIX}\"${BINPATH} \
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
+ DSTROOT="\"${D}\"" \
+ BINDIR="\"${EPREFIX}\"${BINPATH}" \
+ LOCBINDIR="\"${EPREFIX}\"${BINPATH}" \
+ USRBINDIR="\"${EPREFIX}\"${BINPATH}" \
+ LOCLIBDIR="\"${EPREFIX}\"${LIBPATH}" \
+ MANDIR="\"${EPREFIX}\"${DATAPATH}/man/"
cd "${S}"/${CCTOOLS}/as
emake install \
BUILD_OBSOLETE_ARCH= \
- DSTROOT=\"${D}\" \
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
+ DSTROOT="\"${D}\"" \
+ USRBINDIR="\"${EPREFIX}\"${BINPATH}" \
+ LIBDIR="\"${EPREFIX}\"${LIBPATH}" \
+ LOCLIBDIR="\"${EPREFIX}\"${LIBPATH}"
cd "${ED}"${BINPATH}
insinto ${DATAPATH}/man/man1
@@ -249,6 +249,8 @@ src_install() {
install_ld64
install_cctools
+ docompress /usr/share/binutils-data/${CTARGET}/${PV}/man
+
cd "${S}"
insinto /etc/env.d/binutils
cat <<-EOF > env.d
diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild
index da5d72becad1..9c2ab92a0fe8 100644
--- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild
@@ -5,7 +5,7 @@ EAPI=7
CMAKE_MAKEFILE_GENERATOR=emake # keep dependencies down
-inherit cmake toolchain-funcs
+inherit cmake
DESCRIPTION="Darwin Xtools matching Xcode Tools ${PN}"
HOMEPAGE="https://github.com/iains/darwin-xtools"
@@ -13,7 +13,7 @@ SRC_URI="https://github.com/grobian/darwin-xtools/archive/gentoo-${PVR}.tar.gz -
LICENSE="APSL-2"
SLOT="8"
-KEYWORDS="~ppc-macos ~x64-macos"
+KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos"
# xtools uses c++11 features, not available in gcc-apple, hence gcc/clang dep
DEPEND="sys-devel/binutils-config
@@ -25,9 +25,15 @@ BDEPEND=""
S="${WORKDIR}/darwin-xtools-gentoo-${PVR}"
-PATCHES=(
- "${FILESDIR}"/${PN}-8.2.1-macos-12.patch
-)
+src_prepare() {
+ cmake_src_prepare
+ # kill forced libstd=libc++ usage, breaks with GCC-13 which has
+ # preliminary support for that
+ # check_cxx_compiler_flag(-stdlib=libc++ # XTOOLS_CXX_HAS_STDLIB_FLAG)
+ #
+ sed -i -e '/check_cxx_compiler_flag/s/XTOOLS_CXX_HAS_STDLIB_FLAG/NO_&/' \
+ cmake/config-ix.cmake || die
+}
src_configure() {
CTARGET=${CTARGET:-${CHOST}}
@@ -107,6 +113,8 @@ src_install() {
dodir "${DATAPATH}"
mv "${ED}"/usr/share/man "${ED}/${DATAPATH}/" || die
+ docompress "${DATAPATH}"/man
+
cd "${S}"
insinto /etc/env.d/binutils
cat <<-EOF > env.d
diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild
index b38e12eebe33..b1c82e7522e4 100644
--- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
-inherit eutils flag-o-matic toolchain-funcs llvm prefix
+inherit flag-o-matic llvm prefix
# versions:
# XCode-11.3.1 ld64-530 cctools-949.0.1
@@ -64,12 +64,12 @@ src_prepare() {
cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
cp "${S}"/ld64-274.2-Makefile Makefile
- epatch "${S}"/ld64-274.1-nolto.patch
- epatch "${S}"/ld64-236.3-crashreporter.patch
- epatch "${S}"/ld64-264.3.102-bitcode-case.patch
- epatch "${S}"/ld64-274.1-unknown-fixup.patch
- epatch "${S}"/ld64-274.1-notapi.patch
- epatch "${S}"/ld64-274.2-cfi-info-type.patch
+ eapply -p2 "${S}"/ld64-274.1-nolto.patch
+ eapply -p2 "${S}"/ld64-236.3-crashreporter.patch
+ eapply -p2 "${S}"/ld64-264.3.102-bitcode-case.patch
+ eapply -p2 "${S}"/ld64-274.1-unknown-fixup.patch
+ eapply -p2 "${S}"/ld64-274.1-notapi.patch
+ eapply -p2 "${S}"/ld64-274.2-cfi-info-type.patch
# workound llvm-3.9.{0,1} issue
# https://bugs.gentoo.org/show_bug.cgi?id=603580
@@ -87,27 +87,27 @@ src_prepare() {
cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
# add alias for newer identifiers, because ld64 uses both but cctools
# header only defines the older
- epatch "${S}"/ld64-236.3-missing-cputypes.patch
+ eapply -p2 "${S}"/ld64-236.3-missing-cputypes.patch
local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
echo "char ldVersionString[] = ${VER_STR};" > version.cpp
- epatch "${S}"/ld64-123.2-debug-backtrace.patch
+ eapply -p0 "${S}"/ld64-123.2-debug-backtrace.patch
cd "${S}"/${CCTOOLS}
- epatch "${S}"/${PN}-4.5-as.patch
- epatch "${S}"/${PN}-5.1-as-dir.patch
- epatch "${S}"/${PN}-5.1-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-no-headers.patch
- epatch "${S}"/${PN}-4.0-no-oss-dir.patch
- epatch "${S}"/cctools-839-intel-retf.patch
- epatch "${S}"/${PN}-5.1-extraneous-includes.patch
- epatch "${S}"/${PN}-5.1-strnlen.patch
- epatch "${S}"/${PN}-7.3-make-j.patch
- epatch "${S}"/${PN}-7.3-no-developertools-dir.patch
- epatch "${S}"/${PN}-8.2.1-llvm-prefix-3.patch
- epatch "${S}"/${PN}-8.2.1-llvm-shim.patch
+ eapply -p1 "${S}"/${PN}-4.5-as.patch
+ eapply -p1 "${S}"/${PN}-5.1-as-dir.patch
+ eapply -p2 "${S}"/${PN}-5.1-ranlib.patch
+ eapply -p1 "${S}"/${PN}-3.1.1-libtool-ranlib.patch
+ eapply -p1 "${S}"/${PN}-3.1.1-no-headers.patch
+ eapply -p0 "${S}"/${PN}-4.0-no-oss-dir.patch
+ eapply -p1 "${S}"/cctools-839-intel-retf.patch
+ eapply -p2 "${S}"/${PN}-5.1-extraneous-includes.patch
+ eapply -p1 "${S}"/${PN}-5.1-strnlen.patch
+ eapply -p1 "${S}"/${PN}-7.3-make-j.patch
+ eapply -p1 "${S}"/${PN}-7.3-no-developertools-dir.patch
+ eapply -p1 "${S}"/${PN}-8.2.1-llvm-prefix-3.patch
+ eapply -p1 "${S}"/${PN}-8.2.1-llvm-shim.patch
eprefixify libstuff/execute.c
cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
@@ -263,19 +263,19 @@ install_cctools() {
EFITOOLS= \
COMMON_SUBDIRS='ar misc otool' \
SUBDIRS_32= \
- DSTROOT=\"${D}\" \
- BINDIR=\"${EPREFIX}\"${BINPATH} \
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
+ DSTROOT="\"${D}\"" \
+ BINDIR="\"${EPREFIX}\"${BINPATH}" \
+ LOCBINDIR="\"${EPREFIX}\"${BINPATH}" \
+ USRBINDIR="\"${EPREFIX}\"${BINPATH}" \
+ LOCLIBDIR="\"${EPREFIX}\"${LIBPATH}" \
+ MANDIR="\"${EPREFIX}\"${DATAPATH}/man/"
cd "${S}"/${CCTOOLS}/as
emake install \
BUILD_OBSOLETE_ARCH= \
- DSTROOT=\"${D}\" \
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
+ DSTROOT="\"${D}\"" \
+ USRBINDIR="\"${EPREFIX}\"${BINPATH}" \
+ LIBDIR="\"${EPREFIX}\"${LIBPATH}" \
+ LOCLIBDIR="\"${EPREFIX}\"${LIBPATH}"
# upstream is starting to replace classic binutils with llvm-integrated
# ones. In Xcode, nm and size are now symlinks to llvm-{nm,size} while the
@@ -294,7 +294,7 @@ install_cctools() {
# -> $EPREFIX/usr/lib/llvm/<major/bin/llvm-<tool>
# -> $EPREFIX/usr/bin/llvm-<tool>
# -> binutils-bin/<version>/<tool>-classic
- budir=${D}/${EPREFIX}/${BINPATH}
+ budir="${D}"/${EPREFIX}/${BINPATH}
for tool in nm size ; do
use classic && \
ln -sfn ${tool}-classic "${budir}/${tool}" || \
@@ -314,7 +314,7 @@ install_cctools() {
ln -sfn llvm-shim "${budir}/${tool}"
done
- cd "${ED}"${BINPATH}
+ cd "${ED}"/${BINPATH}
insinto ${DATAPATH}/man/man1
local skips manpage
# ar brings an up-to-date manpage with it
@@ -361,6 +361,8 @@ src_install() {
install_ld64
install_cctools
+ docompress /usr/share/binutils-data/${CTARGET}/${PV}/man
+
cd "${S}"
insinto /etc/env.d/binutils
cat <<-EOF > env.d
diff --git a/sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch b/sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch
deleted file mode 100644
index b30f91d44cb5..000000000000
--- a/sys-devel/binutils-apple/files/binutils-apple-8.2.1-macos-12.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Extracted from the patch in
-https://reviews.llvm.org/rG96d071cd0ccc53bbf94bcd6ed4b52c9006b17e15
-License is unclear.
-
-support macOS Monterey by providing definitions which formerly were
-provided
-
---- a/cctools/otool/print_objc.c
-+++ b/cctools/otool/print_objc.c
-@@ -75,6 +75,14 @@
- uint32_t protocols; /* struct objc_protocol_list * (32-bit pointer) */
- };
-
-+#ifndef CLS_GETINFO
-+# define CLS_GETINFO(cls, infomask) ((cls)->info & (infomask))
-+// class is not a metaclass
-+#define CLS_CLASS 0x1
-+// class is a metaclass
-+#define CLS_META 0x2
-+#endif
-+
- struct objc_category_t {
- uint32_t category_name; /* char * (32-bit pointer) */
- uint32_t class_name; /* char * (32-bit pointer) */
diff --git a/sys-devel/binutils-apple/metadata.xml b/sys-devel/binutils-apple/metadata.xml
index 481c99bd5bd5..d64768b87649 100644
--- a/sys-devel/binutils-apple/metadata.xml
+++ b/sys-devel/binutils-apple/metadata.xml
@@ -10,4 +10,7 @@
<flag name="classic">Use nm, otool, etc. from this ebuild
instead of llvm-based tools</flag>
</use>
+ <upstream>
+ <remote-id type="github">grobian/darwin-xtools</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/binutils-config/Manifest b/sys-devel/binutils-config/Manifest
index ec46795d11ac..de1dcd4ed1a2 100644
--- a/sys-devel/binutils-config/Manifest
+++ b/sys-devel/binutils-config/Manifest
@@ -1,2 +1 @@
-DIST binutils-config-5.4.1.tar.xz 7328 BLAKE2B 51f0ca625abfd964cc1b6c902017edc9790da1d33a44b3da64e3b2c68ed245fc1c0eb8b3fb999f6acb88e614f47e2f53e19b456b03c069bb61cd0f39e85d786d SHA512 af12644d591152f45d573bee0499b21c293b68a9b81626e9e1d46d5a7dc40e9a24642364bdb2bce52d61cbe3d2e045f4ab6e50a9827648a820bac885f20239cd
-DIST binutils-config-5.4.tar.xz 7332 BLAKE2B 1dd0fdebf028e9d95caa395948037d51ac1e627f370921b56fc99a6fe2e2100ddb202c8027ad1e67330306de8b4cbc6a03753105d401198e515b22fca94f760f SHA512 79411afcbec3a6cce960be1b06e4a6efdf55081992f6a92157737f7ef41fc61eaec0005078a4ce0cd78ad6af14583ab85f4f2b7b43808238088d521e1aa31af1
+DIST binutils-config-5.5.tar.xz 7344 BLAKE2B decef43013ca2f7c6d36c12d08d55f499d866b6b1b55ed58f8b2df3761077b5e2c4d09d1f2c40762d42c2d3b9827575833a502b79180ef13b845f1a39a5f2feb SHA512 6f6e21799b47e38cd61621e4ec018dc0db4811f363c0817025c3e3be651d3790b30a0cab233f35fe40b1d57c88daa246037f24a7488187f4e47cca589d87d45b
diff --git a/sys-devel/binutils-config/binutils-config-5.4.ebuild b/sys-devel/binutils-config/binutils-config-5.4.ebuild
deleted file mode 100644
index 11e69fe4f773..000000000000
--- a/sys-devel/binutils-config/binutils-config-5.4.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit prefix
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git"
- inherit git-r3
-else
- SRC_URI="https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="Utility to change the binutils version being used"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="+native-symlinks"
-
-# We also RDEPEND on sys-apps/findutils which is in base @system
-RDEPEND="sys-apps/gentoo-functions"
-
-src_compile() {
- emake PV="${PV}" USE_NATIVE_LINKS="$(usex native-symlinks)"
-}
-
-src_install() {
- emake DESTDIR="${D}" PV="${PV}" install
-
- use prefix && eprefixify "${ED}"/usr/bin/${PN}
-}
-
-pkg_postinst() {
- # Re-register all targets. USE flags or new versions can change
- # installed symlinks.
- local x
- for x in $(binutils-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
- binutils-config ${x}
- done
-}
diff --git a/sys-devel/binutils-config/binutils-config-5.4.1.ebuild b/sys-devel/binutils-config/binutils-config-5.5.ebuild
index eafb482fa18a..b6729edc8359 100644
--- a/sys-devel/binutils-config/binutils-config-5.4.1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.5.ebuild
@@ -1,9 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-inherit prefix
+EAPI=8
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git"
@@ -16,7 +14,7 @@ fi
DESCRIPTION="Utility to change the binutils version being used"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain"
-LICENSE="GPL-2"
+LICENSE="GPL-2 GPL-2+"
SLOT="0"
IUSE="+native-symlinks"
@@ -29,8 +27,6 @@ src_compile() {
src_install() {
emake DESTDIR="${D}" PV="${PV}" install
-
- use prefix && eprefixify "${ED}"/usr/bin/${PN}
}
pkg_postinst() {
diff --git a/sys-devel/binutils-config/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild
index 0282c67448af..c1bb9c114e91 100644
--- a/sys-devel/binutils-config/binutils-config-9999.ebuild
+++ b/sys-devel/binutils-config/binutils-config-9999.ebuild
@@ -1,20 +1,20 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git"
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
DESCRIPTION="Utility to change the binutils version being used"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain"
-LICENSE="GPL-2"
+LICENSE="GPL-2 GPL-2+"
SLOT="0"
IUSE="+native-symlinks"
diff --git a/sys-devel/binutils-config/metadata.xml b/sys-devel/binutils-config/metadata.xml
index 34de766f7ebc..b44ab6e35394 100644
--- a/sys-devel/binutils-config/metadata.xml
+++ b/sys-devel/binutils-config/metadata.xml
@@ -8,4 +8,8 @@
<use>
<flag name="native-symlinks">Install native symlinks like 'as' or 'ar' to /usr/bin. Otherwise keep only ${CTARGET}-as and friends.</flag>
</use>
+ <upstream>
+ <remote-id type="gentoo">proj/binutils-config</remote-id>
+ <remote-id type="github">gentoo/binutils-config</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index e7d9c044043c..253059918a79 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,9 +1,13 @@
-DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
-DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
-DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
-DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
-DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
+DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
+DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
+DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
+DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
+DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
+DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
+DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d
+DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
deleted file mode 100644
index d9ffb17a0c13..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
- 9999)
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- SLOT=${PV}
- ;;
- *)
- SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
- SLOT=$(ver_cut 1-2)
- KEYWORDS="-* hppa"
- ;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
- >=sys-devel/binutils-config-3
- sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( sys-apps/texinfo )
- test? ( dev-util/dejagnu )
- nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
- case ${PV} in
- *9999)
- git-r3_src_unpack
- ;;
- *)
- ;;
- esac
- default
- mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Make sure our explicit libdir paths don't get clobbered. #562460
- sed -i \
- -e 's:@bfdlibdir@:@libdir@:g' \
- -e 's:@bfdincludedir@:@includedir@:g' \
- {bfd,opcodes}/Makefile.in || die
-
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
- # Apply things from PATCHES and user dirs
- default
-
- # Run misc portage update scripts
- gnuconfig_update
- elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
- printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
- printf "Gentoo ${PV}"
- [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
- # Setup some paths
- LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
- INCPATH=${LIBPATH}/include
- DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
- if is_cross ; then
- TOOLPATH=/usr/${CHOST}/${CTARGET}
- else
- TOOLPATH=/usr/${CTARGET}
- fi
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
- # Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
- strip-linguas -u */po
-
- # Keep things sane
- strip-flags
-
- local x
- echo
- for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
- einfo "$(printf '%10s' ${x}:) ${!x}"
- done
- echo
-
- cd "${MY_BUILDDIR}"
- local myconf=()
-
- if use plugins ; then
- myconf+=( --enable-plugins )
- fi
- # enable gold (installed as ld.gold) and ld's plugin architecture
- if use gold ; then
- myconf+=( --enable-gold )
- if use default-gold; then
- myconf+=( --enable-gold=default )
- fi
- fi
-
- if use nls ; then
- myconf+=( --without-included-gettext )
- else
- myconf+=( --disable-nls )
- fi
-
- myconf+=( --with-system-zlib )
-
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
- case $(tc-arch) in
- ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
- esac
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
- is_cross && myconf+=(
- --with-sysroot="${EPREFIX}"/usr/${CTARGET}
- --enable-poison-system-directories
- )
-
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- myconf+=(
- --prefix="${EPREFIX}"/usr
- --host=${CHOST}
- --target=${CTARGET}
- --datadir="${EPREFIX}"${DATAPATH}
- --datarootdir="${EPREFIX}"${DATAPATH}
- --infodir="${EPREFIX}"${DATAPATH}/info
- --mandir="${EPREFIX}"${DATAPATH}/man
- --bindir="${EPREFIX}"${BINPATH}
- --libdir="${EPREFIX}"${LIBPATH}
- --libexecdir="${EPREFIX}"${LIBPATH}
- --includedir="${EPREFIX}"${INCPATH}
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.27) offer a configure flag now.
- --enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="$(toolchain-binutils_bugurl)"
- --with-pkgversion="$(toolchain-binutils_pkgversion)"
- $(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
-
- # Prevent makeinfo from running if doc is unset.
- if ! use doc ; then
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
- fi
-}
-
-src_compile() {
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
-
- # only build info pages if the user wants them
- if use doc ; then
- emake info
- fi
-
- # we nuke the manpages when we're left with junk
- # (like when we bootstrap, no perl -> no manpages)
- find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
- cd "${MY_BUILDDIR}"
- # bug 637066
- filter-flags -Wall -Wreturn-type
- emake -k check
-}
-
-src_install() {
- local x d
-
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
- use static-libs || find "${ED}" -name '*.la' -delete
-
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
- for d in ../* ; do
- [[ ${d} == ../${PV} ]] && continue
- mv ${d}/* . || die
- rmdir ${d} || die
- done
-
- # Now we collect everything intp the proper SLOT-ed dirs
- # When something is built to cross-compile, it installs into
- # /usr/$CHOST/ by default ... we have to 'fix' that :)
- if is_cross ; then
- cd "${ED}"/${BINPATH}
- for x in * ; do
- mv ${x} ${x/${CTARGET}-}
- done
-
- if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
- mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
- mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/usr/${CHOST}/{include,lib}
- fi
- fi
- insinto ${INCPATH}
- local libiberty_headers=(
- # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
- demangle.h
- dyn-string.h
- fibheap.h
- hashtab.h
- libiberty.h
- objalloc.h
- splay-tree.h
- )
- doins "${libiberty_headers[@]/#/${S}/include/}"
- if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/${LIBPATH}/lib
- fi
-
- # Generate an env.d entry for this binutils
- insinto /etc/env.d/binutils
- cat <<-EOF > "${T}"/env.d
- TARGET="${CTARGET}"
- VER="${PV}"
- LIBPATH="${EPREFIX}${LIBPATH}"
- EOF
- newins "${T}"/env.d ${CTARGET}-${PV}
-
- # Handle documentation
- if ! is_cross ; then
- cd "${S}"
- dodoc README
- docinto bfd
- dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
- docinto binutils
- dodoc binutils/ChangeLog binutils/NEWS binutils/README
- docinto gas
- dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
- docinto gprof
- dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
- docinto ld
- dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
- docinto libiberty
- dodoc libiberty/ChangeLog* libiberty/README
- docinto opcodes
- dodoc opcodes/ChangeLog*
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
- # Trim all empty dirs
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
- # the hppa64 hack; this should go into 9999 as a PN-conditional
- # tweak the default fake list a little bit
- cd "${D}"/etc/env.d/binutils
- sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
- # Make sure this ${CTARGET} has a binutils version selected
- [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
- binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
- local current_profile=$(binutils-config -c ${CTARGET})
-
- # If no other versions exist, then uninstall for this
- # target ... otherwise, switch to the newest version
- # Note: only do this if this version is unmerged. We
- # rerun binutils-config if this is a remerge, as
- # we want the mtimes on the symlinks updated (if
- # it is the same as the current selected profile)
- if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
- local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
- choice=${choice//$'\n'/ }
- choice=${choice/* }
- if [[ -z ${choice} ]] ; then
- binutils-config -u ${CTARGET}
- else
- binutils-config ${choice}
- fi
- elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
- binutils-config ${CTARGET}-${PV}
- fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-# /usr/bin/${CTARGET}-<tool>
-# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-# /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
deleted file mode 100644
index 4350678795e6..000000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-case ${PV} in
- 9999)
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- SLOT=${PV}
- ;;
- *)
- SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
- SLOT=$(ver_cut 1-2)
- KEYWORDS="-* hppa"
- ;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
- >=sys-devel/binutils-config-3
- sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( sys-apps/texinfo )
- test? ( dev-util/dejagnu )
- nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
- case ${PV} in
- *9999)
- git-r3_src_unpack
- ;;
- *)
- ;;
- esac
- default
- mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Make sure our explicit libdir paths don't get clobbered. #562460
- sed -i \
- -e 's:@bfdlibdir@:@libdir@:g' \
- -e 's:@bfdincludedir@:@includedir@:g' \
- {bfd,opcodes}/Makefile.in || die
-
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
- # Apply things from PATCHES and user dirs
- default
-
- # Run misc portage update scripts
- gnuconfig_update
- elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
- printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
- printf "Gentoo ${PV}"
- [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
- # Setup some paths
- LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
- INCPATH=${LIBPATH}/include
- DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
- if is_cross ; then
- TOOLPATH=/usr/${CHOST}/${CTARGET}
- else
- TOOLPATH=/usr/${CTARGET}
- fi
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
- # Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
- strip-linguas -u */po
-
- # Keep things sane
- strip-flags
-
- local x
- echo
- for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
- einfo "$(printf '%10s' ${x}:) ${!x}"
- done
- echo
-
- cd "${MY_BUILDDIR}"
- local myconf=()
-
- if use plugins ; then
- myconf+=( --enable-plugins )
- fi
- # enable gold (installed as ld.gold) and ld's plugin architecture
- if use gold ; then
- myconf+=( --enable-gold )
- if use default-gold; then
- myconf+=( --enable-gold=default )
- fi
- fi
-
- if use nls ; then
- myconf+=( --without-included-gettext )
- else
- myconf+=( --disable-nls )
- fi
-
- myconf+=( --with-system-zlib )
-
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
- case $(tc-arch) in
- ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
- esac
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
- is_cross && myconf+=(
- --with-sysroot="${EPREFIX}"/usr/${CTARGET}
- --enable-poison-system-directories
- )
-
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- myconf+=(
- --prefix="${EPREFIX}"/usr
- --host=${CHOST}
- --target=${CTARGET}
- --datadir="${EPREFIX}"${DATAPATH}
- --datarootdir="${EPREFIX}"${DATAPATH}
- --infodir="${EPREFIX}"${DATAPATH}/info
- --mandir="${EPREFIX}"${DATAPATH}/man
- --bindir="${EPREFIX}"${BINPATH}
- --libdir="${EPREFIX}"${LIBPATH}
- --libexecdir="${EPREFIX}"${LIBPATH}
- --includedir="${EPREFIX}"${INCPATH}
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.27) offer a configure flag now.
- --enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="$(toolchain-binutils_bugurl)"
- --with-pkgversion="$(toolchain-binutils_pkgversion)"
- $(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
-
- # Prevent makeinfo from running if doc is unset.
- if ! use doc ; then
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
- fi
-}
-
-src_compile() {
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
-
- # only build info pages if the user wants them
- if use doc ; then
- emake info
- fi
-
- # we nuke the manpages when we're left with junk
- # (like when we bootstrap, no perl -> no manpages)
- find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
- cd "${MY_BUILDDIR}"
- # bug 637066
- filter-flags -Wall -Wreturn-type
- emake -k check
-}
-
-src_install() {
- local x d
-
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
- use static-libs || find "${ED}" -name '*.la' -delete
-
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
- for d in ../* ; do
- [[ ${d} == ../${PV} ]] && continue
- mv ${d}/* . || die
- rmdir ${d} || die
- done
-
- # Now we collect everything intp the proper SLOT-ed dirs
- # When something is built to cross-compile, it installs into
- # /usr/$CHOST/ by default ... we have to 'fix' that :)
- if is_cross ; then
- cd "${ED}"/${BINPATH}
- for x in * ; do
- mv ${x} ${x/${CTARGET}-}
- done
-
- if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
- mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
- mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/usr/${CHOST}/{include,lib}
- fi
- fi
- insinto ${INCPATH}
- local libiberty_headers=(
- # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
- demangle.h
- dyn-string.h
- fibheap.h
- hashtab.h
- libiberty.h
- objalloc.h
- splay-tree.h
- )
- doins "${libiberty_headers[@]/#/${S}/include/}"
- if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/${LIBPATH}/lib
- fi
-
- # Generate an env.d entry for this binutils
- insinto /etc/env.d/binutils
- cat <<-EOF > "${T}"/env.d
- TARGET="${CTARGET}"
- VER="${PV}"
- LIBPATH="${EPREFIX}${LIBPATH}"
- EOF
- newins "${T}"/env.d ${CTARGET}-${PV}
-
- # Handle documentation
- if ! is_cross ; then
- cd "${S}"
- dodoc README
- docinto bfd
- dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
- docinto binutils
- dodoc binutils/ChangeLog binutils/NEWS binutils/README
- docinto gas
- dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
- docinto gprof
- dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
- docinto ld
- dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
- docinto libiberty
- dodoc libiberty/ChangeLog* libiberty/README
- docinto opcodes
- dodoc opcodes/ChangeLog*
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
- # Trim all empty dirs
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
- # the hppa64 hack; this should go into 9999 as a PN-conditional
- # tweak the default fake list a little bit
- cd "${D}"/etc/env.d/binutils
- sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
- # Make sure this ${CTARGET} has a binutils version selected
- [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
- binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
- local current_profile=$(binutils-config -c ${CTARGET})
-
- # If no other versions exist, then uninstall for this
- # target ... otherwise, switch to the newest version
- # Note: only do this if this version is unmerged. We
- # rerun binutils-config if this is a remerge, as
- # we want the mtimes on the symlinks updated (if
- # it is the same as the current selected profile)
- if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
- local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
- choice=${choice//$'\n'/ }
- choice=${choice/* }
- if [[ -z ${choice} ]] ; then
- binutils-config -u ${CTARGET}
- else
- binutils-config ${choice}
- fi
- elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
- binutils-config ${CTARGET}-${PV}
- fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-# /usr/bin/${CTARGET}-<tool>
-# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-# /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index d3f797079c97..144ce57e1699 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
export CTARGET=hppa64-${CHOST#*-}
-inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@@ -60,11 +60,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -122,17 +122,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
index b6e72448d384..909ed7c262ce 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -35,7 +35,7 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- KEYWORDS="-* ~hppa"
+ KEYWORDS="-* hppa"
fi
#
@@ -61,11 +61,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -123,17 +123,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible, bug #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Apply things from PATCHES and user dirs
default
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
index 6d45ceecacaf..9b2ba15370d8 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
@@ -1,16 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
export CTARGET=hppa64-${CHOST#*-}
-inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -21,7 +22,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=3
+PATCH_VER=6
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -34,7 +35,7 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- KEYWORDS="-* ~hppa"
+ KEYWORDS="-* hppa"
fi
#
@@ -60,28 +61,28 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
git-r3_src_unpack
mv patches-git/9999 patch || die
+ S="${WORKDIR}"/binutils
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
+ EGIT_CHECKOUT_DIR="${S}"
git-r3_src_unpack
else
unpack ${P/-hppa64/}.tar.xz
@@ -116,28 +117,12 @@ src_prepare() {
fi
fi
- # Make sure our explicit libdir paths don't get clobbered. #562460
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
# Apply things from PATCHES and user dirs
default
@@ -155,6 +140,11 @@ toolchain-binutils_pkgversion() {
}
src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
@@ -167,7 +157,7 @@ src_configure() {
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
+ # actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
@@ -182,7 +172,7 @@ src_configure() {
done
echo
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
@@ -204,9 +194,10 @@ src_configure() {
myconf+=( --with-system-zlib )
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
@@ -220,10 +211,7 @@ src_configure() {
--enable-poison-system-directories
)
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+ myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
@@ -247,45 +235,70 @@ src_configure() {
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
- # Works better than vapier's patch... #808787
+
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
--enable-new-dtags
+
+ --disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
+ # {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
- # avoid automagic dependency on (currently prefix) systems
+ # Avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
- # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
- $(use_enable pgo pgo-build)
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
)
- if use pgo ; then
- export BUILD_CFLAGS="${CFLAGS}"
+ if ! is_cross ; then
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
fi
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -296,13 +309,14 @@ src_configure() {
}
src_compile() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
- emake info
+ emake V=1 info
fi
# we nuke the manpages when we're left with junk
@@ -311,25 +325,26 @@ src_compile() {
}
src_test() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
- # bug 637066
+ # bug #637066
filter-flags -Wall -Wreturn-type
- emake -k check
+ emake -k V=1 check
}
src_install() {
local x d
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
+ emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
@@ -340,17 +355,19 @@ src_install() {
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
- cd "${ED}"/${BINPATH}
+ cd "${ED}"/${BINPATH} || die
for x in * ; do
- mv ${x} ${x/${CTARGET}-}
+ mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ # No die for now, dies on hppa?
mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
+
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
@@ -364,6 +381,7 @@ src_install() {
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ # TODO: add || die here, fails on hppa?
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/${LIBPATH}/lib
fi
@@ -379,26 +397,33 @@ src_install() {
# Handle documentation
if ! is_cross ; then
- cd "${S}"
+ cd "${S}" || die
dodoc README
+
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
+
docinto opcodes
dodoc opcodes/ChangeLog*
fi
# Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
# Trim all empty dirs
find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
diff --git a/sys-devel/binutils/binutils-2.37_p1-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
index b6100c1d6a22..9b2ba15370d8 100644
--- a/sys-devel/binutils/binutils-2.37_p1-r3.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
@@ -1,14 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -19,7 +22,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=2
+PATCH_VER=6
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -32,7 +35,7 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- #KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+ KEYWORDS="-* hppa"
fi
#
@@ -58,27 +61,28 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
-MY_BUILDDIR=${WORKDIR}/build
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
git-r3_src_unpack
mv patches-git/9999 patch || die
+ S="${WORKDIR}"/binutils
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
+ EGIT_CHECKOUT_DIR="${S}"
git-r3_src_unpack
else
unpack ${P/-hppa64/}.tar.xz
@@ -113,28 +117,12 @@ src_prepare() {
fi
fi
- # Make sure our explicit libdir paths don't get clobbered. #562460
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
# Apply things from PATCHES and user dirs
default
@@ -152,21 +140,24 @@ toolchain-binutils_pkgversion() {
}
src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-
- # see Note [tooldir hack for ldscripts]
if is_cross ; then
TOOLPATH=/usr/${CHOST}/${CTARGET}
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
else
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
+ TOOLPATH=/usr/${CTARGET}
fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
+ # actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
@@ -181,7 +172,7 @@ src_configure() {
done
echo
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
@@ -203,9 +194,10 @@ src_configure() {
myconf+=( --with-system-zlib )
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
@@ -219,10 +211,7 @@ src_configure() {
--enable-poison-system-directories
)
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+ myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
@@ -246,46 +235,70 @@ src_configure() {
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
- # Works better than vapier's patch... #808787
+
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
--enable-new-dtags
+
+ --disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
+ # {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
- # avoid automagic dependency on (currently prefix) systems
+ # Avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
)
if ! is_cross ; then
- myconf+=( $(use_enable pgo pgo-build lto) )
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
if use pgo ; then
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -296,17 +309,14 @@ src_configure() {
}
src_compile() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- if is_cross ; then
- emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
- else
- emake V=1 all
- fi
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
- emake info
+ emake V=1 info
fi
# we nuke the manpages when we're left with junk
@@ -315,27 +325,26 @@ src_compile() {
}
src_test() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
- # bug 637066
+ # bug #637066
filter-flags -Wall -Wreturn-type
- emake -k check
+ emake -k V=1 check
}
src_install() {
local x d
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-
- rm -rf "${ED}"/${LIBPATH}/bin
+ rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
@@ -346,17 +355,19 @@ src_install() {
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
- cd "${ED}"/${BINPATH}
+ cd "${ED}"/${BINPATH} || die
for x in * ; do
- mv ${x} ${x/${CTARGET}-}
+ mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ # No die for now, dies on hppa?
mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
+
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
@@ -370,6 +381,7 @@ src_install() {
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ # TODO: add || die here, fails on hppa?
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/${LIBPATH}/lib
fi
@@ -385,29 +397,41 @@ src_install() {
# Handle documentation
if ! is_cross ; then
- cd "${S}"
+ cd "${S}" || die
dodoc README
+
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
+
docinto opcodes
dodoc opcodes/ChangeLog*
fi
# Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
# Trim all empty dirs
find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # the hppa64 hack; this should go into 9999 as a PN-conditional
+ # tweak the default fake list a little bit
+ cd "${D}"/etc/env.d/binutils
+ sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
}
pkg_postinst() {
@@ -466,11 +490,3 @@ pkg_postrm() {
# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
# - at install-time set scriptdir to point to slotted location:
# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-#
-# Now, this would all be very nice except for the fact that the changed
-# directory makes libtool re-link libraries during the install phase.
-# It uses libraries from the system installation to do that (bad)
-# and fails if it cant handle these (e.g. newer LTO version than in
-# current gcc, see bugs 834720 and 838925).
-#
-# So, we apply this whole hack only for cross builds.
diff --git a/sys-devel/binutils/binutils-2.38-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
index 0041aec7eb5e..cfe58c7c1e4f 100644
--- a/sys-devel/binutils/binutils-2.38-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild
@@ -1,14 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -19,7 +22,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=3
+PATCH_VER=4
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -32,7 +35,7 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="-* hppa"
fi
#
@@ -58,27 +61,28 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
-MY_BUILDDIR=${WORKDIR}/build
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
git-r3_src_unpack
mv patches-git/9999 patch || die
+ S="${WORKDIR}"/binutils
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
+ EGIT_CHECKOUT_DIR="${S}"
git-r3_src_unpack
else
unpack ${P/-hppa64/}.tar.xz
@@ -113,28 +117,12 @@ src_prepare() {
fi
fi
- # Make sure our explicit libdir paths don't get clobbered. #562460
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
# Apply things from PATCHES and user dirs
default
@@ -152,6 +140,11 @@ toolchain-binutils_pkgversion() {
}
src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
@@ -164,7 +157,7 @@ src_configure() {
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
+ # actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
@@ -179,7 +172,7 @@ src_configure() {
done
echo
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
@@ -201,9 +194,10 @@ src_configure() {
myconf+=( --with-system-zlib )
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
@@ -217,10 +211,7 @@ src_configure() {
--enable-poison-system-directories
)
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+ myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
@@ -239,51 +230,80 @@ src_configure() {
--libdir="${EPREFIX}"${LIBPATH}
--libexecdir="${EPREFIX}"${LIBPATH}
--includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
--enable-obsolete
--enable-shared
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
- # Works better than vapier's patch... #808787
+
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
--enable-new-dtags
+
+ --disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
+ # {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
- # avoid automagic dependency on (currently prefix) systems
+ # Avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
)
if ! is_cross ; then
- myconf+=( $(use_enable pgo pgo-build lto) )
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
if use pgo ; then
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -294,7 +314,8 @@ src_configure() {
}
src_compile() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
emake tooldir="${EPREFIX}${TOOLPATH}" all
@@ -309,9 +330,9 @@ src_compile() {
}
src_test() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
- # bug 637066
+ # bug #637066
filter-flags -Wall -Wreturn-type
emake -k check
@@ -320,14 +341,15 @@ src_test() {
src_install() {
local x d
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
+ rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
@@ -338,17 +360,19 @@ src_install() {
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
- cd "${ED}"/${BINPATH}
+ cd "${ED}"/${BINPATH} || die
for x in * ; do
- mv ${x} ${x/${CTARGET}-}
+ mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ # No die for now, dies on hppa?
mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
+
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
@@ -362,6 +386,7 @@ src_install() {
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ # TODO: add || die here, fails on hppa?
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/${LIBPATH}/lib
fi
@@ -377,29 +402,41 @@ src_install() {
# Handle documentation
if ! is_cross ; then
- cd "${S}"
+ cd "${S}" || die
dodoc README
+
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
+
docinto opcodes
dodoc opcodes/ChangeLog*
fi
# Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
# Trim all empty dirs
find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # the hppa64 hack; this should go into 9999 as a PN-conditional
+ # tweak the default fake list a little bit
+ cd "${D}"/etc/env.d/binutils
+ sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
}
pkg_postinst() {
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
new file mode 100644
index 000000000000..c4fc096afca6
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild
@@ -0,0 +1,497 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="-* hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ S="${WORKDIR}"/binutils
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ EGIT_CHECKOUT_DIR="${S}"
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ if use default-gold; then
+ myconf+=( --enable-gold=default )
+ fi
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.27) offer a configure flag now.
+ --enable-relro
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
+ --enable-install-libiberty
+ # Available from 2.35 on
+ --enable-textrel-check=warning
+
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
+ --enable-new-dtags
+
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across
+ # {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ # Avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ if ! is_cross ; then
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ # No die for now, dies on hppa?
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ # TODO: add || die here, fails on hppa?
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/${LIBPATH}/lib
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # the hppa64 hack; this should go into 9999 as a PN-conditional
+ # tweak the default fake list a little bit
+ cd "${D}"/etc/env.d/binutils
+ sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
new file mode 100644
index 000000000000..53e91ed47268
--- /dev/null
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild
@@ -0,0 +1,534 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CTARGET=hppa64-${CHOST#*-}
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="-* ~hppa"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+ "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ # TOOD: breaks glibc test suite
+ #--enable-error-execstack=yes
+ #--enable-error-rwx-segments=yes
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if ! is_cross ; then
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ # see linker prefix patch
+ emake \
+ tooldir="${EPREFIX}${TOOLPATH}" \
+ gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+ all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ # No die for now, dies on hppa?
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ # TODO: add || die here, fails on hppa?
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/${LIBPATH}/lib
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ docompress "${DATAPATH}"/{info,man}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # the hppa64 hack; this should go into 9999 as a PN-conditional
+ # tweak the default fake list a little bit
+ cd "${D}"/etc/env.d/binutils
+ sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index a5e5c11c9e15..5e566060dac2 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -3,7 +3,7 @@
<pkgmetadata>
<maintainer type="project">
<email>hppa@gentoo.org</email>
- <name>Gentoo Linux HPPA Development</name>
+ <name>HPPA architecture team</name>
</maintainer>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
@@ -13,8 +13,13 @@
<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
<flag name="gold">Build ld.gold linker</flag>
+ <flag name="gprofng">Enable the next-generation gprofng profiler</flag>
<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
<flag name="plugins">Enable plugin support in tools</flag>
<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
+ <flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag>
</use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index db3df3d2e7c4..635b751d198d 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -10,6 +10,15 @@ DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348a
DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
-DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
+DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
+DIST binutils-2.40-patches-7.tar.xz 299188 BLAKE2B 170cd2432e0458889b240c3603461d0b4bfa62d5314634b101a629db455d87235ac14ad44c63920b713d5235fa8b73902960df1019153873ef06a33aa7050b4b SHA512 a60da163caee68fe1fa355385d404e8998ebed0e390d50e0713e95334733a8b4e37bc63d522817284c027953e43848dbc98042461a47131fb53bc69203b4ee87
+DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
+DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
+DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
+DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
+DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
+DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d
+DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild b/sys-devel/binutils/binutils-2.32-r2.ebuild
index 40db4705c2a9..606d5951eec2 100644
--- a/sys-devel/binutils/binutils-2.32-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.32-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -76,8 +76,8 @@ DEPEND="${RDEPEND}
doc? ( sys-apps/texinfo )
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -111,17 +111,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
@@ -162,6 +151,8 @@ src_configure() {
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -279,6 +270,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
# bug 637066
filter-flags -Wall -Wreturn-type
diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
index 785ea17b6542..29def533ca06 100644
--- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -68,8 +68,8 @@ DEPEND="${RDEPEND}
doc? ( sys-apps/texinfo )
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -104,17 +104,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
@@ -155,6 +144,8 @@ src_configure() {
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -272,6 +263,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
# bug 637066
filter-flags -Wall -Wreturn-type
diff --git a/sys-devel/binutils/binutils-2.34-r2.ebuild b/sys-devel/binutils/binutils-2.34-r2.ebuild
index c61503139101..009154a560d0 100644
--- a/sys-devel/binutils/binutils-2.34-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -69,8 +69,8 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -101,17 +101,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
@@ -152,6 +141,8 @@ src_configure() {
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -273,6 +264,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
# bug 637066
filter-flags -Wall -Wreturn-type
diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild b/sys-devel/binutils/binutils-2.35.2.ebuild
index cdb4d4b87ec3..2e7d17a37bea 100644
--- a/sys-devel/binutils/binutils-2.35.2.ebuild
+++ b/sys-devel/binutils/binutils-2.35.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -58,11 +58,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -118,17 +118,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
@@ -169,6 +158,8 @@ src_configure() {
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -297,6 +288,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
# bug 637066
filter-flags -Wall -Wreturn-type
diff --git a/sys-devel/binutils/binutils-2.36.1-r2.ebuild b/sys-devel/binutils/binutils-2.36.1-r2.ebuild
index faa27e272c6c..243182b97a8a 100644
--- a/sys-devel/binutils/binutils-2.36.1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.36.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -58,11 +58,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -113,17 +113,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
@@ -164,6 +153,8 @@ src_configure() {
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -292,6 +283,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
# bug 637066
filter-flags -Wall -Wreturn-type
diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
index 6ade635ea8fa..c7faa17c7bed 100644
--- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -58,11 +58,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -119,17 +119,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
@@ -170,6 +159,8 @@ src_configure() {
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
@@ -311,6 +302,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
# bug 637066
filter-flags -Wall -Wreturn-type
diff --git a/sys-devel/binutils/binutils-2.38-r2.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild
index dcf30dbb65a6..c384b5f5ae0b 100644
--- a/sys-devel/binutils/binutils-2.38-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.38-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -32,7 +32,7 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
#
@@ -58,11 +58,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -119,17 +119,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
@@ -175,6 +164,8 @@ src_configure() {
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
@@ -319,6 +310,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
# bug 637066
filter-flags -Wall -Wreturn-type
diff --git a/sys-devel/binutils/binutils-2.38-r3.ebuild b/sys-devel/binutils/binutils-2.39-r5.ebuild
index 3fd587616c36..efeadfc827de 100644
--- a/sys-devel/binutils/binutils-2.38-r3.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -7,8 +7,9 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -19,7 +20,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=4
+PATCH_VER=6
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -32,7 +33,7 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
#
@@ -58,11 +59,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -113,28 +114,12 @@ src_prepare() {
fi
fi
- # Make sure our explicit libdir paths don't get clobbered. #562460
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
# Apply things from PATCHES and user dirs
default
@@ -161,22 +146,22 @@ src_configure() {
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-
- # see Note [tooldir hack for ldscripts]
if is_cross ; then
TOOLPATH=/usr/${CHOST}/${CTARGET}
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
else
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
+ TOOLPATH=/usr/${CTARGET}
fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
+ # actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
strip-flags
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
@@ -186,7 +171,7 @@ src_configure() {
done
echo
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
@@ -208,9 +193,10 @@ src_configure() {
myconf+=( --with-system-zlib )
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
@@ -224,10 +210,7 @@ src_configure() {
--enable-poison-system-directories
)
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+ myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
@@ -235,9 +218,6 @@ src_configure() {
fi
myconf+=(
- # (--disable-silent-rules should get passed automatically w/ econf which we use
- # in >= 2.39, so can drop it then.)
- --disable-silent-rules
--prefix="${EPREFIX}"/usr
--host=${CHOST}
--target=${CTARGET}
@@ -254,34 +234,58 @@ src_configure() {
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
- # Works better than vapier's patch... #808787
+
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
--enable-new-dtags
+
+ --disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
+ # {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
- # avoid automagic dependency on (currently prefix) systems
+ # Avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
)
if ! is_cross ; then
@@ -292,8 +296,7 @@ src_configure() {
fi
fi
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -304,13 +307,10 @@ src_configure() {
}
src_compile() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- if is_cross ; then
- emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
- else
- emake V=1 all
- fi
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
@@ -323,9 +323,13 @@ src_compile() {
}
src_test() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
- # bug 637066
+ # bug #637066
filter-flags -Wall -Wreturn-type
emake -k V=1 check
@@ -334,16 +338,15 @@ src_test() {
src_install() {
local x d
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-
- rm -rf "${ED}"/${LIBPATH}/bin
+ rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
@@ -354,9 +357,9 @@ src_install() {
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
- cd "${ED}"/${BINPATH}
+ cd "${ED}"/${BINPATH} || die
for x in * ; do
- mv ${x} ${x/${CTARGET}-}
+ mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
@@ -365,6 +368,7 @@ src_install() {
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
+
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
@@ -378,8 +382,8 @@ src_install() {
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/${LIBPATH}/lib
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
fi
# Generate an env.d entry for this binutils
@@ -393,20 +397,27 @@ src_install() {
# Handle documentation
if ! is_cross ; then
- cd "${S}"
+ cd "${S}" || die
dodoc README
+
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
+
docinto opcodes
dodoc opcodes/ChangeLog*
fi
@@ -474,11 +485,3 @@ pkg_postrm() {
# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
# - at install-time set scriptdir to point to slotted location:
# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-#
-# Now, this would all be very nice except for the fact that the changed
-# directory makes libtool re-link libraries during the install phase.
-# It uses libraries from the system installation to do that (bad)
-# and fails if it cant handle these (e.g. newer LTO version than in
-# current gcc, see bugs 834720 and 838925).
-#
-# So, we apply this whole hack only for cross builds.
diff --git a/sys-devel/binutils/binutils-2.40-r9.ebuild b/sys-devel/binutils/binutils-2.40-r9.ebuild
new file mode 100644
index 000000000000..a8b13b594c74
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.40-r9.ebuild
@@ -0,0 +1,499 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=7
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if is_cross || use prefix; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.27) offer a configure flag now.
+ --enable-relro
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
+ --enable-install-libiberty
+ # Available from 2.35 on
+ --enable-textrel-check=warning
+
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
+ --enable-new-dtags
+
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across
+ # {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils/binutils-2.41-r2.ebuild b/sys-devel/binutils/binutils-2.41-r2.ebuild
new file mode 100644
index 000000000000..c787465a3200
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.41-r2.ebuild
@@ -0,0 +1,517 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if is_cross || use prefix; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils/binutils-2.41-r3.ebuild b/sys-devel/binutils/binutils-2.41-r3.ebuild
new file mode 100644
index 000000000000..a0cc21bab946
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.41-r3.ebuild
@@ -0,0 +1,517 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if is_cross || use prefix; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils/binutils-2.41-r4.ebuild b/sys-devel/binutils/binutils-2.41-r4.ebuild
new file mode 100644
index 000000000000..9cac9d6928b7
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.41-r4.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if is_cross || use prefix; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+ "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ # see linker prefix patch
+ emake \
+ tooldir="${EPREFIX}${TOOLPATH}" \
+ gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+ all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ docompress "${DATAPATH}"/{info,man}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils/binutils-2.41-r5.ebuild b/sys-devel/binutils/binutils-2.41-r5.ebuild
new file mode 100644
index 000000000000..219a22bdca12
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.41-r5.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if is_cross || use prefix; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+ "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ # see linker prefix patch
+ emake \
+ tooldir="${EPREFIX}${TOOLPATH}" \
+ gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+ all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ docompress "${DATAPATH}"/{info,man}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils/binutils-2.42-r1.ebuild b/sys-devel/binutils/binutils-2.42-r1.ebuild
new file mode 100644
index 000000000000..cf195f441b89
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.42-r1.ebuild
@@ -0,0 +1,551 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+
+LICENSE="GPL-3+"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ app-alternatives/bc
+ )
+ nls? ( sys-devel/gettext )
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if is_cross || use prefix; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+ "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+ fi
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ --enable-relro
+ --enable-install-libiberty
+ --enable-textrel-check=$(usex hardened error warning)
+ # Things to think about
+ #--enable-deterministic-archives
+ --enable-new-dtags
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ $(use_with zstd)
+
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
+ )
+
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ # TOOD: breaks glibc test suite
+ #--enable-error-execstack=yes
+ #--enable-error-rwx-segments=yes
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if use test || { use pgo && tc-is-lto ; } ; then
+ # -Wa,* needs to be consistent everywhere or lto-wrapper will complain
+ filter-flags '-Wa,*'
+ fi
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) )
+
+ if use pgo ; then
+ # We let configure handle it for us because it has to run
+ # the testsuite later on for profiling, and LTO isn't compatible
+ # with the testsuite.
+ filter-lto
+
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ # see linker prefix patch
+ emake \
+ tooldir="${EPREFIX}${TOOLPATH}" \
+ gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+ all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
+ (
+ # Tests don't expect LTO
+ filter-lto
+
+ # lto-wrapper warnings which confuse tests
+ filter-flags '-Wa,*'
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check \
+ CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
+ CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
+ LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ )
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ docompress "${DATAPATH}"/{info,man}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-<tool>
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
index ae887224952e..8576f0e43ff0 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -7,9 +7,9 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
-REQUIRED_USE="default-gold? ( gold )"
+IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
# Variables that can be set here (ignored for live ebuilds)
# PATCH_VER - the patchset version
@@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=0
+PATCH_VER=1
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -28,12 +28,11 @@ if [[ ${PV} == 9999* ]]; then
else
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
PATCH_DEV=${PATCH_DEV:-dilfridge}
- SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- # live ebuild
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
#
@@ -53,17 +52,22 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}"
BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
+ zstd? ( virtual/pkgconfig )
+ app-alternatives/lex
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -111,6 +115,13 @@ src_prepare() {
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
einfo "Done."
+
+ # This is applied conditionally for now just out of caution.
+ # It should be okay on non-prefix systems though. See bug #892549.
+ if is_cross || use prefix; then
+ eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \
+ "${FILESDIR}"/binutils-2.41-linker-prefix.patch
+ fi
fi
fi
@@ -120,17 +131,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible, bug #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
# Apply things from PATCHES and user dirs
default
@@ -157,14 +157,12 @@ src_configure() {
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
-
- # see Note [tooldir hack for ldscripts]
if is_cross ; then
TOOLPATH=/usr/${CHOST}/${CTARGET}
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
else
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
+ TOOLPATH=/usr/${CTARGET}
fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
# actually work make it through, bug #42033
@@ -172,9 +170,11 @@ src_configure() {
# Keep things sane
strip-flags
-
+ use cet && filter-flags -mindirect-branch -mindirect-branch=*
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -191,9 +191,6 @@ src_configure() {
# enable gold (installed as ld.gold) and ld's plugin architecture
if use gold ; then
myconf+=( --enable-gold )
- if use default-gold; then
- myconf+=( --enable-gold=default )
- fi
fi
if use nls ; then
@@ -240,63 +237,110 @@ src_configure() {
--libdir="${EPREFIX}"${LIBPATH}
--libexecdir="${EPREFIX}"${LIBPATH}
--includedir="${EPREFIX}"${INCPATH}
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or bfd's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
--enable-obsolete
--enable-shared
--enable-threads
- # Newer versions (>=2.27) offer a configure flag now.
--enable-relro
- # Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
- # Available from 2.35 on
- --enable-textrel-check=warning
-
- # Available from 2.39 on
- --enable-warn-execstack
- --enable-warn-rwx-segments
- # TODO: Available from 2.39+ on but let's try the warning on for a bit
- # first... (--enable-warn-execstack)
- # Could put it under USE=hardened?
- #--enable-default-execstack
-
+ --enable-textrel-check=$(usex hardened error warning)
# Things to think about
#--enable-deterministic-archives
-
- # Works better than vapier's patch, bug #808787
--enable-new-dtags
-
--disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
+ $(use_with zstd)
+
# Disable modules that are in a combined binutils/gdb tree, bug #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
+ --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
+ # Strip out broken static link flags: https://gcc.gnu.org/PR56750
--without-stage1-ldflags
- # Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. bug #666100
+ # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
+ $(use_with debuginfod)
+
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
+
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
)
+ case ${CTARGET} in
+ x86_64-*|aarch64*|arm64*|i[3456]*)
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #
+ # TODO: Get the logic for this fixed upstream so it doesn't
+ # create impossible broken combinations on some arches, like mips.
+ #
+ # TODO: Get the logic for this fixed upstream so --disable-* works
+ # as expected.
+ myconf+=(
+ --enable-warn-execstack=yes
+ --enable-warn-rwx-segments=yes
+ )
+
+ if use hardened ; then
+ myconf+=(
+ # TOOD: breaks glibc test suite
+ #--enable-error-execstack=yes
+ #--enable-error-rwx-segments=yes
+ --enable-default-execstack=no
+ )
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ if use elibc_musl ; then
+ # Override our earlier setting for musl, as textrels don't
+ # work there at all. See bug #707660.
+ myconf+=(
+ --enable-textrel-check=error
+ )
+ fi
+
+ if use test || { use pgo && tc-is-lto ; } ; then
+ # -Wa,* needs to be consistent everywhere or lto-wrapper will complain
+ filter-flags '-Wa,*'
+ fi
+
if ! is_cross ; then
- myconf+=( $(use_enable pgo pgo-build lto) )
+ myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) )
if use pgo ; then
+ # We let configure handle it for us because it has to run
+ # the testsuite later on for profiling, and LTO isn't compatible
+ # with the testsuite.
+ filter-lto
+
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
- ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -310,15 +354,15 @@ src_compile() {
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
- if is_cross ; then
- emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
- else
- emake V=1 all
- fi
+ # see linker prefix patch
+ emake \
+ tooldir="${EPREFIX}${TOOLPATH}" \
+ gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \
+ all
# only build info pages if the user wants them
if use doc ; then
- emake V=1 info
+ emake info
fi
# we nuke the manpages when we're left with junk
@@ -329,10 +373,28 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
- # bug #637066
- filter-flags -Wall -Wreturn-type
+ # https://sourceware.org/PR31327
+ local -x XZ_OPT="-T1"
+ local -x XZ_DEFAULTS="-T1"
+
+ (
+ # Tests don't expect LTO
+ filter-lto
+
+ # lto-wrapper warnings which confuse tests
+ filter-flags '-Wa,*'
- emake -k V=1 check
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check \
+ CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
+ CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
+ LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ )
}
src_install() {
@@ -341,8 +403,7 @@ src_install() {
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
- emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
-
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
@@ -424,10 +485,12 @@ src_install() {
fi
# Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ docompress "${DATAPATH}"/{info,man}
# Trim all empty dirs
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null || die
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
}
pkg_postinst() {
@@ -486,11 +549,3 @@ pkg_postrm() {
# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
# - at install-time set scriptdir to point to slotted location:
# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
-#
-# Now, this would all be very nice except for the fact that the changed
-# directory makes libtool re-link libraries during the install phase.
-# It uses libraries from the system installation to do that (bad)
-# and fails if it cant handle these (e.g. newer LTO version than in
-# current gcc, see bugs 834720 and 838925).
-#
-# So, we apply this whole hack only for cross builds.
diff --git a/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch b/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch
new file mode 100644
index 000000000000..bddfa1ec6eb5
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/892549
+https://github.com/gentoo/binutils-gdb/pull/4
+
+From 1601840f9f2397edd56177871527a198a14277bd Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 11 Feb 2023 15:15:20 +0000
+Subject: [PATCH 1/2] ldelf.c: Always consider -L arguments when handling
+ DT_NEEDED
+
+This is for consistency with other linkers, including gold. Without
+this, we typically rely on ld.so.conf to find libraries such as
+libstdc++.so.6, while other linkers do not use this file at all.
+--- a/ld/ldelf.c
++++ b/ld/ldelf.c
+@@ -1090,8 +1090,8 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab,
+ linker will search. That means that we want to use
+ rpath_link, rpath, then the environment variable
+ LD_LIBRARY_PATH (native only), then the DT_RPATH/DT_RUNPATH
+- entries (native only), then the linker script LIB_SEARCH_DIRS.
+- We do not search using the -L arguments.
++ entries (native only), then the linker script LIB_SEARCH_DIRS,
++ then the -L arguments.
+
+ We search twice. The first time, we skip objects which may
+ introduce version mismatches. The second time, we force
+@@ -1165,11 +1165,7 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab,
+ len = strlen (l->name);
+ for (search = search_head; search != NULL; search = search->next)
+ {
+- char *filename;
+-
+- if (search->cmdline)
+- continue;
+- filename = (char *) xmalloc (strlen (search->name) + len + 2);
++ char *filename = (char *) xmalloc (strlen (search->name) + len + 2);
+ sprintf (filename, "%s/%s", search->name, l->name);
+ nn.name = filename;
+ if (ldelf_try_needed (&nn, force, is_linux))
diff --git a/sys-devel/binutils/files/binutils-2.41-linker-prefix.patch b/sys-devel/binutils/files/binutils-2.41-linker-prefix.patch
new file mode 100644
index 000000000000..d97a15599209
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.41-linker-prefix.patch
@@ -0,0 +1,56 @@
+https://bugs.gentoo.org/892549
+https://github.com/gentoo/binutils-gdb/pull/5
+
+From 531bc1536dfc3070c1f7d03e98fa14bcb81fdcd0 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 23 Dec 2023 13:48:10 +0000
+Subject: [PATCH 2/2] ld: Allow a Gentoo-specific prefix to override the prefix
+ used by ld.bfd
+
+This prefix is only used to locate $prefix/etc/ld.so.conf, with $prefix
+usually being /usr. This file is important on Gentoo Prefix systems,
+where the /usr prefix is within another directory. The problem is that
+Gentoo already passes the same directory as the sysroot, and ld.bfd
+therefore looks for /myprefix/myprefix/usr/etc/ld.so.conf.
+
+The sysroot is dynamic, while the prefix is hardcoded. A hardcoded
+prefix that isn't just /usr is unhelpful, not just because of the
+doubled prefix issue above, but also because it prevents ld.bfd from
+working effectively outside its native environment. We will therefore
+hardcode it to just /usr.
+
+This change does not simply do that though and sets up a $gentoo_prefix
+variable instead, with $prefix as a fallback. This is necessary because
+Gentoo prefix-guest systems, which use the host's libc, do not apply a
+sysroot like RAP prefix systems do. In that case, we must preserve the
+existing behaviour. The binutils ebuild will be responsible for setting
+this variable appropriately.
+---
+ ld/emultempl/elf.em | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
+index 3f67f8b09d9..78c8e909b6c 100644
+--- a/ld/emultempl/elf.em
++++ b/ld/emultempl/elf.em
+@@ -138,7 +138,7 @@ gld${EMULATION_NAME}_before_plugin_all_symbols_read (void)
+ ldelf_before_plugin_all_symbols_read ($IS_LIBPATH, $IS_NATIVE,
+ $IS_LINUX_TARGET,
+ $IS_FREEBSD_TARGET,
+- $ELFSIZE, "$prefix");
++ $ELFSIZE, "${gentoo_prefix-${prefix}}");
+ }
+
+ /* This is called after all the input files have been opened. */
+@@ -147,7 +147,7 @@ static void
+ gld${EMULATION_NAME}_after_open (void)
+ {
+ ldelf_after_open ($IS_LIBPATH, $IS_NATIVE,
+- $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE, "$prefix");
++ $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE, "${gentoo_prefix-${prefix}}");
+ }
+
+ EOF
+--
+2.43.0
+
diff --git a/sys-devel/binutils/files/binutils-configure-LANG.patch b/sys-devel/binutils/files/binutils-configure-LANG.patch
deleted file mode 100644
index 5521d196cf4a..000000000000
--- a/sys-devel/binutils/files/binutils-configure-LANG.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
-option parsing, it may break.
-
-http://bugs.gentoo.org/103483
-http://bugs.gentoo.org/122216
-
---- configure
-+++ configure
-@@ -54,6 +54,19 @@
- infodir='${prefix}/info'
- mandir='${prefix}/man'
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ eval $as_var=C; export $as_var
-+ else
-+ unset $as_var
-+ fi
-+done
-+
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
-@@ -452,16 +463,6 @@
- esac
- done
-
--# NLS nuisances.
--# Only set these to C if already set. These must not be set unconditionally
--# because not all systems understand e.g. LANG=C (notably SCO).
--# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
--# Non-C LC_CTYPE values break the ctype check.
--if test "${LANG+set}" = set; then LANG=C; export LANG; fi
--if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
--if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
--if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
--
- # confdefs.h avoids OS command line length limits that DEFS can exceed.
- rm -rf conftest* confdefs.h
- # AIX cpp loses on an empty file, so make sure it contains at least a newline.
-@@ -1850,6 +1850,19 @@
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then
-+ eval \$as_var=C; export \$as_var
-+ else
-+ unset \$as_var
-+ fi
-+done
-+
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
index e05bf0bdd552..3cc106863437 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -9,9 +9,11 @@
<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
<flag name="gold">Build ld.gold linker</flag>
+ <flag name="gprofng">Enable the next-generation gprofng profiler</flag>
<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
<flag name="plugins">Enable plugin support in tools</flag>
<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
+ <flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
diff --git a/sys-devel/bison/Manifest b/sys-devel/bison/Manifest
index 580d3f2c84a6..b6104c4e11c0 100644
--- a/sys-devel/bison/Manifest
+++ b/sys-devel/bison/Manifest
@@ -1,4 +1,2 @@
-DIST bison-3.7.6-patches-01.tar.xz 10600 BLAKE2B c7907a327c2bbb82a2e575a864e71400f91cd4349a84f95b187ecaadefc1bfd595a91bce6c8c47e42423cace9cf78a4041fde3fdc489a4824aa3c10ca73be7cb SHA512 8f2ddee79b9678b9fd9a7a34f26d44f7c4472d0fc55c9fef8b418d27949b6a27309b7aa5ac3f4a5ad27c90ad7d92d824ffe767c77b0ed81de6b2897c91cd7560
-DIST bison-3.7.6.tar.xz 2627180 BLAKE2B 2f1015b517e46ff0870378b4d0dd489c8c737f31b2b69146bd7fbbae1e3adcdff0e4837cfdf1d238e8660ecc2b310ce87ec8940ed4989278b3df6cbb2d464e54 SHA512 6c1c9b825fbd2c94b8903f03a7e68e6832599f7bbd8d3c49864537c11b038c45a15de02fd36128d662af314334c83515bbc132df84e9acc6c651e98649c65bad
DIST bison-3.8.2.tar.xz 2817324 BLAKE2B e211b61494c911f55b72a8b70b5a48cdf4000ce9e675a1f1f52735bb8f57d93a3f8075341451263af9c9c531004907ae2b62b1873e7e4664c2cd26fa3b12271c SHA512 d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444
DIST bison-3.8.2.tar.xz.sig 195 BLAKE2B b9bd21adb5115d3d3174c94223fbc9cd33afa0e9c1805008e49f77ff154fc2b656d8a9e9503dc5290658ae2948a2ca7c0dbc812f62aec268d8f8bfafb6349096 SHA512 8bb7743ca326e81a6c091b1413e3c09bd43c7eabbb80bac0638ccd52bdf7e3395cce300a86acd95f4637a9ec8a1b0e9a4d3d25d95ab0a8f03e57fd82eb87a7ac
diff --git a/sys-devel/bison/bison-3.7.6.ebuild b/sys-devel/bison/bison-3.7.6.ebuild
deleted file mode 100644
index a9e566e5e632..000000000000
--- a/sys-devel/bison/bison-3.7.6.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-
-PATCH_TAR="${PN}-3.7.6-patches-01.tar.xz"
-
-DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
-HOMEPAGE="https://www.gnu.org/software/bison/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~whissi/dist/bison/${PATCH_TAR}
- https://dev.gentoo.org/~polynomial-c/dist/bison/${PATCH_TAR}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="examples nls static test"
-RESTRICT="!test? ( test )"
-
-# gettext _IS_ required in RDEPEND because >=bison-3.7 links against
-# libtextstyle.so!!! (see bug #740754)
-DEPEND="
- >=sys-devel/m4-1.4.16
- >=sys-devel/gettext-0.21
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- sys-devel/flex
- examples? ( dev-lang/perl )
- test? ( dev-lang/perl )
-"
-
-DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release
-
-src_prepare() {
- # Record date to avoid 'config.status --recheck' & regen of 'tests/package.m4'
- touch -r configure.ac old.configure.ac || die
- touch -r configure old.configure || die
-
- eapply "${WORKDIR}"/patches
- default
-
- # Restore date after patching
- touch -r old.configure.ac configure.ac || die
- touch -r old.configure configure || die
-
- # The makefiles make the man page depend on the configure script
- # which we patched above. Touch it to prevent regeneration.
- touch doc/bison.1 || die #548778 #538300#9
-
- # Avoid regenerating the info page when the timezone is diff. #574492
- sed -i '2iexport TZ=UTC' build-aux/mdate-sh || die
-}
-
-src_configure() {
- use static && append-ldflags -static
-
- local myeconfargs=(
- $(use_enable examples)
- $(use_enable nls)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- # This one is installed by dev-util/yacc
- mv "${ED}"/usr/bin/yacc{,.bison} || die
- mv "${ED}"/usr/share/man/man1/yacc{,.bison}.1 || die
-
- # We do not need liby.a
- rm -r "${ED}"/usr/lib* || die
-}
-
-pkg_postinst() {
- local f="${EROOT}/usr/bin/yacc"
- if [[ ! -e ${f} ]] ; then
- ln -s yacc.bison "${f}"
- fi
-}
-
-pkg_postrm() {
- # clean up the dead symlink when we get unmerged #377469
- local f="${EROOT}/usr/bin/yacc"
- if [[ -L ${f} && ! -e ${f} ]] ; then
- rm -f "${f}"
- fi
-}
diff --git a/sys-devel/bison/bison-3.8.2.ebuild b/sys-devel/bison/bison-3.8.2-r2.ebuild
index 8d135411443f..b778f945857a 100644
--- a/sys-devel/bison/bison-3.8.2.ebuild
+++ b/sys-devel/bison/bison-3.8.2-r2.ebuild
@@ -1,19 +1,19 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bison.asc
-inherit flag-o-matic verify-sig
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/bison.asc
+inherit flag-o-matic multiprocessing verify-sig
DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
HOMEPAGE="https://www.gnu.org/software/bison/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
-LICENSE="GPL-2"
+LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="examples nls static test"
RESTRICT="!test? ( test )"
@@ -25,10 +25,11 @@ DEPEND="
"
RDEPEND="${DEPEND}"
BDEPEND="
- sys-devel/flex
+ app-alternatives/lex
test? ( dev-lang/perl )
verify-sig? ( sec-keys/openpgp-keys-bison )
"
+PDEPEND="app-alternatives/yacc"
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release
@@ -67,10 +68,14 @@ src_configure() {
econf "${myeconfargs[@]}"
}
+src_test() {
+ emake check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
+}
+
src_install() {
default
- # This one is installed by dev-util/yacc
+ # These are owned by app-alternatives/yacc
mv "${ED}"/usr/bin/yacc{,.bison} || die
mv "${ED}"/usr/share/man/man1/yacc{,.bison}.1 || die
@@ -84,16 +89,17 @@ src_install() {
}
pkg_postinst() {
- local f="${EROOT}/usr/bin/yacc"
- if [[ ! -e ${f} ]] ; then
- ln -s yacc.bison "${f}"
- fi
-}
-
-pkg_postrm() {
- # clean up the dead symlink when we get unmerged #377469
- local f="${EROOT}/usr/bin/yacc"
- if [[ -L ${f} && ! -e ${f} ]] ; then
- rm -f "${f}"
+ # ensure to preserve the symlinks before app-alternatives/yacc
+ # is installed
+ if [[ ! -h ${EROOT}/usr/bin/yacc ]]; then
+ if [[ -e ${EROOT}/usr/bin/yacc ]] ; then
+ # bug #886123
+ ewarn "${EROOT}/usr/bin/yacc exists but is not a symlink."
+ ewarn "This is expected during Prefix bootstrap and unusual otherwise."
+ ewarn "Moving away unexpected ${EROOT}/usr/bin/yacc to .bak."
+ mv "${EROOT}/usr/bin/yacc" "${EROOT}/usr/bin/yacc.bak" || die
+ fi
+
+ ln -s yacc.bison "${EROOT}/usr/bin/yacc" || die
fi
}
diff --git a/sys-devel/bison/metadata.xml b/sys-devel/bison/metadata.xml
index 73dda144f9ac..2e9f3654b407 100644
--- a/sys-devel/bison/metadata.xml
+++ b/sys-devel/bison/metadata.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:bison</remote-id>
+ <remote-id type="github">akimd/bison</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/bmake/Manifest b/sys-devel/bmake/Manifest
deleted file mode 100644
index 306140daa775..000000000000
--- a/sys-devel/bmake/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST bmake-20220418.tar.gz 805986 BLAKE2B 6569956d81a9c67cc95756831ec086b392af69cb2b068f11d3beb237ca3f62059b9102695f28aa4093b589af52c512545bd86d91a410d681f3835a99b8270f6f SHA512 89fa5cb6e35ee1cd6a32acf291bda33b3a7272c4ef25d38412b8caa7e092210c8fa04a11d19d3c19b7e60dee2cf0a5049cf393be6e25b6e28bab2eea50e03204
-DIST bmake-20220612.tar.gz 810914 BLAKE2B afb7691bdffe799e629f856ba61226cd93217890ef10e2803d6dda28e16439f2a3583d98964700858dfabdf38d62a1ad06eefaa49570e45fccb9bcddac3fb68b SHA512 c7b352ca44c30c107bcae544125989dcea9cb32ea296f875ed84313bb72633366191b86f30c38fe733fb27bf91a040a063059070efefa774089af5694af2bc3f
-DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b
diff --git a/sys-devel/bmake/bmake-20220418.ebuild b/sys-devel/bmake/bmake-20220418.ebuild
deleted file mode 100644
index 7e0fdf7ced79..000000000000
--- a/sys-devel/bmake/bmake-20220418.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MK_VER=20210330
-
-DESCRIPTION="NetBSD's portable make"
-HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html"
-SRC_URI="
- http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz
- http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz"
-S="${WORKDIR}/${PN}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~ppc ~x86"
-
-# Skip failing test (sandbox and csh)
-PATCHES=(
- "${FILESDIR}"/${PN}-20210206-tests.patch
- "${FILESDIR}"/${PN}-20220418-warnings.patch
-)
-
-src_prepare() {
- default
- cd "${WORKDIR}" || die
- eapply "${FILESDIR}"/${PN}-20210314-mk-fixes.patch
-}
-
-src_configure() {
- econf \
- --with-mksrc=../mk \
- --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \
- --with-machine_arch=${ARCH}
-}
-
-src_compile() {
- sh make-bootstrap.sh || die "bootstrap failed"
-}
-
-src_test() {
- cd unit-tests || die
-
- # the 'ternary' test uses ${A} internally, which
- # conflicts with Gentoo's ${A}, hence unset it for
- # the tests temporarily.
- env -u A MAKEFLAGS= \
- "${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed"
-}
-
-src_install() {
- dobin ${PN}
- doman ${PN}.1
- FORCE_BSD_MK=1 SYS_MK_DIR=. \
- sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \
- || die "failed to install mk files"
-}
diff --git a/sys-devel/bmake/bmake-20220612.ebuild b/sys-devel/bmake/bmake-20220612.ebuild
deleted file mode 100644
index 5505e007c65a..000000000000
--- a/sys-devel/bmake/bmake-20220612.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MK_VER=20210330
-
-DESCRIPTION="NetBSD's portable make"
-HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html"
-SRC_URI="
- http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz
- http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz"
-S="${WORKDIR}/${PN}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-
-# Skip failing test (sandbox and csh)
-PATCHES=(
- "${FILESDIR}"/${PN}-20210206-tests.patch
- "${FILESDIR}"/${PN}-20220418-warnings.patch
-)
-
-src_prepare() {
- default
- cd "${WORKDIR}" || die
- eapply "${FILESDIR}"/${PN}-20210314-mk-fixes.patch
-}
-
-src_configure() {
- econf \
- --with-mksrc=../mk \
- --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \
- --with-machine_arch=${ARCH}
-}
-
-src_compile() {
- sh make-bootstrap.sh || die "bootstrap failed"
-}
-
-src_test() {
- cd unit-tests || die
-
- # the 'ternary' test uses ${A} internally, which
- # conflicts with Gentoo's ${A}, hence unset it for
- # the tests temporarily.
- env -u A MAKEFLAGS= \
- "${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed"
-}
-
-src_install() {
- dobin ${PN}
- doman ${PN}.1
- FORCE_BSD_MK=1 SYS_MK_DIR=. \
- sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \
- || die "failed to install mk files"
-}
diff --git a/sys-devel/bmake/files/bmake-20210206-tests.patch b/sys-devel/bmake/files/bmake-20210206-tests.patch
deleted file mode 100644
index 49e5f258e91a..000000000000
--- a/sys-devel/bmake/files/bmake-20210206-tests.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/unit-tests/Makefile
-+++ b/unit-tests/Makefile
-@@ -191,7 +191,6 @@ TESTS+= dotwait
- TESTS+= envfirst
- TESTS+= error
- TESTS+= # escape # broken by reverting POSIX changes
--TESTS+= export
- TESTS+= export-all
- TESTS+= export-env
- TESTS+= export-variants
-@@ -290,7 +289,6 @@ TESTS+= sh-leading-plus
- TESTS+= sh-meta-chars
- TESTS+= sh-multi-line
- TESTS+= sh-single-line
--TESTS+= shell-csh
- TESTS+= shell-custom
- .if exists(/bin/ksh)
- TESTS+= shell-ksh
diff --git a/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch b/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch
deleted file mode 100644
index 6dd935863be1..000000000000
--- a/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-# https://bugs.gentoo.org/779340
-# https://bugs.gentoo.org/778458
-# - Fix incorrect linking of shared libraries
-# - Respect LDFLAGS
-# - Do not strip prog binaries
---- a/mk/lib.mk
-+++ b/mk/lib.mk
-@@ -170,7 +170,7 @@ LD_solib= lib${LIB}_pic.a
- .elif ${TARGET_OSNAME} == "Linux"
- SHLIB_LD = ${CC}
- # this is ambiguous of course
--LD_shared=-shared -Wl,"-soname lib${LIB}.so.${SHLIB_MAJOR}"
-+LD_shared=-shared -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR}
- LD_solib= -Wl,--whole-archive lib${LIB}_pic.a -Wl,--no-whole-archive
- .if ${COMPILER_TYPE} == "gcc"
- # Linux uses GNU ld, which is a multi-pass linker
-@@ -455,11 +455,11 @@ lib${LIB}.${LD_so}: ${SOLIB} ${DPADD}
- --whole-archive ${SOLIB} --no-whole-archive ${SHLIB_LDADD} \
- ${SHLIB_LDENDFILE}
- .else
-- ${SHLIB_LD} ${LD_x} ${LD_shared} \
-+ ${SHLIB_LD} ${LD_x} ${LD_shared} ${LDFLAGS} \
- -o ${.TARGET} ${SOLIB} ${SHLIB_LDADD}
- .endif
- .else
-- ${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LD_solib} ${DLLIB} ${SHLIB_LDADD}
-+ ${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LDFLAGS} ${LD_solib} ${DLLIB} ${SHLIB_LDADD}
- .endif
- .endif
- .if !empty(SHLIB_LINKS)
---- a/mk/prog.mk
-+++ b/mk/prog.mk
-@@ -178,7 +178,7 @@ proginstall:
- .if defined(PROG)
- [ -d ${DESTDIR}${BINDIR} ] || \
- ${INSTALL} -d ${PROG_INSTALL_OWN} -m 775 ${DESTDIR}${BINDIR}
-- ${INSTALL} ${COPY} ${STRIP_FLAG} ${PROG_INSTALL_OWN} -m ${BINMODE} \
-+ ${INSTALL} ${COPY} ${PROG_INSTALL_OWN} -m ${BINMODE} \
- ${PROG} ${DESTDIR}${BINDIR}/${PROG_NAME}
- .endif
- .if defined(HIDEGAME)
---- a/mk/sys/Linux.mk
-+++ b/mk/sys/Linux.mk
-@@ -19,12 +19,13 @@ NEED_SOLINKS ?=yes
- AR ?= ar
- ARFLAGS ?= rl
- RANLIB ?= ranlib
-+LDFLAGS ?=
-
- AS ?= as
- AFLAGS=
- COMPILE.s ?= ${AS} ${AFLAGS}
- LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS}
--COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c
-+COMPILE.S ?= ${CC} ${AFLAGS} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -c
- LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
- .if exists(/usr/local/bin/gcc)
- CC ?= gcc -pipe
-@@ -65,7 +66,6 @@ LFLAGS=
- LEX.l ?= ${LEX} ${LFLAGS}
-
- LD ?= ld
--LDFLAGS=
-
- LINT ?= lint
- LINTFLAGS ?= -chapbx
diff --git a/sys-devel/bmake/files/bmake-20220418-warnings.patch b/sys-devel/bmake/files/bmake-20220418-warnings.patch
deleted file mode 100644
index 1fccb91e95a3..000000000000
--- a/sys-devel/bmake/files/bmake-20220418-warnings.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-# https://bugs.gentoo.org/841362
-#
-# Fix -Wimplicit-function-declaration and -Wunused-result warnings
-#
-# meta.c: In function ‘meta_name’:
-# meta.c:262:21: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
-# 262 | strlcpy(rp, tname_base, sizeof buf - (size_t)(rp - buf));
-# | ^~~~~~~
-# | strncpy
-#
-# meta.c: In function ‘meta_job_error’:
-# meta.c:774:5: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
-# 774 | getcwd(cwd, sizeof cwd);
-# | ^~~~~~~~~~~~~~~~~~~~~~~
-
---- a/meta.c
-+++ b/meta.c
-@@ -106,6 +106,10 @@
- char * stresep(char **, const char *, int);
- #endif
-
-+#if !defined(HAVE_STRLCPY)
-+size_t strlcpy(char *, const char *, size_t);
-+#endif
-+
- /*
- * Filemon is a kernel module which snoops certain syscalls.
- *
-@@ -769,7 +773,8 @@
- }
- if (gn != NULL)
- Global_Set(".ERROR_TARGET", GNode_Path(gn));
-- getcwd(cwd, sizeof cwd);
-+ if (getcwd(cwd, sizeof cwd) == NULL)
-+ err(1, "Could not get current working directory");
- Global_Set(".ERROR_CWD", cwd);
- if (pbm->meta_fname[0] != '\0') {
- Global_Set(".ERROR_META_FILE", pbm->meta_fname);
diff --git a/sys-devel/bmake/metadata.xml b/sys-devel/bmake/metadata.xml
deleted file mode 100644
index fe8a3a5da516..000000000000
--- a/sys-devel/bmake/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>jsmolic@gentoo.org</email>
- <name>Jakov Smolić</name>
- </maintainer>
- <maintainer type="person">
- <email>soap@gentoo.org</email>
- <name>David Seifert</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-devel/boost-m4/Manifest b/sys-devel/boost-m4/Manifest
deleted file mode 100644
index 2c9cc88c4c1b..000000000000
--- a/sys-devel/boost-m4/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST boost-m4-0.4_p20160328.tar.gz 41253 BLAKE2B 47ad17f652560dce4e276b295e55e7daa8752f1c932a6c0d1bad9e4bc2ff72eb0adfaf8abc4e7c57f179f08857de255935fc530f0a4d8a26d3f6a2a0711417ac SHA512 4aecd311b21ced4a3d62fc706a9fa731c375ea490482f78756892243b5af6909cd8841c249632b37820be7f1bde41c290e842edd933d0c727e1dca76d30eb506
diff --git a/sys-devel/boost-m4/boost-m4-0.4_p20160328.ebuild b/sys-devel/boost-m4/boost-m4-0.4_p20160328.ebuild
deleted file mode 100644
index abe648762767..000000000000
--- a/sys-devel/boost-m4/boost-m4-0.4_p20160328.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Another set of autoconf macros for compiling against boost"
-HOMEPAGE="https://github.com/tsuna/boost.m4"
-SRC_URI="https://dev.gentoo.org/~soap/distfiles/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE=""
-S="${WORKDIR}/boost.m4-1489691f65aecb593e33abc3e56ac482dd67da7b"
-
-# boost.m4 has a buildsystem, but the distributer didn't use make dist
-# so we'd have to eautoreconf to use it. Also, its ./configure script
-# DEPENDs on boost. For installing one file, bootstrapping the
-# buildsystem isn't worth it.
-src_configure() { :; }
-
-src_compile() { :; }
-
-src_install() {
- insinto /usr/share/aclocal
- doins build-aux/boost.m4
-
- dodoc AUTHORS NEWS README THANKS
-}
diff --git a/sys-devel/boost-m4/metadata.xml b/sys-devel/boost-m4/metadata.xml
deleted file mode 100644
index 9b6ec7a4328b..000000000000
--- a/sys-devel/boost-m4/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!--maintainer-needed-->
- <upstream>
- <remote-id type="github">tsuna/boost.m4</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index fed0786bf224..bd71f2e58a68 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -1,9 +1,10 @@
-DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5
-DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7
-DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
-DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
-DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2
-DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646
-DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-devel/clang-common/clang-common-12.0.1.ebuild b/sys-devel/clang-common/clang-common-12.0.1.ebuild
deleted file mode 100644
index 70896015ab67..000000000000
--- a/sys-devel/clang-common/clang-common-12.0.1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE=""
-
-PDEPEND="sys-devel/clang:*"
-
-LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh )
-llvm.org_set_globals
-S=${WORKDIR}/clang/utils
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-13.0.1.ebuild b/sys-devel/clang-common/clang-common-13.0.1.ebuild
deleted file mode 100644
index 89948f1aa15e..000000000000
--- a/sys-devel/clang-common/clang-common-13.0.1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE=""
-
-PDEPEND="sys-devel/clang:*"
-
-LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh )
-llvm.org_set_globals
-S=${WORKDIR}/clang/utils
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-14.0.1.ebuild b/sys-devel/clang-common/clang-common-14.0.1.ebuild
deleted file mode 100644
index a422bd9111c0..000000000000
--- a/sys-devel/clang-common/clang-common-14.0.1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE=""
-
-PDEPEND="sys-devel/clang:*"
-
-LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh )
-llvm.org_set_globals
-S=${WORKDIR}/clang/utils
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-14.0.3.ebuild b/sys-devel/clang-common/clang-common-14.0.3.ebuild
deleted file mode 100644
index 798f9e9fb858..000000000000
--- a/sys-devel/clang-common/clang-common-14.0.3.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-PDEPEND="
- sys-devel/clang:*
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-14.0.4.ebuild b/sys-devel/clang-common/clang-common-14.0.4.ebuild
deleted file mode 100644
index 188f4f88ad90..000000000000
--- a/sys-devel/clang-common/clang-common-14.0.4.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-PDEPEND="
- sys-devel/clang:*
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-14.0.5.ebuild b/sys-devel/clang-common/clang-common-14.0.5.ebuild
deleted file mode 100644
index 798f9e9fb858..000000000000
--- a/sys-devel/clang-common/clang-common-14.0.5.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-PDEPEND="
- sys-devel/clang:*
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-14.0.6.ebuild b/sys-devel/clang-common/clang-common-14.0.6.ebuild
deleted file mode 100644
index 798f9e9fb858..000000000000
--- a/sys-devel/clang-common/clang-common-14.0.6.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-PDEPEND="
- sys-devel/clang:*
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild
deleted file mode 100644
index 1285500128bb..000000000000
--- a/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-
-PDEPEND="
- sys-devel/clang:*
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild b/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild
new file mode 100644
index 000000000000..4d200fba7af7
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="
+ default-compiler-rt default-libcxx default-lld llvm-libunwind
+ hardened stricter
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( >=sys-devel/lld-${PV} )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # Baseline hardening (bug #851111)
+ # (-fstack-clash-protection is omitted because of a possible Clang bug,
+ # see bug #892537 and bug #865339.)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Xarch_host -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ #endif
+ EOF
+
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ -D_LIBCPP_ENABLE_ASSERTIONS=1
+ EOF
+ fi
+
+ if use stricter; then
+ newins - gentoo-stricter.cfg <<-EOF
+ # This file increases the strictness of older clang versions
+ # to match the newest upstream version.
+
+ # clang-16 defaults
+ -Werror=implicit-function-declaration
+ -Werror=implicit-int
+ -Werror=incompatible-function-pointer-types
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ @gentoo-stricter.cfg
+ EOF
+ fi
+
+ local tool
+ for tool in clang{,++,-cpp}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ EOF
+ done
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild b/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild
new file mode 100644
index 000000000000..8185d75d346e
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="
+ default-compiler-rt default-libcxx default-lld
+ bootstrap-prefix hardened llvm-libunwind
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( >=sys-devel/lld-${PV} )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # Baseline hardening (bug #851111)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Xarch_host -fstack-clash-protection
+ -Xarch_host -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ #endif
+ EOF
+
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ -D_LIBCPP_ENABLE_ASSERTIONS=1
+ EOF
+ fi
+
+ local tool
+ for tool in clang{,++,-cpp}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ EOF
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ # Gentoo Prefix on Darwin
+ -Wl,-search_paths_first
+ -Wl,-rpath,${EPREFIX}/usr/lib
+ -L ${EPREFIX}/usr/lib
+ -isystem ${EPREFIX}/usr/include
+ -isysroot ${EPREFIX}/MacOSX.sdk
+ EOF
+ if use bootstrap-prefix ; then
+ # bootstrap-prefix is only set during stage2 of bootstrapping
+ # Prefix, where EPREFIX is set to EPREFIX/tmp.
+ # Here we need to point it at the future lib dir of the stage3's
+ # EPREFIX.
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ -Wl,-rpath,${EPREFIX}/../usr/lib
+ EOF
+ fi
+ cat >> "${ED}/etc/clang/clang++.cfg" <<-EOF || die
+ -lc++abi
+ EOF
+ fi
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-17.0.6-r5.ebuild b/sys-devel/clang-common/clang-common-17.0.6-r5.ebuild
new file mode 100644
index 000000000000..e736620feb37
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-17.0.6-r5.ebuild
@@ -0,0 +1,303 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org multilib
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="
+ default-compiler-rt default-libcxx default-lld
+ bootstrap-prefix cet hardened llvm-libunwind
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( >=sys-devel/lld-${PV} )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+_doclang_cfg() {
+ local triple="${1}"
+
+ local tool
+ for tool in ${triple}-clang{,++}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ @gentoo-common-ld.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die
+ -lc++abi
+ EOF
+ fi
+
+ newins - "${triple}-clang-cpp.cfg" <<-EOF
+ # This configuration file is used by the ${triple}-clang-cpp driver.
+ @gentoo-common.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+
+ # Install symlinks for triples with other vendor strings since some
+ # programs insist on mangling the triple.
+ local vendor
+ for vendor in gentoo pc unknown; do
+ local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
+ for tool in clang{,++,-cpp}; do
+ if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
+ dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg"
+ fi
+ done
+ done
+}
+
+doclang_cfg() {
+ local triple="${1}"
+
+ _doclang_cfg ${triple}
+
+ # LLVM may have different arch names in some cases. For example in x86
+ # profiles the triple uses i686, but llvm will prefer i386 if invoked
+ # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will
+ # be used if invoked through ${CHOST}-clang{,++,-cpp} though.
+ #
+ # To make sure the correct triples are installed,
+ # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp
+ # and compare with CHOST values in profiles.
+
+ local abi=${triple%%-*}
+ case ${abi} in
+ armv4l|armv4t|armv5tel|armv6j|armv7a)
+ _doclang_cfg ${triple/${abi}/arm}
+ ;;
+ i686)
+ _doclang_cfg ${triple/${abi}/i386}
+ ;;
+ sparc)
+ _doclang_cfg ${triple/${abi}/sparcel}
+ ;;
+ sparc64)
+ _doclang_cfg ${triple/${abi}/sparcv9}
+ ;;
+ esac
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # clang-cpp does not like link args being passed to it when directly
+ # invoked, so use a separate configuration file.
+ newins - gentoo-common-ld.cfg <<-EOF
+ # This file contains flags common to clang and clang++
+ @gentoo-hardened-ld.cfg
+ EOF
+
+ # Baseline hardening (bug #851111)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Xarch_host -fstack-clash-protection
+ -Xarch_host -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ newins - gentoo-cet.cfg <<-EOF
+ -Xarch_host -fcf-protection=$(usex cet full none)
+ EOF
+
+ if use kernel_Darwin; then
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # There was -Wl,-z,relro here, but it's not supported on Mac
+ # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job
+ EOF
+ else
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Wl,-z,relro
+ -Wl,-z,now
+ EOF
+ fi
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
+ # define __GENTOO_NOT_FREESTANDING 1
+ # else
+ # define __GENTOO_NOT_FREESTANDING 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ # undef __GENTOO_NOT_FREESTANDING
+ #endif
+ EOF
+
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ # https://libcxx.llvm.org/Hardening.html#using-hardened-mode
+ -D_LIBCPP_ENABLE_ASSERTIONS=1
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ EOF
+ fi
+
+ # We only install config files for supported ABIs because unprefixed tools
+ # might be used for crosscompilation where e.g. PIE may not be supported.
+ # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685.
+ local abi
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ doclang_cfg "${abi_chost}"
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ # Gentoo Prefix on Darwin
+ -Wl,-search_paths_first
+ -Wl,-rpath,${EPREFIX}/usr/lib
+ -L ${EPREFIX}/usr/lib
+ -isystem ${EPREFIX}/usr/include
+ -isysroot ${EPREFIX}/MacOSX.sdk
+ EOF
+ if use bootstrap-prefix ; then
+ # bootstrap-prefix is only set during stage2 of bootstrapping
+ # Prefix, where EPREFIX is set to EPREFIX/tmp.
+ # Here we need to point it at the future lib dir of the stage3's
+ # EPREFIX.
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ -Wl,-rpath,${EPREFIX}/../usr/lib
+ EOF
+ fi
+ fi
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild b/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild
new file mode 100644
index 000000000000..fff63838526d
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild
@@ -0,0 +1,297 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org multilib
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="
+ default-compiler-rt default-libcxx default-lld
+ bootstrap-prefix cet hardened llvm-libunwind
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( >=sys-devel/lld-${PV} )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+_doclang_cfg() {
+ local triple="${1}"
+
+ local tool
+ for tool in ${triple}-clang{,++}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ @gentoo-common-ld.cfg
+ EOF
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die
+ -lc++abi
+ EOF
+ fi
+
+ newins - "${triple}-clang-cpp.cfg" <<-EOF
+ # This configuration file is used by the ${triple}-clang-cpp driver.
+ @gentoo-common.cfg
+ EOF
+
+ # Install symlinks for triples with other vendor strings since some
+ # programs insist on mangling the triple.
+ local vendor
+ for vendor in gentoo pc unknown; do
+ local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
+ for tool in clang{,++,-cpp}; do
+ if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
+ dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg"
+ fi
+ done
+ done
+}
+
+doclang_cfg() {
+ local triple="${1}"
+
+ _doclang_cfg ${triple}
+
+ # LLVM may have different arch names in some cases. For example in x86
+ # profiles the triple uses i686, but llvm will prefer i386 if invoked
+ # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will
+ # be used if invoked through ${CHOST}-clang{,++,-cpp} though.
+ #
+ # To make sure the correct triples are installed,
+ # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp
+ # and compare with CHOST values in profiles.
+
+ local abi=${triple%%-*}
+ case ${abi} in
+ armv4l|armv4t|armv5tel|armv6j|armv7a)
+ _doclang_cfg ${triple/${abi}/arm}
+ ;;
+ i686)
+ _doclang_cfg ${triple/${abi}/i386}
+ ;;
+ sparc)
+ _doclang_cfg ${triple/${abi}/sparcel}
+ ;;
+ sparc64)
+ _doclang_cfg ${triple/${abi}/sparcv9}
+ ;;
+ esac
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # clang-cpp does not like link args being passed to it when directly
+ # invoked, so use a separate configuration file.
+ newins - gentoo-common-ld.cfg <<-EOF
+ # This file contains flags common to clang and clang++
+ @gentoo-hardened-ld.cfg
+ EOF
+
+ # Baseline hardening (bug #851111)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Xarch_host -fstack-clash-protection
+ -Xarch_host -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ if use amd64; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ -Xarch_host -fcf-protection=$(usex cet full none)
+ EOF
+ fi
+
+ if use kernel_Darwin; then
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # There was -Wl,-z,relro here, but it's not supported on Mac
+ # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job
+ EOF
+ else
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Wl,-z,relro
+ -Wl,-z,now
+ EOF
+ fi
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
+ # define __GENTOO_NOT_FREESTANDING 1
+ # else
+ # define __GENTOO_NOT_FREESTANDING 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ # undef __GENTOO_NOT_FREESTANDING
+ #endif
+ EOF
+
+ # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for
+ # non-hardened?
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ # https://libcxx.llvm.org/Hardening.html#using-hardened-mode
+ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ EOF
+ fi
+
+ # We only install config files for supported ABIs because unprefixed tools
+ # might be used for crosscompilation where e.g. PIE may not be supported.
+ # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685.
+ local abi
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ doclang_cfg "${abi_chost}"
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ # Gentoo Prefix on Darwin
+ -Wl,-search_paths_first
+ -Wl,-rpath,${EPREFIX}/usr/lib
+ -L ${EPREFIX}/usr/lib
+ -isystem ${EPREFIX}/usr/include
+ -isysroot ${EPREFIX}/MacOSX.sdk
+ EOF
+ if use bootstrap-prefix ; then
+ # bootstrap-prefix is only set during stage2 of bootstrapping
+ # Prefix, where EPREFIX is set to EPREFIX/tmp.
+ # Here we need to point it at the future lib dir of the stage3's
+ # EPREFIX.
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ -Wl,-rpath,${EPREFIX}/../usr/lib
+ EOF
+ fi
+ fi
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..f260391ba4ab
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild
@@ -0,0 +1,304 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org multilib
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="
+ default-compiler-rt default-libcxx default-lld
+ bootstrap-prefix cet hardened llvm-libunwind
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( >=sys-devel/lld-${PV} )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+_doclang_cfg() {
+ local triple="${1}"
+
+ local tool
+ for tool in ${triple}-clang{,++}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ @gentoo-common-ld.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die
+ -lc++abi
+ EOF
+ fi
+
+ newins - "${triple}-clang-cpp.cfg" <<-EOF
+ # This configuration file is used by the ${triple}-clang-cpp driver.
+ @gentoo-common.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+
+ # Install symlinks for triples with other vendor strings since some
+ # programs insist on mangling the triple.
+ local vendor
+ for vendor in gentoo pc unknown; do
+ local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
+ for tool in clang{,++,-cpp}; do
+ if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
+ dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg"
+ fi
+ done
+ done
+}
+
+doclang_cfg() {
+ local triple="${1}"
+
+ _doclang_cfg ${triple}
+
+ # LLVM may have different arch names in some cases. For example in x86
+ # profiles the triple uses i686, but llvm will prefer i386 if invoked
+ # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will
+ # be used if invoked through ${CHOST}-clang{,++,-cpp} though.
+ #
+ # To make sure the correct triples are installed,
+ # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp
+ # and compare with CHOST values in profiles.
+
+ local abi=${triple%%-*}
+ case ${abi} in
+ armv4l|armv4t|armv5tel|armv6j|armv7a)
+ _doclang_cfg ${triple/${abi}/arm}
+ ;;
+ i686)
+ _doclang_cfg ${triple/${abi}/i386}
+ ;;
+ sparc)
+ _doclang_cfg ${triple/${abi}/sparcel}
+ ;;
+ sparc64)
+ _doclang_cfg ${triple/${abi}/sparcv9}
+ ;;
+ esac
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # clang-cpp does not like link args being passed to it when directly
+ # invoked, so use a separate configuration file.
+ newins - gentoo-common-ld.cfg <<-EOF
+ # This file contains flags common to clang and clang++
+ @gentoo-hardened-ld.cfg
+ EOF
+
+ # Baseline hardening (bug #851111)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Xarch_host -fstack-clash-protection
+ -Xarch_host -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ newins - gentoo-cet.cfg <<-EOF
+ -Xarch_host -fcf-protection=$(usex cet full none)
+ EOF
+
+ if use kernel_Darwin; then
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # There was -Wl,-z,relro here, but it's not supported on Mac
+ # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job
+ EOF
+ else
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Wl,-z,relro
+ -Wl,-z,now
+ EOF
+ fi
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
+ # define __GENTOO_NOT_FREESTANDING 1
+ # else
+ # define __GENTOO_NOT_FREESTANDING 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ # undef __GENTOO_NOT_FREESTANDING
+ #endif
+ EOF
+
+ # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for
+ # non-hardened?
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ # https://libcxx.llvm.org/Hardening.html#using-hardened-mode
+ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ EOF
+ fi
+
+ # We only install config files for supported ABIs because unprefixed tools
+ # might be used for crosscompilation where e.g. PIE may not be supported.
+ # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685.
+ local abi
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ doclang_cfg "${abi_chost}"
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ # Gentoo Prefix on Darwin
+ -Wl,-search_paths_first
+ -Wl,-rpath,${EPREFIX}/usr/lib
+ -L ${EPREFIX}/usr/lib
+ -isystem ${EPREFIX}/usr/include
+ -isysroot ${EPREFIX}/MacOSX.sdk
+ EOF
+ if use bootstrap-prefix ; then
+ # bootstrap-prefix is only set during stage2 of bootstrapping
+ # Prefix, where EPREFIX is set to EPREFIX/tmp.
+ # Here we need to point it at the future lib dir of the stage3's
+ # EPREFIX.
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ -Wl,-rpath,${EPREFIX}/../usr/lib
+ EOF
+ fi
+ fi
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-19.0.0_pre20240410.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..f260391ba4ab
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-19.0.0_pre20240410.ebuild
@@ -0,0 +1,304 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org multilib
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="
+ default-compiler-rt default-libcxx default-lld
+ bootstrap-prefix cet hardened llvm-libunwind
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( >=sys-devel/lld-${PV} )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+_doclang_cfg() {
+ local triple="${1}"
+
+ local tool
+ for tool in ${triple}-clang{,++}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ @gentoo-common-ld.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die
+ -lc++abi
+ EOF
+ fi
+
+ newins - "${triple}-clang-cpp.cfg" <<-EOF
+ # This configuration file is used by the ${triple}-clang-cpp driver.
+ @gentoo-common.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+
+ # Install symlinks for triples with other vendor strings since some
+ # programs insist on mangling the triple.
+ local vendor
+ for vendor in gentoo pc unknown; do
+ local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
+ for tool in clang{,++,-cpp}; do
+ if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
+ dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg"
+ fi
+ done
+ done
+}
+
+doclang_cfg() {
+ local triple="${1}"
+
+ _doclang_cfg ${triple}
+
+ # LLVM may have different arch names in some cases. For example in x86
+ # profiles the triple uses i686, but llvm will prefer i386 if invoked
+ # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will
+ # be used if invoked through ${CHOST}-clang{,++,-cpp} though.
+ #
+ # To make sure the correct triples are installed,
+ # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp
+ # and compare with CHOST values in profiles.
+
+ local abi=${triple%%-*}
+ case ${abi} in
+ armv4l|armv4t|armv5tel|armv6j|armv7a)
+ _doclang_cfg ${triple/${abi}/arm}
+ ;;
+ i686)
+ _doclang_cfg ${triple/${abi}/i386}
+ ;;
+ sparc)
+ _doclang_cfg ${triple/${abi}/sparcel}
+ ;;
+ sparc64)
+ _doclang_cfg ${triple/${abi}/sparcv9}
+ ;;
+ esac
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # clang-cpp does not like link args being passed to it when directly
+ # invoked, so use a separate configuration file.
+ newins - gentoo-common-ld.cfg <<-EOF
+ # This file contains flags common to clang and clang++
+ @gentoo-hardened-ld.cfg
+ EOF
+
+ # Baseline hardening (bug #851111)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Xarch_host -fstack-clash-protection
+ -Xarch_host -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ newins - gentoo-cet.cfg <<-EOF
+ -Xarch_host -fcf-protection=$(usex cet full none)
+ EOF
+
+ if use kernel_Darwin; then
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # There was -Wl,-z,relro here, but it's not supported on Mac
+ # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job
+ EOF
+ else
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Wl,-z,relro
+ -Wl,-z,now
+ EOF
+ fi
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
+ # define __GENTOO_NOT_FREESTANDING 1
+ # else
+ # define __GENTOO_NOT_FREESTANDING 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ # undef __GENTOO_NOT_FREESTANDING
+ #endif
+ EOF
+
+ # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for
+ # non-hardened?
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ # https://libcxx.llvm.org/Hardening.html#using-hardened-mode
+ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ EOF
+ fi
+
+ # We only install config files for supported ABIs because unprefixed tools
+ # might be used for crosscompilation where e.g. PIE may not be supported.
+ # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685.
+ local abi
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ doclang_cfg "${abi_chost}"
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ # Gentoo Prefix on Darwin
+ -Wl,-search_paths_first
+ -Wl,-rpath,${EPREFIX}/usr/lib
+ -L ${EPREFIX}/usr/lib
+ -isystem ${EPREFIX}/usr/include
+ -isysroot ${EPREFIX}/MacOSX.sdk
+ EOF
+ if use bootstrap-prefix ; then
+ # bootstrap-prefix is only set during stage2 of bootstrapping
+ # Prefix, where EPREFIX is set to EPREFIX/tmp.
+ # Here we need to point it at the future lib dir of the stage3's
+ # EPREFIX.
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ -Wl,-rpath,${EPREFIX}/../usr/lib
+ EOF
+ fi
+ fi
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-19.0.0_pre20240420.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..f260391ba4ab
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-19.0.0_pre20240420.ebuild
@@ -0,0 +1,304 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org multilib
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="
+ default-compiler-rt default-libcxx default-lld
+ bootstrap-prefix cet hardened llvm-libunwind
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( >=sys-devel/lld-${PV} )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+_doclang_cfg() {
+ local triple="${1}"
+
+ local tool
+ for tool in ${triple}-clang{,++}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ @gentoo-common-ld.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die
+ -lc++abi
+ EOF
+ fi
+
+ newins - "${triple}-clang-cpp.cfg" <<-EOF
+ # This configuration file is used by the ${triple}-clang-cpp driver.
+ @gentoo-common.cfg
+ EOF
+ if [[ ${triple} == x86_64* ]]; then
+ cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die
+ @gentoo-cet.cfg
+ EOF
+ fi
+
+ # Install symlinks for triples with other vendor strings since some
+ # programs insist on mangling the triple.
+ local vendor
+ for vendor in gentoo pc unknown; do
+ local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
+ for tool in clang{,++,-cpp}; do
+ if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
+ dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg"
+ fi
+ done
+ done
+}
+
+doclang_cfg() {
+ local triple="${1}"
+
+ _doclang_cfg ${triple}
+
+ # LLVM may have different arch names in some cases. For example in x86
+ # profiles the triple uses i686, but llvm will prefer i386 if invoked
+ # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will
+ # be used if invoked through ${CHOST}-clang{,++,-cpp} though.
+ #
+ # To make sure the correct triples are installed,
+ # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp
+ # and compare with CHOST values in profiles.
+
+ local abi=${triple%%-*}
+ case ${abi} in
+ armv4l|armv4t|armv5tel|armv6j|armv7a)
+ _doclang_cfg ${triple/${abi}/arm}
+ ;;
+ i686)
+ _doclang_cfg ${triple/${abi}/i386}
+ ;;
+ sparc)
+ _doclang_cfg ${triple/${abi}/sparcel}
+ ;;
+ sparc64)
+ _doclang_cfg ${triple/${abi}/sparcv9}
+ ;;
+ esac
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # clang-cpp does not like link args being passed to it when directly
+ # invoked, so use a separate configuration file.
+ newins - gentoo-common-ld.cfg <<-EOF
+ # This file contains flags common to clang and clang++
+ @gentoo-hardened-ld.cfg
+ EOF
+
+ # Baseline hardening (bug #851111)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Xarch_host -fstack-clash-protection
+ -Xarch_host -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ newins - gentoo-cet.cfg <<-EOF
+ -Xarch_host -fcf-protection=$(usex cet full none)
+ EOF
+
+ if use kernel_Darwin; then
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # There was -Wl,-z,relro here, but it's not supported on Mac
+ # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job
+ EOF
+ else
+ newins - gentoo-hardened-ld.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -Wl,-z,relro
+ -Wl,-z,now
+ EOF
+ fi
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
+ # define __GENTOO_NOT_FREESTANDING 1
+ # else
+ # define __GENTOO_NOT_FREESTANDING 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ # undef __GENTOO_NOT_FREESTANDING
+ #endif
+ EOF
+
+ # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for
+ # non-hardened?
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ # https://libcxx.llvm.org/Hardening.html#using-hardened-mode
+ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ EOF
+ fi
+
+ # We only install config files for supported ABIs because unprefixed tools
+ # might be used for crosscompilation where e.g. PIE may not be supported.
+ # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685.
+ local abi
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ doclang_cfg "${abi_chost}"
+ done
+
+ if use kernel_Darwin; then
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ # Gentoo Prefix on Darwin
+ -Wl,-search_paths_first
+ -Wl,-rpath,${EPREFIX}/usr/lib
+ -L ${EPREFIX}/usr/lib
+ -isystem ${EPREFIX}/usr/include
+ -isysroot ${EPREFIX}/MacOSX.sdk
+ EOF
+ if use bootstrap-prefix ; then
+ # bootstrap-prefix is only set during stage2 of bootstrapping
+ # Prefix, where EPREFIX is set to EPREFIX/tmp.
+ # Here we need to point it at the future lib dir of the stage3's
+ # EPREFIX.
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ -Wl,-rpath,${EPREFIX}/../usr/lib
+ EOF
+ fi
+ fi
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/metadata.xml b/sys-devel/clang-common/metadata.xml
index 3ad9b7a7c0eb..da45c87b0e27 100644
--- a/sys-devel/clang-common/metadata.xml
+++ b/sys-devel/clang-common/metadata.xml
@@ -4,4 +4,24 @@
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
+ <use>
+ <flag name="bootstrap-prefix">!!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for bootstrapping Gentoo Prefix</flag>
+ <flag name="cet">
+ Enable support for control flow hijacking protection.
+
+ On amd64, this provides Intel Control Flow Enforcement Technology (CET).
+
+ Only provides benefits on newer CPUs. For Intel, the CPU
+ must be at least as new as Tiger Lake. For AMD, it must be
+ at least as new as Zen 3. This is harmless on older CPUs,
+ but provides no benefit either.
+ </flag>
+ <flag name="default-compiler-rt">Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang</flag>
+ <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag>
+ <flag name="default-lld">Use lld as the default linker for clang</flag>
+ <flag name="stricter">Default to stricter behavior known from newer clang versions, turning more warnings into errors</flag>
+ </use>
</pkgmetadata>
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild
new file mode 100644
index 000000000000..2a6e3cd5239e
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos"
+
+RDEPEND="
+ sys-devel/clang:${SLOT}
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild
new file mode 100644
index 000000000000..4c77cf55e7da
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x64-macos"
+
+RDEPEND="
+ sys-devel/clang:${SLOT}
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild
new file mode 100644
index 000000000000..7604a7a58de0
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS=""
+PROPERTIES="live"
+
+RDEPEND="
+ sys-devel/clang:${SLOT}
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild
new file mode 100644
index 000000000000..7604a7a58de0
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev
+
+DESCRIPTION="Symlinks to a Clang crosscompiler"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS=""
+PROPERTIES="live"
+
+RDEPEND="
+ sys-devel/clang:${SLOT}
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ into "${llvm_path}"
+
+ for exe in "clang" "clang++" "clang-cpp"; do
+ newbin - "${CTARGET}-${exe}" <<-EOF
+ #!/bin/sh
+ exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@}
+ EOF
+ done
+
+ local tools=(
+ ${CTARGET}-clang-${SLOT}:${CTARGET}-clang
+ ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp
+ ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++
+ )
+
+ local t
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${llvm_path}/bin/${t%:*}"
+ done
+}
diff --git a/sys-devel/clang-crossdev-wrappers/metadata.xml b/sys-devel/clang-crossdev-wrappers/metadata.xml
new file mode 100644
index 000000000000..83615f23a338
--- /dev/null
+++ b/sys-devel/clang-crossdev-wrappers/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>cat@catcream.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-devel/clang-runtime/clang-runtime-12.0.1.ebuild b/sys-devel/clang-runtime/clang-runtime-12.0.1.ebuild
deleted file mode 100644
index 1b29ce1a433d..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-12.0.1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-build
-
-DESCRIPTION="Meta-ebuild for clang runtime libraries"
-HOMEPAGE="https://clang.llvm.org/"
-SRC_URI=""
-
-LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-
-RDEPEND="
- compiler-rt? (
- ~sys-libs/compiler-rt-${PV}:${SLOT}
- sanitize? ( ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT} )
- )
- libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )"
diff --git a/sys-devel/clang-runtime/clang-runtime-13.0.1.ebuild b/sys-devel/clang-runtime/clang-runtime-13.0.1.ebuild
deleted file mode 100644
index a81ecc3327a9..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-13.0.1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-build
-
-DESCRIPTION="Meta-ebuild for clang runtime libraries"
-HOMEPAGE="https://clang.llvm.org/"
-SRC_URI=""
-
-LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-
-RDEPEND="
- compiler-rt? (
- ~sys-libs/compiler-rt-${PV}:${SLOT}
- sanitize? ( ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT} )
- )
- libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )"
diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.1.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.1.ebuild
deleted file mode 100644
index 18c271cc01bb..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-14.0.1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-build
-
-DESCRIPTION="Meta-ebuild for clang runtime libraries"
-HOMEPAGE="https://clang.llvm.org/"
-SRC_URI=""
-
-LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-
-RDEPEND="
- compiler-rt? (
- ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- sanitize? (
- ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- )
- )
- libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )"
diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.3.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.3.ebuild
deleted file mode 100644
index f0ec98510540..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-14.0.3.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-build
-
-DESCRIPTION="Meta-ebuild for clang runtime libraries"
-HOMEPAGE="https://clang.llvm.org/"
-
-LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-
-RDEPEND="
- compiler-rt? (
- ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- sanitize? (
- ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- )
- )
- libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
-"
diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.4.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.4.ebuild
deleted file mode 100644
index 0bd1a498f6d9..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-14.0.4.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-build
-
-DESCRIPTION="Meta-ebuild for clang runtime libraries"
-HOMEPAGE="https://clang.llvm.org/"
-
-LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-
-RDEPEND="
- compiler-rt? (
- ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- sanitize? (
- ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- )
- )
- libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
-"
diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.5.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.5.ebuild
deleted file mode 100644
index f0ec98510540..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-14.0.5.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-build
-
-DESCRIPTION="Meta-ebuild for clang runtime libraries"
-HOMEPAGE="https://clang.llvm.org/"
-
-LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-
-RDEPEND="
- compiler-rt? (
- ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- sanitize? (
- ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- )
- )
- libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
-"
diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild
deleted file mode 100644
index f0ec98510540..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-build
-
-DESCRIPTION="Meta-ebuild for clang runtime libraries"
-HOMEPAGE="https://clang.llvm.org/"
-
-LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-
-RDEPEND="
- compiler-rt? (
- ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- sanitize? (
- ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
- )
- )
- libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
- openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
-"
diff --git a/sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild
index e4ff9326ddcb..c4f7620e1212 100644
--- a/sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -10,10 +10,9 @@ HOMEPAGE="https://clang.llvm.org/"
LICENSE="metapackage"
SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
IUSE="+compiler-rt libcxx openmp +sanitize"
REQUIRED_USE="sanitize? ( compiler-rt )"
-PROPERTIES="live"
RDEPEND="
compiler-rt? (
diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild
new file mode 100644
index 000000000000..25889f60d661
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ sanitize? (
+ ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+ if tc-is-clang; then
+ ewarn "You seem to be using clang as a system compiler. As of clang-16,"
+ ewarn "upstream has turned a few warnings that commonly occur during"
+ ewarn "configure script runs into errors by default. This causes some"
+ ewarn "configure tests to start failing, sometimes resulting in silent"
+ ewarn "breakage, missing functionality or runtime misbehavior. It is"
+ ewarn "not yet clear whether the change will remain or be reverted."
+ ewarn
+ ewarn "For more information, please see:"
+ ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+ fi
+}
diff --git a/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild
new file mode 100644
index 000000000000..25889f60d661
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ sanitize? (
+ ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+ if tc-is-clang; then
+ ewarn "You seem to be using clang as a system compiler. As of clang-16,"
+ ewarn "upstream has turned a few warnings that commonly occur during"
+ ewarn "configure script runs into errors by default. This causes some"
+ ewarn "configure tests to start failing, sometimes resulting in silent"
+ ewarn "breakage, missing functionality or runtime misbehavior. It is"
+ ewarn "not yet clear whether the change will remain or be reverted."
+ ewarn
+ ewarn "For more information, please see:"
+ ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+ fi
+}
diff --git a/sys-devel/clang-runtime/clang-runtime-18.1.4.ebuild b/sys-devel/clang-runtime/clang-runtime-18.1.4.ebuild
new file mode 100644
index 000000000000..38042f073a24
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-18.1.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ sanitize? (
+ ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+ if tc-is-clang; then
+ ewarn "You seem to be using clang as a system compiler. As of clang-16,"
+ ewarn "upstream has turned a few warnings that commonly occur during"
+ ewarn "configure script runs into errors by default. This causes some"
+ ewarn "configure tests to start failing, sometimes resulting in silent"
+ ewarn "breakage, missing functionality or runtime misbehavior. It is"
+ ewarn "not yet clear whether the change will remain or be reverted."
+ ewarn
+ ewarn "For more information, please see:"
+ ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+ fi
+}
diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..323c0b62c062
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ sanitize? (
+ ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+ if tc-is-clang; then
+ ewarn "You seem to be using clang as a system compiler. As of clang-16,"
+ ewarn "upstream has turned a few warnings that commonly occur during"
+ ewarn "configure script runs into errors by default. This causes some"
+ ewarn "configure tests to start failing, sometimes resulting in silent"
+ ewarn "breakage, missing functionality or runtime misbehavior. It is"
+ ewarn "not yet clear whether the change will remain or be reverted."
+ ewarn
+ ewarn "For more information, please see:"
+ ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+ fi
+}
diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..323c0b62c062
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ sanitize? (
+ ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+ if tc-is-clang; then
+ ewarn "You seem to be using clang as a system compiler. As of clang-16,"
+ ewarn "upstream has turned a few warnings that commonly occur during"
+ ewarn "configure script runs into errors by default. This causes some"
+ ewarn "configure tests to start failing, sometimes resulting in silent"
+ ewarn "breakage, missing functionality or runtime misbehavior. It is"
+ ewarn "not yet clear whether the change will remain or be reverted."
+ ewarn
+ ewarn "For more information, please see:"
+ ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+ fi
+}
diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..323c0b62c062
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ sanitize? (
+ ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+ if tc-is-clang; then
+ ewarn "You seem to be using clang as a system compiler. As of clang-16,"
+ ewarn "upstream has turned a few warnings that commonly occur during"
+ ewarn "configure script runs into errors by default. This causes some"
+ ewarn "configure tests to start failing, sometimes resulting in silent"
+ ewarn "breakage, missing functionality or runtime misbehavior. It is"
+ ewarn "not yet clear whether the change will remain or be reverted."
+ ewarn
+ ewarn "For more information, please see:"
+ ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+ fi
+}
diff --git a/sys-devel/clang-runtime/metadata.xml b/sys-devel/clang-runtime/metadata.xml
index 2180b1b16681..83929061543f 100644
--- a/sys-devel/clang-runtime/metadata.xml
+++ b/sys-devel/clang-runtime/metadata.xml
@@ -10,4 +10,7 @@
<flag name="openmp">Install <pkg>sys-libs/libomp</pkg> for -fopenmp support</flag>
<flag name="sanitize">Enable compiler-rt sanitizer (-fsanitize*) support</flag>
</use>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild
new file mode 100644
index 000000000000..988214f580c9
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use Clang on GCC-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos"
+IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
+
+# Blocker for bug #872416
+RDEPEND="
+ !<sys-devel/gcc-config-2.6
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local tools=()
+
+ if use native-symlinks; then
+ tools+=(
+ cc:clang
+ cpp:clang-cpp
+ c++:clang++
+ )
+ fi
+ if use gcc-symlinks; then
+ tools+=(
+ gcc:clang
+ g++:clang++
+ )
+ fi
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${t%:*}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+ done
+ done
+}
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
new file mode 100644
index 000000000000..436e2673639f
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use Clang on GCC-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos"
+IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
+
+# Blocker for bug #872416
+RDEPEND="
+ !<sys-devel/gcc-config-2.6
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local tools=()
+
+ if use native-symlinks; then
+ tools+=(
+ cc:clang
+ cpp:clang-cpp
+ c++:clang++
+ )
+ fi
+ if use gcc-symlinks; then
+ tools+=(
+ gcc:clang
+ g++:clang++
+ )
+ fi
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${t%:*}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+ done
+ done
+}
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild
new file mode 100644
index 000000000000..436e2673639f
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use Clang on GCC-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos"
+IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
+
+# Blocker for bug #872416
+RDEPEND="
+ !<sys-devel/gcc-config-2.6
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local tools=()
+
+ if use native-symlinks; then
+ tools+=(
+ cc:clang
+ cpp:clang-cpp
+ c++:clang++
+ )
+ fi
+ if use gcc-symlinks; then
+ tools+=(
+ gcc:clang
+ g++:clang++
+ )
+ fi
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${t%:*}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+ done
+ done
+}
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild
new file mode 100644
index 000000000000..5cfe92aa27da
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use Clang on GCC-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos"
+IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
+
+# Blocker for bug #872416
+RDEPEND="
+ !<sys-devel/gcc-config-2.6
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local tools=()
+
+ if use native-symlinks; then
+ tools+=(
+ cc:clang
+ cpp:clang-cpp
+ c++:clang++
+ )
+ fi
+ if use gcc-symlinks; then
+ tools+=(
+ gcc:clang
+ g++:clang++
+ )
+ fi
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${t%:*}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+ done
+ done
+}
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild
new file mode 100644
index 000000000000..3496a0f89b67
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use Clang on GCC-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
+
+# Blocker for bug #872416
+RDEPEND="
+ !<sys-devel/gcc-config-2.6
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local tools=()
+
+ if use native-symlinks; then
+ tools+=(
+ cc:clang
+ cpp:clang-cpp
+ c++:clang++
+ )
+ fi
+ if use gcc-symlinks; then
+ tools+=(
+ gcc:clang
+ g++:clang++
+ )
+ fi
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${t%:*}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+ done
+ done
+}
diff --git a/sys-devel/clang-toolchain-symlinks/metadata.xml b/sys-devel/clang-toolchain-symlinks/metadata.xml
new file mode 100644
index 000000000000..bf4e9fc6a6ca
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="gcc-symlinks">
+ Install symlinks for 'gcc' and 'g++' for extra
+ compatibility.
+ </flag>
+ <flag name="multilib-symlinks">
+ Install symlinks for all ABI CHOSTs. Note that this can
+ result in gcc being overrode for native builds, as well
+ as conflict with crossdev if used for the same targets.
+ </flag>
+ <flag name="native-symlinks">
+ Install generic tool symlinks like 'cc' and 'c++',
+ as well as ${CTARGET}-*. These symlinks are installed
+ into slotted LLVM bindir, so they should not take precedence
+ over symlinks installed into /usr/bin
+ by <pkg>sys-devel/gcc-config</pkg> but they can be helpful
+ for GCC-free setups.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index a3098c8a1b7f..ca97e13c826f 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -1,24 +1,17 @@
-DIST llvm-12.0.1-manpages.tar.bz2 191582 BLAKE2B a049cd305c257875d47e92d703c51aee8225854f999eddbd530c7a978704a981b05bc0819ba31a2f2a218d3569b078f0deb01b0eeb385966253b54a0fdc090d1 SHA512 9931a57f843709aed59193524fe980af695e4e23c8f53ec3cff308677ba4fc520ca58032b50b68440c7762305855317d9a705fe5ccbb543fb104f4deb5d10ea5
-DIST llvm-13.0.1-manpages.tar.bz2 202187 BLAKE2B 32a761426dbe4c3c355d30660254305cd88b6d513faee04c78e370cea9d38761108a9be4c4b4ac39b6a74400af1f9d37ffd11ab05acd7340175c8d66845ae7d9 SHA512 9495e1daf588540fdb8b9ee905a9b6be4693bd70b7f42c8e8a0d667242fc24dc853c45918d3bc09d02f0761ad61541bc9749c1498e312da129abdab638a0d572
-DIST llvm-14.0.1-manpages.tar.bz2 86273 BLAKE2B 174b412568565bdd4c3db34b1b2f2482a18ca45a0a6269ca381fe5c77da21b85dafabad29551b262d593006e9b68e6f7fdf43c2ec626204970d1280dd87a5f3d SHA512 49c58094eebecfadff97d62b4e6b0129e07c52ad7fe3ea4ce5c955e6fc9c73ac443b6a6e0f8322cf25e1d88b059c4231c4798d8da04340a46f6f84fb1b386f29
-DIST llvm-14.0.3-manpages.tar.bz2 217443 BLAKE2B ebea48d9015bb0b53e8b799d8d79ac7a8d03f55440e5d3a08a9ce6c8f106c3f37e597c46aaf824dfee87c222775630299a5c277b4b29d43e831116c12932675a SHA512 db762ff7bfde28147276cacb5c5753a1bb4dd08dc8840423d6fc073629cd97bc3c7f54402cb17aa00cfc06f9f775f7ac9478c2661cacf86d5517a968d290beb3
-DIST llvm-14.0.4-manpages.tar.bz2 214161 BLAKE2B 9e8a0a78cce26b0e5235750a2af99542a496d34726046fbfa3274a22a55a75b3210c4af49e768130515c636ae3d6350f909ccb601888c276ce8cbd6b029b7172 SHA512 793dcbac320d26d26c637f2d38de0a55f5a91d13c93fa1aa2753103a07720248ffc16e8f1914ce81e8c291f02797360c052c23b027d773ac05a5563744313828
-DIST llvm-14.0.5-manpages.tar.bz2 217258 BLAKE2B 617f454e8d05f644ba1314d0bf72446e00058a547858469442017fffdd4c629f9240b96fb2107bee0aae7e5e85cfa35a21c072378bb2d0bc8260d1c021751f9d SHA512 051f154e3498dca3da420cafedd4ea4e43bbdb1eaf95f5c15107b05cedbaea4bf2d6b4c9567a95f0b8e513173c975e637391055bcd4802dcd0339b88b23da648
-DIST llvm-14.0.6-manpages.tar.bz2 214038 BLAKE2B c1ec35a5eeb35b720bf9a3a5ea9820eceaa26d9030a876772aca25dd47f8848500b94309ae9e6f3e9bc16e083d91747664e16b01dec06897e294e55fbf6f5cb3 SHA512 ea22af2f6cbfd3183f4e9ba5638e2667ca48562519bd679744d86778fed8da97173a25f57671aa67bcb45a7e4c8fd6cbbf461589a8611e1c8eb1b9eda7cc430f
-DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01
-DIST llvm-gentoo-patchset-14.0.1-r1.tar.xz 6132 BLAKE2B c99f57a09f214361f2728938ec587e3ef0b473363919058e39fb75c012cc94771b9116b1820f1bd001151eb5f49cc6beaa7572e60e4095811fffb12717a8c5a8 SHA512 af9eca93c9ba91429b0bb07290dce1c9742338dd0635423bc59ebead91a7493a49b66bd36a7ce4cf715fa660678218f64e0ba85824a0869b8e31b81be9f0bb3d
-DIST llvm-gentoo-patchset-14.0.3.tar.xz 5492 BLAKE2B 48a46d50a81c5572d1573c6923bc404b198f74ee8587a928e0858553dac37f7fa39cc969d72b938ef3d2f04f6872f9e2e2478821ab90c657ecbbacb3f7d99d7a SHA512 b917b549de6d46cd7aab3e59b888b5e5ffb955435b33d6538be2f31dc30217a24740a673cb6bb661087c245121edb079052b179badaf70b86b985ca69b3652a6
-DIST llvm-gentoo-patchset-14.0.4.tar.xz 4072 BLAKE2B cbd8804e33069ca2709503931545a57cfd33c06f28696d876d499285e9add9487a069495b756bbb94d29a162c39ece651defddd302e3ac523c5484c09fb3d2ea SHA512 db00268d01e7ec99b907321384c02468a53020386ee4fc819fabfc1cd0784323044931dac42437968d5fd37190da1b9f8f847af553a65a0595c33cecfd82c293
-DIST llvm-gentoo-patchset-14.0.5.tar.xz 4072 BLAKE2B c35072f70831d5e3c9f7236f8473b098e6b8da4f27ce6a382ff4d3cd235837b25b9a1bc1e406ce0d3feb05e4d1e1c8bf141ff8f218568d5a5339fd1092f86b62 SHA512 646e0515a6cf1aae86f05db4797d7af6e3c9b8a6070f41cbd36535944029e0e5888128e33d8c44af22b5bb9ccba392b9dfeabc7708e5eab11858edefced6b68d
-DIST llvm-gentoo-patchset-14.0.6.tar.xz 4544 BLAKE2B b613582fa048837303168a2d62835688128621236022ca6c232293cb2e4549174ef256e7dcd8303bfef6d5456d0459ddb2cbda4a4d323b82901da4c16f15dcc4 SHA512 fb89a3186c5bffdc6245ed103d79fe6802a86986bd43891b7e128955bd546dffcb5b4083ac9e7966f67ce8dd82322756a11428ab4c62d21f012d614062adab35
-DIST llvm-gentoo-patchset-9999-r3.tar.xz 4076 BLAKE2B 30bdf740606a1718ae45d850803385d425b656fbbe0250f587cad54f55272e3617d5ee0d04f534a58f87408b0a2dea322ebf1bb8cd653a2beba21d0bc5778c62 SHA512 2c7080ffd09d7dcf4c72a97044a5c63ab895250721d60270bc51c2095aef5f9039781892b4c0d14e942611686153f874a1f52a1c854bb8ca093383c08bdc005a
-DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5
-DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7
-DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
-DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
-DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2
-DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646
-DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959
+DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49
+DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b
+DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b53f11a37a23effea41a12322f6908bbe702dc1a97bfd10293061f01f1dbff8693e9324ab3dce2551e78eab128dbd7fea30 SHA512 963ff1b7aa0cb01ed0c0356a0adc3a315d94e78035e928dc81464f553e722633a17596e421c248968e87e22ae66f1ab9cccda5fd3388d1a6d34b5e9c6140ebcb
+DIST llvm-18.1.0-manpages.tar.bz2 270429 BLAKE2B d85d6e23197184dc512019c25805af0aa145eefb4c36215807c1ba70ad47943c05c06dbaafd84a7e6487bdd83814e03277374e095d97b129e3fc8d468c10741c SHA512 5f492c85fad4e04e0148ea509f4b6520de9e2765c51e617363a11aa8e47c2d847f6b0897958ca1d93bccf0f6a9150868b7e04c728bd430c05bf2da30bdeba6cc
+DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df
+DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825
+DIST llvm-gentoo-patchset-17.0.6-r1.tar.xz 2792 BLAKE2B b4e9014179edd96add0c932b16d3a95a5d7a905298052164ff668590108c83cd4f938d42b6d801efedae28a959b03b2bc3c7cd2a4cad20ef2b3c7aa9a3d0c15d SHA512 73a46aa9f6f2ac6334a073733aa082a12f97fb6a2750d5930af4eb1639cd192f3a17ea87c2f17947f04c68a5f60e37d9bc27ede8bab75531599edfb4c3aa8ffe
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-devel/clang/clang-12.0.1.ebuild b/sys-devel/clang/clang-12.0.1.ebuild
deleted file mode 100644
index fde58c87f658..000000000000
--- a/sys-devel/clang/clang-12.0.1.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org multilib multilib-minimal \
- prefix python-single-r1 toolchain-funcs
-
-DESCRIPTION="C language family frontend for LLVM"
-HOMEPAGE="https://llvm.org/"
-
-# Keep in sync with sys-devel/llvm
-ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY VE )
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
- "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-
-# MSVCSetupApi.h: MIT
-# sorttable.js: MIT
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x64-macos"
-IUSE="debug default-compiler-rt default-libcxx default-lld
- doc llvm-libunwind +static-analyzer test xml ${ALL_LLVM_TARGETS[*]}"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- || ( ${ALL_LLVM_TARGETS[*]} )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
- static-analyzer? ( dev-lang/perl:* )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- ${PYTHON_DEPS}"
-for x in "${ALL_LLVM_TARGETS[@]}"; do
- RDEPEND+="
- ${x}? ( ~sys-devel/llvm-${PV}:${SLOT}[${x}] )"
-done
-unset x
-
-DEPEND="${RDEPEND}"
-BDEPEND="
- >=dev-util/cmake-3.16
- doc? ( dev-python/sphinx )
- xml? ( virtual/pkgconfig )
- ${PYTHON_DEPS}"
-PDEPEND="
- sys-devel/clang-common
- ~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )"
-
-LLVM_COMPONENTS=( clang clang-tools-extra )
-LLVM_MANPAGES=1
-LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
-)
-LLVM_PATCHSET=12.0.1
-llvm.org_set_globals
-
-# Multilib notes:
-# 1. ABI_* flags control ABIs libclang* is built for only.
-# 2. clang is always capable of compiling code for all ABIs for enabled
-# target. However, you will need appropriate crt* files (installed
-# e.g. by sys-devel/gcc and sys-libs/glibc).
-# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
-# in the current profile (i.e. alike supported by sys-devel/gcc).
-#
-# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
-# multilib clang* libraries (not runtime, not wrappers).
-
-pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # create extra parent dir for relative CLANG_RESOURCE_DIR access
- mkdir -p x/y || die
- BUILD_DIR=${WORKDIR}/x/y/clang
-
- llvm.org_src_prepare
-
- # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
- eprefixify \
- lib/Frontend/InitHeaderSearch.cpp \
- lib/Driver/ToolChains/Darwin.cpp || die
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # meta-targets
- clang-libraries|distribution)
- continue
- ;;
- # headers for clang-tidy static library
- clang-tidy-headers)
- continue
- ;;
- # tools
- clang|clangd|clang-*)
- ;;
- # static libraries
- clang*|findAllSymbols)
- continue
- ;;
- # conditional to USE=doc
- docs-clang-html|docs-clang-tools-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # common stuff
- clang-cmake-exports
- clang-headers
- clang-resource-headers
- libclang-headers
-
- # libs
- clang-cpp
- libclang
- )
-
- if multilib_is_native_abi; then
- out+=(
- # common stuff
- bash-autocomplete
- libclang-python-bindings
-
- # tools
- c-index-test
- clang
- clang-format
- clang-offload-bundler
- clang-offload-wrapper
- clang-refactor
- clang-rename
- clang-scan-deps
- diagtool
- hmaptool
-
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clangd
- find-all-symbols
- modularize
- pp-trace
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
- )
- fi
-
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
-
- use static-analyzer && out+=(
- clang-check
- clang-extdef-mapping
- scan-build
- scan-view
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
- local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- # relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
-
- -DBUILD_SHARED_LIBS=OFF
- -DCLANG_LINK_CLANG_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- # these are not propagated reliably, so redefine them
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- # libgomp support fails to find headers without explicit -I
- # furthermore, it provides only syntax checking
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
-
- # disable using CUDA to autodetect GPU, just build for all
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
-
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
- -DLLVM_ENABLE_SPHINX=ON
- -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
- mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
- -DCLANG_INCLUDE_DOCS=${build_docs}
- -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
- )
- else
- mycmakeargs+=(
- -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
-
- if [[ -n ${EPREFIX} ]]; then
- mycmakeargs+=(
- -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
- )
- fi
-
- if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
- )
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- # provide a symlink for tests
- if [[ ! -L ${WORKDIR}/lib/clang ]]; then
- mkdir -p "${WORKDIR}"/lib || die
- ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
-}
-
-src_install() {
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/clang/Config/config.h
- )
-
- multilib-minimal_src_install
-
- # Move runtime headers to /usr/lib/clang, where they belong
- mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
- # move (remaining) wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-
- # Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
- local clang_tools=( clang clang++ clang-cl clang-cpp )
- local abi i
-
- # cmake gives us:
- # - clang-X
- # - clang -> clang-X
- # - clang++, clang-cl, clang-cpp -> clang
- # we want to have:
- # - clang-X
- # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
- # - clang, clang++, clang-cl, clang-cpp -> clang*-X
- # also in CHOST variant
- for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
- done
-
- # now create target symlinks for all supported ABIs
- for abi in $(get_all_abis); do
- local abi_chost=$(get_abi_CHOST "${abi}")
- for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
- done
- done
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping & ABI mismatch checks
- # (also drop the version suffix from runtime headers)
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
-}
-
-multilib_src_install_all() {
- python_fix_shebang "${ED}"
- if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
- fi
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
- # match 'html' non-compression
- use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
- # +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow update all
- fi
-
- elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
-}
-
-pkg_postrm() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow clean all
- fi
-}
diff --git a/sys-devel/clang/clang-13.0.1.ebuild b/sys-devel/clang/clang-13.0.1.ebuild
deleted file mode 100644
index ad43beaccb8f..000000000000
--- a/sys-devel/clang/clang-13.0.1.ebuild
+++ /dev/null
@@ -1,422 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org multilib multilib-minimal \
- prefix python-single-r1 toolchain-funcs
-
-DESCRIPTION="C language family frontend for LLVM"
-HOMEPAGE="https://llvm.org/"
-
-# MSVCSetupApi.h: MIT
-# sorttable.js: MIT
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x64-macos"
-IUSE="debug default-compiler-rt default-libcxx default-lld
- doc llvm-libunwind +static-analyzer test xml"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
- static-analyzer? ( dev-lang/perl:* )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- ${PYTHON_DEPS}"
-
-DEPEND="${RDEPEND}"
-BDEPEND="
- >=dev-util/cmake-3.16
- doc? ( dev-python/sphinx )
- xml? ( virtual/pkgconfig )
- ${PYTHON_DEPS}"
-PDEPEND="
- sys-devel/clang-common
- ~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )"
-
-LLVM_COMPONENTS=( clang clang-tools-extra )
-LLVM_MANPAGES=1
-LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
-)
-LLVM_PATCHSET=${PV/_/-}
-LLVM_USE_TARGETS=llvm
-llvm.org_set_globals
-
-# Multilib notes:
-# 1. ABI_* flags control ABIs libclang* is built for only.
-# 2. clang is always capable of compiling code for all ABIs for enabled
-# target. However, you will need appropriate crt* files (installed
-# e.g. by sys-devel/gcc and sys-libs/glibc).
-# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
-# in the current profile (i.e. alike supported by sys-devel/gcc).
-#
-# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
-# multilib clang* libraries (not runtime, not wrappers).
-
-pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # create extra parent dir for relative CLANG_RESOURCE_DIR access
- mkdir -p x/y || die
- BUILD_DIR=${WORKDIR}/x/y/clang
-
- llvm.org_src_prepare
-
- # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
- eprefixify \
- lib/Frontend/InitHeaderSearch.cpp \
- lib/Driver/ToolChains/Darwin.cpp || die
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # meta-targets
- clang-libraries|distribution)
- continue
- ;;
- # headers for clang-tidy static library
- clang-tidy-headers)
- continue
- ;;
- # tools
- clang|clangd|clang-*)
- ;;
- # static libraries
- clang*|findAllSymbols)
- continue
- ;;
- # conditional to USE=doc
- docs-clang-html|docs-clang-tools-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # common stuff
- clang-cmake-exports
- clang-headers
- clang-resource-headers
- libclang-headers
-
- # libs
- clang-cpp
- libclang
- )
-
- if multilib_is_native_abi; then
- out+=(
- # common stuff
- bash-autocomplete
- libclang-python-bindings
-
- # tools
- c-index-test
- clang
- clang-format
- clang-offload-bundler
- clang-offload-wrapper
- clang-refactor
- clang-repl
- clang-rename
- clang-scan-deps
- diagtool
- hmaptool
-
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clangd
- find-all-symbols
- modularize
- pp-trace
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
- )
- fi
-
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
-
- use static-analyzer && out+=(
- clang-check
- clang-extdef-mapping
- scan-build
- scan-build-py
- scan-view
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
- local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- # relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
-
- -DBUILD_SHARED_LIBS=OFF
- -DCLANG_LINK_CLANG_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- # these are not propagated reliably, so redefine them
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- # libgomp support fails to find headers without explicit -I
- # furthermore, it provides only syntax checking
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
-
- # disable using CUDA to autodetect GPU, just build for all
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
-
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
- -DLLVM_ENABLE_SPHINX=ON
- -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
- mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
- -DCLANG_INCLUDE_DOCS=${build_docs}
- -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
- )
- else
- mycmakeargs+=(
- -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
-
- if [[ -n ${EPREFIX} ]]; then
- mycmakeargs+=(
- -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
- )
- fi
-
- if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
- )
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- # provide a symlink for tests
- if [[ ! -L ${WORKDIR}/lib/clang ]]; then
- mkdir -p "${WORKDIR}"/lib || die
- ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
-}
-
-src_install() {
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/clang/Config/config.h
- )
-
- multilib-minimal_src_install
-
- # Move runtime headers to /usr/lib/clang, where they belong
- mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
- # move (remaining) wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-
- # Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
- local clang_tools=( clang clang++ clang-cl clang-cpp )
- local abi i
-
- # cmake gives us:
- # - clang-X
- # - clang -> clang-X
- # - clang++, clang-cl, clang-cpp -> clang
- # we want to have:
- # - clang-X
- # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
- # - clang, clang++, clang-cl, clang-cpp -> clang*-X
- # also in CHOST variant
- for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
- done
-
- # now create target symlinks for all supported ABIs
- for abi in $(get_all_abis); do
- local abi_chost=$(get_abi_CHOST "${abi}")
- for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
- done
- done
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping & ABI mismatch checks
- # (also drop the version suffix from runtime headers)
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
-}
-
-multilib_src_install_all() {
- python_fix_shebang "${ED}"
- if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
- fi
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
- # match 'html' non-compression
- use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
- # +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow update all
- fi
-
- elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
-}
-
-pkg_postrm() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow clean all
- fi
-}
diff --git a/sys-devel/clang/clang-14.0.1-r1.ebuild b/sys-devel/clang/clang-14.0.1-r1.ebuild
deleted file mode 100644
index 56d63fbd72f7..000000000000
--- a/sys-devel/clang/clang-14.0.1-r1.ebuild
+++ /dev/null
@@ -1,433 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org multilib multilib-minimal \
- prefix python-single-r1 toolchain-funcs
-
-DESCRIPTION="C language family frontend for LLVM"
-HOMEPAGE="https://llvm.org/"
-
-# MSVCSetupApi.h: MIT
-# sorttable.js: MIT
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
-IUSE="debug default-compiler-rt default-libcxx default-lld
- doc llvm-libunwind +pie +static-analyzer test xml"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
- static-analyzer? ( dev-lang/perl:* )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- ${PYTHON_DEPS}"
-
-DEPEND="${RDEPEND}"
-BDEPEND="
- >=dev-util/cmake-3.16
- doc? ( $(python_gen_cond_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
- xml? ( virtual/pkgconfig )
- ${PYTHON_DEPS}"
-PDEPEND="
- sys-devel/clang-common
- ~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )"
-
-LLVM_COMPONENTS=(
- clang clang-tools-extra cmake
- llvm/lib/Transforms/Hello
-)
-LLVM_MANPAGES=1
-LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
-)
-LLVM_PATCHSET=14.0.1-r1
-LLVM_USE_TARGETS=llvm
-llvm.org_set_globals
-
-# Multilib notes:
-# 1. ABI_* flags control ABIs libclang* is built for only.
-# 2. clang is always capable of compiling code for all ABIs for enabled
-# target. However, you will need appropriate crt* files (installed
-# e.g. by sys-devel/gcc and sys-libs/glibc).
-# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
-# in the current profile (i.e. alike supported by sys-devel/gcc).
-#
-# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
-# multilib clang* libraries (not runtime, not wrappers).
-
-pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # create extra parent dir for relative CLANG_RESOURCE_DIR access
- mkdir -p x/y || die
- BUILD_DIR=${WORKDIR}/x/y/clang
-
- llvm.org_src_prepare
-
- # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
- eprefixify \
- lib/Lex/InitHeaderSearch.cpp \
- lib/Driver/ToolChains/Darwin.cpp || die
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # meta-targets
- clang-libraries|distribution)
- continue
- ;;
- # tools
- clang|clangd|clang-*)
- ;;
- # static libraries
- clang*|findAllSymbols)
- continue
- ;;
- # conditional to USE=doc
- docs-clang-html|docs-clang-tools-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # common stuff
- clang-cmake-exports
- clang-headers
- clang-resource-headers
- libclang-headers
-
- # libs
- clang-cpp
- libclang
- )
-
- if multilib_is_native_abi; then
- out+=(
- # common stuff
- bash-autocomplete
- libclang-python-bindings
-
- # tools
- c-index-test
- clang
- clang-format
- clang-offload-bundler
- clang-offload-wrapper
- clang-refactor
- clang-repl
- clang-rename
- clang-scan-deps
- diagtool
- hmaptool
-
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clang-tidy-headers
- clangd
- find-all-symbols
- modularize
- pp-trace
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
- )
- fi
-
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
-
- use static-analyzer && out+=(
- clang-check
- clang-extdef-mapping
- scan-build
- scan-build-py
- scan-view
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
- local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- # relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
-
- -DBUILD_SHARED_LIBS=OFF
- -DCLANG_LINK_CLANG_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- # these are not propagated reliably, so redefine them
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- # libgomp support fails to find headers without explicit -I
- # furthermore, it provides only syntax checking
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
-
- # disable using CUDA to autodetect GPU, just build for all
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
-
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
- -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
- -DLLVM_ENABLE_SPHINX=ON
- -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
- mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
- -DCLANG_INCLUDE_DOCS=${build_docs}
- -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
- )
- else
- mycmakeargs+=(
- -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
-
- if [[ -n ${EPREFIX} ]]; then
- mycmakeargs+=(
- -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
- )
- fi
-
- if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
- )
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- # provide a symlink for tests
- if [[ ! -L ${WORKDIR}/lib/clang ]]; then
- mkdir -p "${WORKDIR}"/lib || die
- ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
-}
-
-src_install() {
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/clang/Config/config.h
- )
-
- multilib-minimal_src_install
-
- # Move runtime headers to /usr/lib/clang, where they belong
- mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
- # move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-
- # Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
- local clang_tools=( clang clang++ clang-cl clang-cpp )
- local abi i
-
- # cmake gives us:
- # - clang-X
- # - clang -> clang-X
- # - clang++, clang-cl, clang-cpp -> clang
- # we want to have:
- # - clang-X
- # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
- # - clang, clang++, clang-cl, clang-cpp -> clang*-X
- # also in CHOST variant
- for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
- done
-
- # now create target symlinks for all supported ABIs
- for abi in $(get_all_abis); do
- local abi_chost=$(get_abi_CHOST "${abi}")
- for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
- done
- done
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping & ABI mismatch checks
- # (also drop the version suffix from runtime headers)
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
- # don't wrap clang-tidy headers, the list is too long
- # (they're fine for non-native ABI but enabling the targets is problematic)
- mv "${ED}"/usr/include/clang-tidy "${T}/" || die
- fi
-}
-
-multilib_src_install_all() {
- python_fix_shebang "${ED}"
- if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
- fi
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
- # match 'html' non-compression
- use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
- # +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow update all
- fi
-
- elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
-}
-
-pkg_postrm() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow clean all
- fi
-}
diff --git a/sys-devel/clang/clang-15.0.0.9999.ebuild b/sys-devel/clang/clang-15.0.0.9999.ebuild
deleted file mode 100644
index e1960cb92f18..000000000000
--- a/sys-devel/clang/clang-15.0.0.9999.ebuild
+++ /dev/null
@@ -1,440 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org multilib multilib-minimal \
- prefix python-single-r1 toolchain-funcs
-
-DESCRIPTION="C language family frontend for LLVM"
-HOMEPAGE="https://llvm.org/"
-
-# MSVCSetupApi.h: MIT
-# sorttable.js: MIT
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS=""
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
- static-analyzer? ( dev-lang/perl:* )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
-"
-
-RDEPEND="
- ${PYTHON_DEPS}
- ${DEPEND}
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-util/cmake-3.16
- doc? ( $(python_gen_cond_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
- xml? ( virtual/pkgconfig )
-"
-PDEPEND="
- sys-devel/clang-common
- ~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
-"
-
-LLVM_COMPONENTS=(
- clang clang-tools-extra cmake
- llvm/lib/Transforms/Hello
-)
-LLVM_MANPAGES=1
-LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
-)
-LLVM_PATCHSET=9999-r3
-LLVM_USE_TARGETS=llvm
-llvm.org_set_globals
-
-# Multilib notes:
-# 1. ABI_* flags control ABIs libclang* is built for only.
-# 2. clang is always capable of compiling code for all ABIs for enabled
-# target. However, you will need appropriate crt* files (installed
-# e.g. by sys-devel/gcc and sys-libs/glibc).
-# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
-# in the current profile (i.e. alike supported by sys-devel/gcc).
-#
-# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
-# multilib clang* libraries (not runtime, not wrappers).
-
-pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # create extra parent dir for relative CLANG_RESOURCE_DIR access
- mkdir -p x/y || die
- BUILD_DIR=${WORKDIR}/x/y/clang
-
- llvm.org_src_prepare
-
- # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
- eprefixify \
- lib/Lex/InitHeaderSearch.cpp \
- lib/Driver/ToolChains/Darwin.cpp || die
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # meta-targets
- clang-libraries|distribution)
- continue
- ;;
- # tools
- clang|clangd|clang-*)
- ;;
- # static libraries
- clang*|findAllSymbols)
- continue
- ;;
- # conditional to USE=doc
- docs-clang-html|docs-clang-tools-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # common stuff
- clang-cmake-exports
- clang-headers
- clang-resource-headers
- libclang-headers
-
- # libs
- clang-cpp
- libclang
- )
-
- if multilib_is_native_abi; then
- out+=(
- # common stuff
- bash-autocomplete
- libclang-python-bindings
-
- # tools
- c-index-test
- clang
- clang-format
- clang-offload-bundler
- clang-offload-wrapper
- clang-refactor
- clang-repl
- clang-rename
- clang-scan-deps
- diagtool
- hmaptool
-
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clang-tidy-headers
- clangd
- find-all-symbols
- modularize
- pp-trace
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
- )
- fi
-
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
-
- use static-analyzer && out+=(
- clang-check
- clang-extdef-mapping
- scan-build
- scan-build-py
- scan-view
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
- local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- # relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
-
- -DBUILD_SHARED_LIBS=OFF
- -DCLANG_LINK_CLANG_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- # these are not propagated reliably, so redefine them
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- # libgomp support fails to find headers without explicit -I
- # furthermore, it provides only syntax checking
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
-
- # disable using CUDA to autodetect GPU, just build for all
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
-
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
- -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
- -DLLVM_ENABLE_SPHINX=ON
- -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
- mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
- -DCLANG_INCLUDE_DOCS=${build_docs}
- -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
- )
- else
- mycmakeargs+=(
- -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
-
- if [[ -n ${EPREFIX} ]]; then
- mycmakeargs+=(
- -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
- )
- fi
-
- if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
- )
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- # provide a symlink for tests
- if [[ ! -L ${WORKDIR}/lib/clang ]]; then
- mkdir -p "${WORKDIR}"/lib || die
- ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
-}
-
-src_install() {
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/clang/Config/config.h
- )
-
- multilib-minimal_src_install
-
- # Move runtime headers to /usr/lib/clang, where they belong
- mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
- # move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-
- # Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
- local clang_tools=( clang clang++ clang-cl clang-cpp )
- local abi i
-
- # cmake gives us:
- # - clang-X
- # - clang -> clang-X
- # - clang++, clang-cl, clang-cpp -> clang
- # we want to have:
- # - clang-X
- # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
- # - clang, clang++, clang-cl, clang-cpp -> clang*-X
- # also in CHOST variant
- for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
- done
-
- # now create target symlinks for all supported ABIs
- for abi in $(get_all_abis); do
- local abi_chost=$(get_abi_CHOST "${abi}")
- for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
- done
- done
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping & ABI mismatch checks
- # (also drop the version suffix from runtime headers)
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
- # don't wrap clang-tidy headers, the list is too long
- # (they're fine for non-native ABI but enabling the targets is problematic)
- mv "${ED}"/usr/include/clang-tidy "${T}/" || die
- fi
-}
-
-multilib_src_install_all() {
- python_fix_shebang "${ED}"
- if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
- fi
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
- # match 'html' non-compression
- use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
- # +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow update all
- fi
-
- elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
-}
-
-pkg_postrm() {
- if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow clean all
- fi
-}
diff --git a/sys-devel/clang/clang-14.0.5.ebuild b/sys-devel/clang/clang-15.0.7-r3.ebuild
index ed84f3755fa2..131afb227f0e 100644
--- a/sys-devel/clang/clang-14.0.5.ebuild
+++ b/sys-devel/clang/clang-15.0.7-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit cmake llvm llvm.org multilib multilib-minimal \
prefix python-single-r1 toolchain-funcs
@@ -14,17 +14,14 @@ HOMEPAGE="https://llvm.org/"
# sorttable.js: MIT
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}g1"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
static-analyzer? ( dev-lang/perl:* )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
"
@@ -32,10 +29,10 @@ DEPEND="
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
+ >=sys-devel/clang-common-${PV}
"
BDEPEND="
${PYTHON_DEPS}
- >=dev-util/cmake-3.16
doc? ( $(python_gen_cond_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
@@ -43,15 +40,8 @@ BDEPEND="
xml? ( virtual/pkgconfig )
"
PDEPEND="
- sys-devel/clang-common
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
"
LLVM_COMPONENTS=(
@@ -64,7 +54,7 @@ LLVM_TEST_COMPONENTS=(
llvm/utils/{lit,llvm-lit,unittest}
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
)
-LLVM_PATCHSET=${PV}
+LLVM_PATCHSET=${PV/_/-}-r3
LLVM_USE_TARGETS=llvm
llvm.org_set_globals
@@ -80,7 +70,7 @@ llvm.org_set_globals
# multilib clang* libraries (not runtime, not wrappers).
pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-single-r1_pkg_setup
}
@@ -95,6 +85,10 @@ src_prepare() {
eprefixify \
lib/Lex/InitHeaderSearch.cpp \
lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
}
check_distribution_components() {
@@ -164,6 +158,27 @@ get_distribution_components() {
clang-resource-headers
libclang-headers
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
# libs
clang-cpp
libclang
@@ -180,6 +195,7 @@ get_distribution_components() {
clang
clang-format
clang-offload-bundler
+ clang-offload-packager
clang-offload-wrapper
clang-refactor
clang-repl
@@ -188,34 +204,39 @@ get_distribution_components() {
diagtool
hmaptool
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clang-tidy-headers
- clangd
- find-all-symbols
- modularize
- pp-trace
+ # needed for cross-compiling Clang
+ clang-tblgen
)
- if llvm_are_manpages_built; then
+ if use extra; then
out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
)
fi
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
use static-analyzer && out+=(
clang-check
@@ -230,15 +251,13 @@ get_distribution_components() {
}
multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
# relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_VERSION}"
-DBUILD_SHARED_LIBS=OFF
-DCLANG_LINK_CLANG_DYLIB=ON
@@ -259,18 +278,20 @@ multilib_src_configure() {
# disable using CUDA to autodetect GPU, just build for all
-DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
@@ -285,13 +306,21 @@ multilib_src_configure() {
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
fi
mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
)
else
@@ -307,11 +336,12 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
)
fi
@@ -339,9 +369,14 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
}
src_install() {
@@ -354,14 +389,12 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
# Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
local clang_tools=( clang clang++ clang-cl clang-cpp )
local abi i
@@ -375,19 +408,19 @@ src_install() {
# - clang, clang++, clang-cl, clang-cpp -> clang*-X
# also in CHOST variant
for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
done
# now create target symlinks for all supported ABIs
for abi in $(get_all_abis); do
local abi_chost=$(get_abi_CHOST "${abi}")
for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
done
done
}
@@ -395,12 +428,19 @@ src_install() {
multilib_src_install() {
DESTDIR=${D} cmake_build install-distribution
+ if multilib_is_native_abi; then
+ # install clang-*-wrapper tools
+ # https://bugs.gentoo.org/904143
+ exeinto "/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ doexe "${BUILD_DIR}"/bin/clang-{linker,nvlink}-wrapper
+ fi
+
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
# don't wrap clang-tidy headers, the list is too long
# (they're fine for non-native ABI but enabling the targets is problematic)
mv "${ED}"/usr/include/clang-tidy "${T}/" || die
@@ -410,15 +450,15 @@ multilib_src_install() {
multilib_src_install_all() {
python_fix_shebang "${ED}"
if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
fi
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
# match 'html' non-compression
use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
# +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
}
pkg_postinst() {
@@ -427,10 +467,12 @@ pkg_postinst() {
fi
elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
}
pkg_postrm() {
diff --git a/sys-devel/clang/clang-14.0.3.ebuild b/sys-devel/clang/clang-16.0.6.ebuild
index ed84f3755fa2..bd1e86a5edd7 100644
--- a/sys-devel/clang/clang-14.0.3.ebuild
+++ b/sys-devel/clang/clang-16.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org multilib multilib-minimal \
- prefix python-single-r1 toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic llvm llvm.org multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
DESCRIPTION="C language family frontend for LLVM"
HOMEPAGE="https://llvm.org/"
@@ -14,17 +15,14 @@ HOMEPAGE="https://llvm.org/"
# sorttable.js: MIT
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
static-analyzer? ( dev-lang/perl:* )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
"
@@ -32,10 +30,10 @@ DEPEND="
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
+ >=sys-devel/clang-common-${PV}
"
BDEPEND="
${PYTHON_DEPS}
- >=dev-util/cmake-3.16
doc? ( $(python_gen_cond_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
@@ -43,15 +41,8 @@ BDEPEND="
xml? ( virtual/pkgconfig )
"
PDEPEND="
- sys-devel/clang-common
~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
"
LLVM_COMPONENTS=(
@@ -60,9 +51,9 @@ LLVM_COMPONENTS=(
)
LLVM_MANPAGES=1
LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
+ llvm/lib/Testing
+ llvm/utils
+ third-party
)
LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=llvm
@@ -80,7 +71,7 @@ llvm.org_set_globals
# multilib clang* libraries (not runtime, not wrappers).
pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-single-r1_pkg_setup
}
@@ -95,6 +86,10 @@ src_prepare() {
eprefixify \
lib/Lex/InitHeaderSearch.cpp \
lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
}
check_distribution_components() {
@@ -164,6 +159,27 @@ get_distribution_components() {
clang-resource-headers
libclang-headers
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
# libs
clang-cpp
libclang
@@ -176,46 +192,55 @@ get_distribution_components() {
libclang-python-bindings
# tools
+ amdgpu-arch
c-index-test
clang
clang-format
+ clang-linker-wrapper
clang-offload-bundler
- clang-offload-wrapper
+ clang-offload-packager
clang-refactor
clang-repl
clang-rename
clang-scan-deps
diagtool
hmaptool
+ nvptx-arch
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clang-tidy-headers
- clangd
- find-all-symbols
- modularize
- pp-trace
+ # needed for cross-compiling Clang
+ clang-tblgen
)
- if llvm_are_manpages_built; then
+ if use extra; then
out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
)
fi
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
use static-analyzer && out+=(
clang-check
@@ -230,22 +255,22 @@ get_distribution_components() {
}
multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
+ tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670
local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
# relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=OFF
-DCLANG_LINK_CLANG_DYLIB=ON
-DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
# these are not propagated reliably, so redefine them
-DLLVM_ENABLE_EH=ON
@@ -258,22 +283,26 @@ multilib_src_configure() {
# disable using CUDA to autodetect GPU, just build for all
-DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ # disable linking to HSA to avoid automagic dep,
+ # load it dynamically instead
+ -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
+ -DLLVM_BUILD_TESTS=ON
-DLLVM_LIT_ARGS="$(get_lit_flags)"
)
@@ -285,13 +314,21 @@ multilib_src_configure() {
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
fi
mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
)
else
@@ -307,11 +344,12 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
)
fi
@@ -339,9 +377,14 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
}
src_install() {
@@ -354,14 +397,12 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
# Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
local clang_tools=( clang clang++ clang-cl clang-cpp )
local abi i
@@ -375,19 +416,19 @@ src_install() {
# - clang, clang++, clang-cl, clang-cpp -> clang*-X
# also in CHOST variant
for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
done
# now create target symlinks for all supported ABIs
for abi in $(get_all_abis); do
local abi_chost=$(get_abi_CHOST "${abi}")
for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
done
done
}
@@ -398,9 +439,9 @@ multilib_src_install() {
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
# don't wrap clang-tidy headers, the list is too long
# (they're fine for non-native ABI but enabling the targets is problematic)
mv "${ED}"/usr/include/clang-tidy "${T}/" || die
@@ -410,15 +451,15 @@ multilib_src_install() {
multilib_src_install_all() {
python_fix_shebang "${ED}"
if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
fi
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
# match 'html' non-compression
use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
# +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
}
pkg_postinst() {
@@ -427,10 +468,12 @@ pkg_postinst() {
fi
elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
}
pkg_postrm() {
diff --git a/sys-devel/clang/clang-14.0.4.ebuild b/sys-devel/clang/clang-17.0.6.ebuild
index d48c4267822f..71d4d04a4823 100644
--- a/sys-devel/clang/clang-14.0.4.ebuild
+++ b/sys-devel/clang/clang-17.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org multilib multilib-minimal \
- prefix python-single-r1 toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake llvm llvm.org multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
DESCRIPTION="C language family frontend for LLVM"
HOMEPAGE="https://llvm.org/"
@@ -14,17 +15,14 @@ HOMEPAGE="https://llvm.org/"
# sorttable.js: MIT
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x64-macos"
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
static-analyzer? ( dev-lang/perl:* )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
"
@@ -32,10 +30,10 @@ DEPEND="
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
+ >=sys-devel/clang-common-${PV}
"
BDEPEND="
${PYTHON_DEPS}
- >=dev-util/cmake-3.16
doc? ( $(python_gen_cond_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
@@ -43,15 +41,8 @@ BDEPEND="
xml? ( virtual/pkgconfig )
"
PDEPEND="
- sys-devel/clang-common
~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
"
LLVM_COMPONENTS=(
@@ -59,12 +50,10 @@ LLVM_COMPONENTS=(
llvm/lib/Transforms/Hello
)
LLVM_MANPAGES=1
+LLVM_PATCHSET=${PV}-r1
LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
+ llvm/utils
)
-LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=llvm
llvm.org_set_globals
@@ -80,7 +69,7 @@ llvm.org_set_globals
# multilib clang* libraries (not runtime, not wrappers).
pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-single-r1_pkg_setup
}
@@ -95,6 +84,10 @@ src_prepare() {
eprefixify \
lib/Lex/InitHeaderSearch.cpp \
lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
}
check_distribution_components() {
@@ -164,6 +157,27 @@ get_distribution_components() {
clang-resource-headers
libclang-headers
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
# libs
clang-cpp
libclang
@@ -176,46 +190,55 @@ get_distribution_components() {
libclang-python-bindings
# tools
+ amdgpu-arch
c-index-test
clang
clang-format
+ clang-linker-wrapper
clang-offload-bundler
- clang-offload-wrapper
+ clang-offload-packager
clang-refactor
clang-repl
clang-rename
clang-scan-deps
diagtool
hmaptool
+ nvptx-arch
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clang-tidy-headers
- clangd
- find-all-symbols
- modularize
- pp-trace
+ # needed for cross-compiling Clang
+ clang-tblgen
)
- if llvm_are_manpages_built; then
+ if use extra; then
out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
)
fi
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
use static-analyzer && out+=(
clang-check
@@ -230,50 +253,53 @@ get_distribution_components() {
}
multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
# relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=OFF
-DCLANG_LINK_CLANG_DYLIB=ON
-DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
# these are not propagated reliably, so redefine them
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
# libgomp support fails to find headers without explicit -I
# furthermore, it provides only syntax checking
-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
# disable using CUDA to autodetect GPU, just build for all
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON
+ # disable linking to HSA to avoid automagic dep,
+ # load it dynamically instead
+ -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
+ -DCLANG_ENABLE_LIBXML2=$(usex xml)
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # TODO: CLANG_ENABLE_HLSL?
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
+ -DLLVM_BUILD_TESTS=ON
-DLLVM_LIT_ARGS="$(get_lit_flags)"
)
@@ -285,13 +311,21 @@ multilib_src_configure() {
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
fi
mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
)
else
@@ -307,11 +341,12 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
)
fi
@@ -328,20 +363,19 @@ multilib_src_configure() {
multilib_src_compile() {
cmake_build distribution
-
- # provide a symlink for tests
- if [[ ! -L ${WORKDIR}/lib/clang ]]; then
- mkdir -p "${WORKDIR}"/lib || die
- ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
- fi
}
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
}
src_install() {
@@ -354,14 +388,12 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
# Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
local clang_tools=( clang clang++ clang-cl clang-cpp )
local abi i
@@ -375,19 +407,19 @@ src_install() {
# - clang, clang++, clang-cl, clang-cpp -> clang*-X
# also in CHOST variant
for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
done
# now create target symlinks for all supported ABIs
for abi in $(get_all_abis); do
local abi_chost=$(get_abi_CHOST "${abi}")
for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
done
done
}
@@ -398,9 +430,9 @@ multilib_src_install() {
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
# don't wrap clang-tidy headers, the list is too long
# (they're fine for non-native ABI but enabling the targets is problematic)
mv "${ED}"/usr/include/clang-tidy "${T}/" || die
@@ -410,15 +442,15 @@ multilib_src_install() {
multilib_src_install_all() {
python_fix_shebang "${ED}"
if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
fi
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
# match 'html' non-compression
use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
# +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
}
pkg_postinst() {
@@ -427,10 +459,12 @@ pkg_postinst() {
fi
elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
}
pkg_postrm() {
diff --git a/sys-devel/clang/clang-18.1.4.ebuild b/sys-devel/clang/clang-18.1.4.ebuild
new file mode 100644
index 000000000000..142fc3861de3
--- /dev/null
+++ b/sys-devel/clang/clang-18.1.4.ebuild
@@ -0,0 +1,476 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake llvm.org llvm-utils multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
+
+DESCRIPTION="C language family frontend for LLVM"
+HOMEPAGE="https://llvm.org/"
+
+# MSVCSetupApi.h: MIT
+# sorttable.js: MIT
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
+ static-analyzer? ( dev-lang/perl:* )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${DEPEND}
+ >=sys-devel/clang-common-${PV}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? ( ~sys-devel/lld-${PV} )
+ xml? ( virtual/pkgconfig )
+"
+PDEPEND="
+ ~sys-devel/clang-runtime-${PV}
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=(
+ clang clang-tools-extra cmake
+ llvm/lib/Transforms/Hello
+)
+LLVM_MANPAGES=1
+LLVM_TEST_COMPONENTS=(
+ llvm/utils
+)
+LLVM_USE_TARGETS=llvm
+llvm.org_set_globals
+
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_cond_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
+# Multilib notes:
+# 1. ABI_* flags control ABIs libclang* is built for only.
+# 2. clang is always capable of compiling code for all ABIs for enabled
+# target. However, you will need appropriate crt* files (installed
+# e.g. by sys-devel/gcc and sys-libs/glibc).
+# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
+# in the current profile (i.e. alike supported by sys-devel/gcc).
+#
+# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
+# multilib clang* libraries (not runtime, not wrappers).
+
+src_prepare() {
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access
+ mkdir -p x/y || die
+ BUILD_DIR=${WORKDIR}/x/y/clang
+
+ llvm.org_src_prepare
+
+ # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
+ eprefixify \
+ lib/Lex/InitHeaderSearch.cpp \
+ lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # meta-targets
+ clang-libraries|distribution)
+ continue
+ ;;
+ # tools
+ clang|clangd|clang-*)
+ ;;
+ # static libraries
+ clang*|findAllSymbols)
+ continue
+ ;;
+ # conditional to USE=doc
+ docs-clang-html|docs-clang-tools-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # common stuff
+ clang-cmake-exports
+ clang-headers
+ clang-resource-headers
+ libclang-headers
+
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
+ # libs
+ clang-cpp
+ libclang
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # common stuff
+ bash-autocomplete
+ libclang-python-bindings
+
+ # tools
+ amdgpu-arch
+ c-index-test
+ clang
+ clang-format
+ clang-linker-wrapper
+ clang-offload-bundler
+ clang-offload-packager
+ clang-refactor
+ clang-repl
+ clang-rename
+ clang-scan-deps
+ diagtool
+ hmaptool
+ nvptx-arch
+
+ # needed for cross-compiling Clang
+ clang-tblgen
+ )
+
+ if use extra; then
+ out+=(
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
+ )
+ fi
+
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
+
+ use static-analyzer && out+=(
+ clang-check
+ clang-extdef-mapping
+ scan-build
+ scan-build-py
+ scan-view
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local mycmakeargs=(
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
+ # relative to bindir
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
+
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+
+ # these are not propagated reliably, so redefine them
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ # libgomp support fails to find headers without explicit -I
+ # furthermore, it provides only syntax checking
+ -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
+
+ # disable using CUDA to autodetect GPU, just build for all
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON
+ # disable linking to HSA to avoid automagic dep,
+ # load it dynamically instead
+ -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
+
+ -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
+
+ -DCLANG_ENABLE_LIBXML2=$(usex xml)
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # TODO: CLANG_ENABLE_HLSL?
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
+ use test && mycmakeargs+=(
+ -DLLVM_BUILD_TESTS=ON
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=ON
+ -DLLVM_ENABLE_SPHINX=ON
+ -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
+ fi
+ mycmakeargs+=(
+ -DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
+ -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
+ )
+ else
+ mycmakeargs+=(
+ -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
+ )
+ fi
+
+ if [[ -n ${EPREFIX} ]]; then
+ mycmakeargs+=(
+ -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
+ )
+ fi
+
+ if tc-is-cross-compiler; then
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
+ mycmakeargs+=(
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
+ )
+ fi
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
+}
+
+src_install() {
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/clang/Config/config.h
+ )
+
+ multilib-minimal_src_install
+
+ # Move runtime headers to /usr/lib/clang, where they belong
+ mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
+ # move (remaining) wrapped headers back
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+
+ # Apply CHOST and version suffix to clang tools
+ local clang_tools=( clang clang++ clang-cl clang-cpp )
+ local abi i
+
+ # cmake gives us:
+ # - clang-X
+ # - clang -> clang-X
+ # - clang++, clang-cl, clang-cpp -> clang
+ # we want to have:
+ # - clang-X
+ # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
+ # - clang, clang++, clang-cl, clang-cpp -> clang*-X
+ # also in CHOST variant
+ for i in "${clang_tools[@]:1}"; do
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
+ done
+
+ # now create target symlinks for all supported ABIs
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ for i in "${clang_tools[@]}"; do
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
+ done
+ done
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping & ABI mismatch checks
+ # (also drop the version suffix from runtime headers)
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
+ # don't wrap clang-tidy headers, the list is too long
+ # (they're fine for non-native ABI but enabling the targets is problematic)
+ mv "${ED}"/usr/include/clang-tidy "${T}/" || die
+ fi
+}
+
+multilib_src_install_all() {
+ python_fix_shebang "${ED}"
+ if use static-analyzer; then
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
+ fi
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+ # match 'html' non-compression
+ use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
+ # +x for some reason; TODO: investigate
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow update all
+ fi
+
+ elog "You can find additional utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
+}
+
+pkg_postrm() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow clean all
+ fi
+}
diff --git a/sys-devel/clang/clang-14.0.6.ebuild b/sys-devel/clang/clang-19.0.0.9999.ebuild
index ed84f3755fa2..79df96923121 100644
--- a/sys-devel/clang/clang-14.0.6.ebuild
+++ b/sys-devel/clang/clang-19.0.0.9999.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org multilib multilib-minimal \
- prefix python-single-r1 toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake llvm.org llvm-utils multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
DESCRIPTION="C language family frontend for LLVM"
HOMEPAGE="https://llvm.org/"
@@ -14,17 +15,13 @@ HOMEPAGE="https://llvm.org/"
# sorttable.js: MIT
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
static-analyzer? ( dev-lang/perl:* )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
"
@@ -32,26 +29,16 @@ DEPEND="
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
+ >=sys-devel/clang-common-${PV}
"
BDEPEND="
${PYTHON_DEPS}
- >=dev-util/cmake-3.16
- doc? ( $(python_gen_cond_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
+ test? ( ~sys-devel/lld-${PV} )
xml? ( virtual/pkgconfig )
"
PDEPEND="
- sys-devel/clang-common
~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
"
LLVM_COMPONENTS=(
@@ -60,14 +47,20 @@ LLVM_COMPONENTS=(
)
LLVM_MANPAGES=1
LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
+ llvm/utils
)
-LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=llvm
llvm.org_set_globals
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_cond_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
# Multilib notes:
# 1. ABI_* flags control ABIs libclang* is built for only.
# 2. clang is always capable of compiling code for all ABIs for enabled
@@ -79,11 +72,6 @@ llvm.org_set_globals
# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
# multilib clang* libraries (not runtime, not wrappers).
-pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
- python-single-r1_pkg_setup
-}
-
src_prepare() {
# create extra parent dir for relative CLANG_RESOURCE_DIR access
mkdir -p x/y || die
@@ -95,6 +83,10 @@ src_prepare() {
eprefixify \
lib/Lex/InitHeaderSearch.cpp \
lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
}
check_distribution_components() {
@@ -164,6 +156,27 @@ get_distribution_components() {
clang-resource-headers
libclang-headers
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
# libs
clang-cpp
libclang
@@ -176,46 +189,55 @@ get_distribution_components() {
libclang-python-bindings
# tools
+ amdgpu-arch
c-index-test
clang
clang-format
+ clang-linker-wrapper
clang-offload-bundler
- clang-offload-wrapper
+ clang-offload-packager
clang-refactor
clang-repl
clang-rename
clang-scan-deps
diagtool
hmaptool
+ nvptx-arch
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clang-tidy-headers
- clangd
- find-all-symbols
- modularize
- pp-trace
+ # needed for cross-compiling Clang
+ clang-tblgen
)
- if llvm_are_manpages_built; then
+ if use extra; then
out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
)
fi
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
use static-analyzer && out+=(
clang-check
@@ -230,50 +252,55 @@ get_distribution_components() {
}
multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
+ llvm_prepend_path "${LLVM_MAJOR}"
local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
# relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=OFF
-DCLANG_LINK_CLANG_DYLIB=ON
-DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
# these are not propagated reliably, so redefine them
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
# libgomp support fails to find headers without explicit -I
# furthermore, it provides only syntax checking
-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
# disable using CUDA to autodetect GPU, just build for all
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON
+ # disable linking to HSA to avoid automagic dep,
+ # load it dynamically instead
+ -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
+ -DCLANG_ENABLE_LIBXML2=$(usex xml)
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # TODO: CLANG_ENABLE_HLSL?
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
+ -DLLVM_BUILD_TESTS=ON
-DLLVM_LIT_ARGS="$(get_lit_flags)"
)
@@ -285,13 +312,21 @@ multilib_src_configure() {
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
fi
mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
)
else
@@ -307,11 +342,12 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- [[ -x "/usr/bin/clang-tblgen" ]] \
- || die "/usr/bin/clang-tblgen not found or usable"
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
)
fi
@@ -328,20 +364,19 @@ multilib_src_configure() {
multilib_src_compile() {
cmake_build distribution
-
- # provide a symlink for tests
- if [[ ! -L ${WORKDIR}/lib/clang ]]; then
- mkdir -p "${WORKDIR}"/lib || die
- ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
- fi
}
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
}
src_install() {
@@ -354,14 +389,12 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
# Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
local clang_tools=( clang clang++ clang-cl clang-cpp )
local abi i
@@ -375,19 +408,19 @@ src_install() {
# - clang, clang++, clang-cl, clang-cpp -> clang*-X
# also in CHOST variant
for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
done
# now create target symlinks for all supported ABIs
for abi in $(get_all_abis); do
local abi_chost=$(get_abi_CHOST "${abi}")
for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
done
done
}
@@ -398,9 +431,9 @@ multilib_src_install() {
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
# don't wrap clang-tidy headers, the list is too long
# (they're fine for non-native ABI but enabling the targets is problematic)
mv "${ED}"/usr/include/clang-tidy "${T}/" || die
@@ -410,15 +443,15 @@ multilib_src_install() {
multilib_src_install_all() {
python_fix_shebang "${ED}"
if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
fi
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
# match 'html' non-compression
use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
# +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
}
pkg_postinst() {
@@ -427,10 +460,12 @@ pkg_postinst() {
fi
elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
}
pkg_postrm() {
diff --git a/sys-devel/clang/clang-19.0.0_pre20240410.ebuild b/sys-devel/clang/clang-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..79df96923121
--- /dev/null
+++ b/sys-devel/clang/clang-19.0.0_pre20240410.ebuild
@@ -0,0 +1,475 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake llvm.org llvm-utils multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
+
+DESCRIPTION="C language family frontend for LLVM"
+HOMEPAGE="https://llvm.org/"
+
+# MSVCSetupApi.h: MIT
+# sorttable.js: MIT
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
+ static-analyzer? ( dev-lang/perl:* )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${DEPEND}
+ >=sys-devel/clang-common-${PV}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? ( ~sys-devel/lld-${PV} )
+ xml? ( virtual/pkgconfig )
+"
+PDEPEND="
+ ~sys-devel/clang-runtime-${PV}
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=(
+ clang clang-tools-extra cmake
+ llvm/lib/Transforms/Hello
+)
+LLVM_MANPAGES=1
+LLVM_TEST_COMPONENTS=(
+ llvm/utils
+)
+LLVM_USE_TARGETS=llvm
+llvm.org_set_globals
+
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_cond_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
+# Multilib notes:
+# 1. ABI_* flags control ABIs libclang* is built for only.
+# 2. clang is always capable of compiling code for all ABIs for enabled
+# target. However, you will need appropriate crt* files (installed
+# e.g. by sys-devel/gcc and sys-libs/glibc).
+# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
+# in the current profile (i.e. alike supported by sys-devel/gcc).
+#
+# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
+# multilib clang* libraries (not runtime, not wrappers).
+
+src_prepare() {
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access
+ mkdir -p x/y || die
+ BUILD_DIR=${WORKDIR}/x/y/clang
+
+ llvm.org_src_prepare
+
+ # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
+ eprefixify \
+ lib/Lex/InitHeaderSearch.cpp \
+ lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # meta-targets
+ clang-libraries|distribution)
+ continue
+ ;;
+ # tools
+ clang|clangd|clang-*)
+ ;;
+ # static libraries
+ clang*|findAllSymbols)
+ continue
+ ;;
+ # conditional to USE=doc
+ docs-clang-html|docs-clang-tools-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # common stuff
+ clang-cmake-exports
+ clang-headers
+ clang-resource-headers
+ libclang-headers
+
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
+ # libs
+ clang-cpp
+ libclang
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # common stuff
+ bash-autocomplete
+ libclang-python-bindings
+
+ # tools
+ amdgpu-arch
+ c-index-test
+ clang
+ clang-format
+ clang-linker-wrapper
+ clang-offload-bundler
+ clang-offload-packager
+ clang-refactor
+ clang-repl
+ clang-rename
+ clang-scan-deps
+ diagtool
+ hmaptool
+ nvptx-arch
+
+ # needed for cross-compiling Clang
+ clang-tblgen
+ )
+
+ if use extra; then
+ out+=(
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
+ )
+ fi
+
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
+
+ use static-analyzer && out+=(
+ clang-check
+ clang-extdef-mapping
+ scan-build
+ scan-build-py
+ scan-view
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local mycmakeargs=(
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
+ # relative to bindir
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
+
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+
+ # these are not propagated reliably, so redefine them
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ # libgomp support fails to find headers without explicit -I
+ # furthermore, it provides only syntax checking
+ -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
+
+ # disable using CUDA to autodetect GPU, just build for all
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON
+ # disable linking to HSA to avoid automagic dep,
+ # load it dynamically instead
+ -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
+
+ -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
+
+ -DCLANG_ENABLE_LIBXML2=$(usex xml)
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # TODO: CLANG_ENABLE_HLSL?
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
+ use test && mycmakeargs+=(
+ -DLLVM_BUILD_TESTS=ON
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=ON
+ -DLLVM_ENABLE_SPHINX=ON
+ -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
+ fi
+ mycmakeargs+=(
+ -DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
+ -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
+ )
+ else
+ mycmakeargs+=(
+ -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
+ )
+ fi
+
+ if [[ -n ${EPREFIX} ]]; then
+ mycmakeargs+=(
+ -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
+ )
+ fi
+
+ if tc-is-cross-compiler; then
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
+ mycmakeargs+=(
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
+ )
+ fi
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
+}
+
+src_install() {
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/clang/Config/config.h
+ )
+
+ multilib-minimal_src_install
+
+ # Move runtime headers to /usr/lib/clang, where they belong
+ mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
+ # move (remaining) wrapped headers back
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+
+ # Apply CHOST and version suffix to clang tools
+ local clang_tools=( clang clang++ clang-cl clang-cpp )
+ local abi i
+
+ # cmake gives us:
+ # - clang-X
+ # - clang -> clang-X
+ # - clang++, clang-cl, clang-cpp -> clang
+ # we want to have:
+ # - clang-X
+ # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
+ # - clang, clang++, clang-cl, clang-cpp -> clang*-X
+ # also in CHOST variant
+ for i in "${clang_tools[@]:1}"; do
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
+ done
+
+ # now create target symlinks for all supported ABIs
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ for i in "${clang_tools[@]}"; do
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
+ done
+ done
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping & ABI mismatch checks
+ # (also drop the version suffix from runtime headers)
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
+ # don't wrap clang-tidy headers, the list is too long
+ # (they're fine for non-native ABI but enabling the targets is problematic)
+ mv "${ED}"/usr/include/clang-tidy "${T}/" || die
+ fi
+}
+
+multilib_src_install_all() {
+ python_fix_shebang "${ED}"
+ if use static-analyzer; then
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
+ fi
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+ # match 'html' non-compression
+ use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
+ # +x for some reason; TODO: investigate
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow update all
+ fi
+
+ elog "You can find additional utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
+}
+
+pkg_postrm() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow clean all
+ fi
+}
diff --git a/sys-devel/clang/clang-19.0.0_pre20240420.ebuild b/sys-devel/clang/clang-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..79df96923121
--- /dev/null
+++ b/sys-devel/clang/clang-19.0.0_pre20240420.ebuild
@@ -0,0 +1,475 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake llvm.org llvm-utils multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
+
+DESCRIPTION="C language family frontend for LLVM"
+HOMEPAGE="https://llvm.org/"
+
+# MSVCSetupApi.h: MIT
+# sorttable.js: MIT
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
+ static-analyzer? ( dev-lang/perl:* )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${DEPEND}
+ >=sys-devel/clang-common-${PV}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? ( ~sys-devel/lld-${PV} )
+ xml? ( virtual/pkgconfig )
+"
+PDEPEND="
+ ~sys-devel/clang-runtime-${PV}
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=(
+ clang clang-tools-extra cmake
+ llvm/lib/Transforms/Hello
+)
+LLVM_MANPAGES=1
+LLVM_TEST_COMPONENTS=(
+ llvm/utils
+)
+LLVM_USE_TARGETS=llvm
+llvm.org_set_globals
+
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_cond_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
+# Multilib notes:
+# 1. ABI_* flags control ABIs libclang* is built for only.
+# 2. clang is always capable of compiling code for all ABIs for enabled
+# target. However, you will need appropriate crt* files (installed
+# e.g. by sys-devel/gcc and sys-libs/glibc).
+# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
+# in the current profile (i.e. alike supported by sys-devel/gcc).
+#
+# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
+# multilib clang* libraries (not runtime, not wrappers).
+
+src_prepare() {
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access
+ mkdir -p x/y || die
+ BUILD_DIR=${WORKDIR}/x/y/clang
+
+ llvm.org_src_prepare
+
+ # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
+ eprefixify \
+ lib/Lex/InitHeaderSearch.cpp \
+ lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # meta-targets
+ clang-libraries|distribution)
+ continue
+ ;;
+ # tools
+ clang|clangd|clang-*)
+ ;;
+ # static libraries
+ clang*|findAllSymbols)
+ continue
+ ;;
+ # conditional to USE=doc
+ docs-clang-html|docs-clang-tools-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # common stuff
+ clang-cmake-exports
+ clang-headers
+ clang-resource-headers
+ libclang-headers
+
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
+ # libs
+ clang-cpp
+ libclang
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # common stuff
+ bash-autocomplete
+ libclang-python-bindings
+
+ # tools
+ amdgpu-arch
+ c-index-test
+ clang
+ clang-format
+ clang-linker-wrapper
+ clang-offload-bundler
+ clang-offload-packager
+ clang-refactor
+ clang-repl
+ clang-rename
+ clang-scan-deps
+ diagtool
+ hmaptool
+ nvptx-arch
+
+ # needed for cross-compiling Clang
+ clang-tblgen
+ )
+
+ if use extra; then
+ out+=(
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
+ )
+ fi
+
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
+
+ use static-analyzer && out+=(
+ clang-check
+ clang-extdef-mapping
+ scan-build
+ scan-build-py
+ scan-view
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local mycmakeargs=(
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
+ # relative to bindir
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
+
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+
+ # these are not propagated reliably, so redefine them
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ # libgomp support fails to find headers without explicit -I
+ # furthermore, it provides only syntax checking
+ -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
+
+ # disable using CUDA to autodetect GPU, just build for all
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON
+ # disable linking to HSA to avoid automagic dep,
+ # load it dynamically instead
+ -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
+
+ -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
+
+ -DCLANG_ENABLE_LIBXML2=$(usex xml)
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # TODO: CLANG_ENABLE_HLSL?
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
+ use test && mycmakeargs+=(
+ -DLLVM_BUILD_TESTS=ON
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=ON
+ -DLLVM_ENABLE_SPHINX=ON
+ -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
+ fi
+ mycmakeargs+=(
+ -DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
+ -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
+ )
+ else
+ mycmakeargs+=(
+ -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
+ )
+ fi
+
+ if [[ -n ${EPREFIX} ]]; then
+ mycmakeargs+=(
+ -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
+ )
+ fi
+
+ if tc-is-cross-compiler; then
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
+ mycmakeargs+=(
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
+ )
+ fi
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
+}
+
+src_install() {
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/clang/Config/config.h
+ )
+
+ multilib-minimal_src_install
+
+ # Move runtime headers to /usr/lib/clang, where they belong
+ mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
+ # move (remaining) wrapped headers back
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+
+ # Apply CHOST and version suffix to clang tools
+ local clang_tools=( clang clang++ clang-cl clang-cpp )
+ local abi i
+
+ # cmake gives us:
+ # - clang-X
+ # - clang -> clang-X
+ # - clang++, clang-cl, clang-cpp -> clang
+ # we want to have:
+ # - clang-X
+ # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
+ # - clang, clang++, clang-cl, clang-cpp -> clang*-X
+ # also in CHOST variant
+ for i in "${clang_tools[@]:1}"; do
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
+ done
+
+ # now create target symlinks for all supported ABIs
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ for i in "${clang_tools[@]}"; do
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
+ done
+ done
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping & ABI mismatch checks
+ # (also drop the version suffix from runtime headers)
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
+ # don't wrap clang-tidy headers, the list is too long
+ # (they're fine for non-native ABI but enabling the targets is problematic)
+ mv "${ED}"/usr/include/clang-tidy "${T}/" || die
+ fi
+}
+
+multilib_src_install_all() {
+ python_fix_shebang "${ED}"
+ if use static-analyzer; then
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
+ fi
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+ # match 'html' non-compression
+ use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
+ # +x for some reason; TODO: investigate
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow update all
+ fi
+
+ elog "You can find additional utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
+}
+
+pkg_postrm() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow clean all
+ fi
+}
diff --git a/sys-devel/clang/metadata.xml b/sys-devel/clang/metadata.xml
index be058e8ac6ea..07d06647c9a6 100644
--- a/sys-devel/clang/metadata.xml
+++ b/sys-devel/clang/metadata.xml
@@ -27,9 +27,11 @@ A simple and hackable code base
A single unified parser for C, Objective C, C++, and Objective C++
Conformance with C/C++/ObjC and their variants</longdescription>
<use>
- <flag name="default-compiler-rt">Use compiler-rt instead of libgcc as the default rtlib for clang</flag>
- <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag>
- <flag name="default-lld">Use lld as the default linker for clang</flag>
+ <flag name="extra">Build extra tools (clangd, clang-tidy and a few more)</flag>
+ <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag>
<flag name="static-analyzer">Install the Clang static analyzer</flag>
</use>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/cons/Manifest b/sys-devel/cons/Manifest
deleted file mode 100644
index 167672cc3290..000000000000
--- a/sys-devel/cons/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST cons-2.3.0.tgz 235895 BLAKE2B 766b00824ede528c5d356eda40d3b2929b472720340c0f85add95ba13a5b172afaaa50c779e664cca1b5e74f9ed1d26cce8405f7994d9464a0693e5828963863 SHA512 a42b7537fa8c8cc179ff9e608e6cecfaec1ee0b2e1efb9b9b5992ced15867ca05155e87221e5fde6d912b94eac0d1a411c7feb528e882ed65ce9fb2a2d46be12
diff --git a/sys-devel/cons/cons-2.3.0-r1.ebuild b/sys-devel/cons/cons-2.3.0-r1.ebuild
deleted file mode 100644
index 8d49a63d1d80..000000000000
--- a/sys-devel/cons/cons-2.3.0-r1.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="Extensible perl-based build utility"
-HOMEPAGE="https://www.gnu.org/software/cons/"
-SRC_URI="https://www.gnu.org/software/${PN}/stable/${P}.tgz
- https://www.gnu.org/software/${PN}/dev/${P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="2.2"
-KEYWORDS="~alpha ~amd64 ~ppc ~sparc x86"
-
-RDEPEND="dev-lang/perl
- virtual/perl-Digest-MD5
- !sci-biology/emboss"
-BDEPEND="${RDEPEND}
- app-arch/gzip"
-
-DOCS=( CHANGES INSTALL MANIFEST README RELEASE TODO )
-
-src_install() {
- dobin cons
-
- docinto html
- dodoc *.html
-
- gunzip cons.1.gz || die
- doman cons.1
-}
diff --git a/sys-devel/cons/metadata.xml b/sys-devel/cons/metadata.xml
deleted file mode 100644
index b0d83aa2e489..000000000000
--- a/sys-devel/cons/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-devel/cproc/Manifest b/sys-devel/cproc/Manifest
new file mode 100644
index 000000000000..c5136579d5a9
--- /dev/null
+++ b/sys-devel/cproc/Manifest
@@ -0,0 +1 @@
+DIST cproc-c19a0bd9b78be94b455af55ad8ceb9be49410974.tar.gz 84602 BLAKE2B 89a01f1382015737ed43e1c7ec36737c05c0818f422b8714b5ac60bfce0830572bd06f0f0b99457e675b52826671b18e872461154a8479d3f5da808e01dd08de SHA512 630d7d933a489be80519366c27650eb3b33443ec068f0d5c4749cc1f87061228b0496f2e31a7b5f0c7eb8608849ac692113f884eab03664a3e12a78f36dbc7fa
diff --git a/sys-devel/cproc/cproc-0_pre20240413.ebuild b/sys-devel/cproc/cproc-0_pre20240413.ebuild
new file mode 100644
index 000000000000..cb98d7443072
--- /dev/null
+++ b/sys-devel/cproc/cproc-0_pre20240413.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc"
+ inherit git-r3
+else
+ CPROC_COMMIT="c19a0bd9b78be94b455af55ad8ceb9be49410974"
+ CPROC_P="${PN}-${CPROC_COMMIT}"
+ SRC_URI="https://git.sr.ht/~mcf/cproc/archive/${CPROC_COMMIT}.tar.gz -> ${CPROC_P}.tar.gz"
+ S="${WORKDIR}/${CPROC_P}"
+
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+DESCRIPTION="C11 compiler using QBE as backend"
+HOMEPAGE="https://sr.ht/~mcf/cproc/"
+
+LICENSE="ISC"
+SLOT="0"
+
+DEPEND="sys-devel/qbe"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ tc-export CC
+
+ edo ./configure --prefix=/usr
+}
diff --git a/sys-devel/cproc/cproc-9999.ebuild b/sys-devel/cproc/cproc-9999.ebuild
new file mode 100644
index 000000000000..cb98d7443072
--- /dev/null
+++ b/sys-devel/cproc/cproc-9999.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc"
+ inherit git-r3
+else
+ CPROC_COMMIT="c19a0bd9b78be94b455af55ad8ceb9be49410974"
+ CPROC_P="${PN}-${CPROC_COMMIT}"
+ SRC_URI="https://git.sr.ht/~mcf/cproc/archive/${CPROC_COMMIT}.tar.gz -> ${CPROC_P}.tar.gz"
+ S="${WORKDIR}/${CPROC_P}"
+
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+DESCRIPTION="C11 compiler using QBE as backend"
+HOMEPAGE="https://sr.ht/~mcf/cproc/"
+
+LICENSE="ISC"
+SLOT="0"
+
+DEPEND="sys-devel/qbe"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ tc-export CC
+
+ edo ./configure --prefix=/usr
+}
diff --git a/sys-devel/cproc/metadata.xml b/sys-devel/cproc/metadata.xml
new file mode 100644
index 000000000000..507ef71566c5
--- /dev/null
+++ b/sys-devel/cproc/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>contact@hacktivis.me</email>
+ <name>Haelwenn (lanodan) Monnier</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourcehut">~mcf/cproc</remote-id>
+ <remote-id type="github">michaelforney/cproc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest
index f6fab852162c..b2e88d73c28e 100644
--- a/sys-devel/crossdev/Manifest
+++ b/sys-devel/crossdev/Manifest
@@ -1,4 +1 @@
-DIST crossdev-20211121.tar.xz 28700 BLAKE2B bfe637dcd3c5b6d45e289d6298de18cab4b70b5d21a817a9207b91360b489457b9ee10266a1c2641f8dfac09dffb166bf1565a7e519ba41f84c6d5c2000f5158 SHA512 5189fa7639b819dfffc8f994bb557d8d83f115b82cd61d938db77fdcf16a33cc9d0147f9708b3bed22fdc4ace27ac863436813ebad94876ae767172ac0cbb9ce
-DIST crossdev-20220205.tar.xz 29088 BLAKE2B 46e90557f0a6df49e4f6ab7be6495514a188c4366868290d3b6b879ad1e5741e1600bca237735290f7e9278d441534569853b582cd85b96581c6ae0517cb4c54 SHA512 72e7cf690d49a87b32f6fdad2462fd4156e4e35a3f0b5f30911012a2b7936bb999575f757547a7a805c0cfdd1fd0caa8b23bf61e72c4333096314043ed565f40
-DIST crossdev-20220424.tar.xz 29316 BLAKE2B 8b026c165b643262ef934fb2daec5484bc2a2e8c2cafbaca08ecb81c2870a6306dd834c9f72bca8cbe219d1b24274fef0b83a88e301e66d98a1eb0825bb2e161 SHA512 3c2ac2d9c79140c6e0aa7ac9fa7838499f003c6c9c1260abf4b0b7883d2179ef1ded5ab0ba14ca48d471edde5090e22a50fffbf25fd86a32d354a9541e4fd567
-DIST crossdev-20220617.tar.xz 29396 BLAKE2B e3b39edfb4cbd5808851b56d86646bc879ea875b5e320802d86073236474e3aa80c5dbefc42ef4799528334bfb5a2a0abb5c0b344ebdce39ec01aac59306eb84 SHA512 bdc5ea519e4cd6275e8171ff7cd35c8ae45b6240fefd278997e247c8b0758bff6563f7e2613072e179ec4735155f05236f32385fe13579c5e955f761e0859e43
+DIST crossdev-20240209.tar.xz 30904 BLAKE2B b23c6c86796ce37968ce23a9399b068ecb78d6beb8e9b02ac11cd9e8b2f1c82f8905e615417525aa94d51f5da763841a8b9fc7cdc9b64d087a52b077adc92635 SHA512 5834cad934707f173529d7258f8230222e8d18903dea723b0051e06a8d974cab92f6aa7bbeef3a64aec0efd2d0b01f80b63503e78e30ddc1ba7e9a6a4ff08977
diff --git a/sys-devel/crossdev/crossdev-20211121.ebuild b/sys-devel/crossdev/crossdev-20211121.ebuild
deleted file mode 100644
index fe3c418c3092..000000000000
--- a/sys-devel/crossdev/crossdev-20211121.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-if [[ ${PV} == "99999999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
-else
- SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="Gentoo Cross-toolchain generator"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-RDEPEND="
- >=sys-apps/portage-2.1
- >=app-portage/portage-utils-0.55
- app-shells/bash
- sys-apps/gentoo-functions
-"
-BDEPEND="app-arch/xz-utils"
-
-src_install() {
- default
-
- if [[ "${PV}" == "99999999" ]] ; then
- sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
- fi
-}
diff --git a/sys-devel/crossdev/crossdev-20220205.ebuild b/sys-devel/crossdev/crossdev-20220205.ebuild
deleted file mode 100644
index fe3c418c3092..000000000000
--- a/sys-devel/crossdev/crossdev-20220205.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-if [[ ${PV} == "99999999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
-else
- SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="Gentoo Cross-toolchain generator"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-RDEPEND="
- >=sys-apps/portage-2.1
- >=app-portage/portage-utils-0.55
- app-shells/bash
- sys-apps/gentoo-functions
-"
-BDEPEND="app-arch/xz-utils"
-
-src_install() {
- default
-
- if [[ "${PV}" == "99999999" ]] ; then
- sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
- fi
-}
diff --git a/sys-devel/crossdev/crossdev-20220424.ebuild b/sys-devel/crossdev/crossdev-20220424.ebuild
deleted file mode 100644
index 8c680c914ad0..000000000000
--- a/sys-devel/crossdev/crossdev-20220424.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-if [[ ${PV} == "99999999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
-else
- SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="Gentoo Cross-toolchain generator"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-RDEPEND="
- >=sys-apps/portage-2.1
- >=app-portage/portage-utils-0.55
- app-shells/bash
- sys-apps/gentoo-functions
-"
-BDEPEND="app-arch/xz-utils"
-
-src_install() {
- default
-
- if [[ "${PV}" == "99999999" ]] ; then
- sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
- fi
-}
diff --git a/sys-devel/crossdev/crossdev-20220617.ebuild b/sys-devel/crossdev/crossdev-20240209.ebuild
index 1701b22179d5..060ebf803d66 100644
--- a/sys-devel/crossdev/crossdev-20220617.ebuild
+++ b/sys-devel/crossdev/crossdev-20240209.ebuild
@@ -1,15 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
+ EGIT_REPO_URI="
+ https://anongit.gentoo.org/git/proj/crossdev.git
+ https://github.com/gentoo/crossdev
+ "
else
- SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Gentoo Cross-toolchain generator"
@@ -20,9 +22,9 @@ SLOT="0"
RDEPEND="
>=sys-apps/portage-2.1
- >=app-portage/portage-utils-0.55
app-shells/bash
sys-apps/gentoo-functions
+ sys-apps/config-site
"
BDEPEND="app-arch/xz-utils"
@@ -32,4 +34,7 @@ src_install() {
if [[ ${PV} == "99999999" ]] ; then
sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
fi
+
+ dodir /usr/share/config.site.d
+ mv "${ED}"/usr/share/config.site{,.d/80crossdev.conf} || die
}
diff --git a/sys-devel/crossdev/crossdev-99999999.ebuild b/sys-devel/crossdev/crossdev-99999999.ebuild
index 1701b22179d5..8938d96f9d54 100644
--- a/sys-devel/crossdev/crossdev-99999999.ebuild
+++ b/sys-devel/crossdev/crossdev-99999999.ebuild
@@ -1,15 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
+ EGIT_REPO_URI="
+ https://anongit.gentoo.org/git/proj/crossdev.git
+ https://github.com/gentoo/crossdev
+ "
else
- SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
DESCRIPTION="Gentoo Cross-toolchain generator"
@@ -20,9 +22,9 @@ SLOT="0"
RDEPEND="
>=sys-apps/portage-2.1
- >=app-portage/portage-utils-0.55
app-shells/bash
sys-apps/gentoo-functions
+ sys-apps/config-site
"
BDEPEND="app-arch/xz-utils"
@@ -32,4 +34,7 @@ src_install() {
if [[ ${PV} == "99999999" ]] ; then
sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
fi
+
+ dodir /usr/share/config.site.d
+ mv "${ED}"/usr/share/config.site{,.d/80crossdev.conf} || die
}
diff --git a/sys-devel/crossdev/metadata.xml b/sys-devel/crossdev/metadata.xml
index a4be5df4dfc4..d4d3daf6c1ae 100644
--- a/sys-devel/crossdev/metadata.xml
+++ b/sys-devel/crossdev/metadata.xml
@@ -13,4 +13,8 @@
<email>embedded@gentoo.org</email>
<name>Embedded Gentoo</name>
</maintainer>
+ <upstream>
+ <remote-id type="gentoo">proj/crossdev</remote-id>
+ <remote-id type="github">gentoo/crossdev</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/crosstool-ng/Manifest b/sys-devel/crosstool-ng/Manifest
new file mode 100644
index 000000000000..f02be9aa507f
--- /dev/null
+++ b/sys-devel/crosstool-ng/Manifest
@@ -0,0 +1,3 @@
+DIST crosstool-ng-1.24.0.tar.xz 1622432 BLAKE2B e0f3f26083dd10a35ac79fc78debe98db7914f5d7fd710ed6b4c788a7a0d56e22d22966f186e8315ae99a6141d1d5b80686e86ad8b0549514a07dfda5913a348 SHA512 89b8794a4184ad4928750e29712ed4f194aa1d0b93768d67ff64f30c30f1b1e165647cafc6de94d68d3ef70e50446e544dad65aa36137511a32ee7a667dddfb4
+DIST crosstool-ng-1.25.0.tar.xz 1075688 BLAKE2B 4484b1a0b9ee65a927c1fc76e86087e48c4f27397c8ebc5a94cc1bbf78a66f4ab94fb54239943a9c710350bd65056e9f63c4138ff3c8f750a35b2a1bfaca6080 SHA512 e25b6fb577ce439592a889fe73bbde4109309e7fe154e7133fefaeb5522c97e3f96958941aa1bc86448fcecb6b4021ff793c595048f5ef8e5ecc75e9a48c0c45
+DIST crosstool-ng-1.26.0.tar.xz 1144720 BLAKE2B 68c38dca58a239bd2a7a4e0f0adfa0069d97aba632c8a8a70594a67bf1049f0576db2d20b8a6ac90b170c1a3d8245f952a949e4fd006abe1d5e54effbb8e100b SHA512 7834184ae5792fd347455f9f48fee826248dcb82d271954ed4304b1a18f63995ff8a2c3b817564dcf147ac7e16e02d779195b26d97eb57db27f1118a1837002a
diff --git a/sys-devel/crosstool-ng/crosstool-ng-1.24.0-r3.ebuild b/sys-devel/crosstool-ng/crosstool-ng-1.24.0-r3.ebuild
new file mode 100644
index 000000000000..943dbb3f1893
--- /dev/null
+++ b/sys-devel/crosstool-ng/crosstool-ng-1.24.0-r3.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit python-single-r1
+
+DESCRIPTION="Versatile (cross-)toolchain generator"
+HOMEPAGE="https://crosstool-ng.github.io/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git"
+ inherit git-r3
+else
+ SRC_URI="
+ https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz
+ http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz
+ "
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~x86"
+ fi
+fi
+
+LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )"
+SLOT="0"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget"
+
+# TODO: Consider dropping these USE (optfeature), but configure does check for them
+BDEPEND="
+ app-arch/unzip
+ >=app-shells/bash-3.1
+ sys-apps/help2man
+ >=sys-apps/sed-4.0
+ sys-apps/gawk
+ sys-apps/texinfo
+ sys-devel/bison
+ sys-devel/flex
+ curl? ( net-misc/curl )
+ cvs? ( dev-vcs/cvs )
+ dtc? ( sys-apps/dtc )
+ git? ( dev-vcs/git )
+ lzip? ( app-arch/lzip )
+ meson? ( dev-build/meson )
+ python? ( ${PYTHON_DEPS} )
+ ninja? ( app-alternatives/ninja )
+ rsync? ( net-misc/rsync )
+ subversion? ( dev-vcs/subversion )
+ wget? ( net-misc/wget )
+"
+RDEPEND="
+ ${BDEPEND}
+"
+
+src_configure() {
+ # Needs bison+flex
+ unset YACC LEX
+
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use doc ; then
+ mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die
+ fi
+
+ rm -rf "${ED}"/usr/share/doc/crosstool-ng || die
+ rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die
+ doman docs/ct-ng.1
+}
diff --git a/sys-devel/crosstool-ng/crosstool-ng-1.25.0-r1.ebuild b/sys-devel/crosstool-ng/crosstool-ng-1.25.0-r1.ebuild
new file mode 100644
index 000000000000..943dbb3f1893
--- /dev/null
+++ b/sys-devel/crosstool-ng/crosstool-ng-1.25.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit python-single-r1
+
+DESCRIPTION="Versatile (cross-)toolchain generator"
+HOMEPAGE="https://crosstool-ng.github.io/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git"
+ inherit git-r3
+else
+ SRC_URI="
+ https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz
+ http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz
+ "
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~x86"
+ fi
+fi
+
+LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )"
+SLOT="0"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget"
+
+# TODO: Consider dropping these USE (optfeature), but configure does check for them
+BDEPEND="
+ app-arch/unzip
+ >=app-shells/bash-3.1
+ sys-apps/help2man
+ >=sys-apps/sed-4.0
+ sys-apps/gawk
+ sys-apps/texinfo
+ sys-devel/bison
+ sys-devel/flex
+ curl? ( net-misc/curl )
+ cvs? ( dev-vcs/cvs )
+ dtc? ( sys-apps/dtc )
+ git? ( dev-vcs/git )
+ lzip? ( app-arch/lzip )
+ meson? ( dev-build/meson )
+ python? ( ${PYTHON_DEPS} )
+ ninja? ( app-alternatives/ninja )
+ rsync? ( net-misc/rsync )
+ subversion? ( dev-vcs/subversion )
+ wget? ( net-misc/wget )
+"
+RDEPEND="
+ ${BDEPEND}
+"
+
+src_configure() {
+ # Needs bison+flex
+ unset YACC LEX
+
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use doc ; then
+ mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die
+ fi
+
+ rm -rf "${ED}"/usr/share/doc/crosstool-ng || die
+ rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die
+ doman docs/ct-ng.1
+}
diff --git a/sys-devel/crosstool-ng/crosstool-ng-1.26.0.ebuild b/sys-devel/crosstool-ng/crosstool-ng-1.26.0.ebuild
new file mode 100644
index 000000000000..943dbb3f1893
--- /dev/null
+++ b/sys-devel/crosstool-ng/crosstool-ng-1.26.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit python-single-r1
+
+DESCRIPTION="Versatile (cross-)toolchain generator"
+HOMEPAGE="https://crosstool-ng.github.io/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git"
+ inherit git-r3
+else
+ SRC_URI="
+ https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz
+ http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz
+ "
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~x86"
+ fi
+fi
+
+LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )"
+SLOT="0"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget"
+
+# TODO: Consider dropping these USE (optfeature), but configure does check for them
+BDEPEND="
+ app-arch/unzip
+ >=app-shells/bash-3.1
+ sys-apps/help2man
+ >=sys-apps/sed-4.0
+ sys-apps/gawk
+ sys-apps/texinfo
+ sys-devel/bison
+ sys-devel/flex
+ curl? ( net-misc/curl )
+ cvs? ( dev-vcs/cvs )
+ dtc? ( sys-apps/dtc )
+ git? ( dev-vcs/git )
+ lzip? ( app-arch/lzip )
+ meson? ( dev-build/meson )
+ python? ( ${PYTHON_DEPS} )
+ ninja? ( app-alternatives/ninja )
+ rsync? ( net-misc/rsync )
+ subversion? ( dev-vcs/subversion )
+ wget? ( net-misc/wget )
+"
+RDEPEND="
+ ${BDEPEND}
+"
+
+src_configure() {
+ # Needs bison+flex
+ unset YACC LEX
+
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use doc ; then
+ mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die
+ fi
+
+ rm -rf "${ED}"/usr/share/doc/crosstool-ng || die
+ rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die
+ doman docs/ct-ng.1
+}
diff --git a/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild b/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild
new file mode 100644
index 000000000000..943dbb3f1893
--- /dev/null
+++ b/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit python-single-r1
+
+DESCRIPTION="Versatile (cross-)toolchain generator"
+HOMEPAGE="https://crosstool-ng.github.io/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git"
+ inherit git-r3
+else
+ SRC_URI="
+ https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz
+ http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz
+ "
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~x86"
+ fi
+fi
+
+LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )"
+SLOT="0"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget"
+
+# TODO: Consider dropping these USE (optfeature), but configure does check for them
+BDEPEND="
+ app-arch/unzip
+ >=app-shells/bash-3.1
+ sys-apps/help2man
+ >=sys-apps/sed-4.0
+ sys-apps/gawk
+ sys-apps/texinfo
+ sys-devel/bison
+ sys-devel/flex
+ curl? ( net-misc/curl )
+ cvs? ( dev-vcs/cvs )
+ dtc? ( sys-apps/dtc )
+ git? ( dev-vcs/git )
+ lzip? ( app-arch/lzip )
+ meson? ( dev-build/meson )
+ python? ( ${PYTHON_DEPS} )
+ ninja? ( app-alternatives/ninja )
+ rsync? ( net-misc/rsync )
+ subversion? ( dev-vcs/subversion )
+ wget? ( net-misc/wget )
+"
+RDEPEND="
+ ${BDEPEND}
+"
+
+src_configure() {
+ # Needs bison+flex
+ unset YACC LEX
+
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use doc ; then
+ mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die
+ fi
+
+ rm -rf "${ED}"/usr/share/doc/crosstool-ng || die
+ rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die
+ doman docs/ct-ng.1
+}
diff --git a/sys-devel/crosstool-ng/metadata.xml b/sys-devel/crosstool-ng/metadata.xml
new file mode 100644
index 000000000000..69260a3c3c18
--- /dev/null
+++ b/sys-devel/crosstool-ng/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ crosstool-NG is a utility for building cross-compiling toolchains.
+ It will only build the toolchain. It is up to use how you want to
+ use it after that.
+
+ It is an alternative to <pkg>sys-devel/crossdev</pkg>.
+
+ For more information, see https://crosstool-ng.github.io/
+ </longdescription>
+ <upstream>
+ <remote-id type="github">crosstool-ng/crosstool-ng</remote-id>
+ </upstream>
+ <use>
+ <flag name="dtc">Require <pkg>sys-apps/dtc</pkg></flag>
+ <flag name="lzip">Require <pkg>app-arch/lzip</pkg></flag>
+ <flag name="meson">Require <pkg>dev-build/meson</pkg></flag>
+ <flag name="ninja">Require <pkg>app-alternatives/ninja</pkg></flag>
+ <flag name="rsync">Require <pkg>net-misc/rsync</pkg></flag>
+ <flag name="wget">Require <pkg>net-misc/wget</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-devel/ct-ng/Manifest b/sys-devel/ct-ng/Manifest
deleted file mode 100644
index 169a86ae625d..000000000000
--- a/sys-devel/ct-ng/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST crosstool-ng-1.24.0.tar.bz2 2058069 BLAKE2B 4108e9546acd6c0660552595d41164ce9c4f07985851a911c260fcc9e2ec70e80136b6cb2090290ca2aa2ceeb4ebc61fca183340de88eafd800bc2bf18d0cfbb SHA512 379e668365628f0ab359ae119213bed44960870093f64f0fbb12e92bbe2a3b82bfed77f5ab33f2e2f17c1977e7a63f2151c46ad8d0e6208220fb7fa8726fae33
diff --git a/sys-devel/ct-ng/ct-ng-1.24.0.ebuild b/sys-devel/ct-ng/ct-ng-1.24.0.ebuild
deleted file mode 100644
index c43e112be440..000000000000
--- a/sys-devel/ct-ng/ct-ng-1.24.0.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-DESCRIPTION="crosstool-ng is a tool to build cross-compiling toolchains"
-HOMEPAGE="https://crosstool-ng.github.io/"
-MY_P=${P/ct/crosstool}
-SRC_URI="http://ymorin.is-a-geek.org/download/crosstool-ng/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc"
-
-RDEPEND="net-misc/curl
- dev-util/gperf
- dev-vcs/cvs
- dev-vcs/subversion"
-
-S="${WORKDIR}/crosstool-ng-${PV}"
-
-src_install() {
- emake DESTDIR="${D}" install
- use doc && mv "${D}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} \
- "${D}"/usr/share/doc/
- rm -rf "${D}"/usr/share/doc/crosstool-ng
-}
diff --git a/sys-devel/ct-ng/metadata.xml b/sys-devel/ct-ng/metadata.xml
deleted file mode 100644
index 7daea155e8ed..000000000000
--- a/sys-devel/ct-ng/metadata.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <longdescription lang="en">
- crosstool-NG is a utility for building cross-compiling toolchains.
- It will only build the toolchain. It is up to use how you want to
- use it after that.
-
- It is an alternative to sys-devel/crossdev.
-
- For more information, see http://ymorin.is-a-geek.org/projects/crosstool
- </longdescription>
-</pkgmetadata>
diff --git a/sys-devel/dev86/metadata.xml b/sys-devel/dev86/metadata.xml
index 115e9d64a669..c4f5ea2afda9 100644
--- a/sys-devel/dev86/metadata.xml
+++ b/sys-devel/dev86/metadata.xml
@@ -2,4 +2,7 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">lkundrak/dev86</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest
index f78dee9dc148..19f4116d75c4 100644
--- a/sys-devel/distcc/Manifest
+++ b/sys-devel/distcc/Manifest
@@ -1,2 +1 @@
-DIST distcc-3.3.3.tar.gz 1195666 BLAKE2B b393fdb20eb555dec794bf55c1287dd804a576e0a5db9f2fa84c3924a40185a193231aea807353918430297c9c83c7592aaaafd521cf73c92a72bf30b8a69caa SHA512 d5e7fc67f49ee640cef753038b5c0ebcbbac61c6ac29f20ee4736b045a89979ced765717c46383a4fadc50a4fe34e94e58e307509144414a9ca19eb4cc68a135
DIST distcc-3.4.tar.gz 1239519 BLAKE2B 8dc9baa6b1f65f2bb3621e4e643d7d15d55e2338de4d6a7f20a572d9ec280925b4421a294f40c9fcfba8d4193a6bd1871eb8caf13dd2c2a8a81834671f6bc8bc SHA512 de09329fdfa25e08a9b9529190ddaa9ceccb34c8655692edb86f367a8db4a71b750c6e928cb8e5a670f51fbbc02fd1c8524f72e01b3ebaacc1106dc676d18eef
diff --git a/sys-devel/distcc/distcc-3.4-r1.ebuild b/sys-devel/distcc/distcc-3.4-r1.ebuild
index 1bee4f2f6420..482c5d36a63e 100644
--- a/sys-devel/distcc/distcc-3.4-r1.ebuild
+++ b/sys-devel/distcc/distcc-3.4-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit autotools flag-o-matic prefix python-single-r1 systemd
@@ -26,7 +26,7 @@ RDEPEND="${PYTHON_DEPS}
DEPEND="${RDEPEND}
sys-libs/binutils-libs"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
virtual/pkgconfig"
RDEPEND+="
acct-user/distcc
diff --git a/sys-devel/distcc/distcc-3.4.ebuild b/sys-devel/distcc/distcc-3.4-r2.ebuild
index cb49de0fd3c1..8aeae8cfb6ff 100644
--- a/sys-devel/distcc/distcc-3.4.ebuild
+++ b/sys-devel/distcc/distcc-3.4-r2.ebuild
@@ -1,12 +1,11 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{10..11} )
-inherit autotools flag-o-matic prefix python-single-r1 systemd \
- toolchain-funcs xdg-utils
+inherit autotools flag-o-matic prefix python-single-r1 systemd
DESCRIPTION="Distribute compilation of C code across several machines on a network"
HOMEPAGE="https://github.com/distcc/distcc"
@@ -14,7 +13,7 @@ SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -27,7 +26,7 @@ RDEPEND="${PYTHON_DEPS}
DEPEND="${RDEPEND}
sys-libs/binutils-libs"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
virtual/pkgconfig"
RDEPEND+="
acct-user/distcc
@@ -40,6 +39,8 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-3.0-xinetd.patch"
# SOCKSv5 support needed for Portage, bug #537616
eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
+ eapply "${FILESDIR}/${PN}-3.4-pump-tests.patch"
+ eapply "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch"
eapply_user
# Bugs #120001, #167844 and probably more. See patch for description.
@@ -64,6 +65,9 @@ src_prepare() {
}
src_configure() {
+ # https://github.com/distcc/distcc/issues/454
+ append-cppflags -DPY_SSIZE_T_CLEAN
+
local myconf=(
--disable-Werror
--libdir="${EPREFIX}"/usr/lib
diff --git a/sys-devel/distcc/distcc-3.3.3-r3.ebuild b/sys-devel/distcc/distcc-3.4-r3.ebuild
index c535bb1a9fe3..aacc1981dc3e 100644
--- a/sys-devel/distcc/distcc-3.3.3-r3.ebuild
+++ b/sys-devel/distcc/distcc-3.4-r3.ebuild
@@ -1,12 +1,11 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{10..11} )
-inherit autotools flag-o-matic prefix python-single-r1 systemd \
- toolchain-funcs xdg-utils
+inherit autotools flag-o-matic prefix python-single-r1 systemd
DESCRIPTION="Distribute compilation of C code across several machines on a network"
HOMEPAGE="https://github.com/distcc/distcc"
@@ -14,20 +13,20 @@ SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
dev-libs/popt
gssapi? ( net-libs/libgssglue )
- gtk? ( x11-libs/gtk+:2 )
+ gtk? ( x11-libs/gtk+:3 )
zeroconf? ( >=net-dns/avahi-0.6[dbus] )
"
DEPEND="${RDEPEND}
sys-libs/binutils-libs"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
virtual/pkgconfig"
RDEPEND+="
acct-user/distcc
@@ -36,19 +35,17 @@ RDEPEND+="
selinux? ( sec-policy/selinux-distcc )
xinetd? ( sys-apps/xinetd )"
-src_prepare() {
- eapply "${FILESDIR}/${PN}-3.0-xinetd.patch"
- # bug #255188
- eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0-xinetd.patch"
# SOCKSv5 support needed for Portage, bug #537616
- eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
- # backport py3.8 fixes
- eapply "${FILESDIR}/${P}-py38.patch"
- # gcc-10 fix, #707502
- eapply "${FILESDIR}/${P}-gcc-10-fix.patch"
- # unbreak CHOST prefix, https://bugs.gentoo.org/773652
- eapply "${FILESDIR}/${P}-no-rewrite-chost.patch"
- eapply_user
+ "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
+ "${FILESDIR}/${PN}-3.4-pump-tests.patch"
+ "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch"
+ "${FILESDIR}/${P}-rewrite-chost.patch"
+)
+
+src_prepare() {
+ default
# Bugs #120001, #167844 and probably more. See patch for description.
use hardened && eapply "${FILESDIR}/distcc-hardened.patch"
@@ -72,9 +69,12 @@ src_prepare() {
}
src_configure() {
+ # https://github.com/distcc/distcc/issues/454
+ append-cppflags -DPY_SSIZE_T_CLEAN
+
local myconf=(
--disable-Werror
- --libdir=/usr/lib
+ --libdir="${EPREFIX}"/usr/lib
$(use_enable ipv6 rfc2553)
$(use_with gtk)
--without-gnome
diff --git a/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch
deleted file mode 100644
index 7b735ebec7f9..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From d852c808d6f470031f40edec9ebe980afc69b9b9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 8 Dec 2018 12:50:07 +0100
-Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install
-
----
- Makefile.in | 18 ++++++++++--------
- gnome/distccmon-gnome.desktop | 7 +++----
- ...mon-gnome-icon.png => distccmon-gnome.png} | Bin
- src/mon-gnome.c | 2 +-
- 4 files changed, 14 insertions(+), 13 deletions(-)
- rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%)
-
-diff --git a/Makefile.in b/Makefile.in
-index 6e1e467..1106559 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -52,13 +52,14 @@ mandir = @mandir@
- includedir = @includedir@
- oldincludedir = /usr/include
- docdir = @docdir@
--pkgdatadir = $(datadir)/@PACKAGE_NAME@
-+icondir = $(datarootdir)/pixmaps
-+desktopdir = $(datarootdir)/applications
-
- include_server_builddir = $(builddir)/_include_server
-
- # These must be done from here, not from autoconf, because they can
- # contain variable expansions written in Make syntax. Ew.
--DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\""
-+DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\""
-
- # arguments to pkgconfig
- GNOME_PACKAGES = @GNOME_PACKAGES@
-@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \
- man/lsdistcc_1.html man/pump_1.html man/include_server_1.html
- MEN = $(man1_MEN)
-
--gnome_data = gnome/distccmon-gnome-icon.png \
-+gnome_data = gnome/distccmon-gnome.png \
- gnome/distccmon-gnome.desktop
-
- popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
-@@ -1033,7 +1034,8 @@ showpaths:
- @echo " programs $(DESTDIR)$(bindir)"
- @echo " sbin programs $(DESTDIR)$(sbindir)"
- @echo " system configuration $(DESTDIR)$(sysconfdir)"
-- @echo " shared data files $(DESTDIR)$(pkgdatadir)"
-+ @echo " icon file $(DESTDIR)$(icondir)"
-+ @echo " application file $(DESTDIR)$(desktopdir)"
-
-
- # install-sh can't handle multiple arguments, but we don't need any
-@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS)
- done
-
- install-gnome-data: $(gnome_data)
-- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
-- for p in $(gnome_data); do \
-- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
-- done
-+ $(mkinstalldirs) "$(DESTDIR)$(icondir)"
-+ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)"
-+ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)"
-+ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)"
-
- install-conf: $(conf_files) $(default_files)
- $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc"
-diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop
-index bd1fa26..7205f5e 100644
---- a/gnome/distccmon-gnome.desktop
-+++ b/gnome/distccmon-gnome.desktop
-@@ -1,6 +1,5 @@
- [Desktop Entry]
--Version=0.9.4
--Encoding=UTF-8
-+Version=1.0
- Exec=distccmon-gnome
- Name=distcc monitor
- Name[sv]=distcc övervakare
-@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor
- GenericName[sv]=Distribuerad kompilerings-övervakare
- Comment=Graphical view of distributed compile tasks
- Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter
--Icon=distccmon-gnome-icon.png
-+Icon=distccmon-gnome
- TryExec=distccmon-gnome
- Terminal=false
- Type=Application
--Categories=GNOME;Application;Development;
-+Categories=GNOME;GTK;Development;
- StartupNotify=true
-diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png
-similarity index 100%
-rename from gnome/distccmon-gnome-icon.png
-rename to gnome/distccmon-gnome.png
-diff --git a/src/mon-gnome.c b/src/mon-gnome.c
-index 24681d0..bfc286d 100644
---- a/src/mon-gnome.c
-+++ b/src/mon-gnome.c
-@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void)
-
- #if GTK_CHECK_VERSION(2,2,0)
- gtk_window_set_icon_from_file (GTK_WINDOW (mainwin),
-- PKGDATADIR "/distccmon-gnome-icon.png",
-+ ICONDIR "/distccmon-gnome.png",
- NULL);
- #endif
-
---
-2.20.0.rc2
-
diff --git a/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch b/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch
deleted file mode 100644
index 2c0bce6c82b6..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 377969cc762569f4a5ec409a1e7ad6a7be3e51b3 Mon Sep 17 00:00:00 2001
-From: Romain Geissler <romain.geissler@amadeus.com>
-Date: Mon, 27 Jan 2020 09:28:43 +0000
-Subject: [PATCH] Fix build with gcc 10 which defaults to -fno-common (cf
- https://gcc.gnu.org/gcc-10/porting_to.html)
-
-This fixes the following link error I see when I use the latest gcc 10
-git branch:
-/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/serve.o:(.bss+0x0): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
-/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/stats.o:(.data+0x20): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
-collect2: error: ld returned 1 exit status
----
- src/stats.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stats.h b/src/stats.h
-index 9bde285..74d4690 100644
---- a/src/stats.h
-+++ b/src/stats.h
-@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD,
- STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT,
- STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX };
-
--const char *stats_text[20];
-+extern const char *stats_text[20];
-
- int dcc_stats_init(void);
- void dcc_stats_init_kid(void);
diff --git a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch b/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
deleted file mode 100644
index dafaa90759b4..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c2471d4cf3e2ef2556c150d52860b4e8f04e4994 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
-Date: Mon, 1 Mar 2021 22:13:36 +0200
-Subject: [PATCH] distcc: fix i686 cross compile
-
-[mgorny: disable toolchain prefix rewriting code that workarounds some
- Debian invention and breaks everything else]
-
----
- src/compile.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/compile.c b/src/compile.c
-index 25df355..e5d655b 100644
---- a/src/compile.c
-+++ b/src/compile.c
-@@ -572,7 +572,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
- if (!newcmd)
- return -ENOMEM;
-
-- if ((t = strstr(target_with_vendor, "-pc-"))) {
-+ if (0 && (t = strstr(target_with_vendor, "-pc-"))) {
- memcpy(newcmd, target_with_vendor, t - target_with_vendor);
- strcat(newcmd, t + strlen("-pc"));
- } else
---
-2.26.2
-
diff --git a/sys-devel/distcc/files/distcc-3.3.3-py38.patch b/sys-devel/distcc/files/distcc-3.3.3-py38.patch
deleted file mode 100644
index 1ba5fee7d87e..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.3-py38.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From c52a023b8a17e4346c66a8fddee69b40b327eae7 Mon Sep 17 00:00:00 2001
-From: MartB <mart.b@outlook.de>
-Date: Thu, 28 Nov 2019 21:00:59 +0100
-Subject: [PATCH] Replace time.clock() with time.perf_counter()
-
-.clock() got removed in python 3.8 and was marked as deprecated since 3.3
-(https://github.com/python/cpython/pull/13270)
----
- include_server/parse_file.py | 4 ++--
- include_server/statistics.py | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include_server/parse_file.py b/include_server/parse_file.py
-index d1dcc74..f5d78b7 100755
---- a/include_server/parse_file.py
-+++ b/include_server/parse_file.py
-@@ -272,7 +272,7 @@ def Parse(self, filepath, symbol_table):
-
- assert isinstance(filepath, str)
- self.filepath = filepath
-- parse_file_start_time = time.clock()
-+ parse_file_start_time = time.perf_counter()
- statistics.parse_file_counter += 1
-
- includepath_map_index = self.includepath_map.Index
-@@ -338,6 +338,6 @@ def Parse(self, filepath, symbol_table):
- expr_includes, next_includes)
-
-
-- statistics.parse_file_total_time += time.clock() - parse_file_start_time
-+ statistics.parse_file_total_time += time.perf_counter() - parse_file_start_time
-
- return (quote_includes, angle_includes, expr_includes, next_includes)
-diff --git a/include_server/statistics.py b/include_server/statistics.py
-index 9677af3..7bc9cb8 100755
---- a/include_server/statistics.py
-+++ b/include_server/statistics.py
-@@ -62,13 +62,13 @@ def StartTiming():
- global start_time, translation_unit_counter
- """Mark the start of a request to find an include closure."""
- translation_unit_counter += 1
-- start_time = time.clock()
-+ start_time = time.perf_counter()
-
-
- def EndTiming():
- """Mark the end of an include closure calculation."""
- global translation_unit_time, min_time, max_time, total_time
-- translation_unit_time = time.clock() - start_time
-+ translation_unit_time = time.perf_counter() - start_time
- min_time = min(translation_unit_time, min_time)
- max_time = max(translation_unit_time, max_time)
- total_time += translation_unit_time
diff --git a/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch b/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch
new file mode 100644
index 000000000000..14c08db329d1
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch
@@ -0,0 +1,65 @@
+https://bugs.gentoo.org/904720
+https://github.com/distcc/distcc/commit/879b71d6e95673e58d33f6c3c341a893ee307161
+
+From 879b71d6e95673e58d33f6c3c341a893ee307161 Mon Sep 17 00:00:00 2001
+From: Alexey Sheplyakov <asheplyakov@yandex.ru>
+Date: Sat, 10 Jul 2021 22:18:14 +0400
+Subject: [PATCH] dcc_gcc_rewrite_fqn: avoid heap corruption
+
+On ALT Linux I've run into the following bug:
+
+distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
+free(): invalid next size (fast)
+Aborted (core dumped)
+
+Apparently dcc_gcc_rewrite writes beyond the allocated memory:
+
+valgrind --leak-check=full -v ./distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
+
+==11382== ERROR SUMMARY: 53 errors from 5 contexts (suppressed: 0 from 0)
+==11382==
+==11382== 1 errors in context 1 of 5:
+==11382== Invalid write of size 1
+==11382== at 0x4C349D8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+==11382== Address 0x544e828 is 1 bytes after a block of size 23 alloc'd
+==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+==11382==
+==11382==
+==11382== 1 errors in context 2 of 5:
+==11382== Invalid write of size 1
+==11382== at 0x4C349C8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+==11382== Address 0x544e827 is 0 bytes after a block of size 23 alloc'd
+==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+
+and ALT Linux' hardened glibc does not quite like that.
+Correctly compute the `newcmd_len` to avoid the problem.
+
+ALTBUG: #40425
+--- a/src/compile.c
++++ b/src/compile.c
+@@ -584,7 +584,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
+ return -ENOENT;
+
+
+- newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0] + 1);
++ newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0]) + 1;
+ newcmd = malloc(newcmd_len);
+ if (!newcmd)
+ return -ENOMEM;
+
diff --git a/sys-devel/distcc/files/distcc-3.4-rewrite-chost.patch b/sys-devel/distcc/files/distcc-3.4-rewrite-chost.patch
new file mode 100644
index 000000000000..05db9691bbbe
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.4-rewrite-chost.patch
@@ -0,0 +1,79 @@
+https://bugs.gentoo.org/773652
+https://github.com/distcc/distcc/issues/440
+https://github.com/distcc/distcc/commit/850db9eec0d5dd7f47ade8ffca91b679081f6d85
+
+From 850db9eec0d5dd7f47ade8ffca91b679081f6d85 Mon Sep 17 00:00:00 2001
+From: Alexey Sheplyakov <asheplyakov@altlinux.org>
+Date: Sun, 11 Jul 2021 18:57:00 +0400
+Subject: [PATCH] Improved cross-rewriting on non-x86 systems
+
+Unfortunately autoconf and GCC don't agree on the system name:
+
+- On arm (aarch64): `GNU_HOST` is `aarch64-unknown-linux-gnu`,
+ and GCC triple is `aarch64-linux-gnu` instead.
+- On rpm-based x86_64 distros: `GNU_HOST` is `x86_64-pc-linux-gnu`,
+ and GCC triple is `x86_64-redhat-linux`
+
+Therefore ask the compiler (when running distcc configure script)
+how to correctly identify it.
+
+Closes: #440
+ALTBUG: 40425
+--- a/configure.ac
++++ b/configure.ac
+@@ -547,6 +547,22 @@ AC_SUBST(CPPFLAGS)
+ AC_SUBST(POPT_INCLUDES)
+ AC_SUBST(BUILD_POPT)
+ AC_SUBST(GNOME_BIN)
++
++
++# Sometimes canonical triples as used by configure differ from GCC ones
++# x86: configure: x86_64-pc-linux-gnu, GCC: x86_64-linux-gnu
++# ALT Linux: configure: ${arch}-alt-linux-gnu, GCC: ${arch}-alt-linux
++# Therefore ask the compiler for its triple
++if test "x${GCC}" = xyes ; then
++ native_compiler_triple=`$CC -dumpmachine`
++fi
++if test "x$native_compiler_triple" = "x"; then
++ native_compiler_triple="$host"
++fi
++AC_MSG_NOTICE([Native compiler triple: $native_compiler_triple])
++
++AC_DEFINE_UNQUOTED(NATIVE_COMPILER_TRIPLE, ["$native_compiler_triple"], [Native compiler triple])
++
+ AC_DEFINE_UNQUOTED(GNU_HOST, ["$host"], [Your gnu-style host triple])
+ # The '.stamp-conf' files force creation of the containing directories in the
+ # build tree.
+--- a/src/compile.c
++++ b/src/compile.c
+@@ -549,7 +549,7 @@ static void dcc_rewrite_generic_compiler(char **argv)
+ static void dcc_add_clang_target(char **argv)
+ {
+ /* defined by autoheader */
+- const char *target = GNU_HOST;
++ const char *target = NATIVE_COMPILER_TRIPLE;
+
+ if (strcmp(argv[0], "clang") == 0 || strncmp(argv[0], "clang-", strlen("clang-")) == 0 ||
+ strcmp(argv[0], "clang++") == 0 || strncmp(argv[0], "clang++-", strlen("clang++-")) == 0)
+@@ -577,7 +577,7 @@ static void dcc_add_clang_target(char **argv)
+ static int dcc_gcc_rewrite_fqn(char **argv)
+ {
+ /* defined by autoheader */
+- const char *target_with_vendor = GNU_HOST;
++ const char *target_with_vendor = NATIVE_COMPILER_TRIPLE;
+ char *newcmd, *t, *path;
+ int pathlen = 0;
+ int newcmd_len = 0;
+@@ -595,11 +595,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
+ return -ENOMEM;
+ memset(newcmd, 0, newcmd_len);
+
+- if ((t = strstr(target_with_vendor, "-pc-"))) {
+- memcpy(newcmd, target_with_vendor, t - target_with_vendor);
+- strcat(newcmd, t + strlen("-pc"));
+- } else
+- strcpy(newcmd, target_with_vendor);
++ strcpy(newcmd, target_with_vendor);
+
+
+ strcat(newcmd, "-");
diff --git a/sys-devel/distcc/metadata.xml b/sys-devel/distcc/metadata.xml
index b39e2f4ab899..8e23cf8fbb58 100644
--- a/sys-devel/distcc/metadata.xml
+++ b/sys-devel/distcc/metadata.xml
@@ -8,4 +8,7 @@
<use>
<flag name="gssapi">Enable support for <pkg>net-libs/libgssglue</pkg></flag>
</use>
+ <upstream>
+ <remote-id type="github">distcc/distcc</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/dwz/Manifest b/sys-devel/dwz/Manifest
index e46195dbc905..d770ee4adc0a 100644
--- a/sys-devel/dwz/Manifest
+++ b/sys-devel/dwz/Manifest
@@ -1 +1 @@
-DIST dwz-0.14.tar.xz 147428 BLAKE2B 286350a8276a1a674937a7adc99560562782044fd6caa50c9a55ec08343f34d8bd27140cca904e648859aba61d181e01ab0755f2115151fab16d498aa1549450 SHA512 62c39f79723ca99305dbb08d1d24a17699b9a84dd98c30904103da116831b1253bf1edbfb905c76fdc4d48305bd1ea0046314c5619209c40a1e624b8ae4908b1
+DIST dwz-0.15.tar.xz 150080 BLAKE2B 4ce1722a53cb588cda8195211a26b28d69891ed32cc59e44897270298d033590c79c8c73168dc3b261cb017fc12874a9cbd50db3bfaa0aa7de8ed7cf8a588cca SHA512 43eb4b08c1f529859dc3466697d5ad7e172d6efbf21409530a67a2492ae4acc3734d5134bbd6e07c089ecc358d915871b13e22f6e4f1dd4c3af19ef804f8fcc5
diff --git a/sys-devel/dwz/dwz-0.14.ebuild b/sys-devel/dwz/dwz-0.15-r1.ebuild
index 4ad7ab103878..07e6062f11f1 100644
--- a/sys-devel/dwz/dwz-0.14.ebuild
+++ b/sys-devel/dwz/dwz-0.15-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -13,20 +13,34 @@ S="${WORKDIR}/${PN}"
LICENSE="GPL-2+ GPL-3+"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
-RDEPEND="dev-libs/elfutils"
+RDEPEND="
+ dev-libs/elfutils
+ dev-libs/xxhash
+"
DEPEND="${RDEPEND}"
BDEPEND="test? (
dev-libs/elfutils[utils]
dev-util/dejagnu
- sys-devel/gdb
+ dev-debug/gdb
)"
src_prepare() {
default
- sed -e '/^CFLAGS/d' -i Makefile || die
tc-export CC
}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" srcdir="${S}"
+}
+
+src_test() {
+ emake CFLAGS="${CFLAGS}" srcdir="${S}" check
+}
+
+src_install() {
+ emake DESTDIR="${D}" CFLAGS="${CFLAGS}" srcdir="${S}" install
+}
diff --git a/sys-devel/dwz/metadata.xml b/sys-devel/dwz/metadata.xml
index 319c2d8312f8..c87f24a66212 100644
--- a/sys-devel/dwz/metadata.xml
+++ b/sys-devel/dwz/metadata.xml
@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person" proxied="yes">
- <email>annulen@yandex.ru</email>
- <name>Konstantin Tokarev</name>
- </maintainer>
- <maintainer type="project" proxied="proxy">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
</maintainer>
<longdescription>
The dwz package contains a program that attempts to optimize DWARF
diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
index 4eea87b1c581..a237b0a27ce2 100644
--- a/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
+++ b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -21,8 +21,8 @@ DEPEND="${RDEPEND}"
BDEPEND="
dev-vcs/subversion
sys-apps/lsb-release
- >=sys-devel/bmake-20210314-r1
- virtual/yacc"
+ >=dev-build/bmake-20210314-r1
+ app-alternatives/yacc"
PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild
index 5c427a1e2119..02c757f53f3e 100644
--- a/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild
+++ b/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -25,8 +25,8 @@ DEPEND="${RDEPEND}"
BDEPEND="
dev-vcs/subversion
sys-apps/lsb-release
- >=sys-devel/bmake-20210314-r1
- virtual/yacc"
+ >=dev-build/bmake-20210314-r1
+ app-alternatives/yacc"
src_prepare() {
default
diff --git a/sys-devel/flex/Manifest b/sys-devel/flex/Manifest
index 327f0405ede2..34ccf066269d 100644
--- a/sys-devel/flex/Manifest
+++ b/sys-devel/flex/Manifest
@@ -1 +1,2 @@
+DIST flex-2.6.4-autotools-regenerate.patch.xz 282588 BLAKE2B 3995b8b5e354a43b1a4ff72fae76027c904ddb24eb8e5d55fc6fbe81299f48fa70ac3c4a98b9ed39aca8a98190d6db5005cacb96ec1016d413860d84a434dcc0 SHA512 9efd3197fdf7f8435dfbf4dafbe6b99c1fafede0ec364dbeb9cca81711763d693bc5d30fc3b2af038a44f8848577d19dd737e3afe0cd3b08ab79daea64fcdefa
DIST flex-2.6.4.tar.gz 1419096 BLAKE2B c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e
diff --git a/sys-devel/flex/files/flex-2.6.4-fix-apple-m1-crash-by-explicit-pointer-cast.patch b/sys-devel/flex/files/flex-2.6.4-fix-apple-m1-crash-by-explicit-pointer-cast.patch
new file mode 100644
index 000000000000..c594262d2cb0
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.6.4-fix-apple-m1-crash-by-explicit-pointer-cast.patch
@@ -0,0 +1,48 @@
+https://github.com/westes/flex/issues/539
+https://github.com/westes/flex/pull/554
+https://bugs.gentoo.org/871324
+
+This is a backported version for applying to v2.6.4
+instead of git.
+
+From cce2df853386d5b5b60445b1204dcca08e9f259e Mon Sep 17 00:00:00 2001
+From: Yifeng Li <tomli@tomli.me>
+Date: Mon, 20 Feb 2023 11:23:52 +0000
+Subject: [PATCH] Fix #539 crash on Apple M1 by casting 0 to (char *)
+ explicitly
+
+Currently, when the NULL-terminated variadic function
+filter_create_ext() is invoked, the value "0" is passed as
+the last argument to act as a terminator. However, this is
+an integer value, which is incompatible with the pointer
+data type expected by filter_create_ext().
+
+This is undefined behavior in C, correct operation is not
+guaranteed. In fact, it causes flex to crash on Apple M1
+when GCC is used - the loop is not terminated when it should,
+instead, it keeps running, corrupting the argument list for
+invoking m4. As a result, it creates the following error:
+
+> flex: fatal internal error, exec of gm4 failed
+
+This commit fixes the problem by explicitly casting the value 0 to
+the correct pointer type (char *).
+
+Signed-off-by: Yifeng Li <tomli@tomli.me>
+---
+ src/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.c b/src/main.c
+index e5eac44fe..5c9086183 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -380,7 +380,7 @@ void check_options (void)
+ }
+ }
+ }
+- filter_create_ext(output_chain, m4, "-P", 0);
++ filter_create_ext(output_chain, m4, "-P", (char *) 0);
+ filter_create_int(output_chain, filter_fix_linedirs, NULL);
+
+ /* For debugging, only run the requested number of filters. */
diff --git a/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch
new file mode 100644
index 000000000000..9a9de8746b89
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch
@@ -0,0 +1,219 @@
+https://github.com/westes/flex/issues/436
+https://bugs.gentoo.org/705800
+https://developers.redhat.com/blog/2019/04/22/implicit-function-declarations-flexs-use-of-reallocarray
+https://github.com/westes/flex/commit/4b5111d9772b5c160340ca96f08d30d7f6db5cda
+https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380
+https://github.com/westes/flex/commit/0db9f8903a446e7026874be519b8dc55a471f014
+https://github.com/westes/flex/commit/a17d79e9c722a6735b6d2a8f152287404f27df32
+https://github.com/westes/flex/commit/4081efa0831b15d7e4e4255401c225ad8262426d
+https://github.com/westes/flex/commit/1985bb3c7abed940e91ad816504ef08a18c3b7c1
+
+From 4b5111d9772b5c160340ca96f08d30d7f6db5cda Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Mon, 4 Sep 2017 08:28:53 +0800
+Subject: [PATCH] scanner: Include flexdef.h at %top block of scan.l
+
+config.h may define macros that alter the API of the standard library
+funtions, and so it should be included before any other standard
+header, even before the skeleton's standard header inclusion.
+
+For example: config.h may #define _GNU_SOURCE that would expose the
+reallocarray() prototype from <stdlib.h> on glibc 2.26+ systems. If we
+include <stdlib.h> before config.h, reallocarray() would not be
+available for use in lex file since the second include doesn't help
+due to header guard.
+
+For now our config.h might `#define malloc rpl_malloc` -- this
+substitution must work before including stdlib.h, or else the compiler
+will complain about missing prototypes, and may result in incorrect
+code in scan.l (gcc warning: return makes pointer from integer without
+a cast [-Wint-conversion]).
+
+Fixes #247.
+--- a/src/scan.l
++++ b/src/scan.l
+@@ -1,5 +1,11 @@
+ /* scan.l - scanner for flex input -*-C-*- */
+
++%top{
++/* flexdef.h includes config.h, which may contain macros that alter the API */
++/* of libc functions. Must include first before any libc header. */
++#include "flexdef.h"
++}
++
+ %{
+ /* Copyright (c) 1990 The Regents of the University of California. */
+ /* All rights reserved. */
+@@ -32,7 +38,6 @@
+ /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+ /* PURPOSE. */
+
+-#include "flexdef.h"
+ #include "parse.h"
+ extern bool tablesverify, tablesext;
+ extern int trlcontxt; /* Set in parse.y for each rule. */
+
+From 24fd0551333e7eded87b64dd36062da3df2f6380 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Mon, 4 Sep 2017 10:47:33 +0800
+Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac.
+
+This would, e.g. define _GNU_SOURCE in config.h, enabling the
+reallocarray() prototype in glibc 2.26+ on Linux systems with that
+version of glibc.
+
+Fixes #241.
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,8 +25,10 @@
+ # autoconf requirements and initialization
+
+ AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])
++AC_PREREQ([2.60])
+ AC_CONFIG_SRCDIR([src/scan.l])
+ AC_CONFIG_AUX_DIR([build-aux])
++AC_USE_SYSTEM_EXTENSIONS
+ LT_INIT
+ AM_INIT_AUTOMAKE([1.15 -Wno-portability foreign std-options dist-lzip parallel-tests subdir-objects])
+ AC_CONFIG_HEADER([src/config.h])
+
+
+From 0db9f8903a446e7026874be519b8dc55a471f014 Mon Sep 17 00:00:00 2001
+From: Lukasz Baj <l.baj@radytek.com>
+Date: Fri, 22 Sep 2017 10:24:46 +0200
+Subject: [PATCH] build: Remove custom reallocarray() declaration.
+
+Use one from <stdlib.h> instead because that is more portable.
+--- a/src/flexdef.h
++++ b/src/flexdef.h
+@@ -631,10 +631,6 @@ extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
+ extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
+ extern int num_backing_up, bol_needed;
+
+-#ifndef HAVE_REALLOCARRAY
+-void *reallocarray(void *, size_t, size_t);
+-#endif
+-
+ void *allocate_array(int, size_t);
+ void *reallocate_array(void *, int, size_t);
+
+
+From a17d79e9c722a6735b6d2a8f152287404f27df32 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Sat, 14 Oct 2017 00:36:54 +0800
+Subject: [PATCH] scanner: Define _POSIX_C_SOURCE when needed in skeleton.
+
+The function fileno() is defined by POSIX. When flex would otherwise not provide that feature macro, we define it.
+
+Fixes #263
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -218,6 +218,14 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
+
+ /* begin standard C headers. */
+ %if-c-only
++m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]], ,
++[[m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]], ,
++[[#ifndef _POSIX_C_SOURCE
++#define _POSIX_C_SOURCE 1 /* for fileno() */
++#ifndef _POSIX_SOURCE
++#define _POSIX_SOURCE 1
++#endif
++#endif]])]])
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+
+From 4081efa0831b15d7e4e4255401c225ad8262426d Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Thu, 8 Mar 2018 10:04:36 +0800
+Subject: [PATCH] scanner: Fix glibc features.h dependency in skeleton.
+
+Commit a17d79e9c722a6735b6d2a8f152287404f27df32 defines _POSIX_C_SOURCE
+to the minimum of 1 if it's not defined in the user's scanner code or
+the compiling environment. However in glibc the macros are not yet set
+up until one of the libc headers is included. This unfortunately have
+made us overwrite the default _POSIX_C_SOURCE value that would be
+defined by glibc (200809L at the time of writing), causing regressions
+in user code.
+
+Now in this patch:
+1. Ensure feature test macros have been set up in glibc before checking
+or defining any of them in our skeleton code.
+2. Have a more conservative logic when determining the need to define
+_POSIX_C_SOURCE (required for fileno()).
+
+Fixes: #313
+
+Note:
+It could be tricky for application code to ensure feature test macros
+have been set up in glibc, since <features.h> is no portable header and
+not meant to be included directly by applications. The way to do it is
+to include a libc header which in turn includes <features.h>. However,
+many of the glibc headers check __USE_POSIX (a glibc internal macro
+defined if _POSIX_C_SOURCE is defined) and determine which interfaces
+to expose already, making the headers inappropriate for our goal.
+Those which don't depend on _POSIX_C_SOURCE, and are also available
+since ANSI C89, are only <assert.h>, <errno.h> and <math.h>.
+
+<assert.h> is finally favored due to other considerations:
+- <math.h> check for __USE_XOPEN in glibc, making a dependency on
+_XOPEN_SOURCE, besides it exposes much more interfaces than we need.
+- In djgpp, <errno.h> depends on _POSIX_SOURCE to hide definitions of
+some errno values when it's defined.
+- <assert.h> exposes the fewest interfaces among the 3 headers and, at
+the time of writing, checks for only C99 (for __func__), C11 (for
+_Static_assert), and _GNU_SOURCE when needed.
+
+Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -220,11 +220,21 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
+ %if-c-only
+ m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]], ,
+ [[m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]], ,
+-[[#ifndef _POSIX_C_SOURCE
+-#define _POSIX_C_SOURCE 1 /* for fileno() */
+-#ifndef _POSIX_SOURCE
+-#define _POSIX_SOURCE 1
++[[/* Feature test macros. Flex uses functions that require a minimum set of
++ * macros defined. As defining some macros may hide function declarations that
++ * user code might use, be conservative and respect user's definitions as much
++ * as possible. In glibc, feature test macros may not be all set up until one
++ * of the libc header (that includes <features.h>) is included. This creates
++ * a circular dependency when we check the macros. <assert.h> is the safest
++ * header we can include and does not declare too many functions we don't need.
++ */
++#if !defined(__GNU_LIBRARY__) && defined(__STDC__)
++#include <assert.h>
+ #endif
++#if !(defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
++ defined(_POSIX_SOURCE))
++# define _POSIX_C_SOURCE 1 /* Required for fileno() */
++# define _POSIX_SOURCE 1
+ #endif]])]])
+ #include <stdio.h>
+ #include <string.h>
+
+From 1985bb3c7abed940e91ad816504ef08a18c3b7c1 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Thu, 8 Mar 2018 09:53:24 +0800
+Subject: [PATCH] scanner: correct comments about __STDC_LIMIT_MACROS.
+
+No code changes.
+
+Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
+--- a/src/flexint.h
++++ b/src/flexint.h
+@@ -7,8 +7,8 @@
+
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+- * if you want the limit (max/min) macros for int types.
++/* C++ systems might need __STDC_LIMIT_MACROS defined before including
++ * <stdint.h>, if you want the limit (max/min) macros for int types.
+ */
+ #ifndef __STDC_LIMIT_MACROS
+ #define __STDC_LIMIT_MACROS 1
+
diff --git a/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.6+.patch b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.6+.patch
deleted file mode 100644
index 328b57524565..000000000000
--- a/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.6+.patch
+++ /dev/null
@@ -1,767 +0,0 @@
-Backport of https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380
-
-Bug: https://bugs.gentoo.org/628744
-
---- a/configure
-+++ b/configure
-@@ -3605,13 +3605,142 @@ test -z "$SED" && SED=sed
- Xsed="$SED -e 1s/^X//"
-
-
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-+$as_echo_n "checking how to run the C preprocessor... " >&6; }
-+# On Suns, sometimes $CPP names a directory.
-+if test -n "$CPP" && test -d "$CPP"; then
-+ CPP=
-+fi
-+if test -z "$CPP"; then
-+ if ${ac_cv_prog_CPP+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ # Double quotes because CPP needs to be expanded
-+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-+ do
-+ ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ # <limits.h> exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+ Syntax error
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+
-+else
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.i conftest.$ac_ext
-+
-+ # OK, works on sane cases. Now check whether nonexistent headers
-+ # can be detected and how.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <ac_nonexistent.h>
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ # Broken: success on invalid input.
-+continue
-+else
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.i conftest.$ac_ext
-+
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.i conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then :
-+ break
-+fi
-
-+ done
-+ ac_cv_prog_CPP=$CPP
-
-+fi
-+ CPP=$ac_cv_prog_CPP
-+else
-+ ac_cv_prog_CPP=$CPP
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-+$as_echo "$CPP" >&6; }
-+ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-+ # <limits.h> exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include <limits.h>
-+#else
-+# include <assert.h>
-+#endif
-+ Syntax error
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-
-+else
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.i conftest.$ac_ext
-
-+ # OK, works on sane cases. Now check whether nonexistent headers
-+ # can be detected and how.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <ac_nonexistent.h>
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ # Broken: success on invalid input.
-+continue
-+else
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.i conftest.$ac_ext
-
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.i conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then :
-
-+else
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-+See \`config.log' for more details" "$LINENO" 5; }
-+fi
-
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-@@ -3744,91 +3873,208 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
--$as_echo_n "checking for fgrep... " >&6; }
--if ${ac_cv_path_FGREP+:} false; then :
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-+$as_echo_n "checking for ANSI C header files... " >&6; }
-+if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
- else
-- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
-- then ac_cv_path_FGREP="$GREP -F"
-- else
-- if test -z "$FGREP"; then
-- ac_path_FGREP_found=false
-- # Loop through the user's path and test for each of PROGNAME-LIST
-- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
--do
-- IFS=$as_save_IFS
-- test -z "$as_dir" && as_dir=.
-- for ac_prog in fgrep; do
-- for ac_exec_ext in '' $ac_executable_extensions; do
-- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-- as_fn_executable_p "$ac_path_FGREP" || continue
--# Check for GNU ac_path_FGREP and select it if it is found.
-- # Check for GNU $ac_path_FGREP
--case `"$ac_path_FGREP" --version 2>&1` in
--*GNU*)
-- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
--*)
-- ac_count=0
-- $as_echo_n 0123456789 >"conftest.in"
-- while :
-- do
-- cat "conftest.in" "conftest.in" >"conftest.tmp"
-- mv "conftest.tmp" "conftest.in"
-- cp "conftest.in" "conftest.nl"
-- $as_echo 'FGREP' >> "conftest.nl"
-- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
-- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-- as_fn_arith $ac_count + 1 && ac_count=$as_val
-- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
-- # Best one so far, save it but keep looking for a better one
-- ac_cv_path_FGREP="$ac_path_FGREP"
-- ac_path_FGREP_max=$ac_count
-- fi
-- # 10*(2^10) chars as input seems more than enough
-- test $ac_count -gt 10 && break
-- done
-- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
--esac
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <stdlib.h>
-+#include <stdarg.h>
-+#include <string.h>
-+#include <float.h>
-
-- $ac_path_FGREP_found && break 3
-- done
-- done
-- done
--IFS=$as_save_IFS
-- if test -z "$ac_cv_path_FGREP"; then
-- as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-- fi
--else
-- ac_cv_path_FGREP=$FGREP
--fi
-+int
-+main ()
-+{
-
-- fi
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_cv_header_stdc=yes
-+else
-+ ac_cv_header_stdc=no
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
--$as_echo "$ac_cv_path_FGREP" >&6; }
-- FGREP="$ac_cv_path_FGREP"
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
--test -z "$GREP" && GREP=grep
-+if test $ac_cv_header_stdc = yes; then
-+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <string.h>
-
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "memchr" >/dev/null 2>&1; then :
-
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-
-+fi
-
-+if test $ac_cv_header_stdc = yes; then
-+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <stdlib.h>
-
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "free" >/dev/null 2>&1; then :
-
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-
-+fi
-
-+if test $ac_cv_header_stdc = yes; then
-+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-+ if test "$cross_compiling" = yes; then :
-+ :
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <ctype.h>
-+#include <stdlib.h>
-+#if ((' ' & 0x0FF) == 0x020)
-+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-+#else
-+# define ISLOWER(c) \
-+ (('a' <= (c) && (c) <= 'i') \
-+ || ('j' <= (c) && (c) <= 'r') \
-+ || ('s' <= (c) && (c) <= 'z'))
-+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-+#endif
-
-+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-+int
-+main ()
-+{
-+ int i;
-+ for (i = 0; i < 256; i++)
-+ if (XOR (islower (i), ISLOWER (i))
-+ || toupper (i) != TOUPPER (i))
-+ return 2;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+ conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-
-+fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-+$as_echo "$ac_cv_header_stdc" >&6; }
-+if test $ac_cv_header_stdc = yes; then
-
-+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-+fi
-
-+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-+ inttypes.h stdint.h unistd.h
-+do :
-+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-+"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+
-+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-+if test "x$ac_cv_header_minix_config_h" = xyes; then :
-+ MINIX=yes
-+else
-+ MINIX=
-+fi
-+
-+
-+ if test "$MINIX" = yes; then
-
-+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-+
-+
-+$as_echo "#define _MINIX 1" >>confdefs.h
-+
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-+if ${ac_cv_safe_to_define___extensions__+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+# define __EXTENSIONS__ 1
-+ $ac_includes_default
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_cv_safe_to_define___extensions__=yes
-+else
-+ ac_cv_safe_to_define___extensions__=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-+ test $ac_cv_safe_to_define___extensions__ = yes &&
-+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-+
-+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-+
-+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-+
-+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-+
-+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-+
-+
-+for ac_header in dlfcn.h
-+do :
-+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-+"
-+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define HAVE_DLFCN_H 1
-+_ACEOF
-+
-+fi
-+
-+done
-
-
- # Check whether --with-gnu-ld was given.
-@@ -6898,288 +7144,6 @@ func_munge_path_list ()
- esac
- }
-
--ac_ext=c
--ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
--$as_echo_n "checking how to run the C preprocessor... " >&6; }
--# On Suns, sometimes $CPP names a directory.
--if test -n "$CPP" && test -d "$CPP"; then
-- CPP=
--fi
--if test -z "$CPP"; then
-- if ${ac_cv_prog_CPP+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
-- # Double quotes because CPP needs to be expanded
-- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-- do
-- ac_preproc_ok=false
--for ac_c_preproc_warn_flag in '' yes
--do
-- # Use a header file that comes with gcc, so configuring glibc
-- # with a fresh cross-compiler works.
-- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-- # <limits.h> exists even on freestanding compilers.
-- # On the NeXT, cc -E runs the code through the compiler's parser,
-- # not just through cpp. "Syntax error" is here to catch this case.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
-- Syntax error
--_ACEOF
--if ac_fn_c_try_cpp "$LINENO"; then :
--
--else
-- # Broken: fails on valid input.
--continue
--fi
--rm -f conftest.err conftest.i conftest.$ac_ext
--
-- # OK, works on sane cases. Now check whether nonexistent headers
-- # can be detected and how.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <ac_nonexistent.h>
--_ACEOF
--if ac_fn_c_try_cpp "$LINENO"; then :
-- # Broken: success on invalid input.
--continue
--else
-- # Passes both tests.
--ac_preproc_ok=:
--break
--fi
--rm -f conftest.err conftest.i conftest.$ac_ext
--
--done
--# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
--rm -f conftest.i conftest.err conftest.$ac_ext
--if $ac_preproc_ok; then :
-- break
--fi
--
-- done
-- ac_cv_prog_CPP=$CPP
--
--fi
-- CPP=$ac_cv_prog_CPP
--else
-- ac_cv_prog_CPP=$CPP
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
--$as_echo "$CPP" >&6; }
--ac_preproc_ok=false
--for ac_c_preproc_warn_flag in '' yes
--do
-- # Use a header file that comes with gcc, so configuring glibc
-- # with a fresh cross-compiler works.
-- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-- # <limits.h> exists even on freestanding compilers.
-- # On the NeXT, cc -E runs the code through the compiler's parser,
-- # not just through cpp. "Syntax error" is here to catch this case.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
-- Syntax error
--_ACEOF
--if ac_fn_c_try_cpp "$LINENO"; then :
--
--else
-- # Broken: fails on valid input.
--continue
--fi
--rm -f conftest.err conftest.i conftest.$ac_ext
--
-- # OK, works on sane cases. Now check whether nonexistent headers
-- # can be detected and how.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <ac_nonexistent.h>
--_ACEOF
--if ac_fn_c_try_cpp "$LINENO"; then :
-- # Broken: success on invalid input.
--continue
--else
-- # Passes both tests.
--ac_preproc_ok=:
--break
--fi
--rm -f conftest.err conftest.i conftest.$ac_ext
--
--done
--# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
--rm -f conftest.i conftest.err conftest.$ac_ext
--if $ac_preproc_ok; then :
--
--else
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
--See \`config.log' for more details" "$LINENO" 5; }
--fi
--
--ac_ext=c
--ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
--$as_echo_n "checking for ANSI C header files... " >&6; }
--if ${ac_cv_header_stdc+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <stdlib.h>
--#include <stdarg.h>
--#include <string.h>
--#include <float.h>
--
--int
--main ()
--{
--
-- ;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_compile "$LINENO"; then :
-- ac_cv_header_stdc=yes
--else
-- ac_cv_header_stdc=no
--fi
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--
--if test $ac_cv_header_stdc = yes; then
-- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <string.h>
--
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "memchr" >/dev/null 2>&1; then :
--
--else
-- ac_cv_header_stdc=no
--fi
--rm -f conftest*
--
--fi
--
--if test $ac_cv_header_stdc = yes; then
-- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <stdlib.h>
--
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "free" >/dev/null 2>&1; then :
--
--else
-- ac_cv_header_stdc=no
--fi
--rm -f conftest*
--
--fi
--
--if test $ac_cv_header_stdc = yes; then
-- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-- if test "$cross_compiling" = yes; then :
-- :
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <ctype.h>
--#include <stdlib.h>
--#if ((' ' & 0x0FF) == 0x020)
--# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
--#else
--# define ISLOWER(c) \
-- (('a' <= (c) && (c) <= 'i') \
-- || ('j' <= (c) && (c) <= 'r') \
-- || ('s' <= (c) && (c) <= 'z'))
--# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
--#endif
--
--#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
--int
--main ()
--{
-- int i;
-- for (i = 0; i < 256; i++)
-- if (XOR (islower (i), ISLOWER (i))
-- || toupper (i) != TOUPPER (i))
-- return 2;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--else
-- ac_cv_header_stdc=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-- conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--fi
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
--$as_echo "$ac_cv_header_stdc" >&6; }
--if test $ac_cv_header_stdc = yes; then
--
--$as_echo "#define STDC_HEADERS 1" >>confdefs.h
--
--fi
--
--# On IRIX 5.3, sys/types and inttypes.h are conflicting.
--for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-- inttypes.h stdint.h unistd.h
--do :
-- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
--ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
--"
--if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-- cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
--
--fi
--
--done
--
--
--for ac_header in dlfcn.h
--do :
-- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
--"
--if test "x$ac_cv_header_dlfcn_h" = xyes; then :
-- cat >>confdefs.h <<_ACEOF
--#define HAVE_DLFCN_H 1
--_ACEOF
--
--fi
--
--done
--
--
--
-
-
- # Set options
---- a/src/config.h.in
-+++ b/src/config.h.in
-@@ -207,6 +207,9 @@
- /* Define to the m4 executable name. */
- #undef M4
-
-+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-+#undef NO_MINUS_C_MINUS_O
-+
- /* Name of package */
- #undef PACKAGE
-
-@@ -239,6 +242,28 @@
- /* Define to 1 if you have the ANSI C header files. */
- #undef STDC_HEADERS
-
-+/* Enable extensions on AIX 3, Interix. */
-+#ifndef _ALL_SOURCE
-+# undef _ALL_SOURCE
-+#endif
-+/* Enable GNU extensions on systems that have them. */
-+#ifndef _GNU_SOURCE
-+# undef _GNU_SOURCE
-+#endif
-+/* Enable threading extensions on Solaris. */
-+#ifndef _POSIX_PTHREAD_SEMANTICS
-+# undef _POSIX_PTHREAD_SEMANTICS
-+#endif
-+/* Enable extensions on HP NonStop. */
-+#ifndef _TANDEM_SOURCE
-+# undef _TANDEM_SOURCE
-+#endif
-+/* Enable general extensions on Solaris. */
-+#ifndef __EXTENSIONS__
-+# undef __EXTENSIONS__
-+#endif
-+
-+
- /* Version number of package */
- #undef VERSION
-
-@@ -246,6 +271,16 @@
- `char[]'. */
- #undef YYTEXT_POINTER
-
-+/* Define to 1 if on MINIX. */
-+#undef _MINIX
-+
-+/* Define to 2 if the system does not provide POSIX.1 features except with
-+ this defined. */
-+#undef _POSIX_1_SOURCE
-+
-+/* Define to 1 if you need to in order for `stat' and other things to work. */
-+#undef _POSIX_SOURCE
-+
- /* Define to empty if `const' does not conform to ANSI C. */
- #undef const
-
diff --git a/sys-devel/flex/flex-2.6.4-r1.ebuild b/sys-devel/flex/flex-2.6.4-r1.ebuild
deleted file mode 100644
index 309967cc2b37..000000000000
--- a/sys-devel/flex/flex-2.6.4-r1.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic libtool multilib-minimal toolchain-funcs
-
-DESCRIPTION="The Fast Lexical Analyzer"
-HOMEPAGE="https://github.com/westes/flex"
-SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
-
-LICENSE="FLEX"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="nls static test"
-RESTRICT="!test? ( test )"
-
-# We want bison explicitly and not yacc in general #381273
-RDEPEND="sys-devel/m4"
-BDEPEND="${RDEPEND}
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bison )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.6.4-libobjdir.patch
- "${FILESDIR}"/${PN}-2.6.4-fix-build-with-glibc2.6+.patch
-)
-
-src_prepare() {
- default
-
- # Disable running in the tests/ subdir as it has a bunch of built sources
- # that cannot be made conditional (automake limitation). #568842
- if ! use test ; then
- sed -i \
- -e '/^SUBDIRS =/,/^$/{/tests/d}' \
- Makefile.in || die
- fi
- elibtoolize # Prefix always needs this
-}
-
-src_configure() {
- use static && append-ldflags -static
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # Do not install shared libs #503522
- ECONF_SOURCE=${S} \
- econf \
- CC_FOR_BUILD="$(tc-getBUILD_CC)" \
- --disable-shared \
- $(use_enable nls)
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
- else
- emake -C src -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake check
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- default
- else
- emake -C src DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
- dodoc ONEWS
- find "${ED}" -name '*.la' -type f -delete || die
- rm "${ED}"/usr/share/doc/${PF}/COPYING || die
- dosym flex /usr/bin/lex
-}
diff --git a/sys-devel/flex/flex-2.6.4-r2.ebuild b/sys-devel/flex/flex-2.6.4-r6.ebuild
index b1e13e873c6d..fd91a0206e3b 100644
--- a/sys-devel/flex/flex-2.6.4-r2.ebuild
+++ b/sys-devel/flex/flex-2.6.4-r6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -8,27 +8,37 @@ inherit flag-o-matic libtool multilib-minimal toolchain-funcs
DESCRIPTION="The Fast Lexical Analyzer"
HOMEPAGE="https://github.com/westes/flex"
SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools-regenerate.patch.xz"
LICENSE="FLEX"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls static test"
RESTRICT="!test? ( test )"
-# We want bison explicitly and not yacc in general, bug #381273
RDEPEND="sys-devel/m4"
-BDEPEND="${RDEPEND}
+# We want bison explicitly and not yacc in general, bug #381273
+BDEPEND="
+ ${RDEPEND}
nls? ( sys-devel/gettext )
- test? ( sys-devel/bison )"
+ test? ( sys-devel/bison )
+"
+PDEPEND="app-alternatives/lex"
PATCHES=(
- "${FILESDIR}"/${PN}-2.6.4-libobjdir.patch
- "${FILESDIR}"/${PN}-2.6.4-fix-build-with-glibc2.6+.patch
+ "${FILESDIR}"/${P}-libobjdir.patch
+ "${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch
+ "${FILESDIR}"/${P}-fix-apple-m1-crash-by-explicit-pointer-cast.patch
+
+ "${WORKDIR}"/${P}-autotools-regenerate.patch
)
src_prepare() {
default
+ # Drop on next release when we can remove ${P}-autotools-regenerate.patch
+ touch configure.ac aclocal.m4 Makefile.in configure src/config.h.in || die
+
# Disable running in the tests/ subdir as it has a bunch of built sources
# that cannot be made conditional (automake limitation). bug #568842
if ! use test ; then
@@ -48,15 +58,6 @@ src_configure() {
}
multilib_src_configure() {
- if tc-is-cross-compiler ; then
- # Similar to workaround for procps:
- # - bug #705800
- # - https://sourceforge.net/p/psmisc/bugs/71/
- # - https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html
- export ac_cv_func_malloc_0_nonnull=yes \
- ac_cv_func_realloc_0_nonnull=yes
- fi
-
# Do not install shared libs, #503522
ECONF_SOURCE="${S}" econf \
CC_FOR_BUILD="$(tc-getBUILD_CC)" \
@@ -89,6 +90,12 @@ multilib_src_install_all() {
dodoc ONEWS
find "${ED}" -name '*.la' -type f -delete || die
rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+}
- dosym flex /usr/bin/lex
+pkg_postinst() {
+ # ensure to preserve the symlink before app-alternatives/lex
+ # is installed
+ if [[ ! -h ${EROOT}/usr/bin/lex ]]; then
+ ln -s flex "${EROOT}/usr/bin/lex" || die
+ fi
}
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch
deleted file mode 100644
index 8da025d8c5d0..000000000000
--- a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Revert of dsymutil part of
-http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00057.html
-See http://article.gmane.org/gmane.linux.gentoo.alt/4327
-
---- gcc/config/darwin.h
-+++ gcc/config/darwin.h
-@@ -326,12 +326,7 @@
- "/* APPLE LOCAL nested functions 4357979 */"\
- %{fnested-functions: -allow_stack_execute} \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
--"/* APPLE LOCAL begin mainline 4.3 2006-10-31 4370146 */"\
-- %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}\n\
--%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
--"/* APPLE LOCAL end mainline 4.3 2006-10-31 4370146 */"\
-- %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
-- %{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
-+ %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}"
- /* APPLE LOCAL end mainline */
-
- #ifdef TARGET_SYSTEM_ROOT
diff --git a/sys-devel/gcc-apple/files/libstdc++-16.patch b/sys-devel/gcc-apple/files/libstdc++-16.patch
deleted file mode 100644
index 81d075bface7..000000000000
--- a/sys-devel/gcc-apple/files/libstdc++-16.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libstdc++-v3/include/bits/c++config
-+++ libstdc++-v3/include/bits/c++config
-@@ -76,7 +76,7 @@
- }
- namespace std
- {
-- using namespace __gnu_debug_def __attribute__ ((strong));
-+ using namespace __gnu_debug_def;
- }
- #else
- # define _GLIBCXX_STD std
diff --git a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r3.ebuild b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r3.ebuild
index c144abe8aca5..0a8cb2421474 100644
--- a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r3.ebuild
+++ b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-inherit toolchain flag-o-matic autotools prefix toolchain-funcs
+inherit flag-o-matic autotools prefix toolchain-funcs
GCC_VERS=${PV/_p*/}
APPLE_VERS="${PV/*_p/}.3"
@@ -32,7 +32,7 @@ RDEPEND=">=sys-libs/zlib-1.1.4
)"
DEPEND="${RDEPEND}
>=sys-apps/texinfo-4.2-r4
- >=sys-devel/bison-1.875
+ app-alternatives/yacc
${CATEGORY}/binutils-apple
>=dev-libs/mpfr-2.2.0_p10"
PDEPEND="sys-libs/csu"
@@ -42,6 +42,17 @@ S=${WORKDIR}/gcc-${APPLE_VERS}
# TPREFIX is the prefix of the CTARGET installation
export TPREFIX=${TPREFIX:-${EPREFIX}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
do_bootstrap() {
is_crosscompile && return 1
[[ ${CHOST} != ${CBUILD} ]] && return 1
@@ -301,6 +312,8 @@ src_install() {
echo "STDCXX_INCDIR=\"g++-v${GCC_VERS/\.*/}\"" >> ${gcc_envd_file}
is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file}
+ docompress /usr/share/gcc-data/${CTARGET}/${GCC_VERS}/{man,info}
+
# Move <cxxabi.h> to compiler-specific directories
[[ -f ${D}${STDCXX_INCDIR}/cxxabi.h ]] && \
mv -f "${D}"${STDCXX_INCDIR}/cxxabi.h "${D}"${LIBPATH}/include/
diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest
index 96afcff2b4a5..d36547d79ebd 100644
--- a/sys-devel/gcc-config/Manifest
+++ b/sys-devel/gcc-config/Manifest
@@ -1,2 +1 @@
-DIST gcc-config-2.4.tar.xz 17552 BLAKE2B 631645a5cc9f3e7ab0ff089960ee3d0b2ecea29aa96f839a03a86985db512bf0d182b67a7b1bb73b95808c04523f32d6b8c122cdfbe8dbf94e7d319a1e49a23c SHA512 852b4aefaccfae1d91c551e226ac28110fa23f9668075c190a5fb9129c86d2f3e4994e96b7a5e8a2801883c5a5b16d9fbf3e9066e6b6a423055fdefa490793c7
-DIST gcc-config-2.5.tar.xz 17664 BLAKE2B fa7133a54d3b49df20d3ae6036a65602c8a0d9e8668e2874a87d080add241a31322a3f4694bff8a5fe61957740603862539c0d9750e446d36beb2fb42ff0ba27 SHA512 20a8d62192faf54101352cfb6ca00503c9b2ab83aefecd94c4c887302a000d78334545a3424603a66a50e5f3ff07b67b16828813407893df5d94051776252b83
+DIST gcc-config-2.11.tar.xz 18068 BLAKE2B 0d76321adea9eff545e042ad847b70a5b3d8ecb8c248fdf58f71c88a7b03c0aca39f7d39e332808b89c3f6d0fb3fc3114bc2d8dfa1ade6460c0b12c3420d876f SHA512 38ea52c2d16287fc2c8efa0ee76e24563851b4fa1ee7dce601507df1530e7a867281f178ad4228505eb2aaf46164024a18825cd6771d847ff1a60a85d6e96d3e
diff --git a/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild b/sys-devel/gcc-config/gcc-config-2.11.ebuild
index d59534f90b07..f387c81e5cb3 100644
--- a/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild
+++ b/sys-devel/gcc-config/gcc-config-2.11.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git"
@@ -14,7 +14,7 @@ fi
DESCRIPTION="Utility to manage compilers"
HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/"
-LICENSE="GPL-2"
+LICENSE="GPL-2 GPL-2+"
SLOT="0"
IUSE="+cc-wrappers +native-symlinks"
diff --git a/sys-devel/gcc-config/gcc-config-2.4.ebuild b/sys-devel/gcc-config/gcc-config-2.4.ebuild
deleted file mode 100644
index 1d9d5647b2f3..000000000000
--- a/sys-devel/gcc-config/gcc-config-2.4.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git"
- inherit git-r3
-else
- SRC_URI="https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="Utility to manage compilers"
-HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="+cc-wrappers +native-symlinks"
-
-RDEPEND=">=sys-apps/gentoo-functions-0.10"
-
-_emake() {
- emake \
- PV="${PVR}" \
- SUBLIBDIR="$(get_libdir)" \
- USE_CC_WRAPPERS="$(usex cc-wrappers)" \
- USE_NATIVE_LINKS="$(usex native-symlinks)" \
- TOOLCHAIN_PREFIX="${CHOST}-" \
- "$@"
-}
-
-src_compile() {
- _emake
-}
-
-src_install() {
- _emake DESTDIR="${D}" install
-}
-
-pkg_postinst() {
- # Do we have a valid multi ver setup ?
- local x
- for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
- gcc-config ${x}
- done
-
- # USE flag change can add or delete files in /usr/bin worth recaching
- if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
- eselect compiler-shadow update all
- fi
-}
diff --git a/sys-devel/gcc-config/gcc-config-9999.ebuild b/sys-devel/gcc-config/gcc-config-9999.ebuild
index 67c6a7ee6316..a314266369ef 100644
--- a/sys-devel/gcc-config/gcc-config-9999.ebuild
+++ b/sys-devel/gcc-config/gcc-config-9999.ebuild
@@ -1,20 +1,20 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git"
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
DESCRIPTION="Utility to manage compilers"
HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/"
-LICENSE="GPL-2"
+LICENSE="GPL-2 GPL-2+"
SLOT="0"
IUSE="+cc-wrappers +native-symlinks"
diff --git a/sys-devel/gcc-config/metadata.xml b/sys-devel/gcc-config/metadata.xml
index 4dac4d50b500..61a8b0758cd6 100644
--- a/sys-devel/gcc-config/metadata.xml
+++ b/sys-devel/gcc-config/metadata.xml
@@ -9,4 +9,8 @@
<flag name="cc-wrappers">Install and manage 'cc' and 'f77' wrappers in /usr/bin. Otherwise ignore them.</flag>
<flag name="native-symlinks">Install native symlinks like 'gcc' or 'g++' to /usr/bin. Otherwise keep only ${CTARGET}-gcc and friends.</flag>
</use>
+ <upstream>
+ <remote-id type="gentoo">proj/gcc-config</remote-id>
+ <remote-id type="github">gentoo/gcc-config</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 74f6ad2c8b42..56e205b5bed9 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,41 +1,45 @@
-DIST gcc-10-20211126.tar.xz 71674848 BLAKE2B 81f4a572e973db7a3701601e66ea58c8e535a55d4d4ac164de00bdb06f7f265585f45d46171cf40d42ebcd3fb02ac81b643398c560912698eb6c008ac6e09518 SHA512 db887184c649ebeede5a1b9f13c00fe425012434cb93ec960c3ca50c0bcdeab04a1cc13b20de21b940e5d6a09c3b1c7fc415110a0e990ec1d938627bf97b9342
-DIST gcc-10-20220623.tar.xz 71747668 BLAKE2B 3849182a188f4a3b5f19e66008a23ab50ff5bf933d28254432d62ce880b7921124302658553c7bc1e8756c430d11b5d577685d1d70b9851b714d1e15b1d7b4ac SHA512 294093cdd0949238e903f91c4ed28b2fd063d25aa6aa7947acdb318350c582e43d15b98a78756da692d0625c6d190c67b62f215ac865594712d6f8efe298831b
-DIST gcc-10-20220630.tar.xz 71753264 BLAKE2B 19179c6ff805dd280835176955995e6a402705d69120023e3b472b4290b29babc9184a07e35c0e780aed6f4b6505c9b8e9c0fd020d251755f73c8f802c65947d SHA512 8c5f9c3a8c8f9b0d3b8236b41fb6cc1facc01bd3c1b3882a68f61ed7e9bb84ac2a478f52ac17e4a7af488970aa5935faa0635158b51edffeb2784d1dbf0407cf
-DIST gcc-10.3.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384
-DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084
-DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
-DIST gcc-10.4.0-musl-patches-1.tar.xz 3808 BLAKE2B 804d1fcc451dcd03be71240dd498ec2d179869571d44012967c48dccf5a478dd8c55000a964a80fdd5584d739a777dee1c83241cffce514ef002df2572854a67 SHA512 83e4a9c0f7062baf0c606a2bcc56a818494991403d7577dea65f04bbc25bdb786a5889b80d45d80e7f4be07c1aef786802cbfcfafd1a17ec255a2d4e93a77570
-DIST gcc-10.4.0-patches-0.tar.bz2 15231 BLAKE2B f64a2e7f317acf9416da69c129ea869116be2780828f9d3cda59f7ea8d39634df7f0347f745275bb167f95aae2a3b8e97ec7c78f775d9002718dd67cb9429f68 SHA512 d1497930ccf4d6ee8700faeb676945e65b3aa2ba3a580a3564575fad1590ad076741f2ecad778ab48d0c4e8ed7723b84b0a660cb67cc4530495691702159a43a
-DIST gcc-10.4.0-patches-1.tar.xz 14392 BLAKE2B 76cc16bb611f1ac2020f0f430fc3f038e8ad29827e000b7aeca2a3143e91a674dee18b9530451fe37110c20dd3548ece387c323b460199e911e8195fc88eddf4 SHA512 f574ad66025eccb824e5901ef14f38268fc1fb26d9fc4fc9d04c8652c7bcee78ea196bdda88dbf891f167a6d7d75a74fb5776592dc25971c5902ba9d5d721266
-DIST gcc-10.4.0-patches-2.tar.xz 15000 BLAKE2B 59a61f7de4b6d2338a8b4fbc88a8e55838d5fdce1bd906b798540839a7efca9b97024779b515df6a7673ee6908540834bc1f58188ed9ef311c51e1f351ed003e SHA512 e1c8f0bf9d64db3f84a6eab0f41ee848643a67ba6ab57df7a8267139928f6e292d95c5b4ed865ff8d9a80028bb07cec714d56438b97004cd2a27f111f1f336da
-DIST gcc-10.4.0.tar.xz 75018092 BLAKE2B ec1169025d3896b70ab80a4b8ce5040763a95529fc7e120c6bc3a3eb1db5cf938ebde347c1e595a8ff7d4081e79ded6252702d7a1a09648449b7a0783188e434 SHA512 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648
-DIST gcc-11-20220115.tar.xz 75676672 BLAKE2B 12171fd97731dbca67f13cc2a3a3a3989c22d628b289cbd3d46080f77a8d951f15c1e54e83a2e62ab41b69221f9784e970799a11a9ed5b224a77ba4b1b081f07 SHA512 7455b3b29d3c64df9123afef82faf922d97e08a3ea30fbc2d9286d4f6ed2fafbfc0f9d94ae1b9eee45329e95a27bd642b3aa679d83a0c27a3e30967d49e0728c
-DIST gcc-11-20220624.tar.xz 75765436 BLAKE2B 642bbda212f31344822ec90bce1422146515b153ddb306c5fd1bcf25be25fea7ed5bc1aa6f5987755969e73af5de1484fb79a805e87428bcfa0b13257b9c35df SHA512 736a71de166851816914561bfbe7c00110b32f8b7e1666176babdfcfbdef4410ba07c8e2d912da2830fa14c6732f9ca555cae127481b07a85f7e689d87f9d509
-DIST gcc-11-20220701.tar.xz 75776176 BLAKE2B 958ba928ba6094e947990ef834f397d94a1f2bb0319aca77cab2d53c1eb12fce8b03d8e1b1fecc0be39f5154fb10126faf5667d6c345e65fb932a3680b55f8dd SHA512 ca378e8cb427c098099192aaa9441a2e85acc38f9a7309d56ef252e7434f7869df8f2af932f0ddc2d3c9e44341092ef05f284fed6a21b56c7c93faff68949709
-DIST gcc-11.2.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384
-DIST gcc-11.2.0-patches-1.tar.bz2 11537 BLAKE2B 9dd791ada244c9b70b8b99f9f305a688c248134715ed1b26d406e53b114983faae6873cdc521497164388d24d5f61c199e98df146bc02f5578e877295bcf5c82 SHA512 6539efc60c656d0798a5896dc1b944ed69914b815102c7a1c10bdba4ef935abd326b01309f38316e121f1ed90ceb2abcaf65df6af116892daad829ac2623cefc
-DIST gcc-11.2.0.tar.xz 80888824 BLAKE2B 69b61234ac436edfea2933df68c434a2ce7aa4454ef4da573e82587e1a42dc420189e949cfdadaf4cb37fc0de9674822210a95b77ff03aca0dbedfe67df19cc6 SHA512 d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf
-DIST gcc-11.3.0-musl-patches-1.tar.bz2 3997 BLAKE2B 5ca064cc78b067f4a7822fa0341c37ae03c8024f871d2e274e481a583afa96c36e291be93fbdd633f203260ae2ea9ac1d45f666d134bac75bc9a715a369d7374 SHA512 0ab239c66cf62a737266377c19b8dda6af6df56380f6731c2c17f3e82778e7e023a68d31728490eea3ad946f4b71d4cab363a75548f74b4b7f653972469d9e91
-DIST gcc-11.3.0-patches-4.tar.bz2 14030 BLAKE2B cdd555f329c7c0b993cd3527489681bfcc2162db0997611b66337e6b287356761c7deccd3b9f9bb8980a32df0574017a52c5e445e24db746757d87ffccb1ea89 SHA512 cb227599d01734ae9f9fc7ae2c8dd4cae1da80d6ab398ec6f112535239ac76ce8e91fbac88e19c2f75cb08ab75f966c1d1ad4af80ede67e953fbbafc7baefa58
-DIST gcc-11.3.0-patches-5.tar.bz2 14575 BLAKE2B 55ff9558f3ffe89d511663f12477e72ed1bc29d4fa8f1bc58b9c52d28838716ba9b8291ede7b86e28c3bee0633c34763f611779fe46531bd75d8aa7661b46118 SHA512 65bf4c0d1d43923298efd527a5f4da2a10d88a383d2eef72e6a25ce37964ddaf27c49545915228347e8320f905afcdfe1275d98e8458993a7229425f74ae41bd
-DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7
-DIST gcc-11.4.0-musl-patches-0.tar.xz 3844 BLAKE2B f3f1be6718e3cf08e553a1a2319a85e13368279849f6f3ab89ad7abe505316afacf5084846c0cb133bdcb5c918244644242c194e6ce55455a26e67b3983d73ef SHA512 a81db52d21de364137461dcff7e1af696df4a02fa26452f90439ae4af14ccbffe68eb4ee93ae56257490ab8aa36b4bff37c4e1f2cf4dd4624b3a6fb4cb50b7ac
-DIST gcc-11.4.0-patches-0.tar.xz 13404 BLAKE2B a384e6604befe306e6ee444b886c1aed1ef469299f5c7903da8314d73fd06463fb4f24be24d3d03df4883eaa8eb24beb477d881c5a1886d5913fee110b11a35c SHA512 f46f971f87deceaa8bc60eaa815aa1625f1cae01d2cccaeb6ff87f518198a756a1f7b496bd5bad004d713a4e8e6138f0b9a832e4df344fcb3009def840f9f6b9
-DIST gcc-11.4.0-patches-1.tar.xz 13956 BLAKE2B ff6ee1b81ad214e74a49c00b15767086c6b12b1566b42c4fb88778bfae3a8e319e42ffbcd8aa7f717b6f32bd966dc0da08be3a57a27992d9b90368622e7e2ff0 SHA512 3b9b641bb00b85fa88c87d8923ebcfb844125ff6149b998c565006173f4d68b0ccf8c1fec2c7bac0684584c61176346cee7373b165587a092bcd92ccb96c61db
-DIST gcc-12-20220528.tar.xz 79096228 BLAKE2B 9c06ce85c6302bd43e06d35d5d5cc9e81268d368484bd60af707e6dbbe791d85ec2a177fe7deae1379d313269fcaea2ff5245e20e54ca667f452c27efb738c13 SHA512 498be61fcae7e4ec55e1f270e1d02fadfe9069692afab6442dac0b7ab480ad7112121f4728a9f99c7868e7373b2c770ad4833a3b4a1a8a43b3417e79f286c28c
-DIST gcc-12-20220625.tar.xz 79092788 BLAKE2B 491da523abc0a63bbceaa6c76b251a5b6c224e1684b5db4e6155fdcab4b0d8d505376d30a13e1b0331f37558aac311477bbb3179b63da850acae436b642c9ee1 SHA512 0527c6d69cd53e8aba3464746b7989e3128af74818864a2e5b4be66313203d32a84201440a254da8de72842b0ebbbccf1ec14c6a121cb09f9454358b0a37b8f9
-DIST gcc-12-20220702.tar.xz 79091468 BLAKE2B a15363dbab5f331b2e5ee6362ef6701307513bca211cacdee2bf17cf50cf88a019110c2b2412939b614c3346b5ec3823ee5b1bca19db526693149a163e5b98fe SHA512 e5ab44e79f641ace6d9d77ffb176f3309d35e8f36b6bdd42f09e29fcc82766933e0fb8f86be84bf7419fe9918c554544d34c448b706ec0cb052e738e5594683c
-DIST gcc-12.0.0-musl-patches-4.tar.xz 4456 BLAKE2B 80ae755b52c31d57eb737b3ec5e70d96e7e20f6720664cd94573b1c6cd079a0e29f73277c27b2f2570706da5239006dabd44f834824c515f6615ed5dc39c273f SHA512 cf917f40133d2b8090e98880e6c87d38129f44bcb454f4d707ef57967635a6fb571d7b85b7cb854421bc9aa88e48767a47aad99c767f9415899f97922d61c497
-DIST gcc-12.0.0-patches-5.tar.xz 9820 BLAKE2B cdebb6fa59e594f95cc4b028d329c0fed3ffa1731a4ca1a2954b7760f4a674e773cfe5888fb2c63a619d5d80ec464d98a94870bfe2e3ea34370afce7f67526bb SHA512 a9c27b0188fd842e88d6a831cdf1f9c6d0cada4ec260b5f7e67f3d8fe0f439fb0d2c82469de9fecebd657043babf3e63a24ee53776be2617bb90e1d3dd3f521e
-DIST gcc-12.1.0-musl-patches-4.tar.xz 4448 BLAKE2B ddad7bccea7474a0552e069df25e66b4af68470da655aaf7669c2ceca7d0588cebb171e8a949c8935eeadff23af4d3de41d44245c06d48044cfc1d1fadc6540a SHA512 bb3b9e4a81efd2d0ceb405220a9c15453d780d8bc01ed5ebf4837a318e0f8ad8cc36d6ad3f2eed5051bb6dc82f223d8b61321b8f602890a770eefd69c0c144b9
-DIST gcc-12.1.0-musl-patches-5.tar.xz 4656 BLAKE2B b8dead8e796df2563cc7bfd4ad95f71f7cfbd51bc0d2bccb7479d2856cc3731b55f5e23b548c5f5f37790aae269815bbba6ee6596c5183847eed0bb1878bf340 SHA512 480e3e34e3f7e7ae27319fa9c51913125b2d4f41b0994c6df4c5c6f008d3ffdacbe059cd1ee643c2b9248a0c69db90867a076b0456c8d6649a1a7e9b62ff6800
-DIST gcc-12.1.0-musl-patches-6.tar.xz 3840 BLAKE2B 5d8ce4dcebd081fae485d3e1367c06c185e07c110b0cfe9598b71209c55adf96a26e198ab91fb3dfb33ddb2d8abd211a518dd74f5113cae1e3a4f90db32bb746 SHA512 b666ac0e9bef1b74dc5cc616ddb13dc40d9ecd1f5ae48b877cc1003356952a9afd800327d4210c732deb94554403d9b8730d2037bec380e413fc9a6cb59ecf23
-DIST gcc-12.1.0-patches-7.tar.xz 11584 BLAKE2B 4487726f8225d6bb2fde91fce8343c34ebece8cca08b258115a55b0f0c594e3a205efe26738c2b06cb8c6ea9d13b451514e073bb3a94d664a56120d9826515df SHA512 4882754d2f55c8144a5af4bcfbc1ee7802f08fc5acca96151cc6323a98e94b9246a69e067bcbf92dcdb8021499b8e1197cd7bd682876aca3e6f1f63a405c1dae
-DIST gcc-12.1.0-patches-8.tar.xz 12020 BLAKE2B 6138ef4d76a682ecfd05ba7c80d8f5db791ea24420d944b7f55b8aa55e7a42d02c0d20d0c25ebba92cdf85fdeb3dad7c7e2676d4a39197862bb90cfc9151ce48 SHA512 d2784967ca580bdc9308bc4b2449eb23601aab46bfcca10f4e7db2267e04950e4d9ffe4d0091fb916149a4982786c80959a069e0da07638bfdcf9d5b8926627b
-DIST gcc-12.1.0-patches-9.tar.xz 12536 BLAKE2B ceb045b2a5c5a2a3047d73296fa1057421ef58c7f793d1f031f43dbd1a6faf49bdf1956e96a4f8e34c4d3fde2c26fcc9b146c223d8b1b3e1f944c2ec8574b786 SHA512 b899ec2d6da65df0f32838be3c89dbb1dc6b423133aa5121635547a1aa18b5d52b920e62522143682c0818baf185ebacb75ab84383ef0ad9768ba567807da5f4
-DIST gcc-12.1.0.tar.xz 82701928 BLAKE2B dca5df8fea680dbeda721742cce5c97de7eb4be490a32a158e06b88e2b9dd092150b7cfe490bb69e48e2f75d8bba231c8a54cd46b48ddcdc01bf9553ab57019d SHA512 2121d295292814a6761edf1fba08c5f633ebe16f52b80e7b73a91050e71e1d2ed98bf17eebad263e191879561c02b48906c53faa4c4670c486a26fc75df23900
-DIST gcc-13-20220619.tar.xz 79328496 BLAKE2B 8c5104870593803b5cc0df02d671522f576bb56ad957e453d9f2bbc7995ccff2a4549ffef5f3beef15f2b9db6b1dc11b1993e2e5fa09feb9a5f6585be315f3f9 SHA512 69dfaf4a54a73b22127dd5167dd7d92e26e33e1bbf45507b05c97342db16264f96d78764745e41ac4ecade989789ac186364dcf9d13d765a5a5e7326469a9852
-DIST gcc-8.5.0-patches-2.tar.bz2 16921 BLAKE2B 619a47f74edf05fa01c9de59d0ff7abb027a01cf0bdec91ac41046166192f4eae561684136c4a6a5e077f64754bb5b0710905129f31b0def21d88f92e6bba7fb SHA512 b6095d4570895e2c4dd58fed5756194aea27391b813e5e2de42b2749cb318c4bea2087eb0ff92c70e7f98ae4482c49d476db57be83d7beb19fd462aa61714ab2
+DIST gcc-10.5.0-musl-patches-2.tar.xz 3452 BLAKE2B 5387e516d07d81477b3f39b8b3bd986bf861d32cd25dc5481c97bd3620d00c918c5661e86857f66dbf28a655401a53e43417f638c443e44cbfdbf5e950caac4d SHA512 86f2ce31cc4fc4fb5a6043fb527bf822d895e1a6220652024f78a1cbd5a962edb6be8dc5f43c32053e075f39bb2350ea8f14e7d57e0473dd2933a7b44676bde5
+DIST gcc-10.5.0-patches-6.tar.xz 18208 BLAKE2B 4cac3340108fb378c76ad62b728429f3c97f348d178744e7536575f3576ca8aa682b878b7df3b1c162dccae64a3cb56c66d8d60eae323e1ece2de4278084fdbd SHA512 9d6c84325fbc118cee01347468ce729c278e5b026b16da945fe54050726e26f86a46ee7b71a01a47cf927b70bfcce459c49a6bc4fb93dcfaa047c76d4c5bc5bc
+DIST gcc-10.5.0.tar.xz 77846412 BLAKE2B 9b71761f4015649514677784443886e59733ac3845f7dfaa4343f46327d36c08c403c444b9e492b870ac0b3f2e3568f972b7700a0ef05a497fb4066079b3143b SHA512 d86dbc18b978771531f4039465e7eb7c19845bf607dc513c97abf8e45ffe1086a99d98f83dfb7b37204af22431574186de9d5ff80c8c3c3a98dbe3983195bffd
+DIST gcc-11-20240111.tar.xz 76240620 BLAKE2B dcf3b2493ca6ba1a9cd0137186cfbf1b96296ff9c5625e40ec7b89e5903b07dc151b61ad54b885fc57ccc02214e2cfa7b9249cbd755ac2554c6ca0008f0704d8 SHA512 aaed094cb6dd99166e0ec59886014108574ddab52701581f0f8e7f0abb966320d01f1bce6ff646170618ca7c2819d20523a23615f20114dbe412de43b937caf4
+DIST gcc-11-20240208.tar.xz 76276224 BLAKE2B efce83c3ea03093546b73d7731ac1051da7a2b0309612ce5b809ae2756bf7a949c94f951f6a77e789f7669051315e1a4e4c33f2b12a2ec1999ee9f1f39f6b13f SHA512 a0e2b4402ff187d0804e3bc2ed0a228cfce48476c1270d57798b060899f65c7e986945651d36c358f9df5eb4b36db13321e141895329b7382c130a0aca6a8962
+DIST gcc-11-20240328.tar.xz 76268060 BLAKE2B a3ffdd5a2376b1d3984ca39837932e1c6dc047ff6ae72eac0387cf27acdf8f1a1ff7e9584f631de348b6553e929892d8bc443ad6c40132a2636c39a8907c5eec SHA512 6372a99f2a1320c7df6e7984bb780395aaf8319624f311d955d5dbab2ac7bfb8de933c5b945bc3c4ea3b5d7404b8fc2d696825214b6563c1e032094a421b8bd2
+DIST gcc-11-20240404.tar.xz 76246936 BLAKE2B 09eed1bff289e960018b8c9c5d39e43ebcff78d344feba45d7889149e0de0d2727a54a0359471eab9a28cb38d5750b488c62cbffbf937ab7238eab51f3e7d0b7 SHA512 431f0b8d78f2b5e910ca8de8e8f64594f070639c17bc65a074650c217a5262cb9081db7e090bd3396e30ef50e92ed3ada0d163b4cabf04f2ae78fd02dba8c05a
+DIST gcc-11-20240411.tar.xz 76275268 BLAKE2B a24769b7f4b6d111b1fc46f9a99f9f731193a15b9a1a73fc224388721f0e3b6d02022eb0dc44a3d587522ad124bf63ce9ee50b9622ec91b55001c46fbc261776 SHA512 43fef6a426b4b8001c1d8707c34339203e66dcfa580cf289e20cd7abeaf0f8b57068ab1099099c4692a7acce1bc38bb978bcff6c309f30e3430457af5b7fb018
+DIST gcc-11-20240418.tar.xz 76255988 BLAKE2B 363f195d8e23915511e768c303550e6e3a67aa45e3f55945cf763fbbcaea7e28932e5094d2fe4c26f8a920ad3479523c27b8aef14716cb7d26cd7da7a69196fa SHA512 a6072e40ad233759f8f893b5c7962df5cc926cd5322bf1b3986b88013628ac7b08eea23a8f5f5bf75444e26e6106d0ebfab26caa82974805308d17f6b69b36d0
+DIST gcc-11-20240425.tar.xz 76259112 BLAKE2B df54ece1a13e56f25ac236c42bbab3c6185d2971ef68f7d6a06ce0e5e367a1b56e43bb7e1f2c0757e33c3c92c31ce7dcec52f325a3c494ae8d855a5f082a5a79 SHA512 600bc31506e512d6ff93f7e6a6cbc47b2282338972d7dd006a931c9ed6af9e494d716e51f4ada1c551e1fb10df5d04ddd3937228e846bd76243024e21ecef073
+DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0eaefafcba9d04e1ad0fd7baeea5a694ab6f5e3c1678cb406f2a1bd17bab25cb01699d032713a1ccf337948dfda2093844607 SHA512 17b84f907cb1bd763873655e6f35fd3ed55a40b602b70a626f04f83b4cc89c6261db1661de78d4d969187a8c56e9f6305b742515a3836b962248a21df0df5d0c
+DIST gcc-11.4.0-patches-12.tar.xz 13824 BLAKE2B e4df9e0dc9512882022aaf325ebf65c540169454c91dd31f913c6f57f6eb291c79ae919671b53db1549799d4a70c09298bf45ed82ad05eb1f961443cc958369d SHA512 87fed0c3f8e28c9f702443db58350bb615110b27ebe334b5de2ea60678e2548c56cd75cffade210d69634e2ac0a9311f5100ddb45d97645aa76d5688bc421a61
+DIST gcc-12-20240112.tar.xz 79832228 BLAKE2B deec7123b8ffc42ddace51e1f3e8e08d5485f7000c0d4b7273b6311912ec0e7e2cb41124297af8c54456bb369a76fa2ef51aff552d8d680ec41dd2b144b08e55 SHA512 2c0a676ad35e6edee915c042a1751ac0263fae9b7af4d324deb49d6603dc73d3ec768832184879543e6ffb1595da5c56d9117288547adab7f243646dcbfc64ac
+DIST gcc-12-20240209.tar.xz 79824868 BLAKE2B 1ae5a646da470f06648c4766c77475ceb287c5f6647d5102f1aef6590f973233d5e7f83b5e0241488d49dba59dd605c211938379e68a393a2dccb3834103ae4b SHA512 9f9a04f4477f41bb2a5662aedef2af75b039de50c2dc99310e504e6080cb7aae06a1255337ea2e563975cb108ddc6766adbbaf4e3d5d5712801d7ba9a5209dbd
+DIST gcc-12-20240329.tar.xz 79862704 BLAKE2B 2ac09aeed2718acfcbb8d0d71e51f21cab9b186c73860cfabcf95a7ed4c37eb461fb26f86ee7319c614c21208c0fdf841b660d314eacd8314e8f323edd37f7cf SHA512 56d67cac2744c7fcb28eda9a29ba200d418a9e44fecc37b29747c2abac479e366b591ad6f7f92ce64b09dd3d0261af8ef28673beee1280618e043cf66f3b76ac
+DIST gcc-12-20240405.tar.xz 79849308 BLAKE2B d94046fead6cacd3e3b869f1db42843a2487d845ded332ad0fd55a7f290a4c3df72258dc1b74e4db3d7f7357e6b55444cde4b8863f2ce6f8691fd92bd49927fb SHA512 93ed2174ac3cdd8d5e885c6f4f546f9d0557e93bc9583a02d5d159c666fe6a82f30b6ed074f5f1e36f6f82855c41be527fb3d053498059ee4a6194575b00ed0d
+DIST gcc-12-20240412.tar.xz 79856320 BLAKE2B b83d64584a2c5bade96b7964349e4b760d5b40a4d10256799130d329f5748d2741a5122105f094f161f95eb8ade64109276aec723a518a42d695b41c8f08d61e SHA512 2a8a3ae4779f1cc897846b9d5e2eeb94ea8ece72d061c0f2436e854bb26eef33eb51c66bee6c0c363be04023e5c5ce3e3a88c9aaa7ae9faaa9322fd18dfbfae3
+DIST gcc-12-20240419.tar.xz 79851084 BLAKE2B fff60c92dc6a2c10c413d837ab9a02959efd24896f1e174a3a15c4d1676abd72b68aa4c88ea3be16b521ecbb0e93afefe6df27b0099809b16426cea0c6ccef07 SHA512 09aefc61f8dea440ca2ffc7e448173c013769415e8bcc86695566d3fe7905b6943bca740f76035383399aef3086822de674265e0b881c504e458f8c6fb4b2b80
+DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b778622fa310ac72a72b2f7032494a8f304eac86217f9204622e6c21aaef9952bece0d09bc126facd4f42b602927909815ab5 SHA512 babc279fea2c1fd4c018815f2f5630214fd46015ce9f365c28af242681d51818eaca30ce298eddcab1eed5ac5f2759e2b47b2335afab9d722b4469a6d4fec326
+DIST gcc-12.3.0-patches-2.tar.xz 14236 BLAKE2B 06c43662c9abb0fa3cf90d5e2273c69aecb9158e6cf6f23c04754ed5d686be2616e81e2502eb16f4298ddd50518ca7677e13249da9e9b091162d3931ff65e4fe SHA512 b0d4b85dbf1a54aaaa1997203b872e3106906b4ad49cde57e1428bc22b2f8e2d73b8cb10ae0d0b792aebaf664594da4d1dea04c44ddc34e59047410766db04d1
+DIST gcc-12.3.0-patches-3.tar.xz 14852 BLAKE2B 7a5f1f43063b15f424099afd72096212fbbbc5151ff01f2de15dfb6e7cf274981c8cfaedba9ef61576c9096fb172fc550a7deb5cd7d9366fd249fd5dd3951f76 SHA512 aa89e4c2ae02f4fb42229ad5167f2eaa3a8fae51118645bf07199fe2124b9c83948590662b053d08002ef709fa870ea88315fd4ccbe4441a74e9cb62edcb82fb
+DIST gcc-13-20240113.tar.xz 84356052 BLAKE2B 1fbfffc9f2afe443158e3f26182c8bdc3f3b599c5582762117831ecb6e6d3c1c69e8d2e5932f45eb7d534c3967e08a9f7b1bcec31aa5d7ac608bebff9f35120c SHA512 a59886f707cf18f684295031d4d9fc5b03396face1705e61852d7de98729c53ac4cf209e951d00c232f14e9dc48eee40dd92487db7cb6ad0e80f2339d6d9503a
+DIST gcc-13-20240210.tar.xz 84354416 BLAKE2B 5807623d3f7dd751b6dfe164cfd50d57b2f93485c23c3c2228a4a846a9a94cdad52a5e6f2806e5e7ee2a7b5526386ebdb339c44c7ea023d69f8652088a1b114d SHA512 14a01ced7ac2bfd9fc93de4e3819b4d0823fbe129d3f1faabeb707e9e3e2613b4173321b58b3648a7250e3b7ff5d94edfee60e6c38682f31a1f7b57b1c01433f
+DIST gcc-13-20240330.tar.xz 84407332 BLAKE2B 28b40915bf8e9ecf71b50d06fcdf69c01e87d3635f0c6b6159e003a0876453ada062cc538204604885e1350d226417fe9d7cbdb5e39146f9fde0d524ad34ff07 SHA512 4c4c4be522feb9ebe1bc868db59f0828de1154f80afad6c32bc2c7cf45df3797cb5e6dce2b35a297194ea87f81e34439f4d87bd88cabf0a29ce686e1b29e7a08
+DIST gcc-13-20240406.tar.xz 84392728 BLAKE2B 42a560b01677350c480bde2a7436a8be4d2259100dd6f2f9e7c5555adb3d13ee1f51bfae058ceb0cc2ca4d527b302b5250f26b3d6b26fa9c7a2f5715aa003a3f SHA512 e5ec524df7e9498a23ccfa42e28c5ce284fecdbb4771980328257d8251a11740c4cd3970d6bbe13052907b257d8e89b176d183c895168cf524dda12582d05d86
+DIST gcc-13-20240413.tar.xz 84405692 BLAKE2B 4df749357ed33afdb0255b4dc02ae568ce12e461c07a535f3736c2dcd9f779391846097aeb99ed70f5f45dbc029244a0c994b84f1de1086cce3da23bba719984 SHA512 934857721e1a92ea709e1ff6f64dbb8a47df4c614935ec298ded0a19bb92342e50bb8ab7eccd6e3ab46ca00e86ed34b499d4b06379a689bf48bf4201f3956006
+DIST gcc-13-20240420.tar.xz 84407856 BLAKE2B 188b92454735223a4da7af2b5b57bb52c6362778550aa6ddbc445d3a2e0700494db2f743da59961ceccb756791f01c23f76c83224daeaccfb561cd1d2e6ece7c SHA512 6be1fbb1cddebbccf38da4424af56e173d0c4a53e63ed3a9d86398f23053747a231287ce7bdeb5666ceeb4f3385dee228cc05fba19beaf4d7b2c9cbe1f14a489
+DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
+DIST gcc-13.2.0-patches-12.tar.xz 47404 BLAKE2B ed018bcd7429d1c7aace746cbfc4e59dae409fc0a35231320c1b44c96fff0d912eba5c72109c2deb883f5368159df02148b2d4373396b34da882164c61fe4387 SHA512 b7872a03870bce7b633e4af4329b24fe8f3d50d6d9173f63549f606ce062787748af7f79e7ec4afeb768968d6e8462a849bd1b94316ea6bb284551f99e811617
+DIST gcc-13.2.0-patches-14.tar.xz 46928 BLAKE2B fce23bc5315f35b04a4976550c4b44578944a1b17e40c7553351eeb8a1ef0f3a2538da5a5e1ae6f37b784ff11bbd8a44b8f6eec542be63e34d984dee69e1cd81 SHA512 d7d52bb2915fd89c06b0134bede8db939cadbb1f2dcddf923bee2c3f9f577ff9e5e986b60420d892539edf82867a0d1bd635807814bc618b06a2b37cdaca893a
+DIST gcc-13.2.0-patches-15.tar.xz 47052 BLAKE2B f145341813d6baf9cbcc3e8421c7f427148503d2aeddd6a2eaac1ad3d470a818292392861542a7915d8b0f2f9b3255603f394b2e6833141658fc035bcd2b5366 SHA512 c89a3fccd944f03d25e076a967c3b220803ee9a6fbedec1daf2c20f629dd6162ce6be4f259522bd193169f0e8307daa9895b5d8581cf975ee086e5abfd675e34
+DIST gcc-14-20240317.tar.xz 87764960 BLAKE2B 5cd957c3bf5e2fbb134b716a7ed14c0ace66d5c944e15422e66affbf110b76ba3b4bf83a05af49eec23d8f1543ca36c3d6ce81fa1b292cba47eceb517c3a7352 SHA512 77ade098872f687a3fb23dcb612eeed27a3ecf816304a218d695d2be7433576ceafcb13a9cfde3ed7fc9e48bfaee8521b77cfbabfe41b2557328cc95f3e73ebe
+DIST gcc-14-20240324.tar.xz 87808876 BLAKE2B 546b69f4562cfee6a3d5d8700e2a9bd0da001e3dde04825754ec5298144243ea4c975d0bf0366711fc9680f263732afb40c083fe9268f578b89e7d006b8d4955 SHA512 16b00690bf541784a109bc2382bbdf8ba6b72b416b130905d020182708ae687cbeca28197ab16539032ce9db3ad0e062e4231f9ef4c2d2452b14ed2b0ff3596e
+DIST gcc-14-20240331.tar.xz 87841560 BLAKE2B 7a3c0beb8234c38e4ad5d27369e848c178053a595bb6a4d2f5e2c848c5ddcd8a89b7674190d6964d5b3fd49709fb3f9be22e651a21543384f0210355bfca79fc SHA512 c7883d3ecb65e46783d8ce5efa87b53600aa84736a9af026b51ed5fdd827cae20729d4cb5cba70d3322ae7ca72c2d5a6944e5dee4174226bfc3c6398777d6377
+DIST gcc-14-20240407.tar.xz 87887372 BLAKE2B 76f9994af354fdd262420d80c6780dbf447a2ef64f09702523c31056d662227571d70cffab067ba82bcf4dee02a81a072382cb579a15af6f0b5edd4c1e51c1af SHA512 02d1ff0ee65ab7b0159d3d22a30ffd9055f3e7bf5f598663d5b711092dedd96bc67b511da37cbc785987d2f3460e2e38653c8fe6c7c3d34970fa1055db33cc0c
+DIST gcc-14-20240414.tar.xz 87980364 BLAKE2B 9b8d4ff7127d5f5cf805d6caa6956acaf24be3d628cbbd82d6bf926e40c8ed0088bf2bf386072ca3ea93ee4d945e4270c1977a5cf96ae4ff24ae32ce768fffa5 SHA512 552d0c49e3903cc42b46f44f1cedd5f1135997cebcd9e1d28c01474ef4365b1136cccb490923923c7633dfe94d744c8882fda1bb286a7dcb2cc26a90d4c3e99f
+DIST gcc-14-20240421.tar.xz 87982608 BLAKE2B e977ee966d7256e996064d0cb3a01ccbece49c6609e8c2bff54650a6d1965e72faf6ed0fe06f50e223f4edea83b44d4f2664d8141d7a8ba371485c9b4877c38e SHA512 f211ae16cc7c64ad097d33c6f092fb64c8c547efd0bf2975f536b457cf0314c7613d39fa82cf04c4a62facf47c4cd214f73a3f2347dd8f73b6d95a5836614f98
+DIST gcc-14.0.0-musl-patches-1.tar.xz 3576 BLAKE2B 692baee8a7709905d53aeb150d73a3721c4ba47ee5f397cfb1b5be905cf003ca02b60c94ee294d90ac39645cd5cdf186c7a3aa950c47d8cf680c128ed705b807 SHA512 0592ab98a7142e404623a6511c67dff61e9ade32c3fb2c0e75b456306e0af3799ad13252b50b3d2fdd31e5815d7f0b16b0ad63ab8386fe4d78729fc9c182d617
+DIST gcc-14.0.0-patches-25.tar.xz 12352 BLAKE2B c006fa3c2454ef4db073f718d54cab33d2832d233199469b1755f23bb168fd725eaec7ad60fb89e4e9965ad2870c35a232edd07ea2a781ca1f0d67964ad4c2e6 SHA512 1ab587c2e9873dd93356dfff30f02916811392b4c878e16f5b2129f833a974f96245deb6db346dde01e07e4ab162bb83be7c5ba1e1edd32efc0404a422268c52
+DIST gcc-14.0.0-patches-26.tar.xz 12360 BLAKE2B a2fdd6ff1774bc94f96bc4f7da4092c373936c93e04b94e75701227ab55d530523fee6b561773d05080e51748cc7716868d8b108f51a06e37a2c26a1d7f39b33 SHA512 1275e6345417ee196e74c46845d05508c8662d71e2432fbfbf7f1eb9c220657b4ee8e3b0ca02b7b4c7e14df164f254380c65af91cadc3bda4cd7afbe6af5ea8b
+DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6
DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8
-DIST gcc-9.4.0-patches-1.tar.bz2 14012 BLAKE2B d5fbfd73d9c3a5b66be5b124d981fe5a7468363c83784989a50731f87931435f4b6302e4c20a64b20680581ed40005eff7bdd5855526a093f73a04c3c1ddab31 SHA512 b84884c7d2197cb14229d3321b98cd66c783cf9ebf7e5d1b1186e6cf32ee9e47d004ebad26118f9c848f9bc0a3783ceb23d9b65101d98c3bfa99874e66ee7cbc
+DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf
DIST gcc-9.5.0.tar.xz 72462752 BLAKE2B 69e39314ee6bb46e3be491ba9c3cbc4914cb716f732c6d3f2b14d9382750b40c4f14b5d3051225b81f936ef8297b0ba8cb5439512e961dae5815d3bee2b0bfdb SHA512 cdd144ce4f747e051480410afc8506c90a57cb45da89071ddae377b1453bca3014422455ade9fe4563ebe51f4b6348cbc0c61905a9b8801cd597d51ad0ec62b3
+DIST gcc-validate-failures-7bbfb01a32b73842f8908de028703510a0e12057.py 27533 BLAKE2B 58917750d247d3a9e7078c62fd4412027a7d02d06c659a9c0743697529754218257c00dc6e10dff467e78b4e019225c39b1627b48a5298d13481a7072748a15f SHA512 b74d6358538d1b076f3d5b6632ea405b99627d5b5621b6f5101cb3453be13ba41e11d590039535b0c74b1624b69885a7093600d5395cc60bc63cea15ae7472b3
diff --git a/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch b/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch
deleted file mode 100644
index d06410650bb0..000000000000
--- a/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://bugs.gentoo.org/803371
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80196
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
---- a/configure
-+++ b/configure
-@@ -17044,7 +17044,7 @@ else
- fi
-
-
--RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
-+RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5
- $as_echo_n "checking where to find the target ar... " >&6; }
---- a/configure.ac
-+++ b/configure.ac
-@@ -3529,7 +3529,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
- ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
- ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc)
-
--RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
-+RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
-
- GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar])
- GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new])
-
diff --git a/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch
new file mode 100644
index 000000000000..6d1681938b07
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch
@@ -0,0 +1,21 @@
+Revert of https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=59e4c98173a79fcaa2c33253261409f38856c384
+for now to fix cross fixincludes builds.
+
+https://bugs.gentoo.org/905118
+https://bugs.gentoo.org/925204
+https://bugs.gentoo.org/926059
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -532,11 +532,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
+ # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
+ NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
+ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
+-ifeq (@includedir@,$(prefix)/include)
+- CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+-else
+- CROSS_SYSTEM_HEADER_DIR = @includedir@
+-endif
++CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+
+ # autoconf sets SYSTEM_HEADER_DIR to one of the above.
+ # Purge it of unnecessary internal relative paths
diff --git a/sys-devel/gcc/files/gcc-14.0.1_pre20240324-PR114439.patch b/sys-devel/gcc/files/gcc-14.0.1_pre20240324-PR114439.patch
new file mode 100644
index 000000000000..2f92ab10cebf
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-14.0.1_pre20240324-PR114439.patch
@@ -0,0 +1,112 @@
+https://bugs.gentoo.org/927657
+https://gcc.gnu.org/PR114439
+https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=de0886d48032332d10e4acb5d15c8789b281b6fe
+
+From de0886d48032332d10e4acb5d15c8789b281b6fe Mon Sep 17 00:00:00 2001
+From: Marek Polacek <polacek@redhat.com>
+Date: Mon, 25 Mar 2024 15:32:20 -0400
+Subject: [PATCH] c++: broken direct-init with trailing array member [PR114439]
+
+can_init_array_with_p is wrongly saying that the init for 's' here:
+
+ struct S {
+ int *list = arr;
+ int arr[];
+ };
+
+ struct A {
+ A() {}
+ S s[2]{};
+ };
+
+is invalid. But as process_init_constructor_array says, for "non-constant
+initialization of trailing elements with no explicit initializers" we use
+a VEC_INIT_EXPR wrapped in a TARGET_EXPR, built in process_init_constructor.
+
+Unfortunately we didn't have a test for this scenario so I didn't
+realize can_init_array_with_p must handle it.
+
+ PR c++/114439
+
+gcc/cp/ChangeLog:
+
+ * init.cc (can_init_array_with_p): Return true for a VEC_INIT_EXPR
+ wrapped in a TARGET_EXPR.
+
+gcc/testsuite/ChangeLog:
+
+ * g++.dg/init/array65.C: New test.
+---
+ gcc/cp/init.cc | 6 ++++-
+ gcc/testsuite/g++.dg/init/array65.C | 38 +++++++++++++++++++++++++++++
+ 2 files changed, 43 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/g++.dg/init/array65.C
+
+diff --git a/gcc/cp/init.cc b/gcc/cp/init.cc
+index dbd37d47cbf..a93ce00800c 100644
+--- a/gcc/cp/init.cc
++++ b/gcc/cp/init.cc
+@@ -950,12 +950,16 @@ can_init_array_with_p (tree type, tree init)
+ mem-initializers of a constructor. */
+ if (DECL_DEFAULTED_FN (current_function_decl))
+ return true;
+- /* As an extension, we allow copying from a compound literal. */
+ if (TREE_CODE (init) == TARGET_EXPR)
+ {
+ init = TARGET_EXPR_INITIAL (init);
++ /* As an extension, we allow copying from a compound literal. */
+ if (TREE_CODE (init) == CONSTRUCTOR)
+ return CONSTRUCTOR_C99_COMPOUND_LITERAL (init);
++ /* VEC_INIT_EXPR is used for non-constant initialization of trailing
++ elements with no explicit initializers. */
++ else if (TREE_CODE (init) == VEC_INIT_EXPR)
++ return true;
+ }
+
+ return false;
+diff --git a/gcc/testsuite/g++.dg/init/array65.C b/gcc/testsuite/g++.dg/init/array65.C
+new file mode 100644
+index 00000000000..0b144f45a9d
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/init/array65.C
+@@ -0,0 +1,38 @@
++// PR c++/114439
++// { dg-do compile { target c++11 } }
++
++struct S {
++ int *list = arr;
++ __extension__ int arr[];
++};
++
++struct R {
++ int *list = arr;
++ int arr[2];
++};
++
++struct A {
++ A() {}
++ S s[2]{};
++};
++
++struct A2 {
++ A2() {}
++ S s[2]{ {}, {} };
++};
++
++struct B {
++ B() {}
++ R r[2]{};
++};
++
++struct B2 {
++ B2() {}
++ R r[2]{ {}, {} };
++};
++
++struct S1 { S1(); };
++struct S2 {
++ S2() {}
++ S1 a[1] {};
++};
+--
+2.39.3
diff --git a/sys-devel/gcc/files/gcc-configure-LANG.patch b/sys-devel/gcc/files/gcc-configure-LANG.patch
deleted file mode 100644
index d1b1b0353662..000000000000
--- a/sys-devel/gcc/files/gcc-configure-LANG.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
-option parsing, it may break.
-
-http://bugs.gentoo.org/103483
-
---- configure
-+++ configure
-@@ -54,6 +54,19 @@
- infodir='${prefix}/info'
- mandir='${prefix}/man'
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ eval $as_var=C; export $as_var
-+ else
-+ unset $as_var
-+ fi
-+done
-+
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
-@@ -452,16 +463,6 @@
- esac
- done
-
--# NLS nuisances.
--# Only set these to C if already set. These must not be set unconditionally
--# because not all systems understand e.g. LANG=C (notably SCO).
--# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
--# Non-C LC_CTYPE values break the ctype check.
--if test "${LANG+set}" = set; then LANG=C; export LANG; fi
--if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
--if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
--if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
--
- # confdefs.h avoids OS command line length limits that DEFS can exceed.
- rm -rf conftest* confdefs.h
- # AIX cpp loses on an empty file, so make sure it contains at least a newline.
-@@ -1850,6 +1850,19 @@
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then
-+ eval \$as_var=C; export \$as_var
-+ else
-+ unset \$as_var
-+ fi
-+done
-+
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
diff --git a/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
deleted file mode 100644
index d62162f1a68d..000000000000
--- a/sys-devel/gcc/gcc-10.3.0-r2.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-TOOLCHAIN_PATCH_DEV="slyfox"
-PATCH_VER="3"
-MUSL_VER="1"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- if has_version '>=sys-libs/glibc-2.32-r1'; then
- rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
- fi
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild b/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild
deleted file mode 100644
index e07e3b74876d..000000000000
--- a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="0"
-PATCH_GCC_VER="10.4.0"
-MUSL_VER="1"
-MUSL_GCC_VER="10.3.0"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- if has_version '>=sys-libs/glibc-2.32-r1'; then
- rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
- fi
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-10.3.1_p20220623.ebuild b/sys-devel/gcc/gcc-10.3.1_p20220623.ebuild
deleted file mode 100644
index 3b0410d85b84..000000000000
--- a/sys-devel/gcc/gcc-10.3.1_p20220623.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_SUFFIX="xz"
-TOOLCHAIN_PATCH_DEV="sam"
-#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="1"
-MUSL_VER="1"
-MUSL_GCC_VER="10.4.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
-elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
- # Cheesy hack for RCs
- MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
- MY_P=${PN}-${MY_PV}
- GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
- TOOLCHAIN_SET_S=no
- S="${WORKDIR}"/${MY_P}
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-
-# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-#fi
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- if has_version '>=sys-libs/glibc-2.32-r1'; then
- rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
- fi
-
- toolchain_src_prepare
-}
diff --git a/sys-devel/gcc/gcc-10.4.1_p20220630.ebuild b/sys-devel/gcc/gcc-10.4.1_p20220630.ebuild
deleted file mode 100644
index b2fac30d2ffc..000000000000
--- a/sys-devel/gcc/gcc-10.4.1_p20220630.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_SUFFIX="xz"
-TOOLCHAIN_PATCH_DEV="sam"
-#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="2"
-MUSL_VER="1"
-MUSL_GCC_VER="10.4.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
-elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
- # Cheesy hack for RCs
- MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
- MY_P=${PN}-${MY_PV}
- GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
- TOOLCHAIN_SET_S=no
- S="${WORKDIR}"/${MY_P}
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-
-# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-#fi
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- if has_version '>=sys-libs/glibc-2.32-r1'; then
- rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
- fi
-
- toolchain_src_prepare
-}
diff --git a/sys-devel/gcc/gcc-10.4.0.ebuild b/sys-devel/gcc/gcc-10.5.0.ebuild
index 81fd79a887f9..9203c7468723 100644
--- a/sys-devel/gcc/gcc-10.4.0.ebuild
+++ b/sys-devel/gcc/gcc-10.5.0.ebuild
@@ -1,42 +1,45 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
-#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="2"
-MUSL_VER="1"
-MUSL_GCC_VER="10.4.0"
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="6"
+MUSL_VER="2"
+MUSL_GCC_VER="10.5.0"
+PYTHON_COMPAT=( python3_{10..11} )
-if [[ $(ver_cut 3) == 9999 ]] ; then
+if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
if [[ ${MY_PV_2} == 0 ]] ; then
MY_PV_2=0
+ MY_PV_3=0
else
- MY_PV_2=$(($(ver_cut 2) - 1))
+ MY_PV_2=$((${MY_PV_2} - 1))
fi
# e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs
MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
MY_P=${PN}-${MY_PV}
- GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
TOOLCHAIN_SET_S=no
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+ :;
fi
RDEPEND=""
diff --git a/sys-devel/gcc/gcc-10.5.9999.ebuild b/sys-devel/gcc/gcc-10.5.9999.ebuild
deleted file mode 100644
index d43d8bf4fbb3..000000000000
--- a/sys-devel/gcc/gcc-10.5.9999.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_SUFFIX="xz"
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_GCC_VER="10.4.0"
-MUSL_GCC_VER="10.4.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- if has_version '>=sys-libs/glibc-2.32-r1'; then
- rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
- fi
-
- toolchain_src_prepare
-}
diff --git a/sys-devel/gcc/gcc-11.2.0.ebuild b/sys-devel/gcc/gcc-11.2.0.ebuild
deleted file mode 100644
index 9dc5d2276295..000000000000
--- a/sys-devel/gcc/gcc-11.2.0.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-TOOLCHAIN_PATCH_DEV="slyfox"
-PATCH_VER="1"
-MUSL_VER="1"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- toolchain_src_prepare
-
- if tc-is-cross-compiler ; then
- # bug #803371
- eapply "${FILESDIR}"/gcc-11.2.0-cross-compile-include.patch
- fi
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild b/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild
deleted file mode 100644
index 4e44bafeab22..000000000000
--- a/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="4"
-PATCH_GCC_VER="11.3.0"
-MUSL_VER="1"
-MUSL_GCC_VER="11.3.0"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~riscv ~s390 sparc x86"
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.3.0.ebuild b/sys-devel/gcc/gcc-11.3.0.ebuild
deleted file mode 100644
index b02633ee3060..000000000000
--- a/sys-devel/gcc/gcc-11.3.0.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="5"
-PATCH_GCC_VER="11.3.0"
-MUSL_VER="1"
-MUSL_GCC_VER="11.3.0"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.3.1_p20220624.ebuild b/sys-devel/gcc/gcc-11.3.1_p20220624.ebuild
deleted file mode 100644
index 66746a359bd7..000000000000
--- a/sys-devel/gcc/gcc-11.3.1_p20220624.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-TOOLCHAIN_PATCH_SUFFIX="xz"
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="0"
-PATCH_GCC_VER="11.4.0"
-MUSL_VER="0"
-MUSL_GCC_VER="11.4.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-
-# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-#fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.3.1_p20220701.ebuild b/sys-devel/gcc/gcc-11.3.1_p20220701.ebuild
deleted file mode 100644
index fec8a9f96524..000000000000
--- a/sys-devel/gcc/gcc-11.3.1_p20220701.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_SUFFIX="xz"
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="1"
-PATCH_GCC_VER="11.4.0"
-MUSL_VER="0"
-MUSL_GCC_VER="11.4.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-
-# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-#fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.4.1_p20240111.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240111.ebuild
new file mode 100644
index 000000000000..7e0cd54888ec
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.4.1_p20240111.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-11.4.1_p20240208.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240208.ebuild
new file mode 100644
index 000000000000..9b1b89ca2bff
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.4.1_p20240208.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-11.4.1_p20240328.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240328.ebuild
new file mode 100644
index 000000000000..5ab7ed2dbcfa
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.4.1_p20240328.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-11.4.1_p20240404.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240404.ebuild
new file mode 100644
index 000000000000..9b1b89ca2bff
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.4.1_p20240404.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-11.4.1_p20240411.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240411.ebuild
new file mode 100644
index 000000000000..5ab7ed2dbcfa
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.4.1_p20240411.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-11.4.1_p20240418.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240418.ebuild
new file mode 100644
index 000000000000..5ab7ed2dbcfa
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.4.1_p20240418.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-11.4.1_p20240425.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240425.ebuild
new file mode 100644
index 000000000000..5ab7ed2dbcfa
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.4.1_p20240425.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-11.4.9999.ebuild b/sys-devel/gcc/gcc-11.4.9999.ebuild
deleted file mode 100644
index de29705ca377..000000000000
--- a/sys-devel/gcc/gcc-11.4.9999.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-TOOLCHAIN_PATCH_SUFFIX="xz"
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_GCC_VER="11.4.0"
-MUSL_GCC_VER="11.4.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.5.9999.ebuild b/sys-devel/gcc/gcc-11.5.9999.ebuild
new file mode 100644
index 000000000000..124b2c1eeeb5
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.5.9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.1.0.ebuild b/sys-devel/gcc/gcc-12.1.0.ebuild
deleted file mode 100644
index d2fce9d32825..000000000000
--- a/sys-devel/gcc/gcc-12.1.0.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="5"
-PATCH_GCC_VER="12.0.0"
-MUSL_VER="4"
-MUSL_GCC_VER="12.0.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- KEYWORDS="~loong"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild
deleted file mode 100644
index aa68dc8eaadf..000000000000
--- a/sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="7"
-PATCH_GCC_VER="12.1.0"
-MUSL_VER="4"
-MUSL_GCC_VER="12.1.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- KEYWORDS="~loong"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild
deleted file mode 100644
index 51819ad52713..000000000000
--- a/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="8"
-PATCH_GCC_VER="12.1.0"
-MUSL_VER="5"
-MUSL_GCC_VER="12.1.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.1.1_p20220702.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220702.ebuild
deleted file mode 100644
index 4ce888a6319a..000000000000
--- a/sys-devel/gcc/gcc-12.1.1_p20220702.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="9"
-PATCH_GCC_VER="12.1.0"
-MUSL_VER="6"
-MUSL_GCC_VER="12.1.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- KEYWORDS="~loong"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.2.9999.ebuild b/sys-devel/gcc/gcc-12.2.9999.ebuild
deleted file mode 100644
index d1a72887e795..000000000000
--- a/sys-devel/gcc/gcc-12.2.9999.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_GCC_VER="12.1.0"
-MUSL_GCC_VER="12.1.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.3.1_p20240112.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240112.ebuild
new file mode 100644
index 000000000000..6c45c55e4a05
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20240112.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+PATCH_VER="2"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.3.1_p20240209.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240209.ebuild
new file mode 100644
index 000000000000..f0ad270b596f
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20240209.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+PATCH_VER="3"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.3.1_p20240329.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240329.ebuild
new file mode 100644
index 000000000000..2c4b89e72445
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20240329.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+PATCH_VER="3"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.3.1_p20240405.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240405.ebuild
new file mode 100644
index 000000000000..2c4b89e72445
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20240405.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+PATCH_VER="3"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.3.1_p20240412.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240412.ebuild
new file mode 100644
index 000000000000..2c4b89e72445
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20240412.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+PATCH_VER="3"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.3.1_p20240419.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240419.ebuild
new file mode 100644
index 000000000000..2c4b89e72445
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20240419.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+PATCH_VER="3"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-12.4.9999.ebuild b/sys-devel/gcc/gcc-12.4.9999.ebuild
new file mode 100644
index 000000000000..4828fd444e14
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.4.9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+MUSL_GCC_VER="12.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.0.0_pre20220619.ebuild b/sys-devel/gcc/gcc-13.0.0_pre20220619.ebuild
deleted file mode 100644
index 0c0625463882..000000000000
--- a/sys-devel/gcc/gcc-13.0.0_pre20220619.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_GCC_VER="13.1.0"
-MUSL_GCC_VER="13.1.0"
-TOOLCHAIN_USE_GIT_PATCHES=yes
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- MY_PV_3=$(($(ver_cut 3) - 9998))
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- MY_PV_3=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=master
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND="${CATEGORY}/binutils[cet(-)?]"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-13.0.9999.ebuild b/sys-devel/gcc/gcc-13.0.9999.ebuild
deleted file mode 100644
index 121075573253..000000000000
--- a/sys-devel/gcc/gcc-13.0.9999.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_GCC_VER="13.1.0"
-MUSL_GCC_VER="13.1.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
- MY_PV_2=$(ver_cut 2)
- MY_PV_3=$(($(ver_cut 3) - 9998))
- if [[ ${MY_PV_2} == 0 ]] ; then
- MY_PV_2=0
- MY_PV_3=0
- else
- MY_PV_2=$(($(ver_cut 2) - 1))
- fi
-
- # e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
-fi
-
-inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=master
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND="${CATEGORY}/binutils[cet(-)?]"
-
-src_prepare() {
- local p upstreamed_patches=(
- # add them here
- )
- for p in "${upstreamed_patches[@]}"; do
- rm -v "${WORKDIR}/patch/${p}" || die
- done
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-13.2.1_p20240113-r1.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240113-r1.ebuild
new file mode 100644
index 000000000000..27e1e5ab20bc
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.2.1_p20240113-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.2.1_p20240210.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240210.ebuild
new file mode 100644
index 000000000000..e2094692e1f6
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.2.1_p20240210.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+PATCH_VER="14"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.2.1_p20240330.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240330.ebuild
new file mode 100644
index 000000000000..1e4b87a7546c
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.2.1_p20240330.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+PATCH_VER="14"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.2.1_p20240406.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240406.ebuild
new file mode 100644
index 000000000000..2a22fc220b4c
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.2.1_p20240406.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+PATCH_VER="15"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.2.1_p20240413.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240413.ebuild
new file mode 100644
index 000000000000..2a22fc220b4c
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.2.1_p20240413.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+PATCH_VER="15"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.2.1_p20240420.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240420.ebuild
new file mode 100644
index 000000000000..2a22fc220b4c
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.2.1_p20240420.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+PATCH_VER="15"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-13.3.9999.ebuild b/sys-devel/gcc/gcc-13.3.9999.ebuild
new file mode 100644
index 000000000000..b7539bd2eccf
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.3.9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+MUSL_GCC_VER="13.2.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240317.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240317.ebuild
new file mode 100644
index 000000000000..e809e40f6564
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240317.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+PATCH_VER="25"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240324-r1.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240324-r1.ebuild
new file mode 100644
index 000000000000..41416832f8b5
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240324-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+PATCH_VER="25"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply "${FILESDIR}"/${P}-PR114439.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240331.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240331.ebuild
new file mode 100644
index 000000000000..e809e40f6564
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240331.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+PATCH_VER="25"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240407.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240407.ebuild
new file mode 100644
index 000000000000..00b7365febb9
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240407.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+PATCH_VER="26"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240414.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240414.ebuild
new file mode 100644
index 000000000000..00b7365febb9
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240414.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+PATCH_VER="26"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240421.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240421.ebuild
new file mode 100644
index 000000000000..00b7365febb9
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240421.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+PATCH_VER="26"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-14.0.9999.ebuild b/sys-devel/gcc/gcc-14.0.9999.ebuild
new file mode 100644
index 000000000000..762b2f9aca6b
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+MUSL_GCC_VER="14.0.0"
+PYTHON_COMPAT=( python3_{10..11} )
+
+if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # Don't keyword live ebuilds
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ :;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-8.5.0-r1.ebuild b/sys-devel/gcc/gcc-8.5.0-r1.ebuild
index ff799268370b..71a72ec0dc9e 100644
--- a/sys-devel/gcc/gcc-8.5.0-r1.ebuild
+++ b/sys-devel/gcc/gcc-8.5.0-r1.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-TOOLCHAIN_PATCH_DEV="slyfox"
-PATCH_VER="2"
+TOOLCHAIN_PATCH_SUFFIX="xz"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="4"
+PYTHON_COMPAT=( python3_{10..11} )
inherit toolchain
diff --git a/sys-devel/gcc/gcc-9.5.0.ebuild b/sys-devel/gcc/gcc-9.5.0.ebuild
index 4a953b324d63..9208cb574215 100644
--- a/sys-devel/gcc/gcc-9.5.0.ebuild
+++ b/sys-devel/gcc/gcc-9.5.0.ebuild
@@ -1,29 +1,42 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
-TOOLCHAIN_PATCH_DEV="slyfox"
-PATCH_GCC_VER="9.4.0"
-PATCH_VER="1"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="9.5.0"
+PATCH_VER="2"
+PYTHON_COMPAT=( python3_{10..11} )
-if [[ $(ver_cut 3) == 9999 ]] ; then
+if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
if [[ ${MY_PV_2} == 0 ]] ; then
MY_PV_2=0
+ MY_PV_3=0
else
- MY_PV_2=$(($(ver_cut 2) - 1))
+ MY_PV_2=$((${MY_PV_2} - 1))
fi
# e.g. 12.2.9999 -> 12.1.1
- TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
fi
inherit toolchain
-# Needs to be after inherit (for now?), bug #830908
-EGIT_BRANCH=releases/gcc-$(ver_cut 1)
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
RDEPEND=""
BDEPEND="${CATEGORY}/binutils"
diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
index b6eef667b039..853d96579504 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -7,28 +7,118 @@
</maintainer>
<use>
<flag name="ada">Build the ADA language (GNAT) frontend</flag>
- <flag name="cet" restrict="&gt;=sys-devel/gcc-10">Enable support for Intel Control Flow Enforcement Technology (CET)</flag>
+ <flag name="cet" restrict="&gt;=sys-devel/gcc-10">
+ Enable support for control flow hijacking protection.
+
+ On amd64, this provides Intel Control Flow Enforcement Technology (CET).
+
+ On arm64, this provides Branch Target Identification (BTI)
+ and Pointer Authentication Code (PAC) support.
+
+ This is only effective on amd64 or arm64.
+
+ Only provides benefits on newer CPUs. For Intel, the CPU
+ must be at least as new as Tiger Lake. For AMD, it must be
+ at least as new as Zen 3. This is harmless on older CPUs,
+ but provides no benefit either.
+
+ For ARM64, PAC was introduced in armv8.3-a, and BTI was
+ introduced in armv8.5-a.
+
+ When combined with USE=hardened on amd64, GCC will set -fcf-protection
+ by default when building software. The effect is minimal
+ on systems which do not support it, other than a possible
+ small increase in codesize for the NOPs. The generated
+ code is therefore compatible with i686 at the earliest.
+
+ On arm64, GCC will set -mbranch-protection=standard by default
+ when building software.
+ </flag>
<flag name="d">Enable support for the D programming language</flag>
+ <flag name="debug">
+ Enables GCC's 'checking' facility via --enable-checking=yes,extra,rtl.
+
+ This adds checks to various compiler passes for integrity and input
+ validation. This can help catch possible miscompilations early as
+ well as latent bugs which could become real problems in future, but
+ at the cost of slower compile times when using GCC.
+
+ Unrelated to backtraces.
+ </flag>
+ <flag name="default-stack-clash-protection">
+ Build packages with stack clash protection on by default as
+ a hardening measure.
+
+ This enables -fstack-clash-protection by default which protects against
+ large memory allocations allowing stack smashing.
+
+ May cause slightly increased codesize, but modern compilers
+ have been adapted to optimize well for this case, as
+ this mitigation is now quite common.
+
+ See https://developers.redhat.com/blog/2020/05/22/stack-clash-mitigation-in-gcc-part-3
+ and https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt.
+ </flag>
+ <flag name="default-znow">
+ Request full relocation on start from ld.so by default.
+
+ This sets the -z,now (BIND_NOW) flag by default on all linker invocations. By
+ resolving all dynamic symbols at application startup, parts of the program
+ can be made read-only as a hardening measure.
+
+ This is closely related to RELRO which is also separately
+ enabled by default.
+
+ In some applications with many unresolved symbols (heavily plugin based,
+ for example), startup time may be impacted.
+ </flag>
<flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets in gcc (Warning: significantly increases compile time!)</flag>
<flag name="go">Build the GCC Go language frontend.</flag>
<flag name="graphite">Add support for the framework for loop optimizations based on a polyhedral intermediate representation</flag>
- <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. This will slow down the compiler a bit as it forces all of the toolchain to be shared libs.</flag>
+ <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag>
+ <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation.</flag>
<flag name="libssp">Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag>
- <flag name="lto">Build using Link Time Optimizations (LTO)</flag>
- <flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag>
- <flag name="nptl">Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)</flag>
+ <flag name="lto">
+ Build using Link Time Optimizations (LTO).
+
+ Note that GCC is always built with support for building
+ other programs with LTO. This USE flag is for whether
+ GCC itself is built and optimized with LTO.
+ </flag>
+ <flag name="modula2">Build the GCC Modula-2 language frontend.</flag>
<flag name="objc">Build support for the Objective C code language</flag>
<flag name="objc++">Build support for the Objective C++ language</flag>
<flag name="objc-gc">Build support for the Objective C code language Garbage Collector</flag>
- <flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag>
- <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag>
- <flag name="ssp">Build packages with stack smashing protector on by default</flag>
+ <flag name="pgo">
+ Build GCC using Profile Guided Optimization (PGO).
+
+ GCC will build itself and then analyze the just-built
+ binary and then rebuild itself using the data obtained
+ from analysis of codepaths taken.
+
+ It does not affect whether GCC itself supports PGO
+ when building other software.
+
+ This substantially increases the build time needed for
+ building GCC itself.
+ </flag>
+ <flag name="rust">Build support for the Rust language, installs gccrs.</flag>
+ <flag name="sanitize">
+ Build support for various sanitizer functions (ASAN/TSAN/etc...)
+ to find runtime problems in applications.
+ </flag>
+ <flag name="ssp">Build packages with stack smashing protection on by default</flag>
<flag name="systemtap">enable systemtap static probe points</flag>
- <flag name="valgrind">Enable valgrind annotations for gcc internals (useful for gcc debugging).</flag>
- <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag>
+ <flag name="vtv">
+ Build support for virtual table verification (a C++ hardening feature).
+
+ This does not control whether GCC defaults to using VTV>
+
+ Note that actually using VTV breaks ABI and hence the whole
+ system must be built with -fvtable-verify.
+ </flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
- <remote-id type="sourceforge">dgcc</remote-id>
</upstream>
</pkgmetadata>
diff --git a/sys-devel/gdb-apple/Manifest b/sys-devel/gdb-apple/Manifest
deleted file mode 100644
index d52e9873b523..000000000000
--- a/sys-devel/gdb-apple/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST gdb-1752.tar.gz 17922994 BLAKE2B 9b27bca2b6a9f10e01d130d595270300a4e7f0040790c5b60337d41086e1238dc12d785cc88c484df630f742ddfe783f7baefc2132b47e41bb74a5d0b7ebbf1e SHA512 863a861a9a7708b8a763ea93599f6b519277f23fff35700d04e81a7747cc49421d0f051790deb92c440ced30ee15ba719b75066d5a614341e0f0b765d7a81094
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch
deleted file mode 100644
index a05169cec25d..000000000000
--- a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch
+++ /dev/null
@@ -1,87 +0,0 @@
---- src/gdb/macosx/macosx-nat-dyld.c
-+++ src/gdb/macosx/macosx-nat-dyld.c
-@@ -2083,7 +2083,9 @@
- case MH_DYLIB:
- case MH_DYLINKER:
- case MH_BUNDLE:
-+#ifdef MH_KEXT_BUNDLE
- case MH_KEXT_BUNDLE:
-+#endif
- break;
- case MH_FVMLIB:
- case MH_PRELOAD:
-@@ -2412,7 +2414,9 @@
- break;
- case MH_DYLINKER:
- case MH_BUNDLE:
-+#ifdef MH_KEXT_BUNDLE
- case MH_KEXT_BUNDLE:
-+#endif
- entry->reason = dyld_reason_dyld;
- break;
- default:
---- src/gdb/macosx/macosx-nat-dyld-process.c
-+++ src/gdb/macosx/macosx-nat-dyld-process.c
-@@ -407,7 +407,9 @@
- case MH_DYLIB:
- break;
- case MH_BUNDLE:
-+#ifdef MH_KEXT_BUNDLE
- case MH_KEXT_BUNDLE:
-+#endif
- break;
- default:
- return;
- return;
---- src/gdb/macosx/macosx-nat-inferior.c
-+++ src/gdb/macosx/macosx-nat-inferior.c
-@@ -2692,6 +2692,7 @@
- if (tp->private == NULL || tp->private->app_thread_port == 0)
- return NULL;
-
-+#ifdef THREAD_IDENTIFIER_INFO_COUNT
- thread_identifier_info_data_t tident;
- unsigned int info_count;
- kern_return_t kret;
-@@ -2719,6 +2720,7 @@
- }
- }
- }
-+#endif
- return buf;
- }
-
---- src/gdb/macosx/macosx-nat-infthread.c
-+++ src/gdb/macosx/macosx-nat-infthread.c
-@@ -809,6 +809,7 @@
- print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
- switch_to_thread (current_ptid);
-
-+#ifdef THREAD_IDENTIFIER_INFO_COUNT
- thread_identifier_info_data_t tident;
- info_count = THREAD_IDENTIFIER_INFO_COUNT;
- kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident,
-@@ -878,6 +879,7 @@
- printf_filtered ("\tcurrent priority: %d\n", pth.pth_priority);
- printf_filtered ("\tmax priority: %d\n", pth.pth_maxpriority);
- }
-+#endif
-
- printf_filtered ("\tsuspend count: %d", info.suspend_count);
-
-@@ -1175,6 +1177,7 @@
- ui_out_field_fmt (uiout, "mach-port-number", "0x%s",
- paddr_nz (app_thread_name));
-
-+#ifdef THREAD_IDENTIFIER_INFO_COUNT
- thread_identifier_info_data_t tident;
- info_count = THREAD_IDENTIFIER_INFO_COUNT;
- kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident,
-@@ -1207,6 +1210,7 @@
- paddr_nz (struct_addr));
- }
- }
-+#endif
- }
-
-
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch
deleted file mode 100644
index f8ecc30be7f6..000000000000
--- a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch
+++ /dev/null
@@ -1,128 +0,0 @@
---- src/gdb/macosx/macosx-nat-inferior.c
-+++ src/gdb/macosx/macosx-nat-inferior.c
-@@ -60,13 +60,17 @@
- #include <sys/sysctl.h>
- #include <sys/proc.h>
- #include <mach/mach_error.h>
-+#if defined(TARGET_ARM)
- #include <spawn.h>
-+#endif
-
- #include <semaphore.h>
-
- #include <dlfcn.h>
-+#if 0
- #include <libproc.h>
- #include <sys/proc_info.h>
-+#endif
-
- #include "macosx-nat-dyld.h"
- #include "macosx-nat-inferior.h"
---- src/gdb/macosx/macosx-nat-info.c
-+++ src/gdb/macosx/macosx-nat-info.c
-@@ -45,6 +45,22 @@
- #include "macosx-nat-inferior.h"
- #include "macosx-nat-inferior-debug.h"
-
-+#ifdef __ppc__
-+#ifndef __darwin_ppc_thread_state
-+#define __darwin_ppc_thread_state ppc_thread_state
-+#define __r0 r0
-+#define __srr0 srr0
-+#define __srr1 srr1
-+#define __cr cr
-+#define __xer xer
-+#define __lr lr
-+#define __ctr ctr
-+#endif
-+#ifndef __darwin_ppc_exception_state
-+#define __darwin_ppc_exception_state ppc_exception_state
-+#endif
-+#endif
-+
- extern macosx_inferior_status *macosx_status;
-
- #define CHECK_ARGS(what, args) \
---- src/gdb/macosx/macosx-nat-infthread.c
-+++ src/gdb/macosx/macosx-nat-infthread.c
-@@ -36,8 +36,10 @@
- #include <sys/dir.h>
- #include <inttypes.h>
-
-+#if 0
- #include <libproc.h>
- #include <sys/proc_info.h>
-+#endif
-
- #include "macosx-nat-inferior.h"
- #include "macosx-nat-inferior-util.h"
---- src/gdb/macosx/macosx-tdep.c
-+++ src/gdb/macosx/macosx-tdep.c
-@@ -64,7 +64,6 @@
- #include "gdbcore.h"
-
- #include <dirent.h>
--#include <libgen.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/param.h>
---- src/gdb/remote.c
-+++ src/gdb/remote.c
-@@ -63,7 +63,6 @@
- #include "macosx-nat-dyld.h"
- #include "macosx-nat-dyld-process.h"
- #endif
--#include <execinfo.h>
-
- /* Prototypes for local functions. */
- static void cleanup_sigint_signal_handler (void *dummy);
-@@ -475,11 +474,13 @@
- static void
- remote_backtrace_self (const char *message)
- {
-+#if 0
- void *bt_buffer[100];
- int count = backtrace (bt_buffer, 100);
- if (message && message[0])
- fprintf_filtered (gdb_stderr, "%s", message);
- backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
-+#endif
- }
-
- static void
---- src/gdb/symfile.c
-+++ src/gdb/symfile.c
-@@ -67,7 +67,6 @@
- #include <ctype.h>
- #include <time.h>
- #include <sys/time.h>
--#include <libgen.h>
-
- #include <sys/mman.h>
-
---- src/gdb/utils.c
-+++ src/gdb/utils.c
-@@ -28,7 +28,6 @@
- #include "event-top.h"
- #include "exceptions.h"
- #include "bfd.h"
--#include <execinfo.h>
- #include <sys/resource.h>
- #include <uuid/uuid.h>
-
-@@ -879,6 +878,7 @@
- target_terminal_ours ();
- begin_line ();
-
-+#if 0
- /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely
- to get useful bug reports. */
- {
-@@ -887,6 +887,7 @@
- fprintf (stderr, "gdb stack crawl at point of internal error:\n");
- backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
- }
-+#endif
-
- /* Create a string containing the full error/warning message. Need
- to call query with this full string, as otherwize the reason
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch b/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch
deleted file mode 100644
index 32247431fe89..000000000000
--- a/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gdb/macosx/macosx-nat-dyld.c
-+++ src/gdb/macosx/macosx-nat-dyld.c
-@@ -788,7 +788,7 @@
- }
- else
- {
--#if defined (NM_NEXTSTEP)
-+#if defined (NM_NEXTSTEP) && defined(TASK_DYLD_INFO_COUNT)
- if (macosx_status->task == TASK_NULL)
- return 0;
-
diff --git a/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch b/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch
deleted file mode 100644
index 41153d8436de..000000000000
--- a/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/Makefile.in
-+++ src/Makefile.in
-@@ -280,6 +280,6 @@
- then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
- else if (${CONFIGURED_MAKEINFO} --version \
-- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
-+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|4\.[1-9][0-9]|[5-9])') >/dev/null 2>&1; \
- then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
-
- # This just becomes part of the MAKEINFO definition passed down to
diff --git a/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
deleted file mode 100644
index 0c132ec5b384..000000000000
--- a/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Sourcing /etc/gdb.conf is annoying mainly because Apple put
- set history save on
-in there, which means everywhere you run it, you end up with a
-.gdb_history file.
-
---- src/gdb/main.c
-+++ src/gdb/main.c
-@@ -675,6 +675,7 @@
- memset (&cwdbuf, 0, sizeof (struct stat));
- /* APPLE LOCAL end move inits up */
- /* APPLE LOCAL begin global gdbinit */
-+#ifdef WANT_GLOBAL_GDBINIT
- memset (&globalbuf, 0, sizeof (struct stat));
- stat (gdbinit_global, &globalbuf);
- if (!inhibit_gdbinit)
-@@ -683,6 +684,7 @@
- source_file (gdbinit_global, 0);
- }
- do_cleanups (ALL_CLEANUPS);
-+#endif
- /* APPLE LOCAL end global gdbinit */
-
- /* APPLE LOCAL: Set the $_Xcode convenience variable at '0' before sourcing
diff --git a/sys-devel/gdb-apple/gdb-apple-1752.ebuild b/sys-devel/gdb-apple/gdb-apple-1752.ebuild
deleted file mode 100644
index e9abe3a3f5d7..000000000000
--- a/sys-devel/gdb-apple/gdb-apple-1752.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic toolchain-funcs
-
-APPLE_PV=${PV}
-DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.3"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz"
-
-LICENSE="APSL-2 GPL-2"
-SLOT="0"
-
-KEYWORDS="~ppc-macos ~x64-macos"
-
-IUSE="nls"
-
-RDEPEND=">=sys-libs/ncurses-5.2-r2:0=
- sys-libs/readline:0=
- =dev-db/sqlite-3*"
-DEPEND="${RDEPEND}
- nls? ( sys-devel/gettext )
- || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )"
-
-S=${WORKDIR}/gdb-${APPLE_PV}/src
-
-PATCHES=(
- "${FILESDIR}"/${PN}-no-global-gdbinit.patch
- "${FILESDIR}"/${PN}-768-texinfo.patch
- "${FILESDIR}"/${PN}-1518-darwin8-9.patch
- "${FILESDIR}"/${PN}-1705-darwin8-10.patch
-)
-
-src_prepare() {
- default
- [[ ${CHOST} == *-darwin8 ]] && eapply "${FILESDIR}"/${PN}-1518-darwin8.patch
-
- # use host readline
- sed -i -e '/host_libs/s/readline//' configure.in configure || die
- sed -i \
- -e '/^\(READLINE\|readline\)_/s/=.*$/=/' \
- -e '/^READLINE /s/=.*$/= -lreadline/' \
- gdb/Makefile.in || die
-}
-
-src_configure() {
- if tc-is-gcc ; then
- # force gcc-apple, FSF gcc doesn't grok this code
- export CC=${CTARGET:-${CHOST}}-gcc-4.2.1
- export CXX=${CTARGET:-${CHOST}}-g++-4.2.1
- fi
-
- replace-flags -O? -O2
- econf \
- --disable-werror \
- --disable-debug-symbols-framework \
- $(use_enable nls)
-}
-
-src_compile() {
- # unable to work around parallel make issue
- # ignore texinfo issues (version mismatch, to hard to fix or
- # disable)
- emake -j2 MAKEINFOFLAGS="--force"
-}
-
-src_install() {
- emake -j2 \
- DESTDIR="${D}" libdir=/nukeme includedir=/nukeme \
- MAKEINFOFLAGS="--force" install || die
- rm -R "${D}"/nukeme || die
- rm -Rf "${ED}"/usr/${CHOST} || die
- mv "${ED}"/usr/bin/gdb "${ED}"/
- rm -f "${ED}"/usr/bin/*
- mv "${ED}"/gdb "${ED}"/usr/bin/
-}
-
-pkg_postinst() {
- if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -ge 9 ]] ; then
- ewarn "Due to increased security measures in 10.5 and up, gdb is"
- ewarn "not able to get a mach task port when installed by Prefix"
- ewarn "Portage, unprivileged. To make gdb fully functional you'll"
- ewarn "have to perform the following steps:"
- ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
- ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
- fi
- if [[ ${CHOST} == *86* ]] ; then
- einfo "FSF gdb works on Intel-based OSX platforms, sometimes even"
- einfo "better than gdb-apple. You can consider installing FSF gdb"
- einfo "instead of gdb-apple, since the FSF version is surely more"
- einfo "advanced than this old 6.8 version modified by Apple."
- fi
-}
diff --git a/sys-devel/gdb-apple/metadata.xml b/sys-devel/gdb-apple/metadata.xml
deleted file mode 100644
index 232d18dd1fa2..000000000000
--- a/sys-devel/gdb-apple/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>prefix@gentoo.org</email>
- <name>Gentoo Prefix</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
deleted file mode 100644
index dbb57cec059f..000000000000
--- a/sys-devel/gdb/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST gdb-11.2.tar.xz 22039420 BLAKE2B 66ce7e12c99c33c8b4e6ababa673204aab525e72c90ba54cc34a5fd69948a09dc2a9ef2050764b2464544231b1d1a6431279c2877388551ca6fbf384a3f9b464 SHA512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127
-DIST gdb-12.1.tar.xz 22470332 BLAKE2B 7f6f853d1640908cf2c79932cdc1ba02549a07721c005d9c7ce2946a715761719cc164a4e68235a18664ec8a029afe3a2a0cfb57e1635f280076d6bed91317fd SHA512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d
diff --git a/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch b/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch
deleted file mode 100644
index 5e0121f85029..000000000000
--- a/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=a532eb7277ff64fb073e209d418b0a97f686c0e3
-https://bugs.gentoo.org/833590
-
-From: Sergei Trofimovich <siarheit@google.com>
-Date: Mon, 14 Feb 2022 17:12:41 +0000
-Subject: [PATCH] microblaze: fix fsqrt collicion to build on glibc-2.35
-
- * microblaze-opcm.h: Renamed 'fsqrt' to 'microblaze_fsqrt'.
- * microblaze-opc.h: Follow 'fsqrt' rename.
---- a/opcodes/microblaze-opc.h
-+++ b/opcodes/microblaze-opc.h
-@@ -268,7 +268,7 @@ const struct op_code_struct
- {"fcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000200, OPCODE_MASK_H4, fcmp_un, arithmetic_inst },
- {"flt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000280, OPCODE_MASK_H4, flt, arithmetic_inst },
- {"fint", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000300, OPCODE_MASK_H4, fint, arithmetic_inst },
-- {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, fsqrt, arithmetic_inst },
-+ {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, microblaze_fsqrt, arithmetic_inst },
- {"tget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001000, OPCODE_MASK_H32, tget, anyware_inst },
- {"tcget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003000, OPCODE_MASK_H32, tcget, anyware_inst },
- {"tnget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005000, OPCODE_MASK_H32, tnget, anyware_inst },
---- a/opcodes/microblaze-opcm.h
-+++ b/opcodes/microblaze-opcm.h
-@@ -42,7 +42,8 @@ enum microblaze_instr
- shr, sw, swr, swx, lbui, lhui, lwi,
- sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv,
- fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt,
-- fint, fsqrt,
-+ /* 'fsqrt' is a glibc:math.h symbol. */
-+ fint, microblaze_fsqrt,
- tget, tcget, tnget, tncget, tput, tcput, tnput, tncput,
- eget, ecget, neget, necget, eput, ecput, neput, necput,
- teget, tecget, tneget, tnecget, teput, tecput, tneput, tnecput,
diff --git a/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch
deleted file mode 100644
index fad27ee4ca85..000000000000
--- a/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=1add37b567a7dee39d99f37b37802034c3fce9c4
-https://bugs.gentoo.org/842252
-
-From: Andreas Schwab <schwab@linux-m68k.org>
-Date: Sun, 20 Mar 2022 14:01:54 +0100
-Subject: [PATCH] Add support for readline 8.2
-
-In readline 8.2 the type of rl_completer_word_break_characters changed to
-include const.
---- a/gdb/completer.c
-+++ b/gdb/completer.c
-@@ -36,7 +36,7 @@
- calling a hook instead so we eliminate the CLI dependency. */
- #include "gdbcmd.h"
-
--/* Needed for rl_completer_word_break_characters() and for
-+/* Needed for rl_completer_word_break_characters and for
- rl_filename_completion_function. */
- #include "readline/readline.h"
-
-@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw ()
- rl_basic_quote_characters = NULL;
- }
-
-- return rl_completer_word_break_characters;
-+ return (char *) rl_completer_word_break_characters;
- }
-
- char *
diff --git a/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch b/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch
deleted file mode 100644
index 06aa6084d2d2..000000000000
--- a/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Enable verbose build. By default gdb ignores even --disable-silent-rules.
-Override verbosity back to non-silent.
-
-https://bugs.gentoo.org/695936
---- a/gdb/silent-rules.mk
-+++ b/gdb/silent-rules.mk
-@@ -1,5 +1,4 @@
--# If V is undefined or V=0 is specified, use the silent/verbose/compact mode.
--V ?= 0
-+V ?= 1
- ifeq ($(V),0)
- ECHO_CXX = @echo " CXX $@";
- ECHO_CXXLD = @echo " CXXLD $@";
diff --git a/sys-devel/gdb/gdb-11.2.ebuild b/sys-devel/gdb/gdb-11.2.ebuild
deleted file mode 100644
index a7deb8517553..000000000000
--- a/sys-devel/gdb/gdb-11.2.ebuild
+++ /dev/null
@@ -1,286 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
-
-export CTARGET=${CTARGET:-${CHOST}}
-
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-case ${PV} in
- 9999*)
- # live git tree
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- SRC_URI=""
- ;;
- *.*.50.2???????)
- # weekly snapshots
- SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
- ;;
- *)
- # Normal upstream release
- SRC_URI="mirror://gnu/gdb/${P}.tar.xz
- ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
- ;;
-esac
-
-PATCH_VER=""
-PATCH_DEV=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
- ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz}
- ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
-"
-
-LICENSE="GPL-3+ LGPL-2.1+"
-SLOT="0"
-
-if [[ ${PV} != 9999* ]] ; then
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-# In fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-# ia64 kernel crashes when gdb testsuite is running
-# in fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-RESTRICT="
- ia64? ( test )
- !test? ( test )
- test
-"
-
-RDEPEND="
- dev-libs/mpfr:0=
- dev-libs/gmp:=
- >=sys-libs/ncurses-5.2-r2:0=
- >=sys-libs/readline-7:0=
- sys-libs/zlib
- lzma? ( app-arch/xz-utils )
- python? ( ${PYTHON_DEPS} )
- guile? ( >=dev-scheme/guile-2.0 )
- xml? ( dev-libs/expat )
- source-highlight? (
- dev-util/source-highlight
- )
- xxhash? (
- dev-libs/xxhash
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- virtual/yacc
- nls? ( sys-devel/gettext )
- source-highlight? ( virtual/pkgconfig )
- test? ( dev-util/dejagnu )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
- "${FILESDIR}"/${P}-glibc-2.35-fsqrt.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- strip-linguas -u bfd/po opcodes/po
-
- # Avoid using ancient termcap from host on Prefix systems
- sed -i -e 's/termcap tinfow/tinfow/g' \
- gdb/configure{.ac,} || die
-}
-
-gdb_branding() {
- printf "Gentoo ${PV} "
-
- if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
- printf "p${PATCH_VER}"
- else
- printf "vanilla"
- fi
-
- [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
-}
-
-src_configure() {
- strip-unsupported-flags
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # gnulib's or gdb's configure.
- --disable-dependency-tracking
-
- --with-pkgversion="$(gdb_branding)"
- --with-bugurl='https://bugs.gentoo.org/'
- --disable-werror
- # Disable modules that are in a combined binutils/gdb tree. bug #490566
- --disable-{binutils,etc,gas,gold,gprof,ld}
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- $(use_enable test unit-tests)
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- local sysroot="${EPREFIX}/usr/${CTARGET}"
-
- is_cross && myconf+=(
- --with-sysroot="${sysroot}"
- --includedir="${sysroot}/usr/include"
- --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
- )
-
- # gdbserver only works for native targets (CHOST==CTARGET).
- # it also doesn't support all targets, so rather than duplicate
- # the target list (which changes between versions), use the
- # "auto" value when things are turned on, which is triggered
- # whenever no --enable or --disable is given
- if is_cross || use !server ; then
- myconf+=( --disable-gdbserver )
- fi
-
- myconf+=(
- --enable-64-bit-bfd
- --disable-install-libbfd
- --disable-install-libiberty
- --enable-obsolete
- # This only disables building in the readline subdir.
- # For gdb itself, it'll use the system version.
- --disable-readline
- --with-system-readline
- # This only disables building in the zlib subdir.
- # For gdb itself, it'll use the system version.
- --without-zlib
- --with-system-zlib
- --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
- $(use_with xml expat)
- $(use_with lzma)
- $(use_enable nls)
- $(use_enable source-highlight)
- $(use multitarget && echo --enable-targets=all)
- $(use_with python python "${EPYTHON}")
- $(use_with xxhash)
- $(use_with guile)
- )
-
- if use sparc-solaris || use x86-solaris ; then
- # Disable largefile support
- # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html
- myconf+=( --disable-largefile )
- fi
-
- # source-highlight is detected with pkg-config: bug #716558
- export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
-
- export CC_FOR_BUILD="$(tc-getBUILD_CC)"
-
- # ensure proper compiler is detected for Clang builds: bug #831202
- export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake V=1
-}
-
-src_install() {
- emake V=1 DESTDIR="${D}" install
-
- find "${ED}"/usr -name libiberty.a -delete || die
-
- # Delete translations that conflict with binutils-libs. bug #528088
- # Note: Should figure out how to store these in an internal gdb dir.
- if use nls ; then
- find "${ED}" \
- -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
- -delete || die
- fi
-
- # Don't install docs when building a cross-gdb
- if [[ ${CTARGET} != ${CHOST} ]] ; then
- rm -rf "${ED}"/usr/share/{doc,info,locale} || die
- local f
- for f in "${ED}"/usr/share/man/*/* ; do
- if [[ ${f##*/} != ${CTARGET}-* ]] ; then
- mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
- fi
- done
- return 0
- fi
-
- # Install it by hand for now:
- # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
- # Only install if it exists due to the twisted behavior (see
- # notes in src_configure above).
- [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
-
- docinto gdb
- dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
- gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
- docinto sim
- dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
-
- if use server ; then
- docinto gdbserver
- dodoc gdbserver/{ChangeLog,README}
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- dodoc "${WORKDIR}"/extra/gdbinit.sample
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
-
- if use python ; then
- python_optimize "${ED}"/usr/share/gdb/python/gdb
- fi
-}
-
-pkg_postinst() {
- # Portage doesn't unmerge files in /etc
- rm -vf "${EROOT}"/etc/skel/.gdbinit
-
- if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
- ewarn "gdb is unable to get a mach task port when installed by Prefix"
- ewarn "Portage, unprivileged. To make gdb fully functional you'll"
- ewarn "have to perform the following steps:"
- ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
- ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
- fi
-}
diff --git a/sys-devel/gdb/gdb-12.1-r1.ebuild b/sys-devel/gdb/gdb-12.1-r1.ebuild
deleted file mode 100644
index 993eca47f83f..000000000000
--- a/sys-devel/gdb/gdb-12.1-r1.ebuild
+++ /dev/null
@@ -1,296 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
-
-export CTARGET=${CTARGET:-${CHOST}}
-
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-case ${PV} in
- 9999*)
- # live git tree
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- SRC_URI=""
- ;;
- *.*.50.2???????)
- # weekly snapshots
- SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
- ;;
- *)
- # Normal upstream release
- SRC_URI="mirror://gnu/gdb/${P}.tar.xz
- ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
- ;;
-esac
-
-PATCH_VER=""
-PATCH_DEV=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
- ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz}
- ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
-"
-
-LICENSE="GPL-3+ LGPL-2.1+"
-SLOT="0"
-
-if [[ ${PV} != 9999* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-# In fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-# ia64 kernel crashes when gdb testsuite is running
-# in fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-RESTRICT="
- ia64? ( test )
- !test? ( test )
- test
-"
-
-RDEPEND="
- dev-libs/mpfr:0=
- dev-libs/gmp:=
- >=sys-libs/ncurses-5.2-r2:0=
- >=sys-libs/readline-7:0=
- sys-libs/zlib
- elibc_glibc? ( net-libs/libnsl:= )
- lzma? ( app-arch/xz-utils )
- python? ( ${PYTHON_DEPS} )
- guile? ( >=dev-scheme/guile-2.0 )
- xml? ( dev-libs/expat )
- source-highlight? (
- dev-util/source-highlight
- )
- xxhash? (
- dev-libs/xxhash
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- virtual/yacc
- nls? ( sys-devel/gettext )
- source-highlight? ( virtual/pkgconfig )
- test? ( dev-util/dejagnu )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
- "${FILESDIR}"/${P}-readline-8.2-build.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- strip-linguas -u bfd/po opcodes/po
-
- # Avoid using ancient termcap from host on Prefix systems
- sed -i -e 's/termcap tinfow/tinfow/g' \
- gdb/configure{.ac,} || die
-}
-
-gdb_branding() {
- printf "Gentoo ${PV} "
-
- if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
- printf "p${PATCH_VER}"
- else
- printf "vanilla"
- fi
-
- [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
-}
-
-src_configure() {
- strip-unsupported-flags
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # gnulib's or gdb's configure.
- --disable-dependency-tracking
-
- --with-pkgversion="$(gdb_branding)"
- --with-bugurl='https://bugs.gentoo.org/'
- --disable-werror
- # Disable modules that are in a combined binutils/gdb tree. bug #490566
- --disable-{binutils,etc,gas,gold,gprof,ld}
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- $(use_enable test unit-tests)
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
-
- # We need to set both configure options, --with-sysroot and --libdir,
- # to fix cross build issues that happen when configuring gmp.
- # We explicitly need --libdir. Having only --with-sysroot without
- # --libdir would not fix the build issues.
- # For some reason, it is not enough to set only --with-sysroot,
- # also not enough to pass --with-gmp-xxx options.
- --with-sysroot="${ESYSROOT}"
- --libdir="${ESYSROOT}/usr/$(get_libdir)"
- )
-
- local sysroot="${EPREFIX}/usr/${CTARGET}"
-
- is_cross && myconf+=(
- --with-sysroot="${sysroot}"
- --includedir="${sysroot}/usr/include"
- --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
- )
-
- # gdbserver only works for native targets (CHOST==CTARGET).
- # it also doesn't support all targets, so rather than duplicate
- # the target list (which changes between versions), use the
- # "auto" value when things are turned on, which is triggered
- # whenever no --enable or --disable is given
- if is_cross || use !server ; then
- myconf+=( --disable-gdbserver )
- fi
-
- myconf+=(
- --enable-64-bit-bfd
- --disable-install-libbfd
- --disable-install-libiberty
- --enable-obsolete
- # This only disables building in the readline subdir.
- # For gdb itself, it'll use the system version.
- --disable-readline
- --with-system-readline
- # This only disables building in the zlib subdir.
- # For gdb itself, it'll use the system version.
- --without-zlib
- --with-system-zlib
- --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
- $(use_with xml expat)
- $(use_with lzma)
- $(use_enable nls)
- $(use_enable source-highlight)
- $(use multitarget && echo --enable-targets=all)
- $(use_with python python "${EPYTHON}")
- $(use_with xxhash)
- $(use_with guile)
- )
-
- if use sparc-solaris || use x86-solaris ; then
- # Disable largefile support
- # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html
- myconf+=( --disable-largefile )
- fi
-
- # source-highlight is detected with pkg-config: bug #716558
- export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
-
- export CC_FOR_BUILD="$(tc-getBUILD_CC)"
-
- # ensure proper compiler is detected for Clang builds: bug #831202
- export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake V=1
-}
-
-src_install() {
- emake V=1 DESTDIR="${D}" install
-
- find "${ED}"/usr -name libiberty.a -delete || die
-
- # Delete translations that conflict with binutils-libs. bug #528088
- # Note: Should figure out how to store these in an internal gdb dir.
- if use nls ; then
- find "${ED}" \
- -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
- -delete || die
- fi
-
- # Don't install docs when building a cross-gdb
- if [[ ${CTARGET} != ${CHOST} ]] ; then
- rm -rf "${ED}"/usr/share/{doc,info,locale} || die
- local f
- for f in "${ED}"/usr/share/man/*/* ; do
- if [[ ${f##*/} != ${CTARGET}-* ]] ; then
- mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
- fi
- done
- return 0
- fi
-
- # Install it by hand for now:
- # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
- # Only install if it exists due to the twisted behavior (see
- # notes in src_configure above).
- [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
-
- docinto gdb
- dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
- gdb/NEWS gdb/PROBLEMS
- docinto sim
- dodoc sim/{MAINTAINERS,README-HACKING}
-
- if use server ; then
- docinto gdbserver
- dodoc gdbserver/README
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- dodoc "${WORKDIR}"/extra/gdbinit.sample
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
-
- if use python ; then
- python_optimize "${ED}"/usr/share/gdb/python/gdb
- fi
-}
-
-pkg_postinst() {
- # Portage doesn't unmerge files in /etc
- rm -vf "${EROOT}"/etc/skel/.gdbinit
-
- if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
- ewarn "gdb is unable to get a mach task port when installed by Prefix"
- ewarn "Portage, unprivileged. To make gdb fully functional you'll"
- ewarn "have to perform the following steps:"
- ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
- ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
- fi
-}
diff --git a/sys-devel/gdb/gdb-12.1.ebuild b/sys-devel/gdb/gdb-12.1.ebuild
deleted file mode 100644
index 0accf1af301f..000000000000
--- a/sys-devel/gdb/gdb-12.1.ebuild
+++ /dev/null
@@ -1,285 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
-
-export CTARGET=${CTARGET:-${CHOST}}
-
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-case ${PV} in
- 9999*)
- # live git tree
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- SRC_URI=""
- ;;
- *.*.50.2???????)
- # weekly snapshots
- SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
- ;;
- *)
- # Normal upstream release
- SRC_URI="mirror://gnu/gdb/${P}.tar.xz
- ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
- ;;
-esac
-
-PATCH_VER=""
-PATCH_DEV=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
- ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz}
- ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
-"
-
-LICENSE="GPL-3+ LGPL-2.1+"
-SLOT="0"
-
-if [[ ${PV} != 9999* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-# In fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-# ia64 kernel crashes when gdb testsuite is running
-# in fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-RESTRICT="
- ia64? ( test )
- !test? ( test )
- test
-"
-
-RDEPEND="
- dev-libs/mpfr:0=
- dev-libs/gmp:=
- >=sys-libs/ncurses-5.2-r2:0=
- >=sys-libs/readline-7:0=
- sys-libs/zlib
- elibc_glibc? ( net-libs/libnsl:= )
- lzma? ( app-arch/xz-utils )
- python? ( ${PYTHON_DEPS} )
- guile? ( >=dev-scheme/guile-2.0 )
- xml? ( dev-libs/expat )
- source-highlight? (
- dev-util/source-highlight
- )
- xxhash? (
- dev-libs/xxhash
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- virtual/yacc
- nls? ( sys-devel/gettext )
- source-highlight? ( virtual/pkgconfig )
- test? ( dev-util/dejagnu )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
- "${FILESDIR}"/${P}-readline-8.2-build.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- strip-linguas -u bfd/po opcodes/po
-
- # Avoid using ancient termcap from host on Prefix systems
- sed -i -e 's/termcap tinfow/tinfow/g' \
- gdb/configure{.ac,} || die
-}
-
-gdb_branding() {
- printf "Gentoo ${PV} "
-
- if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
- printf "p${PATCH_VER}"
- else
- printf "vanilla"
- fi
-
- [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
-}
-
-src_configure() {
- strip-unsupported-flags
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # gnulib's or gdb's configure.
- --disable-dependency-tracking
-
- --with-pkgversion="$(gdb_branding)"
- --with-bugurl='https://bugs.gentoo.org/'
- --disable-werror
- # Disable modules that are in a combined binutils/gdb tree. bug #490566
- --disable-{binutils,etc,gas,gold,gprof,ld}
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- local sysroot="${EPREFIX}/usr/${CTARGET}"
-
- is_cross && myconf+=(
- --with-sysroot="${sysroot}"
- --includedir="${sysroot}/usr/include"
- --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
- )
-
- # gdbserver only works for native targets (CHOST==CTARGET).
- # it also doesn't support all targets, so rather than duplicate
- # the target list (which changes between versions), use the
- # "auto" value when things are turned on, which is triggered
- # whenever no --enable or --disable is given
- if is_cross || use !server ; then
- myconf+=( --disable-gdbserver )
- fi
-
- myconf+=(
- --enable-64-bit-bfd
- --disable-install-libbfd
- --disable-install-libiberty
- --enable-obsolete
- # This only disables building in the readline subdir.
- # For gdb itself, it'll use the system version.
- --disable-readline
- --with-system-readline
- # This only disables building in the zlib subdir.
- # For gdb itself, it'll use the system version.
- --without-zlib
- --with-system-zlib
- --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
- $(use_with xml expat)
- $(use_with lzma)
- $(use_enable nls)
- $(use_enable source-highlight)
- $(use multitarget && echo --enable-targets=all)
- $(use_with python python "${EPYTHON}")
- $(use_with xxhash)
- $(use_with guile)
- )
-
- if use sparc-solaris || use x86-solaris ; then
- # Disable largefile support
- # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html
- myconf+=( --disable-largefile )
- fi
-
- # source-highlight is detected with pkg-config: bug #716558
- export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
-
- export CC_FOR_BUILD="$(tc-getBUILD_CC)"
-
- # ensure proper compiler is detected for Clang builds: bug #831202
- export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake V=1
-}
-
-src_install() {
- emake V=1 DESTDIR="${D}" install
-
- find "${ED}"/usr -name libiberty.a -delete || die
-
- # Delete translations that conflict with binutils-libs. bug #528088
- # Note: Should figure out how to store these in an internal gdb dir.
- if use nls ; then
- find "${ED}" \
- -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
- -delete || die
- fi
-
- # Don't install docs when building a cross-gdb
- if [[ ${CTARGET} != ${CHOST} ]] ; then
- rm -rf "${ED}"/usr/share/{doc,info,locale} || die
- local f
- for f in "${ED}"/usr/share/man/*/* ; do
- if [[ ${f##*/} != ${CTARGET}-* ]] ; then
- mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
- fi
- done
- return 0
- fi
-
- # Install it by hand for now:
- # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
- # Only install if it exists due to the twisted behavior (see
- # notes in src_configure above).
- [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
-
- docinto gdb
- dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
- gdb/NEWS gdb/PROBLEMS
- docinto sim
- dodoc sim/{MAINTAINERS,README-HACKING}
-
- if use server ; then
- docinto gdbserver
- dodoc gdbserver/README
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- dodoc "${WORKDIR}"/extra/gdbinit.sample
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
-
- if use python ; then
- python_optimize "${ED}"/usr/share/gdb/python/gdb
- fi
-}
-
-pkg_postinst() {
- # Portage doesn't unmerge files in /etc
- rm -vf "${EROOT}"/etc/skel/.gdbinit
-
- if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
- ewarn "gdb is unable to get a mach task port when installed by Prefix"
- ewarn "Portage, unprivileged. To make gdb fully functional you'll"
- ewarn "have to perform the following steps:"
- ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
- ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
- fi
-}
diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
deleted file mode 100644
index a431465d7f6a..000000000000
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ /dev/null
@@ -1,295 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
-
-export CTARGET=${CTARGET:-${CHOST}}
-
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-case ${PV} in
- 9999*)
- # live git tree
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- SRC_URI=""
- ;;
- *.*.50.2???????)
- # weekly snapshots
- SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
- ;;
- *)
- # Normal upstream release
- SRC_URI="mirror://gnu/gdb/${P}.tar.xz
- ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
- ;;
-esac
-
-PATCH_VER=""
-PATCH_DEV=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="${SRC_URI}
- ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz}
- ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
-"
-
-LICENSE="GPL-3+ LGPL-2.1+"
-SLOT="0"
-
-if [[ ${PV} != 9999* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-# In fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-# ia64 kernel crashes when gdb testsuite is running
-# in fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures 8600"
-RESTRICT="
- ia64? ( test )
- !test? ( test )
- test
-"
-
-RDEPEND="
- dev-libs/mpfr:0=
- dev-libs/gmp:=
- >=sys-libs/ncurses-5.2-r2:0=
- >=sys-libs/readline-7:0=
- sys-libs/zlib
- elibc_glibc? ( net-libs/libnsl:= )
- lzma? ( app-arch/xz-utils )
- python? ( ${PYTHON_DEPS} )
- guile? ( >=dev-scheme/guile-2.0 )
- xml? ( dev-libs/expat )
- source-highlight? (
- dev-util/source-highlight
- )
- xxhash? (
- dev-libs/xxhash
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- virtual/yacc
- nls? ( sys-devel/gettext )
- source-highlight? ( virtual/pkgconfig )
- test? ( dev-util/dejagnu )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- strip-linguas -u bfd/po opcodes/po
-
- # Avoid using ancient termcap from host on Prefix systems
- sed -i -e 's/termcap tinfow/tinfow/g' \
- gdb/configure{.ac,} || die
-}
-
-gdb_branding() {
- printf "Gentoo ${PV} "
-
- if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
- printf "p${PATCH_VER}"
- else
- printf "vanilla"
- fi
-
- [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
-}
-
-src_configure() {
- strip-unsupported-flags
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # gnulib's or gdb's configure.
- --disable-dependency-tracking
-
- --with-pkgversion="$(gdb_branding)"
- --with-bugurl='https://bugs.gentoo.org/'
- --disable-werror
- # Disable modules that are in a combined binutils/gdb tree. bug #490566
- --disable-{binutils,etc,gas,gold,gprof,ld}
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- $(use_enable test unit-tests)
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
-
- # We need to set both configure options, --with-sysroot and --libdir,
- # to fix cross build issues that happen when configuring gmp.
- # We explicitly need --libdir. Having only --with-sysroot without
- # --libdir would not fix the build issues.
- # For some reason, it is not enough to set only --with-sysroot,
- # also not enough to pass --with-gmp-xxx options.
- --with-sysroot="${ESYSROOT}"
- --libdir="${ESYSROOT}/usr/$(get_libdir)"
- )
-
- local sysroot="${EPREFIX}/usr/${CTARGET}"
-
- is_cross && myconf+=(
- --with-sysroot="${sysroot}"
- --includedir="${sysroot}/usr/include"
- --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
- )
-
- # gdbserver only works for native targets (CHOST==CTARGET).
- # it also doesn't support all targets, so rather than duplicate
- # the target list (which changes between versions), use the
- # "auto" value when things are turned on, which is triggered
- # whenever no --enable or --disable is given
- if is_cross || use !server ; then
- myconf+=( --disable-gdbserver )
- fi
-
- myconf+=(
- --enable-64-bit-bfd
- --disable-install-libbfd
- --disable-install-libiberty
- --enable-obsolete
- # This only disables building in the readline subdir.
- # For gdb itself, it'll use the system version.
- --disable-readline
- --with-system-readline
- # This only disables building in the zlib subdir.
- # For gdb itself, it'll use the system version.
- --without-zlib
- --with-system-zlib
- --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
- $(use_with xml expat)
- $(use_with lzma)
- $(use_enable nls)
- $(use_enable source-highlight)
- $(use multitarget && echo --enable-targets=all)
- $(use_with python python "${EPYTHON}")
- $(use_with xxhash)
- $(use_with guile)
- )
-
- if use sparc-solaris || use x86-solaris ; then
- # Disable largefile support
- # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html
- myconf+=( --disable-largefile )
- fi
-
- # source-highlight is detected with pkg-config: bug #716558
- export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
-
- export CC_FOR_BUILD="$(tc-getBUILD_CC)"
-
- # ensure proper compiler is detected for Clang builds: bug #831202
- export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake V=1
-}
-
-src_install() {
- emake V=1 DESTDIR="${D}" install
-
- find "${ED}"/usr -name libiberty.a -delete || die
-
- # Delete translations that conflict with binutils-libs. bug #528088
- # Note: Should figure out how to store these in an internal gdb dir.
- if use nls ; then
- find "${ED}" \
- -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
- -delete || die
- fi
-
- # Don't install docs when building a cross-gdb
- if [[ ${CTARGET} != ${CHOST} ]] ; then
- rm -rf "${ED}"/usr/share/{doc,info,locale} || die
- local f
- for f in "${ED}"/usr/share/man/*/* ; do
- if [[ ${f##*/} != ${CTARGET}-* ]] ; then
- mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
- fi
- done
- return 0
- fi
-
- # Install it by hand for now:
- # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
- # Only install if it exists due to the twisted behavior (see
- # notes in src_configure above).
- [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
-
- docinto gdb
- dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
- gdb/NEWS gdb/PROBLEMS
- docinto sim
- dodoc sim/{MAINTAINERS,README-HACKING}
-
- if use server ; then
- docinto gdbserver
- dodoc gdbserver/README
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- dodoc "${WORKDIR}"/extra/gdbinit.sample
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
-
- if use python ; then
- python_optimize "${ED}"/usr/share/gdb/python/gdb
- fi
-}
-
-pkg_postinst() {
- # Portage doesn't unmerge files in /etc
- rm -vf "${EROOT}"/etc/skel/.gdbinit
-
- if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
- ewarn "gdb is unable to get a mach task port when installed by Prefix"
- ewarn "Portage, unprivileged. To make gdb fully functional you'll"
- ewarn "have to perform the following steps:"
- ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
- ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
- fi
-}
diff --git a/sys-devel/gdb/metadata.xml b/sys-devel/gdb/metadata.xml
deleted file mode 100644
index bcceccefd45a..000000000000
--- a/sys-devel/gdb/metadata.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
-</maintainer>
-<use>
- <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
- <flag name="lzma">Support lzma compression in ELF debug info</flag>
- <flag name="multitarget">Support all known targets in one gdb binary</flag>
- <flag name="python">Enable support for the new internal scripting language, as well as extended pretty printers</flag>
- <flag name="server">Install the "gdbserver" program (useful for embedded/remote targets)</flag>
- <flag name="source-highlight">Enable listing highlighting via <pkg>dev-util/source-highlight</pkg></flag>
- <flag name="xml">Support parsing XML data files needed (at least) for cpu features, memory maps, and syscall tracing</flag>
- <flag name="xxhash">Use <pkg>dev-libs/xxhash</pkg> to speed up internal hashing.</flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:gdb</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest
index 653a9cf0788c..fe3a242e1a81 100644
--- a/sys-devel/gettext/Manifest
+++ b/sys-devel/gettext/Manifest
@@ -1,2 +1,6 @@
-DIST gettext-0.21.tar.xz 9714352 BLAKE2B e36418323c79f582d13777083b455ae76ccb29e41a8259a2f4d6d9f5d8e2ac7c8ecc4df1b1fa2e9838c819cb27345fe254772398bdb88b3315410866048f755a SHA512 f7e2968651879f8444d43a176a149db9f9411f4a03132a7f3b37c2ed97e3978ae6888169c995c1953cb78943b6e3573811abcbb8661b6631edbbe067b2699ddf
-DIST gettext-0.21.tar.xz.sig 819 BLAKE2B 22a6e5f6e8a6322e24db9c1f575754bccbf6c7cff7cd14cb51ae8f5cf17cd7b677d8ecfc6b876e1b6f8d62077d568cbf57930e1d8accc5306e6869d3c6560bf4 SHA512 67c9515ad5e11773a28599d517dd84131e4afd878d67e97f505cd024e290518ca9cffff7446c62f88b56aea2c7234d11811738e8e2a076b2159f24c2f6809703
+DIST gettext-0.21.1.tar.xz 10054564 BLAKE2B e994924284b3fd5b3e3bf59d4bf43eb30c9b21cc213dc3b98616b4a9fc321c90911d94d314f323cfffd0d2c3e9371b5b8f7985b9a785adc61617dd042b6f4df5 SHA512 61e93bc9876effd3ca1c4e64ff6ba5bd84b24951ec2cc6f40a0e3248410e60f887552f29ca1f70541fb5524f6a4e8191fed288713c3e280e18922dd5bff1a2c9
+DIST gettext-0.21.1.tar.xz.sig 833 BLAKE2B f673436d315e972f9e110a1b5c8d1b2f20a32fc1b7ce027fcd3bc2fe7a81af183fb8db744cbed1a8c3a6ce1a13d55e19a8e8829fc944960fbfc7efcd9aaed91c SHA512 fba912830c57d0616fb66cf81da0cb7a3ab1e27497c45daa63249d3c9f85182a4f42dfeb1591d8f31c2a340ba0c519f04fd2f05429d1cf26a3ea316d047993d0
+DIST gettext-0.22.4.tar.xz 10255384 BLAKE2B 3f93aa5aef8e40d2e01acaa5aeed11efefd0de43ea26d084a0b9e743019685f7584d8e1bf05c1fd5772a5576d21ee1f052b81366f52c7827b6d14bd4d9890edc SHA512 0f3620b1621b85b3df9e372885c2f040c8a91ec0b2d4e16978459a8a2a152318a0e6f5fefb8d971bad80c437e7ee8ac8c24edc4de0ab86e729528b8a2ac62c51
+DIST gettext-0.22.4.tar.xz.sig 833 BLAKE2B fbb00b53c807934a11263c120861971fffebbd39689eda1fae0fb956476e69c3fb6799440cbf3acfcf43ecea2c134ea4dadb95becbac98badb43e546f3c8e9fb SHA512 a774c98de643b1ea3df645e451878652c2baa5cd786642aa457e6d5f5c44787cb1231eb15ad4390acdf314822633acaffffaa853eb69cbbc72c3b79b547a8854
+DIST gettext-0.22.5.tar.xz 10270724 BLAKE2B 18c383518f5a78b5c04cf76de976524da2a87a892a30d6386778bb4c7dd526ffc3f14f484906c5d3a513b7caf76ea560e53962b325e552182d6940055d798f24 SHA512 a60999bb9d09441f138214d87acb7e59aab81e765bb9253a77c54902681c5de164a5a04de2a9778dfb479dbdefaab2d5de1fbaf6095c555c43e7e9fd7a1c09bd
+DIST gettext-0.22.5.tar.xz.sig 833 BLAKE2B bb3e5ced34ab109f498347a3567103fe3491f69addb4a5ce25bf854fae1a11340eef1a9826b369d2416b53e5f7065aeebdb1609615f064cf7fb4151e82a5b4e5 SHA512 87f1df69206702be928b09a59a19ae4c23072cbc78ea16e76bfc4c929de76a3c0bb8e4eb2c3100c6e7b3b51d23e3b0e484c7e1d576ba7e25fd887934dc9ed8f7
diff --git a/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch b/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch
new file mode 100644
index 000000000000..e063785376dc
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch
@@ -0,0 +1,37 @@
+OMIT_SETLOCALE_LOCK should be true when gl_get_setlocale_null_lock is provided by a dependency library, like GNU libintl.
+On Gentoo musl we use musl's libintl and gl_get_setlocale_null_lock is not provided by it, therefore we set OMIT_SETLOCALE_LOCK to 0.
+
+To properly fix this we should do AC_SEARCH_LIBS([gl_get_setlocale_null_lock], [intl], ...) in automake, but instead we do this
+hack to not get complacent. This should be fixed upstream.
+
+https://savannah.gnu.org/bugs/index.php?62659#comment7
+https://bugs.gentoo.org/830590
+diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am
+index 59b016e..d92978d 100644
+--- a/gettext-tools/libgettextpo/Makefile.am
++++ b/gettext-tools/libgettextpo/Makefile.am
+@@ -40,7 +40,7 @@ AM_CPPFLAGS = \
+ -I../src -I$(top_srcdir)/src \
+ -I../intl -I$(top_srcdir)/../gettext-runtime/intl
+
+-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@
++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@
+
+ # libgettextpo contains the public API for PO files.
+ libgettextpo_la_SOURCES = \
+diff --git a/gettext-tools/libgettextpo/Makefile.in b/gettext-tools/libgettextpo/Makefile.in
+index f76efa5..aca3a81 100644
+--- a/gettext-tools/libgettextpo/Makefile.in
++++ b/gettext-tools/libgettextpo/Makefile.in
+@@ -804,7 +804,7 @@ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+ CXX_CHOICE = @CXX_CHOICE@
+ CYGPATH_W = @CYGPATH_W@
+-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@
++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@
+ DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+ DSYMUTIL = @DSYMUTIL@
+--
+2.35.1
+
diff --git a/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch b/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch
new file mode 100644
index 000000000000..a7471ac724c9
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch
@@ -0,0 +1,100 @@
+From b8fc039e4266570f5af5ee1c2cd201369a766f1e Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Tue, 11 Oct 2022 01:54:44 +0200
+Subject: [PATCH] Avoid warnings during configure execution with
+ --disable-java.
+
+Reported by Sam James <sam@cmpct.info>
+in <https://savannah.gnu.org/bugs/?63193>.
+
+* gettext-runtime/configure.ac: Expand gt_JAVACOMP_DISABLED inline.
+* gettext-tools/configure.ac: Expand gt_JAVAEXEC_DISABLED and
+gt_JAVACOMP_DISABLED inline.
+--- a/gettext-runtime/configure.ac
++++ b/gettext-runtime/configure.ac
+@@ -42,7 +42,16 @@ AS_IF([test "$JAVA_CHOICE" != no], [
+ BUILDJAVA=no
+ fi
+ ], [
+- gt_JAVACOMP_DISABLED
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
++ AC_SUBST([CONF_JAVAC])
++ AC_SUBST([HAVE_JAVAC_ENVVAR])
++ AC_SUBST([HAVE_GCJ_C])
++ AC_SUBST([HAVE_JAVAC])
++ AC_SUBST([HAVE_JIKES])
+ JAR=
+ BUILDJAVA=no
+ ])
+--- a/gettext-tools/configure.ac
++++ b/gettext-tools/configure.ac
+@@ -43,8 +43,28 @@ AS_IF([test "$JAVA_CHOICE" != no], [
+ BUILDJAVA=no
+ fi
+ ], [
+- gt_JAVAEXEC_DISABLED
+- gt_JAVACOMP_DISABLED
++ CONF_JAVA=
++ HAVE_JAVA_ENVVAR=
++ HAVE_GIJ=
++ HAVE_JAVA=
++ HAVE_JRE=
++ HAVE_JVIEW=
++ AC_SUBST([CONF_JAVA])
++ AC_SUBST([HAVE_JAVA_ENVVAR])
++ AC_SUBST([HAVE_GIJ])
++ AC_SUBST([HAVE_JAVA])
++ AC_SUBST([HAVE_JRE])
++ AC_SUBST([HAVE_JVIEW])
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
++ AC_SUBST([CONF_JAVAC])
++ AC_SUBST([HAVE_JAVAC_ENVVAR])
++ AC_SUBST([HAVE_GCJ_C])
++ AC_SUBST([HAVE_JAVAC])
++ AC_SUBST([HAVE_JIKES])
+ JAR=
+ BUILDJAVA=no
+ ])
+diff --git a/gettext-runtime/configure b/gettext-runtime/configure
+index 5e2d593..cf579ff 100755
+--- a/gettext-runtime/configure
++++ b/gettext-runtime/configure
+@@ -7070,7 +7070,11 @@ fi
+
+ else $as_nop
+
+- gt_JAVACOMP_DISABLED
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
+ JAR=
+ BUILDJAVA=no
+
+diff --git a/gettext-tools/configure b/gettext-tools/configure
+index f897bc3..3af54cd 100755
+--- a/gettext-tools/configure
++++ b/gettext-tools/configure
+@@ -8718,8 +8718,11 @@ fi
+
+ else $as_nop
+
+- gt_JAVAEXEC_DISABLED
+- gt_JAVACOMP_DISABLED
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
+ JAR=
+ BUILDJAVA=no
+
diff --git a/sys-devel/gettext/gettext-0.21-r3.ebuild b/sys-devel/gettext/gettext-0.21.1.ebuild
index 0dc67c518d43..4988b01ddbeb 100644
--- a/sys-devel/gettext/gettext-0.21-r3.ebuild
+++ b/sys-devel/gettext/gettext-0.21.1.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Note: Keep version bumps in sync with dev-libs/libintl.
-EAPI=7
+EAPI=8
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gettext.asc
-inherit mono-env libtool java-pkg-opt-2 multilib-minimal verify-sig
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc
+inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs
DESCRIPTION="GNU locale utilities"
HOMEPAGE="https://www.gnu.org/software/gettext/"
@@ -17,13 +17,13 @@ if [[ ${PV} == *_rc* ]] ; then
else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
# Only libasprintf is under the LGPL (and libintl is in a sep package),
# so put that license behind USE=cxx.
LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )"
SLOT="0"
-IUSE="acl cvs +cxx doc emacs git java ncurses nls openmp static-libs"
+IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs"
# only runtime goes multilib
# Note: The version of libxml2 corresponds to the version bundled via gnulib.
@@ -40,11 +40,9 @@ DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
ncurses? ( sys-libs/ncurses:0= )
java? ( virtual/jdk:1.8 )"
RDEPEND="${DEPEND}
- !git? ( cvs? ( dev-vcs/cvs ) )
git? ( dev-vcs/git )
java? ( virtual/jre:1.8 )"
BDEPEND="
- !git? ( cvs? ( dev-vcs/cvs ) )
git? ( dev-vcs/git )
verify-sig? ( sec-keys/openpgp-keys-gettext )"
PDEPEND="emacs? ( app-emacs/po-mode )"
@@ -65,19 +63,38 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.20-parallel_install.patch #685530
"${FILESDIR}"/${PN}-0.21_rc1-avoid_eautomake.patch
"${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch
+ "${FILESDIR}"/${P}-java-autoconf.patch
)
QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
pkg_setup() {
- mono-env_pkg_setup
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
java-pkg-opt-2_pkg_setup
}
src_prepare() {
java-pkg-opt-2_src_prepare
+
default
+
+ # gettext-0.21.1-java-autoconf.patch changes
+ # gettext-{runtime,tools}/configure.ac and the corresponding
+ # configure scripts. Avoid regenerating other autotools output.
+ touch -c gettext-{runtime,tools}/{aclocal.m4,Makefile.in,config.h.in,configure} || die
+
+ # Makefile.am adds a dependency on gettext-{runtime,tools}/configure.ac
+ touch -c configure || die
+
elibtoolize
+
+ if use elibc_musl || use elibc_Darwin; then
+ eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+ fi
}
multilib_src_configure() {
@@ -101,11 +118,13 @@ multilib_src_configure() {
# Never build bundled copy of libxml2.
--without-included-libxml
+ --disable-csharp
+ --without-cvs
+
$(use_enable acl)
$(use_enable cxx c++)
$(use_enable cxx libasprintf)
$(use_with git)
- $(usex git --without-cvs $(use_with cvs))
$(multilib_native_use_enable java)
$(use_enable ncurses curses)
$(use_enable nls)
diff --git a/sys-devel/gettext/gettext-0.22.4.ebuild b/sys-devel/gettext/gettext-0.22.4.ebuild
new file mode 100644
index 000000000000..54fa2c5da80e
--- /dev/null
+++ b/sys-devel/gettext/gettext-0.22.4.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: Keep version bumps in sync with dev-libs/libintl.
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc
+inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs
+
+DESCRIPTION="GNU locale utilities"
+HOMEPAGE="https://www.gnu.org/software/gettext/"
+
+if [[ ${PV} == *_rc* ]] ; then
+ SRC_URI="
+ https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz
+ verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig )
+ "
+ S="${WORKDIR}/${P/_/-}"
+else
+ SRC_URI="
+ mirror://gnu/${PN}/${P}.tar.xz
+ verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )
+ "
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+# Only libasprintf is under the LGPL (and libintl is in a sep package),
+# so put that license behind USE=cxx.
+LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )"
+SLOT="0"
+IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs xattr"
+
+# only runtime goes multilib
+# Note: The version of libxml2 corresponds to the version bundled via gnulib.
+# If the build detects too old of a system version, it will end up falling back
+# to the bundled copy. #596918
+# Note: expat lacks a subslot because it is dynamically loaded at runtime. We
+# would depend on older subslots if they were available (based on the ABIs that
+# are explicitly handled), but expat doesn't currently use subslots.
+DEPEND="
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+ >=dev-libs/libxml2-2.9.3:=
+ dev-libs/expat
+ acl? ( virtual/acl )
+ ncurses? ( sys-libs/ncurses:= )
+ java? ( virtual/jdk:1.8 )
+ xattr? ( sys-apps/attr )
+"
+RDEPEND="
+ ${DEPEND}
+ git? ( dev-vcs/git )
+ java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+ git? ( dev-vcs/git )
+ verify-sig? ( sec-keys/openpgp-keys-gettext )
+"
+PDEPEND="emacs? ( app-emacs/po-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ # only installed for native ABI
+ /usr/include/gettext-po.h
+
+ /usr/include/autosprintf.h
+ /usr/include/textstyle.h
+ /usr/include/textstyle/stdbool.h
+ /usr/include/textstyle/version.h
+ /usr/include/textstyle/woe32dll.h
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch
+)
+
+QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ default
+
+ # gettext-0.21.1-java-autoconf.patch changes
+ # gettext-{runtime,tools}/configure.ac and the corresponding
+ # configure scripts. Avoid regenerating other autotools output.
+ #touch -c gettext-{runtime,tools}/{aclocal.m4,Makefile.in,config.h.in,configure} || die
+ # Makefile.am adds a dependency on gettext-{runtime,tools}/configure.ac
+ #touch -c configure || die
+
+ elibtoolize
+
+ if use elibc_musl || use elibc_Darwin; then
+ eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+ fi
+}
+
+multilib_src_configure() {
+ local myconf=(
+ # switches common to runtime and top-level
+ --cache-file="${BUILD_DIR}"/config.cache
+ #--docdir="\$(datarootdir)/doc/${PF}"
+
+ # Emacs support is now in a separate package
+ --without-emacs
+ --without-lispdir
+ # glib depends on us so avoid circular deps
+ --with-included-glib
+ # libcroco depends on glib which ... ^^^
+ --with-included-libcroco
+ # this will _disable_ libunistring (since it is not bundled),
+ # see bug #326477
+ --with-included-libunistring
+ # Never build libintl since it's in dev-libs/libintl now.
+ --without-included-gettext
+ # Never build bundled copy of libxml2.
+ --without-included-libxml
+
+ --disable-csharp
+ --without-cvs
+
+ $(use_enable acl)
+ $(use_enable cxx c++)
+ $(use_enable cxx libasprintf)
+ $(use_with git)
+ $(multilib_native_use_enable java)
+ $(use_enable ncurses curses)
+ $(use_enable nls)
+ $(use_enable openmp)
+ $(use_enable static-libs static)
+ $(use_enable xattr attr)
+ )
+
+ local ECONF_SOURCE="${S}"
+ if ! multilib_is_native_abi ; then
+ # for non-native ABIs, we build runtime only
+ ECONF_SOURCE+=/gettext-runtime
+ fi
+
+ econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi ; then
+ dosym msgfmt /usr/bin/gmsgfmt # bug #43435
+ dobin gettext-tools/misc/gettextize
+ fi
+
+ # 909041 never install libintl which upstream insists on building
+ rm -f "${ED}"/usr/$(get_libdir)/libintl.* "${ED}"/usr/include/libintl.h
+}
+
+multilib_src_install_all() {
+ find "${ED}" -type f -name "*.la" -delete || die
+
+ if use java ; then
+ java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar
+ rm "${ED}"/usr/share/${PN}/*.jar || die
+ rm "${ED}"/usr/share/${PN}/*.class || die
+ if use doc ; then
+ java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2
+ fi
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+
+ if use doc ; then
+ docinto html
+ dodoc "${ED}"/usr/share/doc/${PF}/*.html
+ else
+ rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
+ fi
+ rm "${ED}"/usr/share/doc/${PF}/*.html || die
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+}
diff --git a/sys-devel/gettext/gettext-0.22.5.ebuild b/sys-devel/gettext/gettext-0.22.5.ebuild
new file mode 100644
index 000000000000..0f0de646e397
--- /dev/null
+++ b/sys-devel/gettext/gettext-0.22.5.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: Keep version bumps in sync with dev-libs/libintl.
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc
+inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs
+
+DESCRIPTION="GNU locale utilities"
+HOMEPAGE="https://www.gnu.org/software/gettext/"
+
+if [[ ${PV} == *_rc* ]] ; then
+ SRC_URI="
+ https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz
+ verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig )
+ "
+ S="${WORKDIR}/${P/_/-}"
+else
+ SRC_URI="
+ mirror://gnu/${PN}/${P}.tar.xz
+ verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )
+ "
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+# Only libasprintf is under the LGPL (and libintl is in a sep package),
+# so put that license behind USE=cxx.
+LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )"
+SLOT="0"
+IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs xattr"
+
+# Only runtime goes multilib
+#
+# Note: The version of libxml2 corresponds to the version bundled via gnulib.
+# If the build detects too old of a system version, it will end up falling back
+# to the bundled copy (bug #596918).
+#
+# Note: expat lacks a subslot because it is dynamically loaded at runtime. We
+# would depend on older subslots if they were available (based on the ABIs that
+# are explicitly handled), but expat doesn't currently use subslots.
+DEPEND="
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+ >=dev-libs/libxml2-2.9.3:=
+ dev-libs/expat
+ acl? ( virtual/acl )
+ ncurses? ( sys-libs/ncurses:= )
+ java? ( virtual/jdk:1.8 )
+ xattr? ( sys-apps/attr )
+"
+RDEPEND="
+ ${DEPEND}
+ git? ( dev-vcs/git )
+ java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+ git? ( dev-vcs/git )
+ verify-sig? ( sec-keys/openpgp-keys-gettext )
+"
+PDEPEND="emacs? ( app-emacs/po-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ # only installed for native ABI
+ /usr/include/gettext-po.h
+
+ /usr/include/autosprintf.h
+ /usr/include/textstyle.h
+ /usr/include/textstyle/stdbool.h
+ /usr/include/textstyle/version.h
+ /usr/include/textstyle/woe32dll.h
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch
+)
+
+QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # bug #898570
+ unreachable
+ MIN
+ alignof
+ static_assert
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ default
+
+ # gettext-0.21.1-java-autoconf.patch changes
+ # gettext-{runtime,tools}/configure.ac and the corresponding
+ # configure scripts. Avoid regenerating other autotools output.
+ #touch -c gettext-{runtime,tools}/{aclocal.m4,Makefile.in,config.h.in,configure} || die
+ # Makefile.am adds a dependency on gettext-{runtime,tools}/configure.ac
+ #touch -c configure || die
+
+ elibtoolize
+
+ if use elibc_musl || use elibc_Darwin; then
+ eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+ fi
+}
+
+multilib_src_configure() {
+ local myconf=(
+ # switches common to runtime and top-level
+ --cache-file="${BUILD_DIR}"/config.cache
+ #--docdir="\$(datarootdir)/doc/${PF}"
+
+ # Emacs support is now in a separate package
+ --without-emacs
+ --without-lispdir
+ # glib depends on us so avoid circular deps
+ --with-included-glib
+ # libcroco depends on glib which ... ^^^
+ --with-included-libcroco
+ # this will _disable_ libunistring (since it is not bundled),
+ # see bug #326477
+ --with-included-libunistring
+ # Never build libintl since it's in dev-libs/libintl now.
+ --without-included-gettext
+ # Never build bundled copy of libxml2.
+ --without-included-libxml
+
+ --disable-csharp
+ --without-cvs
+
+ $(use_enable acl)
+ $(use_enable cxx c++)
+ $(use_enable cxx libasprintf)
+ $(use_with git)
+ $(multilib_native_use_enable java)
+ $(use_enable ncurses curses)
+ $(use_enable nls)
+ $(use_enable openmp)
+ $(use_enable static-libs static)
+ $(use_enable xattr attr)
+ )
+
+ local ECONF_SOURCE="${S}"
+ if ! multilib_is_native_abi ; then
+ # for non-native ABIs, we build runtime only
+ ECONF_SOURCE+=/gettext-runtime
+ fi
+
+ econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi ; then
+ dosym msgfmt /usr/bin/gmsgfmt # bug #43435
+ dobin gettext-tools/misc/gettextize
+ fi
+
+ # 909041 never install libintl which upstream insists on building
+ rm -f "${ED}"/usr/$(get_libdir)/libintl.* "${ED}"/usr/include/libintl.h
+}
+
+multilib_src_install_all() {
+ find "${ED}" -type f -name "*.la" -delete || die
+
+ if use java ; then
+ java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar
+ rm "${ED}"/usr/share/${PN}/*.jar || die
+ rm "${ED}"/usr/share/${PN}/*.class || die
+ if use doc ; then
+ java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2
+ fi
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+
+ if use doc ; then
+ docinto html
+ dodoc "${ED}"/usr/share/doc/${PF}/*.html
+ else
+ rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
+ fi
+ rm "${ED}"/usr/share/doc/${PF}/*.html || die
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+}
diff --git a/sys-devel/gettext/metadata.xml b/sys-devel/gettext/metadata.xml
index 502becbd6b66..aad767169a65 100644
--- a/sys-devel/gettext/metadata.xml
+++ b/sys-devel/gettext/metadata.xml
@@ -1,21 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<use>
- <flag name="cvs">
- When running `autopoint`, use cvs to store the internal development files;
- this requires cvs at runtime, but will be faster/smaller than raw archives
- </flag>
- <flag name="git">
- When running `autopoint`, use git to store the internal development files;
- this requires git at runtime, but will be faster/smaller than raw archives
- </flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:gettext</remote-id>
-</upstream>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="git">When running `autopoint`, use git to store the internal development files; this requires git at runtime, but will be faster/smaller than raw archives</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:gettext</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/gnuconfig/Manifest b/sys-devel/gnuconfig/Manifest
index 0625142aef24..0a977480cafd 100644
--- a/sys-devel/gnuconfig/Manifest
+++ b/sys-devel/gnuconfig/Manifest
@@ -1,2 +1 @@
-DIST gnuconfig-20210107.tar.xz 65944 BLAKE2B 209952ca349c9859b695df5a4f8b49df689cba47b439e715108cb66ccef7ec3742162113a2ee4948a85a96b44c45d4d553f9e41c15823403f451fea6ea61bd36 SHA512 e1485b7b719994441f49b18a88f922405f74aff2ba1df16050802a311fb5438e598d989fdb7fa008734e5ec0e567e7e90486f8bc6655787bc053ad8a89650213
-DIST gnuconfig-20220508.tar.xz 87616 BLAKE2B 80b981cc85153af1cdf5ba8ca3f4e22843443ee062dacf0fa104749cebb4d25e28c83a1ba82ae326457b4cd58fe17e0f28423e9b1d0cbd3ff53b72dbc3e414b3 SHA512 c77363d30733b509d9e2a795189d0a7a556f87c6d2333ad5b376175bd8df34c48777d27e85b766c7b557f151ee2d877c6cf94940dedb4d85793427daeed5c7cd
+DIST gnuconfig-20230731.tar.xz 73112 BLAKE2B c6502d6b339e56440dbfc9abb0ba49e3eec5a573c5e44779dd326e6f11b55b7fc3a6d99fec73abbcc271e8f6f125699ce87f512cb3a825144307cf820df0067a SHA512 d8e24a30f86f1983c69a37a901e2357a0aefbe15fcd3f8a331d1c6f8eabc81b7436930055756a764ae874e406090d8029403f1c0faa3737acb94bd937cd577ef
diff --git a/sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch b/sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch
deleted file mode 100644
index a95e7ad3d5d8..000000000000
--- a/sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From f1a763afa41654e25cbf73aae5ed56ca0909be63 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 9 Oct 2008 15:51:35 -0400
-Subject: [PATCH] add ps2 targets to config.sub
-
-We no longer carry the "ps2" target as that conflicts with the long
-standing shortcut for the i386-ibm-aix target.
----
- config.sub | 25 +++++++++++++++++++++++--
- 1 file changed, 23 insertions(+), 2 deletions(-)
-
-diff --git a/config.sub b/config.sub
-index b0f8492..4d89efe 100755
---- a/config.sub
-+++ b/config.sub
-@@ -813,6 +813,27 @@ case $basic_machine in
- vendor=atari
- basic_os=mint
- ;;
-+ mipsEE* | ee)
-+ cpu=mips64r5900el
-+ vendor=scei
-+ case $os in
-+ linux*)
-+ ;;
-+ *)
-+ os=elf
-+ ;;
-+ esac
-+ ;;
-+ iop)
-+ cpu=mipsel
-+ vendor=scei
-+ os=irx
-+ ;;
-+ dvp)
-+ cpu=dvp
-+ vendor=scei
-+ os=elf
-+ ;;
- news-3600 | risc-news)
- cpu=mips
- vendor=sony
-@@ -1174,7 +1195,7 @@ case $cpu-$vendor in
- | bfin | bpf | bs2000 \
- | c[123]* | c30 | [cjt]90 | c4x \
- | c8051 | clipper | craynv | csky | cydra \
-- | d10v | d30v | dlx | dsp16xx \
-+ | d10v | d30v | dlx | dsp16xx | dvp \
- | e2k | elxsi | epiphany \
- | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
- | h8300 | h8500 \
-@@ -1715,7 +1736,7 @@ case $os in
- | uxpv* | beos* | mpeix* | udk* | moxiebox* \
- | interix* | uwin* | mks* | rhapsody* | darwin* \
- | openstep* | oskit* | conix* | pw32* | nonstopux* \
-- | storm-chaos* | tops10* | tenex* | tops20* | its* \
-+ | storm-chaos* | tops10* | tenex* | tops20* | its* | irx* \
- | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
- | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
- | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
---
-2.30.0
-
diff --git a/sys-devel/gnuconfig/gnuconfig-20210107.ebuild b/sys-devel/gnuconfig/gnuconfig-20210107.ebuild
deleted file mode 100644
index f0894f34d091..000000000000
--- a/sys-devel/gnuconfig/gnuconfig-20210107.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-if [[ ${PV} == "99999999" ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git"
-
- inherit git-r3
-else
- SRC_URI="https://dev.gentoo.org/~polynomial-c/dist/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
- S="${WORKDIR}"
-fi
-
-DESCRIPTION="Updated config.sub and config.guess file from GNU"
-HOMEPAGE="https://savannah.gnu.org/projects/config"
-
-LICENSE="GPL-3+-with-autoconf-exception"
-SLOT="0"
-IUSE=""
-
-maint_pkg_create() {
- cd "${S}"
-
- make ChangeLog || die
- local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
- [[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
-
- cp "${FILESDIR}"/${PV}/*.patch . || die
-
- local tar="${T}/gnuconfig-${ver}.tar.xz"
- tar -Jcf "${tar}" ./* || die "creating tar failed"
- einfo "Packaged tar now available:"
- einfo "$(du -b "${tar}")"
-}
-
-src_unpack() {
- if [[ ${PV} == "99999999" ]] ; then
- git-r3_src_unpack
- maint_pkg_create
- else
- unpack ${A}
- fi
-}
-
-src_prepare() {
- default
- eapply "${S}"/*.patch
-}
-
-src_compile() { :;}
-
-src_test() {
- emake check
-}
-
-src_install() {
- insinto /usr/share/${PN}
- doins config.{sub,guess}
- fperms +x /usr/share/${PN}/config.{sub,guess}
- dodoc ChangeLog
-}
diff --git a/sys-devel/gnuconfig/gnuconfig-20220508.ebuild b/sys-devel/gnuconfig/gnuconfig-20230731.ebuild
index 1d1a7649fea0..36482deca301 100644
--- a/sys-devel/gnuconfig/gnuconfig-20220508.ebuild
+++ b/sys-devel/gnuconfig/gnuconfig-20230731.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
if [[ ${PV} == 99999999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git"
@@ -9,7 +9,7 @@ if [[ ${PV} == 99999999 ]] ; then
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
S="${WORKDIR}"
fi
@@ -26,8 +26,6 @@ maint_pkg_create() {
local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
[[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
- cp "${FILESDIR}"/${PV}/*.patch . || die
-
local tar="${T}/gnuconfig-${ver}.tar.xz"
tar -Jcf "${tar}" ./* || die "creating tar failed"
einfo "Packaged tar now available:"
@@ -43,16 +41,6 @@ src_unpack() {
fi
}
-src_prepare() {
- default
-
- eapply "${S}"/*.patch
-}
-
-src_test() {
- emake check
-}
-
src_install() {
insinto /usr/share/${PN}
doins config.{sub,guess}
diff --git a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
index 3c5c54ade825..bbfd2430e73e 100644
--- a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
+++ b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
if [[ ${PV} == 99999999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git"
@@ -9,7 +9,7 @@ if [[ ${PV} == 99999999 ]] ; then
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
S="${WORKDIR}"
fi
@@ -26,8 +26,6 @@ maint_pkg_create() {
local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
[[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
- cp "${FILESDIR}"/${PV}/*.patch . || die
-
local tar="${T}/gnuconfig-${ver}.tar.xz"
tar -Jcf "${tar}" ./* || die "creating tar failed"
einfo "Packaged tar now available:"
@@ -43,16 +41,6 @@ src_unpack() {
fi
}
-src_prepare() {
- default
-
- eapply "${S}"/*.patch
-}
-
-src_test() {
- emake check
-}
-
src_install() {
insinto /usr/share/${PN}
doins config.{sub,guess}
diff --git a/sys-devel/gnuconfig/metadata.xml b/sys-devel/gnuconfig/metadata.xml
index 44a4bf40a0e9..fa5be8d4e324 100644
--- a/sys-devel/gnuconfig/metadata.xml
+++ b/sys-devel/gnuconfig/metadata.xml
@@ -6,4 +6,7 @@
<name>Gentoo Base System</name>
</maintainer>
<stabilize-allarches/>
+<upstream>
+ <remote-id type="savannah">config</remote-id>
+</upstream>
</pkgmetadata>
diff --git a/sys-devel/icecream/Manifest b/sys-devel/icecream/Manifest
index 7641b4101f3a..715a372facd9 100644
--- a/sys-devel/icecream/Manifest
+++ b/sys-devel/icecream/Manifest
@@ -1,2 +1 @@
-DIST icecream-1.3.1.tar.gz 224068 BLAKE2B d7d66dadf27b0b88ab706bf217ce2b0d33b5db2ed95e48c4e9dcbd000931688ad6809ecbd4e14f0f3889bcebddc8543bd364c9dda09ba71e5dc04d0a5a2122d5 SHA512 d850394b4093defcf2c50bb3f9306348a45bf17d21f4730baeee7125998c2a548b7b3a7597785855d7e388e84830769bf0ec1c4136330a4c8e359cbdd111f5da
DIST icecream-1.4.tar.gz 232707 BLAKE2B 5fdebea4d0eba4a99e8c7c01acab46ec323a887d3fe9944da23ae7089403a9ebf7bf9870ca61af49578af6adf49679341f7070f9e3da3e8c7c2f50d9d4e7c3fe SHA512 b77dd630c51b7b6b4d7fa06cd14a580891b974fe2d50074f7a3b129adc558fc7ce19b3a3716a6798c2fd0f7d0d3a1bc295bbedee3ed6dafa015f309c7c2590f5
diff --git a/sys-devel/icecream/icecream-1.3.1.ebuild b/sys-devel/icecream/icecream-1.3.1.ebuild
deleted file mode 100644
index 72ab4fad07b2..000000000000
--- a/sys-devel/icecream/icecream-1.3.1.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-AT_NOELIBTOOLIZE="yes"
-inherit autotools systemd tmpfiles
-
-DESCRIPTION="Distributed compiler with a central scheduler to share build load"
-HOMEPAGE="https://github.com/icecc/icecream"
-SRC_URI="https://github.com/icecc/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
-
-DEPEND="app-arch/libarchive:=
- app-arch/zstd:=
- acct-user/icecream
- acct-group/icecream
- dev-libs/lzo:2
- sys-libs/libcap-ng"
-RDEPEND="${DEPEND}
- dev-util/shadowman"
-BDEPEND="app-text/docbook2X"
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-src_configure() {
- econf \
- --enable-clang-rewrite-includes \
- --enable-clang-wrappers
-}
-
-src_install() {
- default
-
- find "${ED}" -name '*.la' -delete || die
-
- systemd_dounit "${FILESDIR}"/iceccd.service
- systemd_dounit "${FILESDIR}"/icecc-scheduler.service
-
- newconfd suse/sysconfig.icecream icecream
- newinitd "${FILESDIR}"/icecream.openrc icecream
-
- keepdir /var/log/icecream
- fowners icecream:icecream /var/log/icecream
- fperms 0750 /var/log/icecream
-
- newtmpfiles "${FILESDIR}"/icecream-tmpfiles.conf icecream.conf
-
- insinto /etc/logrotate.d
- newins suse/logrotate icecream
-
- insinto /etc/firewalld/services
- doins suse/iceccd.xml
- doins suse/icecc-scheduler.xml
-
- insinto /usr/share/shadowman/tools
- newins - icecc <<<"${EPREFIX}"/usr/libexec/icecc/bin
-}
-
-pkg_prerm() {
- if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then
- eselect compiler-shadow remove icecc
- fi
-}
-
-pkg_postinst() {
- tmpfiles_process icecream.conf
-
- if [[ -z ${ROOT} ]]; then
- eselect compiler-shadow update icecc
- fi
-}
diff --git a/sys-devel/icecream/icecream-1.4.ebuild b/sys-devel/icecream/icecream-1.4.ebuild
index 8b29c30afdb4..487a71efceb4 100644
--- a/sys-devel/icecream/icecream-1.4.ebuild
+++ b/sys-devel/icecream/icecream-1.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/icecc/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
+KEYWORDS="~amd64 ~arm ~hppa ~loong ~ppc ~sparc ~x86"
DEPEND="app-arch/libarchive:=
app-arch/zstd:=
diff --git a/sys-devel/kgcc64/Manifest b/sys-devel/kgcc64/Manifest
index a7c8ca028d95..33b317e8f850 100644
--- a/sys-devel/kgcc64/Manifest
+++ b/sys-devel/kgcc64/Manifest
@@ -1,9 +1,17 @@
-DIST gcc-10.3.0-patches-1.tar.bz2 15282 BLAKE2B ef283e8b108af9bfd3324fabb95c835374113c6ff2cf1430a5568b3d1b27183e6de6751367c1e5720c85ac4c45132848888d5510c63f95e88a1f623b6bcf4000 SHA512 6dc435c8619a1532000fae843b9964d0d1e28d3cc9cc1962ab7391570a0cf1135424ea5c0b0d3d5ec5ea863f02e963be2ec4c94822f217fc692a1d808325404e
-DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
-DIST gcc-11-20220115.tar.xz 75676672 BLAKE2B 12171fd97731dbca67f13cc2a3a3a3989c22d628b289cbd3d46080f77a8d951f15c1e54e83a2e62ab41b69221f9784e970799a11a9ed5b224a77ba4b1b081f07 SHA512 7455b3b29d3c64df9123afef82faf922d97e08a3ea30fbc2d9286d4f6ed2fafbfc0f9d94ae1b9eee45329e95a27bd642b3aa679d83a0c27a3e30967d49e0728c
-DIST gcc-11.3.0-patches-4.tar.bz2 14030 BLAKE2B cdd555f329c7c0b993cd3527489681bfcc2162db0997611b66337e6b287356761c7deccd3b9f9bb8980a32df0574017a52c5e445e24db746757d87ffccb1ea89 SHA512 cb227599d01734ae9f9fc7ae2c8dd4cae1da80d6ab398ec6f112535239ac76ce8e91fbac88e19c2f75cb08ab75f966c1d1ad4af80ede67e953fbbafc7baefa58
-DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7
-DIST gcc-9.3.0-patches-3.tar.bz2 14193 BLAKE2B 4863fec1af41a8cdb2c24479b28812df36c1f71ab71d267ff0efc467cfb8ce99ed77714ceaedfb08b0d1eb0eb9316758cc7cbc5a8ad0bb582050690935e64b46 SHA512 8b90a5826df64e6f74e4f6c0e5acead695b38f671e26485b110d5b341daaad4ac21aabb04baae9ad457408eed274888b7f785bbc782611acfc7261e6a315d110
-DIST gcc-9.3.0.tar.xz 70533868 BLAKE2B 21efb1432aefad5ed9b9b395e88ef2adfda3a8ea6e3e808cd151da6e66df9fed1bafdc8b8ff055d4b2272ac786d8b7ddc4293bb6b51c55c40a261a0eda0e7cb4 SHA512 4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de
-DIST gcc-9.4.0-patches-1.tar.bz2 14012 BLAKE2B d5fbfd73d9c3a5b66be5b124d981fe5a7468363c83784989a50731f87931435f4b6302e4c20a64b20680581ed40005eff7bdd5855526a093f73a04c3c1ddab31 SHA512 b84884c7d2197cb14229d3321b98cd66c783cf9ebf7e5d1b1186e6cf32ee9e47d004ebad26118f9c848f9bc0a3783ceb23d9b65101d98c3bfa99874e66ee7cbc
-DIST gcc-9.4.0.tar.xz 72411232 BLAKE2B 4bb000d33d6bd2d6cc91c040713f27f79dcf726ef8ab1542c711e0c25651507628510b1373bc73aef71ffb660afddb2eb8d8c8540f5f1498ee243cfff6c0be67 SHA512 dfd3500bf21784b8351a522d53463cf362ede66b0bc302edf350bb44e94418497a8b4b797b6af8ca9b2eeb746b3b115d9c3698381b989546e9151b4496415624
+DIST gcc-10.5.0-musl-patches-2.tar.xz 3452 BLAKE2B 5387e516d07d81477b3f39b8b3bd986bf861d32cd25dc5481c97bd3620d00c918c5661e86857f66dbf28a655401a53e43417f638c443e44cbfdbf5e950caac4d SHA512 86f2ce31cc4fc4fb5a6043fb527bf822d895e1a6220652024f78a1cbd5a962edb6be8dc5f43c32053e075f39bb2350ea8f14e7d57e0473dd2933a7b44676bde5
+DIST gcc-10.5.0-patches-6.tar.xz 18208 BLAKE2B 4cac3340108fb378c76ad62b728429f3c97f348d178744e7536575f3576ca8aa682b878b7df3b1c162dccae64a3cb56c66d8d60eae323e1ece2de4278084fdbd SHA512 9d6c84325fbc118cee01347468ce729c278e5b026b16da945fe54050726e26f86a46ee7b71a01a47cf927b70bfcce459c49a6bc4fb93dcfaa047c76d4c5bc5bc
+DIST gcc-10.5.0.tar.xz 77846412 BLAKE2B 9b71761f4015649514677784443886e59733ac3845f7dfaa4343f46327d36c08c403c444b9e492b870ac0b3f2e3568f972b7700a0ef05a497fb4066079b3143b SHA512 d86dbc18b978771531f4039465e7eb7c19845bf607dc513c97abf8e45ffe1086a99d98f83dfb7b37204af22431574186de9d5ff80c8c3c3a98dbe3983195bffd
+DIST gcc-11-20240111.tar.xz 76240620 BLAKE2B dcf3b2493ca6ba1a9cd0137186cfbf1b96296ff9c5625e40ec7b89e5903b07dc151b61ad54b885fc57ccc02214e2cfa7b9249cbd755ac2554c6ca0008f0704d8 SHA512 aaed094cb6dd99166e0ec59886014108574ddab52701581f0f8e7f0abb966320d01f1bce6ff646170618ca7c2819d20523a23615f20114dbe412de43b937caf4
+DIST gcc-11-20240208.tar.xz 76276224 BLAKE2B efce83c3ea03093546b73d7731ac1051da7a2b0309612ce5b809ae2756bf7a949c94f951f6a77e789f7669051315e1a4e4c33f2b12a2ec1999ee9f1f39f6b13f SHA512 a0e2b4402ff187d0804e3bc2ed0a228cfce48476c1270d57798b060899f65c7e986945651d36c358f9df5eb4b36db13321e141895329b7382c130a0aca6a8962
+DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0eaefafcba9d04e1ad0fd7baeea5a694ab6f5e3c1678cb406f2a1bd17bab25cb01699d032713a1ccf337948dfda2093844607 SHA512 17b84f907cb1bd763873655e6f35fd3ed55a40b602b70a626f04f83b4cc89c6261db1661de78d4d969187a8c56e9f6305b742515a3836b962248a21df0df5d0c
+DIST gcc-11.4.0-patches-12.tar.xz 13824 BLAKE2B e4df9e0dc9512882022aaf325ebf65c540169454c91dd31f913c6f57f6eb291c79ae919671b53db1549799d4a70c09298bf45ed82ad05eb1f961443cc958369d SHA512 87fed0c3f8e28c9f702443db58350bb615110b27ebe334b5de2ea60678e2548c56cd75cffade210d69634e2ac0a9311f5100ddb45d97645aa76d5688bc421a61
+DIST gcc-12-20240112.tar.xz 79832228 BLAKE2B deec7123b8ffc42ddace51e1f3e8e08d5485f7000c0d4b7273b6311912ec0e7e2cb41124297af8c54456bb369a76fa2ef51aff552d8d680ec41dd2b144b08e55 SHA512 2c0a676ad35e6edee915c042a1751ac0263fae9b7af4d324deb49d6603dc73d3ec768832184879543e6ffb1595da5c56d9117288547adab7f243646dcbfc64ac
+DIST gcc-12-20240209.tar.xz 79824868 BLAKE2B 1ae5a646da470f06648c4766c77475ceb287c5f6647d5102f1aef6590f973233d5e7f83b5e0241488d49dba59dd605c211938379e68a393a2dccb3834103ae4b SHA512 9f9a04f4477f41bb2a5662aedef2af75b039de50c2dc99310e504e6080cb7aae06a1255337ea2e563975cb108ddc6766adbbaf4e3d5d5712801d7ba9a5209dbd
+DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b778622fa310ac72a72b2f7032494a8f304eac86217f9204622e6c21aaef9952bece0d09bc126facd4f42b602927909815ab5 SHA512 babc279fea2c1fd4c018815f2f5630214fd46015ce9f365c28af242681d51818eaca30ce298eddcab1eed5ac5f2759e2b47b2335afab9d722b4469a6d4fec326
+DIST gcc-12.3.0-patches-2.tar.xz 14236 BLAKE2B 06c43662c9abb0fa3cf90d5e2273c69aecb9158e6cf6f23c04754ed5d686be2616e81e2502eb16f4298ddd50518ca7677e13249da9e9b091162d3931ff65e4fe SHA512 b0d4b85dbf1a54aaaa1997203b872e3106906b4ad49cde57e1428bc22b2f8e2d73b8cb10ae0d0b792aebaf664594da4d1dea04c44ddc34e59047410766db04d1
+DIST gcc-13-20240113.tar.xz 84356052 BLAKE2B 1fbfffc9f2afe443158e3f26182c8bdc3f3b599c5582762117831ecb6e6d3c1c69e8d2e5932f45eb7d534c3967e08a9f7b1bcec31aa5d7ac608bebff9f35120c SHA512 a59886f707cf18f684295031d4d9fc5b03396face1705e61852d7de98729c53ac4cf209e951d00c232f14e9dc48eee40dd92487db7cb6ad0e80f2339d6d9503a
+DIST gcc-13-20240210.tar.xz 84354416 BLAKE2B 5807623d3f7dd751b6dfe164cfd50d57b2f93485c23c3c2228a4a846a9a94cdad52a5e6f2806e5e7ee2a7b5526386ebdb339c44c7ea023d69f8652088a1b114d SHA512 14a01ced7ac2bfd9fc93de4e3819b4d0823fbe129d3f1faabeb707e9e3e2613b4173321b58b3648a7250e3b7ff5d94edfee60e6c38682f31a1f7b57b1c01433f
+DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
+DIST gcc-13.2.0-patches-12.tar.xz 47404 BLAKE2B ed018bcd7429d1c7aace746cbfc4e59dae409fc0a35231320c1b44c96fff0d912eba5c72109c2deb883f5368159df02148b2d4373396b34da882164c61fe4387 SHA512 b7872a03870bce7b633e4af4329b24fe8f3d50d6d9173f63549f606ce062787748af7f79e7ec4afeb768968d6e8462a849bd1b94316ea6bb284551f99e811617
+DIST gcc-13.2.0-patches-13.tar.xz 46404 BLAKE2B d11e6ebfed8d1fcba60638240927d57722015ea7cfb0790836c338c023fc01f9f5b3ebf0fe1e0c615b36e0131d38b49e3aee4026f8ed81473572255ccaa74e4b SHA512 4f8bbf9101548d64e78e32f38869ed84e462ce8329d64fbb934132d15bc81f8a9b6f2a075c0263fdc3b32e0dfac6bc032a4176eb06df88cb282fe974bfe102f4
+DIST kgcc64-validate-failures-7bbfb01a32b73842f8908de028703510a0e12057.py 27533 BLAKE2B 58917750d247d3a9e7078c62fd4412027a7d02d06c659a9c0743697529754218257c00dc6e10dff467e78b4e019225c39b1627b48a5298d13481a7072748a15f SHA512 b74d6358538d1b076f3d5b6632ea405b99627d5b5621b6f5101cb3453be13ba41e11d590039535b0c74b1624b69885a7093600d5395cc60bc63cea15ae7472b3
diff --git a/sys-devel/kgcc64/files/gcc-12.3-ccache-ICE.patch b/sys-devel/kgcc64/files/gcc-12.3-ccache-ICE.patch
new file mode 100644
index 000000000000..9a170f5db77e
--- /dev/null
+++ b/sys-devel/kgcc64/files/gcc-12.3-ccache-ICE.patch
@@ -0,0 +1,67 @@
+https://bugs.gentoo.org/906310
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109850
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109241
+
+https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=396a4e76afec30d2461638f569cae18955eb4ad2
+
+From 396a4e76afec30d2461638f569cae18955eb4ad2 Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Wed, 22 Mar 2023 16:11:47 -0400
+Subject: [PATCH] c++: local class in nested generic lambda [PR109241]
+
+In this testcase, the tree walk to look for bare parameter packs was
+confused by finding a type with no TREE_BINFO. But it should be fine that
+it's unset; we already checked for unexpanded packs at parse time.
+
+I also tried doing the partial instantiation of the local class, which is
+probably the long-term direction we want to go, but for stage 4 let's go
+with this safer change.
+
+ PR c++/109241
+
+gcc/cp/ChangeLog:
+
+ * pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.
+
+gcc/testsuite/ChangeLog:
+
+ * g++.dg/cpp1y/lambda-generic-local-class2.C: New test.
+--- a/gcc/cp/pt.cc
++++ b/gcc/cp/pt.cc
+@@ -4106,10 +4106,14 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
+ case TAG_DEFN:
+ t = TREE_TYPE (t);
+ if (CLASS_TYPE_P (t))
+- /* Local class, need to look through the whole definition. */
+- for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
+- cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
+- ppd, ppd->visited);
++ {
++ /* Local class, need to look through the whole definition.
++ TYPE_BINFO might be unset for a partial instantiation. */
++ if (TYPE_BINFO (t))
++ for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
++ cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
++ ppd, ppd->visited);
++ }
+ else
+ /* Enum, look at the values. */
+ for (tree l = TYPE_VALUES (t); l; l = TREE_CHAIN (l))
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
+@@ -0,0 +1,13 @@
++// PR c++/109241
++// { dg-do compile { target c++14 } }
++// { dg-options "" } no pedantic
++
++void g() {
++ [](auto) {
++ [](auto) {
++ ({
++ struct A {};
++ });
++ };
++ }(1);
++}
+--
+2.31.1
diff --git a/sys-devel/kgcc64/files/gcc-configure-LANG.patch b/sys-devel/kgcc64/files/gcc-configure-LANG.patch
deleted file mode 100644
index d1b1b0353662..000000000000
--- a/sys-devel/kgcc64/files/gcc-configure-LANG.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
-option parsing, it may break.
-
-http://bugs.gentoo.org/103483
-
---- configure
-+++ configure
-@@ -54,6 +54,19 @@
- infodir='${prefix}/info'
- mandir='${prefix}/man'
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ eval $as_var=C; export $as_var
-+ else
-+ unset $as_var
-+ fi
-+done
-+
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
-@@ -452,16 +463,6 @@
- esac
- done
-
--# NLS nuisances.
--# Only set these to C if already set. These must not be set unconditionally
--# because not all systems understand e.g. LANG=C (notably SCO).
--# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
--# Non-C LC_CTYPE values break the ctype check.
--if test "${LANG+set}" = set; then LANG=C; export LANG; fi
--if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
--if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
--if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
--
- # confdefs.h avoids OS command line length limits that DEFS can exceed.
- rm -rf conftest* confdefs.h
- # AIX cpp loses on an empty file, so make sure it contains at least a newline.
-@@ -1850,6 +1850,19 @@
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
-
-+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then
-+ eval \$as_var=C; export \$as_var
-+ else
-+ unset \$as_var
-+ fi
-+done
-+
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
diff --git a/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild b/sys-devel/kgcc64/kgcc64-10.5.0.ebuild
index 1c81c1c0fb35..c2a2eb1fd4b3 100644
--- a/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild
+++ b/sys-devel/kgcc64/kgcc64-10.5.0.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
@@ -12,11 +12,16 @@ case ${CHOST} in
i?86*) CTARGET=x86_64-${CHOST#*-};;
esac
export CTARGET
+
TOOLCHAIN_ALLOWED_LANGS="c"
-TOOLCHAIN_PATCH_DEV="slyfox"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="6"
+MUSL_VER="2"
+MUSL_GCC_VER="10.5.0"
GCC_TARGET_NO_MULTILIB=true
+PYTHON_COMPAT=( python3_{10..11} )
-PATCH_VER="3"
inherit toolchain
DESCRIPTION="64bit kernel compiler"
diff --git a/sys-devel/kgcc64/kgcc64-10.3.0.ebuild b/sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild
index 3eb8d3aeded9..805aef87b2bb 100644
--- a/sys-devel/kgcc64/kgcc64-10.3.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
@@ -12,11 +12,15 @@ case ${CHOST} in
i?86*) CTARGET=x86_64-${CHOST#*-};;
esac
export CTARGET
-TOOLCHAIN_ALLOWED_LANGS="c"
-TOOLCHAIN_PATCH_DEV="slyfox"
-GCC_TARGET_NO_MULTILIB=true
-PATCH_VER="1"
+GCC_TARGET_NO_MULTILIB=true
+TOOLCHAIN_ALLOWED_LANGS="c"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
inherit toolchain
DESCRIPTION="64bit kernel compiler"
@@ -26,7 +30,7 @@ KEYWORDS="hppa"
# unlike every other target, hppa has not unified the 32/64 bit
# ports in binutils yet
-DEPEND="hppa? ( sys-devel/binutils-hppa64 )"
+BDEPEND="hppa? ( sys-devel/binutils-hppa64 )"
pkg_postinst() {
toolchain_pkg_postinst
diff --git a/sys-devel/kgcc64/kgcc64-9.4.0.ebuild b/sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild
index 25de4c738340..1105de63f8d0 100644
--- a/sys-devel/kgcc64/kgcc64-9.4.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
@@ -12,11 +12,15 @@ case ${CHOST} in
i?86*) CTARGET=x86_64-${CHOST#*-};;
esac
export CTARGET
-TOOLCHAIN_ALLOWED_LANGS="c"
-TOOLCHAIN_PATCH_DEV="slyfox"
-GCC_TARGET_NO_MULTILIB=true
-PATCH_VER="1"
+GCC_TARGET_NO_MULTILIB=true
+TOOLCHAIN_ALLOWED_LANGS="c"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+PATCH_VER="12"
+MUSL_VER="2"
+MUSL_GCC_VER="11.4.0"
+PYTHON_COMPAT=( python3_{10..11} )
inherit toolchain
DESCRIPTION="64bit kernel compiler"
@@ -26,7 +30,7 @@ KEYWORDS="~hppa"
# unlike every other target, hppa has not unified the 32/64 bit
# ports in binutils yet
-DEPEND="hppa? ( sys-devel/binutils-hppa64 )"
+BDEPEND="hppa? ( sys-devel/binutils-hppa64 )"
pkg_postinst() {
toolchain_pkg_postinst
diff --git a/sys-devel/kgcc64/kgcc64-12.3.1_p20240112.ebuild b/sys-devel/kgcc64/kgcc64-12.3.1_p20240112.ebuild
new file mode 100644
index 000000000000..65514fe59f88
--- /dev/null
+++ b/sys-devel/kgcc64/kgcc64-12.3.1_p20240112.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+case ${CHOST} in
+ hppa*) CTARGET=hppa64-${CHOST#*-};;
+ mips*) CTARGET=${CHOST/mips/mips64};;
+ powerpc*) CTARGET=${CHOST/powerpc/powerpc64};;
+ s390*) CTARGET=${CHOST/s390/s390x};;
+ sparc*) CTARGET=${CHOST/sparc/sparc64};;
+ i?86*) CTARGET=x86_64-${CHOST#*-};;
+esac
+export CTARGET
+TOOLCHAIN_ALLOWED_LANGS="c"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="2"
+PATCH_GCC_VER="12.3.0"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+GCC_TARGET_NO_MULTILIB=true
+PYTHON_COMPAT=( python3_{10..11} )
+inherit toolchain
+
+DESCRIPTION="64bit kernel compiler"
+
+# Works on hppa and mips; all other archs, refer to bug #228115
+KEYWORDS="hppa"
+
+# unlike every other target, hppa has not unified the 32/64 bit
+# ports in binutils yet
+BDEPEND="hppa? ( sys-devel/binutils-hppa64 )"
+
+src_prepare() {
+ toolchain_src_prepare
+ eapply "${FILESDIR}"/gcc-12.3-ccache-ICE.patch
+}
+
+pkg_postinst() {
+ toolchain_pkg_postinst
+
+ cd "${ROOT}"/usr/bin
+ local x
+ for x in gcc cpp ; do
+ cat <<-EOF >${CTARGET%%-*}-linux-${x}
+ #!/bin/sh
+ exec ${CTARGET}-${x} "\$@"
+ EOF
+ chmod a+rx ${CTARGET%%-*}-linux-${x}
+ done
+}
diff --git a/sys-devel/kgcc64/kgcc64-12.3.1_p20240209.ebuild b/sys-devel/kgcc64/kgcc64-12.3.1_p20240209.ebuild
new file mode 100644
index 000000000000..65514fe59f88
--- /dev/null
+++ b/sys-devel/kgcc64/kgcc64-12.3.1_p20240209.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+case ${CHOST} in
+ hppa*) CTARGET=hppa64-${CHOST#*-};;
+ mips*) CTARGET=${CHOST/mips/mips64};;
+ powerpc*) CTARGET=${CHOST/powerpc/powerpc64};;
+ s390*) CTARGET=${CHOST/s390/s390x};;
+ sparc*) CTARGET=${CHOST/sparc/sparc64};;
+ i?86*) CTARGET=x86_64-${CHOST#*-};;
+esac
+export CTARGET
+TOOLCHAIN_ALLOWED_LANGS="c"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="2"
+PATCH_GCC_VER="12.3.0"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+GCC_TARGET_NO_MULTILIB=true
+PYTHON_COMPAT=( python3_{10..11} )
+inherit toolchain
+
+DESCRIPTION="64bit kernel compiler"
+
+# Works on hppa and mips; all other archs, refer to bug #228115
+KEYWORDS="hppa"
+
+# unlike every other target, hppa has not unified the 32/64 bit
+# ports in binutils yet
+BDEPEND="hppa? ( sys-devel/binutils-hppa64 )"
+
+src_prepare() {
+ toolchain_src_prepare
+ eapply "${FILESDIR}"/gcc-12.3-ccache-ICE.patch
+}
+
+pkg_postinst() {
+ toolchain_pkg_postinst
+
+ cd "${ROOT}"/usr/bin
+ local x
+ for x in gcc cpp ; do
+ cat <<-EOF >${CTARGET%%-*}-linux-${x}
+ #!/bin/sh
+ exec ${CTARGET}-${x} "\$@"
+ EOF
+ chmod a+rx ${CTARGET%%-*}-linux-${x}
+ done
+}
diff --git a/sys-devel/kgcc64/kgcc64-11.2.1_p20220115.ebuild b/sys-devel/kgcc64/kgcc64-13.2.1_p20240113-r1.ebuild
index 53f4e1488ec0..e14486eae1a8 100644
--- a/sys-devel/kgcc64/kgcc64-11.2.1_p20220115.ebuild
+++ b/sys-devel/kgcc64/kgcc64-13.2.1_p20240113-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
@@ -14,9 +14,12 @@ esac
export CTARGET
TOOLCHAIN_ALLOWED_LANGS="c"
TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="12"
+PATCH_GCC_VER="13.2.0"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
GCC_TARGET_NO_MULTILIB=true
-PATCH_VER="4"
-PATCH_GCC_VER="11.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
inherit toolchain
DESCRIPTION="64bit kernel compiler"
diff --git a/sys-devel/kgcc64/kgcc64-11.3.0.ebuild b/sys-devel/kgcc64/kgcc64-13.2.1_p20240210.ebuild
index 53f4e1488ec0..71ebd938a35b 100644
--- a/sys-devel/kgcc64/kgcc64-11.3.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-13.2.1_p20240210.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
@@ -14,9 +14,12 @@ esac
export CTARGET
TOOLCHAIN_ALLOWED_LANGS="c"
TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="13"
+PATCH_GCC_VER="13.2.0"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
GCC_TARGET_NO_MULTILIB=true
-PATCH_VER="4"
-PATCH_GCC_VER="11.3.0"
+PYTHON_COMPAT=( python3_{10..11} )
inherit toolchain
DESCRIPTION="64bit kernel compiler"
diff --git a/sys-devel/libtool/Manifest b/sys-devel/libtool/Manifest
deleted file mode 100644
index 123e05bfb246..000000000000
--- a/sys-devel/libtool/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4
-DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da
diff --git a/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch b/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch
deleted file mode 100644
index c4693ee7feeb..000000000000
--- a/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -2087,7 +2087,7 @@
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
- esac
-- sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-+ sys_lib_search_path_spec=`$ECHO "@GENTOO_PORTAGE_EPREFIX@/lib @GENTOO_PORTAGE_EPREFIX@/usr/lib $lt_search_path_spec" | $lt_NL2SP`
- else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
- fi])
diff --git a/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch b/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch
deleted file mode 100644
index 81364d4d02af..000000000000
--- a/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-In Gentoo Prefix we go by Apple's convention to give modules the .bundle
-extension.
-http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
-(Above link was removed by Apple, the link below contains a copy:
-http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html,
-in case it disappears also, the relevant quote:
-
-Bundle. Bundles are executable files that can be loaded at runtime by
-other products. Plug-ins are implemented using bundles. The term bundle
-in this context refers to the binary itself, not to a structured
-hierarchy. Bundles have the .bundle extension; for example,
-MyBundle.bundle.)
-
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -2645,7 +2645,7 @@
- soname_spec='$libname$release$major$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
-- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-+ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
- m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
diff --git a/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch b/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch
deleted file mode 100644
index aa1e870649b6..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Force linux-style versioning when generating shared libraries on
-Gentoo/FreeBSD hosts only.
-
-Patch by Diego Elio Pettenò
-
-http://bugs.gentoo.org/109105
-
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -2666,7 +2666,14 @@
- *) objformat=elf ;;
- esac
- fi
-- version_type=freebsd-$objformat
-+ # Handle Gentoo/FreeBSD as it was Linux
-+ case $host_vendor in
-+ gentoo)
-+ version_type=linux ;;
-+ *)
-+ version_type=freebsd-$objformat ;;
-+ esac
-+
- case $version_type in
- freebsd-elf*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-@@ -2678,6 +2685,12 @@
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
- need_version=yes
- ;;
-+ linux)
-+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-+ soname_spec='${libname}${release}${shared_ext}$major'
-+ need_lib_prefix=no
-+ need_version=no
-+ ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
diff --git a/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch b/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch
deleted file mode 100644
index aded304989d2..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-* revert old 1.5 behaviour
-
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -2641,7 +2641,7 @@
- version_type=darwin
- need_lib_prefix=no
- need_version=no
-- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
-+ library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$major$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
diff --git a/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch b/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch
deleted file mode 100644
index 02cb1d7eb9ac..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
-macOS Monterey is 12.0.
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -1076,7 +1076,7 @@
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]][[,.]]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-- 10.*)
-+ 10.*|11.*|12.*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
diff --git a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch
deleted file mode 100644
index 974cd44d028c..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-https://lists.gnu.org/archive/html/libtool-patches/2016-02/msg00002.html
-
-From 53419307d5b44e5b0cff80d76f88ea02f237b747 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 13 Feb 2016 03:32:20 -0500
-Subject: [PATCH] libtoolize: don't execute automake and autoconf on every
- invocation.
-
-Same fix as applied to libtool in commit 408cfb9c5fa8a666917167ffb806cb
-to delay use of automake/autoconf to when the --help option is actually
-specified.
-
-* libtoolize.in (func_help): Override func_help() from
-gl/build-aux/options-parser to only run automake --version and
-autoconf --version when libtool --help is executed on the command
-line.
----
- libtoolize.in | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/libtoolize.in b/libtoolize.in
-index 3fe61ce..0d4af3d 100644
---- a/libtoolize.in
-+++ b/libtoolize.in
-@@ -94,7 +94,12 @@ usage_message="Options:
- "
-
- # Additional text appended to 'usage_message' in response to '--help'.
--long_help_message=$long_help_message"
-+func_help ()
-+{
-+ $debug_cmd
-+
-+ func_usage_message
-+ $ECHO "$long_help_message
- 'environment' show warnings about LIBTOOLIZE_OPTIONS content
- 'file' show warnings about file copying and linking
-
-@@ -120,8 +125,9 @@ include the following information:
-
- Report bugs to <@PACKAGE_BUGREPORT@>.
- GNU @PACKAGE@ home page: <@PACKAGE_URL@>.
--General help using GNU software: <http://www.gnu.org/gethelp/>.
--"
-+General help using GNU software: <http://www.gnu.org/gethelp/>."
-+ exit 0
-+}
-
- warning_categories='environment file'
-
---
-2.6.2
-
diff --git a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch
deleted file mode 100644
index d27f976ccb40..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 351a88feee66eda6ce33eb06acdebb8e9c6d6716 Mon Sep 17 00:00:00 2001
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Fri, 18 Sep 2015 23:17:07 +0200
-Subject: [PATCH] libtoolize: fix infinite recursion in m4
-
-Some projects use this construct in configure.ac:
-
- m4_define([version], m4_include([version]))
- pkg_version=version
-
-When the m4_include builtin is undefined (as was done in
-libtoolize and extract-trace scripts), the call to this 'version'
-macro enters an infinite recursion (until ENOMEM). So rather
-re-define all potentially dangerous macros by empty strings,
-suggested by Eric Blake.
-
-While we are on it, merge the macro-"blacklist" with similar list
-implemented in gettext, except for 'm4_esyscmd'. It's kept
-defined because we already trace AC_INIT macro for package
-version, while it is often specified by
-m4_esyscmd(git-version-gen). Similarly to m4_include, m4_esyscmd
-might be opt-in-blacklisted in future.
-
-References:
-http://lists.gnu.org/archive/html/libtool/2015-09/msg00000.html
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764580
-
-* gl/build-aux/extract-trace (_G_mini): Redefine trace-breaking
-macros to empty strings rather than undefining those. Use 'dnl'
-for comments.
-* bootstrap: Likewise, sync with extract-trace.
-* NEWS: Document.
-* NO-THANKS: Mention Hiroyuki Sato.
-
-Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
----
- NEWS | 4 ++++
- NO-THANKS | 1 +
- bootstrap | 42 +++++++++++++++++++++++++++---------------
- build-aux/extract-trace | 42 +++++++++++++++++++++++++++---------------
- 4 files changed, 59 insertions(+), 30 deletions(-)
-
-diff --git a/gl/build-aux/extract-trace b/gl/build-aux/extract-trace
-index 315a32a..c6abd21 100755
---- a/build-aux/extract-trace
-+++ b/build-aux/extract-trace
-@@ -329,29 +329,41 @@ func_extract_trace ()
- # arguments to Autocof functions, but without following
- # 'm4_s?include' files.
- _G_mini='
-- # Initialisation.
-+ dnl Initialisation.
- m4_changequote([,])
- m4_define([m4_copy], [m4_define([$2], m4_defn([$1]))])
- m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])])
-
-- # Disable these macros.
-- m4_undefine([m4_dnl])
-- m4_undefine([m4_include])
-- m4_undefine([m4_m4exit])
-- m4_undefine([m4_m4wrap])
-- m4_undefine([m4_maketemp])
-+ dnl Replace macros which may abort m4 with a no-op variant.
-+ m4_pushdef([m4_assert])
-+ m4_pushdef([m4_exit])
-+ m4_pushdef([m4_fatal])
-+ m4_pushdef([m4_m4exit])
-
-- # Copy and rename macros not handled by "m4 --prefix".
-+ dnl Replace macros that might break stderr of m4.
-+ m4_pushdef([m4_errprint])
-+ m4_pushdef([m4_errprintn])
-+ m4_pushdef([m4_include])
-+ m4_pushdef([m4_warn])
-+
-+ dnl Avoid side-effects of tracing by extract-trace.
-+ m4_pushdef([m4_maketemp])
-+ m4_pushdef([m4_mkstemp])
-+
-+ dnl TODO: reasons for this
-+ m4_pushdef([m4_dnl])
-+ m4_pushdef([m4_m4wrap])
-+
-+ dnl Copy and rename macros not handled by "m4 --prefix".
- m4_define([dnl], [m4_builtin([dnl])])
- m4_copy([m4_define], [m4_defun])
- m4_rename([m4_ifelse], [m4_if])
-- m4_ifdef([m4_mkstemp], [m4_undefine([m4_mkstemp])])
- m4_rename([m4_patsubst], [m4_bpatsubst])
- m4_rename([m4_regexp], [m4_bregexp])
-
-- # "m4sugar.mini" - useful m4-time macros for dynamic arguments.
-- # If we discover packages that need more m4 macros defined in
-- # order to bootstrap correctly, add them here:
-+ dnl "m4sugar.mini" - useful m4-time macros for dynamic arguments.
-+ dnl If we discover packages that need more m4 macros defined in
-+ dnl order to bootstrap correctly, add them here:
- m4_define([m4_bmatch],
- [m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2],
- [m4_if(m4_bregexp([$1], [$2]), -1,
-@@ -362,11 +374,11 @@ func_extract_trace ()
- m4_define([m4_require], [$1])
- m4_define([m4_shift3], [m4_shift(m4shift(m4shift($@)))])
-
-- # "autoconf.mini" - things from autoconf macros we care about.
-+ dnl "autoconf.mini" - things from autoconf macros we care about.
- m4_copy([m4_defun], [AC_DEFUN])
-
-- # Dummy definitions for the macros we want to trace.
-- # AM_INIT_AUTOMAKE at least produces no trace without this.
-+ dnl Dummy definitions for the macros we want to trace.
-+ dnl AM_INIT_AUTOMAKE at least produces no trace without this.
- '
-
- _G_save=$IFS
---
-2.6.2
-
diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch
deleted file mode 100644
index 853a22eff54f..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://bugs.gentoo.org/573744
-
-From a5c6466528c060cc4660ad0319c00740db0e42ba Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
-Date: Sun, 18 Oct 2015 21:55:39 -0700
-Subject: [PATCH] libtool: fix GCC/clang linking with -fsanitize=*
-
-References:
-https://lists.gnu.org/archive/html/libtool/2014-04/msg00026.html
-
-* build-aux/ltmain.in (func_mode_link): Pass -fsanitize=* to the
-linker to allow trivial use of the clang address sanitizer.
-
-Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
-Copyright-paperwork-exempt: Yes
-
---- a/build-aux/ltmain.in
-+++ b/build-aux/ltmain.in
-@@ -5362,10 +5362,11 @@
- # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- # -specs=* GCC specs files
- # -stdlib=* select c++ std lib with clang
-+ # -fsanitize=* Clang/GCC memory and address sanitizer
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-- -specs=*)
-+ -specs=*|-fsanitize=*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
- func_append compile_command " $arg"
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
-@@ -7274,10 +7274,11 @@
- # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- # -specs=* GCC specs files
- # -stdlib=* select c++ std lib with clang
-+ # -fsanitize=* Clang/GCC memory and address sanitizer
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-- -specs=*)
-+ -specs=*|-fsanitize=*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
- func_append compile_command " $arg"
diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch
deleted file mode 100644
index f6c0a3dc89f1..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-https://lists.gnu.org/archive/html/libtool-patches/2015-03/msg00000.html
-https://lists.gnu.org/archive/html/libtool-patches/2016-02/msg00001.html
-
-From 2f258b87ce4415edede1b2a84a3a7dbcf44555c2 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Mon, 16 Mar 2015 18:17:31 -0400
-Subject: [PATCH] libtool: pass through -fuse-ld flags
-
-Starting with gcc-4.8, there's a -fuse-ld flag that can be used to select
-between bfd & gold. Make sure we pass it through to the linking stage.
-
-* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags through.
-
---- a/build-aux/ltmain.in
-+++ b/build-aux/ltmain.in
-@@ -5363,10 +5363,11 @@
- # -specs=* GCC specs files
- # -stdlib=* select c++ std lib with clang
- # -fsanitize=* Clang/GCC memory and address sanitizer
-+ # -fuse-ld=* Linker select flags for GCC
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-- -specs=*|-fsanitize=*)
-+ -specs=*|-fsanitize=*|-fuse-ld=*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
- func_append compile_command " $arg"
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
-@@ -7275,10 +7275,11 @@
- # -specs=* GCC specs files
- # -stdlib=* select c++ std lib with clang
- # -fsanitize=* Clang/GCC memory and address sanitizer
-+ # -fuse-ld=* Linker select flags for GCC
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-- -specs=*|-fsanitize=*)
-+ -specs=*|-fsanitize=*|-fuse-ld=*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
- func_append compile_command " $arg"
diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch b/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch
deleted file mode 100644
index c7720935d8fd..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Fri, 18 Sep 2015 10:36:43 +0200
-Subject: [PATCH] libtool: fix GCC linking with -specs=*
-
-References:
-https://bugzilla.redhat.com/show_bug.cgi?id=985592
-
-* build-aux/ltmain.in (func_mode_link): Pass -specs=*
-to the linker, Fedora uses this option for hardening.
-
-Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
-
---- a/build-aux/ltmain.in
-+++ b/build-aux/ltmain.in
-@@ -5360,10 +5360,12 @@
- # -tp=* Portland pgcc target processor selection
- # --sysroot=* for sysroot support
- # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-+ # -specs=* GCC specs files
- # -stdlib=* select c++ std lib with clang
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
-+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-+ -specs=*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
- func_append compile_command " $arg"
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
-@@ -7272,10 +7272,12 @@
- # -tp=* Portland pgcc target processor selection
- # --sysroot=* for sysroot support
- # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-+ # -specs=* GCC specs files
- # -stdlib=* select c++ std lib with clang
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
-+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-+ -specs=*)
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
- func_append compile_command " $arg"
diff --git a/sys-devel/libtool/files/libtool-2.4.6-mint.patch b/sys-devel/libtool/files/libtool-2.4.6-mint.patch
deleted file mode 100644
index 4fe5bcede5a3..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-mint.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Patch by Alan Hourihane
-
-http://bugs.gentoo.org/show_bug.cgi?id=266984
-
---- a/configure
-+++ b/configure
-@@ -5897,6 +5897,11 @@
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
-+ mint*)
-+ # On MiNT this can take a long time and run out of memory.
-+ lt_cv_sys_max_cmd_len=8192;
-+ ;;
-+
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
---- a/libltdl/configure
-+++ b/libltdl/configure
-@@ -4782,6 +4782,11 @@
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
-+ mint*)
-+ # On MiNT this can take a long time and run out of memory.
-+ lt_cv_sys_max_cmd_len=8192;
-+ ;;
-+
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -1708,6 +1708,11 @@
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
-+ mint*)
-+ # On MiNT this can take a long time and run out of memory.
-+ lt_cv_sys_max_cmd_len=8192;
-+ ;;
-+
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
diff --git a/sys-devel/libtool/files/libtool-2.4.6-ppc64le.patch b/sys-devel/libtool/files/libtool-2.4.6-ppc64le.patch
deleted file mode 100644
index 78d86c72956b..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-ppc64le.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 020afd7d6410f73bc205206abe1b88b4890b83b1 Mon Sep 17 00:00:00 2001
-From: Leno Hou <lenohou@gmail.com>
-Date: Sun, 24 Apr 2016 00:46:53 +0800
-Subject: [PATCH] [m4/libtool.m4] linker error for powerpc64le-unknown-linux-gnu
-
-Hi all,
-
- 1) As we might know, Gentoo has powerpc64le-unknown-linux-gnu compiler
-
-leno@localhost ~ $ powerpc64le-unknown-linux-gnu-gcc -v
-
-Using built-in specs.
-
-COLLECT_GCC=/usr/powerpc64le-unknown-linux-gnu/gcc-bin/5.3.0/powerpc64le-unknown-linux-gnu-gcc
-
-COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc64le-unknown-linux-gnu/5.3.0/lto-wrapper
-
-Target: powerpc64le-unknown-linux-gnu
-
-Configured with:
-/var/tmp/portage/sys-devel/gcc-5.3.0/work/gcc-5.3.0/configure
---host=powerpc64le-unknown-linux-gnu --build=powerpc64le-unknown-linux-gnu
---prefix=/usr --bindir=/usr/powerpc64le-unknown-linux-gnu/gcc-bin/5.3.0
---includedir=/usr/lib/gcc/powerpc64le-unknown-linux-gnu/5.3.0/include
---datadir=/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0
---mandir=/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0/man
---infodir=/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0/info
---with-gxx-include-dir=/usr/lib/gcc/powerpc64le-unknown-linux-gnu/5.3.0/include/g++-v5
---with-python-dir=/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0/python
---enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
---disable-werror --with-system-zlib --enable-nls --without-included-gettext
---enable-checking=release --with-bugurl=https://bugs.gentoo.org/
---with-pkgversion='Gentoo 5.3.0 p1.0, pie-0.6.5' --enable-libstdcxx-time
---enable-shared --enable-threads=posix --enable-__cxa_atexit
---enable-clocale=gnu --disable-multilib --enable-altivec
---disable-fixed-point --enable-targets=all --disable-libgcj
---enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts
---enable-lto --without-isl --enable-libsanitizer
-
-Thread model: posix
-
-gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5)
-
- 2) And the supported emulations
-
-leno@localhost ~ $ powerpc64le-unknown-linux-gnu-ld -V
-GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
- Supported emulations:
- elf64lppc
- elf32lppc
- elf32lppclinux
- elf32lppcsim
-
- 3) But when I set CHOST="powerpc64le-unkown-linux-gnu" in Gentoo and
-execute aclocal, automake, libtoolize --copy --force, autoconf. When I
-glance in the latest m4/libtool.m4 :
-
-if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
-...
- powerpc64le-*linux*)
- LD="${LD-ld} -m elf32lppclinux"
- ;;
- powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
-...
- *64-bit*)
- case $host in
-...
- powerpcle-*linux*)
- LD="${LD-ld} -m elf64lppc"
- ;;
- powerpc-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
-...
-
-seems linked to $LD='$LD-ld -m elf64ppc' and failed to compile packages.
-
- 4) Below is my workaround patch and works fine for this case. If this is
-OK for you, Could this to be merged in upstream? Thanks
-
-URL: https://debbugs.gnu.org/23348
-URL: https://bugs.gentoo.org/581314
----
- m4/libtool.m4 | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/m4/libtool.m4 b/m4/libtool.m4
-index ee292aff5bca..758b6951ae07 100644
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -1417,10 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
-- powerpcle-*linux*)
-+ powerpcle-*linux*|powerpc64le-*linux*)
- LD="${LD-ld} -m elf64lppc"
- ;;
-- powerpc-*linux*)
-+ powerpc-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
---
-2.11.1
-
diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread.patch
deleted file mode 100644
index 49b81c1dcda6..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-pthread.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/11704
-https://bugs.gentoo.org/650876
-
-From: Pavel Raiskup <praiskup <at> redhat.com>
-Subject: [PATCH] libtool: handle the -pthread{,s} options for g++
-Newsgroups: gmane.comp.gnu.libtool.patches
-Date: Thursday 28th November 2013 14:18:05 UTC (over 4 years ago)
-
-As we are forced to pass -nostdlib to g++ for linking, this option
-expectedly disables the effectiveness of passed -pthread flag - so
-add the -lpthread explicitly to $deplibs to link correctly.
-
-References:
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
-https://bugzilla.redhat.com/show_bug.cgi?id=661333
-http://lists.gnu.org/archive/html/bug-libtool/2013-01/msg00018.htm
-
-* build-aux/ltmain.in (func_mode_link): Explicitly add -lpthread
-flag into $deplibs when -pthread is passed (for g++ only).
----
- build-aux/ltmain.in | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
-index fba05c1..f202b80 100644
---- a/build-aux/ltmain.in
-+++ b/build-aux/ltmain.in
-@@ -5113,6 +5113,16 @@ func_mode_link ()
- *" $arg "*) ;;
- * ) func_append new_inherited_linker_flags " $arg" ;;
- esac
-+
-+ # As we are forced to pass -nostdlib to g++ during linking, the option
-+ # -pthread{,s} is not in effect; add the -lpthread to $deplist
-+ # explicitly to link correctly.
-+ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
-+ case "$arg" in
-+ -pthread*) func_append deplibs " -lpthread" ;;
-+ esac
-+ fi
-+
- continue
- ;;
diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch
deleted file mode 100644
index b093d74266f2..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://bugs.gentoo.org/650876
-
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
-@@ -7127,6 +7127,16 @@
- *" $arg "*) ;;
- * ) func_append new_inherited_linker_flags " $arg" ;;
- esac
-+
-+ # As we are forced to pass -nostdlib to g++ during linking, the option
-+ # -pthread{,s} is not in effect; add the -lpthread to $deplist
-+ # explicitly to link correctly.
-+ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
-+ case "$arg" in
-+ -pthread*) func_append deplibs " -lpthread" ;;
-+ esac
-+ fi
-+
- continue
- ;;
-
diff --git a/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch b/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch
deleted file mode 100644
index 580d635d04aa..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-https://bugs.gentoo.org/542252
-
-From 32f0df9835ac15ac17e04be57c368172c3ad1d19 Mon Sep 17 00:00:00 2001
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Sun, 4 Oct 2015 21:55:03 +0200
-Subject: [PATCH] libtool: mitigate the $sed_quote_subst slowdown
-
-When it is reasonably possible, use shell implementation for
-quoting.
-
-References:
-http://lists.gnu.org/archive/html/libtool/2015-03/msg00005.html
-http://lists.gnu.org/archive/html/libtool/2015-02/msg00000.html
-https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006
-
-* gl/build-aux/funclib.sh (func_quote): New function that can be
-used as substitution for '$SED $sed_quote_subst' call.
-* build-aux/ltmain.in (func_emit_wrapper): Use func_quote instead
-of '$SED $sed_quote_subst'.
-(func_mode_link): Likewise.
-* NEWS: Document.
-* bootstrap: Sync with funclib.sh.
-
---- a/build-aux/ltmain.in
-+++ b/build-aux/ltmain.in
-@@ -3346,7 +3346,8 @@
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- file=\"\$0\""
-
-- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
-+ func_quote "$ECHO"
-+ qECHO=$func_quote_result
- $ECHO "\
-
- # A function that is used when there is no print builtin or printf.
-@@ -8598,8 +8599,8 @@
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
-- relink_command="(cd `pwd`; $relink_command)"
-- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-+ func_quote "(cd `pwd`; $relink_command)"
-+ relink_command=$func_quote_result
- fi
-
- # Only actually do things if not in dry run mode.
-@@ -8845,7 +8846,8 @@
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-+ func_quote "$relink_command"
-+ relink_command=$func_quote_result
- if test yes = "$hardcode_automatic"; then
- relink_command=
- fi
---- a/build-aux/funclib.sh
-+++ b/build-aux/funclib.sh
-@@ -1,5 +1,5 @@
- # Set a version string for this script.
--scriptversion=2015-01-20.17; # UTC
-+scriptversion=2015-10-04.22; # UTC
-
- # General shell script boiler plate, and helper functions.
- # Written by Gary V. Vaughan, 2004
-@@ -1026,6 +1026,57 @@
- }
-
-
-+# func_quote ARG
-+# --------------
-+# Aesthetically quote one ARG, store the result into $func_quote_result. Note
-+# that we keep attention to performance here (so far O(N) complexity as long as
-+# func_append is O(1)).
-+func_quote ()
-+{
-+ $debug_cmd
-+
-+ func_quote_result=$1
-+
-+ case $func_quote_result in
-+ *[\\\`\"\$]*)
-+ case $func_quote_result in
-+ *[\[\*\?]*)
-+ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"`
-+ return 0
-+ ;;
-+ esac
-+
-+ func_quote_old_IFS=$IFS
-+ for _G_char in '\' '`' '"' '$'
-+ do
-+ # STATE($1) PREV($2) SEPARATOR($3)
-+ set start "" ""
-+ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy
-+ IFS=$_G_char
-+ for _G_part in $func_quote_result
-+ do
-+ case $1 in
-+ quote)
-+ func_append func_quote_result "$3$2"
-+ set quote "$_G_part" "\\$_G_char"
-+ ;;
-+ start)
-+ set first "" ""
-+ func_quote_result=
-+ ;;
-+ first)
-+ set quote "$_G_part" ""
-+ ;;
-+ esac
-+ done
-+ IFS=$func_quote_old_IFS
-+ done
-+ ;;
-+ *) ;;
-+ esac
-+}
-+
-+
- # func_quote_for_eval ARG...
- # --------------------------
- # Aesthetically quote ARGs to be evaled later.
-@@ -1042,12 +1093,8 @@
- func_quote_for_eval_unquoted_result=
- func_quote_for_eval_result=
- while test 0 -lt $#; do
-- case $1 in
-- *[\\\`\"\$]*)
-- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
-- *)
-- _G_unquoted_arg=$1 ;;
-- esac
-+ func_quote "$1"
-+ _G_unquoted_arg=$func_quote_result
- if test -n "$func_quote_for_eval_unquoted_result"; then
- func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
- else
---- a/build-aux/ltmain.sh
-+++ b/build-aux/ltmain.sh
-@@ -64,7 +64,7 @@
- # libraries, which are installed to $pkgauxdir.
-
- # Set a version string for this script.
--scriptversion=2015-01-20.17; # UTC
-+scriptversion=2015-10-04.22; # UTC
-
- # General shell script boiler plate, and helper functions.
- # Written by Gary V. Vaughan, 2004
-@@ -1091,6 +1091,57 @@
- }
-
-
-+# func_quote ARG
-+# --------------
-+# Aesthetically quote one ARG, store the result into $func_quote_result. Note
-+# that we keep attention to performance here (so far O(N) complexity as long as
-+# func_append is O(1)).
-+func_quote ()
-+{
-+ $debug_cmd
-+
-+ func_quote_result=$1
-+
-+ case $func_quote_result in
-+ *[\\\`\"\$]*)
-+ case $func_quote_result in
-+ *[\[\*\?]*)
-+ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"`
-+ return 0
-+ ;;
-+ esac
-+
-+ func_quote_old_IFS=$IFS
-+ for _G_char in '\' '`' '"' '$'
-+ do
-+ # STATE($1) PREV($2) SEPARATOR($3)
-+ set start "" ""
-+ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy
-+ IFS=$_G_char
-+ for _G_part in $func_quote_result
-+ do
-+ case $1 in
-+ quote)
-+ func_append func_quote_result "$3$2"
-+ set quote "$_G_part" "\\$_G_char"
-+ ;;
-+ start)
-+ set first "" ""
-+ func_quote_result=
-+ ;;
-+ first)
-+ set quote "$_G_part" ""
-+ ;;
-+ esac
-+ done
-+ IFS=$func_quote_old_IFS
-+ done
-+ ;;
-+ *) ;;
-+ esac
-+}
-+
-+
- # func_quote_for_eval ARG...
- # --------------------------
- # Aesthetically quote ARGs to be evaled later.
-@@ -1107,12 +1158,8 @@
- func_quote_for_eval_unquoted_result=
- func_quote_for_eval_result=
- while test 0 -lt $#; do
-- case $1 in
-- *[\\\`\"\$]*)
-- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
-- *)
-- _G_unquoted_arg=$1 ;;
-- esac
-+ func_quote "$1"
-+ _G_unquoted_arg=$func_quote_result
- if test -n "$func_quote_for_eval_unquoted_result"; then
- func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
- else
-@@ -5258,7 +5305,8 @@
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- file=\"\$0\""
-
-- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
-+ func_quote "$ECHO"
-+ qECHO=$func_quote_result
- $ECHO "\
-
- # A function that is used when there is no print builtin or printf.
-@@ -10510,8 +10558,8 @@
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
-- relink_command="(cd `pwd`; $relink_command)"
-- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-+ func_quote "(cd `pwd`; $relink_command)"
-+ relink_command=$func_quote_result
- fi
-
- # Only actually do things if not in dry run mode.
-@@ -10757,7 +10805,8 @@
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-+ func_quote "$relink_command"
-+ relink_command=$func_quote_result
- if test yes = "$hardcode_automatic"; then
- relink_command=
- fi
diff --git a/sys-devel/libtool/libtool-2.4.6-r6.ebuild b/sys-devel/libtool/libtool-2.4.6-r6.ebuild
deleted file mode 100644
index cf041ceafab1..000000000000
--- a/sys-devel/libtool/libtool-2.4.6-r6.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LIBTOOLIZE="true" #225559
-WANT_LIBTOOL="none"
-inherit autotools prefix
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git"
- inherit git-r3
-else
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-fi
-
-DESCRIPTION="A shared library tool for developers"
-HOMEPAGE="https://www.gnu.org/software/libtool/"
-
-LICENSE="GPL-2"
-SLOT="2"
-IUSE="vanilla"
-
-# Pull in libltdl directly until we convert packages to the new dep.
-RDEPEND="
- sys-devel/gnuconfig
- >=sys-devel/autoconf-2.69:*
- >=sys-devel/automake-1.13:*
- dev-libs/libltdl:0"
-DEPEND="${RDEPEND}"
-[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105
- "${FILESDIR}"/${PN}-2.4.6-link-specs.patch
- "${FILESDIR}"/${PN}-2.4.6-link-fsanitize.patch #573744
- "${FILESDIR}"/${PN}-2.4.6-link-fuse-ld.patch
- "${FILESDIR}"/${PN}-2.4.6-libtoolize-slow.patch
- "${FILESDIR}"/${PN}-2.4.6-libtoolize-delay-help.patch
- "${FILESDIR}"/${PN}-2.4.6-sed-quote-speedup.patch #542252
- "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch #581314
-
- "${FILESDIR}"/${PN}-2.4.6-mint.patch
- "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
- "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
- "${FILESDIR}"/${PN}-2.4.6-darwin20.patch
-)
-
-src_prepare() {
- if [[ ${PV} == *9999 ]] ; then
- eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch #650876
- ./bootstrap || die
- else
- PATCHES+=(
- "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch #650876
- )
- fi
-
- # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway
- chmod +w build-aux/ltmain.sh || die
-
- if use vanilla ; then
- eapply_user
- return 0
- else
- default
- fi
-
- if use prefix ; then
- # seems that libtool has to know about EPREFIX a little bit
- # better, since it fails to find prefix paths to search libs
- # from, resulting in some packages building static only, since
- # libtool is fooled into thinking that libraries are unavailable
- # (argh...). This could also be fixed by making the gcc wrapper
- # return the correct result for -print-search-dirs (doesn't
- # include prefix dirs ...).
- eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
- eprefixify m4/libtool.m4
- fi
-
- pushd libltdl >/dev/null || die
- AT_NOELIBTOOLIZE=yes eautoreconf
- popd >/dev/null || die
- AT_NOELIBTOOLIZE=yes eautoreconf
-
- # Make sure timestamps don't trigger a rebuild of man pages. #556512
- if [[ ${PV} != *9999 ]] ; then
- touch doc/*.1 || die
- export HELP2MAN=false
- fi
-}
-
-src_configure() {
- # the libtool script uses bash code in it and at configure time, tries
- # to find a bash shell. if /bin/sh is bash, it uses that. this can
- # cause problems for people who switch /bin/sh on the fly to other
- # shells, so just force libtool to use /bin/bash all the time.
- export CONFIG_SHELL="$(type -P bash)"
-
- # Do not bother hardcoding the full path to sed. Just rely on $PATH. #574550
- export ac_cv_path_SED="$(basename "$(type -P sed)")"
-
- [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g"
- ECONF_SOURCE=${S} econf ${myconf} --disable-ltdl-install
-}
-
-src_install() {
- default
-
- local x
- while read -d $'\0' -r x ; do
- ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die
- done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0)
-}
diff --git a/sys-devel/libtool/libtool-2.4.7.ebuild b/sys-devel/libtool/libtool-2.4.7.ebuild
deleted file mode 100644
index 09853e34e58d..000000000000
--- a/sys-devel/libtool/libtool-2.4.7.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Please bump with dev-libs/libltdl.
-
-# bug #225559
-LIBTOOLIZE="true"
-WANT_LIBTOOL="none"
-inherit autotools prefix
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git"
- inherit git-r3
-else
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-fi
-
-DESCRIPTION="A shared library tool for developers"
-HOMEPAGE="https://www.gnu.org/software/libtool/"
-
-LICENSE="GPL-2"
-SLOT="2"
-IUSE="vanilla"
-
-# Pull in libltdl directly until we convert packages to the new dep.
-RDEPEND="
- sys-devel/gnuconfig
- >=sys-devel/autoconf-2.69:*
- >=sys-devel/automake-1.13:*
- >=dev-libs/libltdl-2.4.7"
-DEPEND="${RDEPEND}"
-[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man"
-
-PATCHES=(
- # bug #109105
- "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch
- # bug #581314
- "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
-
- "${FILESDIR}"/${PN}-2.4.6-mint.patch
- "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
- "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
-)
-
-src_prepare() {
- if [[ ${PV} == *9999 ]] ; then
- eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876
- ./bootstrap || die
- else
- PATCHES+=(
- "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876
- )
- fi
-
- # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway
- chmod +w build-aux/ltmain.sh || die
-
- if use vanilla ; then
- eapply_user
- return 0
- else
- default
- fi
-
- if use prefix ; then
- # seems that libtool has to know about EPREFIX a little bit
- # better, since it fails to find prefix paths to search libs
- # from, resulting in some packages building static only, since
- # libtool is fooled into thinking that libraries are unavailable
- # (argh...). This could also be fixed by making the gcc wrapper
- # return the correct result for -print-search-dirs (doesn't
- # include prefix dirs ...).
- eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
- eprefixify m4/libtool.m4
- fi
-
- pushd libltdl >/dev/null || die
- AT_NOELIBTOOLIZE=yes eautoreconf
- popd >/dev/null || die
- AT_NOELIBTOOLIZE=yes eautoreconf
-
- # Make sure timestamps don't trigger a rebuild of man pages. #556512
- if [[ ${PV} != *9999 ]] ; then
- touch doc/*.1 || die
- export HELP2MAN=false
- fi
-}
-
-src_configure() {
- # the libtool script uses bash code in it and at configure time, tries
- # to find a bash shell. if /bin/sh is bash, it uses that. this can
- # cause problems for people who switch /bin/sh on the fly to other
- # shells, so just force libtool to use /bin/bash all the time.
- export CONFIG_SHELL="$(type -P bash)"
-
- # Do not bother hardcoding the full path to sed.
- # Just rely on $PATH. bug #574550
- export ac_cv_path_SED="$(basename "$(type -P sed)")"
-
- [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g"
-
- ECONF_SOURCE="${S}" econf ${myconf} --disable-ltdl-install
-}
-
-src_install() {
- default
-
- local x
- while read -d $'\0' -r x ; do
- ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die
- done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0)
-}
diff --git a/sys-devel/libtool/libtool-9999.ebuild b/sys-devel/libtool/libtool-9999.ebuild
deleted file mode 100644
index 65f0d1aab0da..000000000000
--- a/sys-devel/libtool/libtool-9999.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Please bump with dev-libs/libltdl.
-
-# bug #225559
-LIBTOOLIZE="true"
-WANT_LIBTOOL="none"
-inherit autotools prefix
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git"
- inherit git-r3
-else
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-fi
-
-DESCRIPTION="A shared library tool for developers"
-HOMEPAGE="https://www.gnu.org/software/libtool/"
-
-LICENSE="GPL-2"
-SLOT="2"
-IUSE="vanilla"
-
-# Pull in libltdl directly until we convert packages to the new dep.
-RDEPEND="
- sys-devel/gnuconfig
- >=sys-devel/autoconf-2.69:*
- >=sys-devel/automake-1.13:*
- >=dev-libs/libltdl-2.4.7"
-DEPEND="${RDEPEND}"
-[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man"
-
-PATCHES=(
- # bug #109105
- "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch
- # bug #581314
- "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
-
- "${FILESDIR}"/${PN}-2.4.6-mint.patch
- "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
- "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
-)
-
-src_prepare() {
- if [[ ${PV} == *9999 ]] ; then
- eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876
- ./bootstrap || die
- else
- PATCHES+=(
- "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876
- )
- fi
-
- # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway
- chmod +w build-aux/ltmain.sh || die
-
- if use vanilla ; then
- eapply_user
- return 0
- else
- default
- fi
-
- if use prefix ; then
- # seems that libtool has to know about EPREFIX a little bit
- # better, since it fails to find prefix paths to search libs
- # from, resulting in some packages building static only, since
- # libtool is fooled into thinking that libraries are unavailable
- # (argh...). This could also be fixed by making the gcc wrapper
- # return the correct result for -print-search-dirs (doesn't
- # include prefix dirs ...).
- eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
- eprefixify m4/libtool.m4
- fi
-
- pushd libltdl >/dev/null || die
- AT_NOELIBTOOLIZE=yes eautoreconf
- popd >/dev/null || die
- AT_NOELIBTOOLIZE=yes eautoreconf
-
- # Make sure timestamps don't trigger a rebuild of man pages. #556512
- if [[ ${PV} != *9999 ]] ; then
- touch doc/*.1 || die
- export HELP2MAN=false
- fi
-}
-
-src_configure() {
- # the libtool script uses bash code in it and at configure time, tries
- # to find a bash shell. if /bin/sh is bash, it uses that. this can
- # cause problems for people who switch /bin/sh on the fly to other
- # shells, so just force libtool to use /bin/bash all the time.
- export CONFIG_SHELL="$(type -P bash)"
-
- # Do not bother hardcoding the full path to sed.
- # Just rely on $PATH. bug #574550
- export ac_cv_path_SED="$(basename "$(type -P sed)")"
-
- [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g"
-
- ECONF_SOURCE="${S}" econf ${myconf} --disable-ltdl-install
-}
-
-src_install() {
- default
-
- local x
- while read -d $'\0' -r x ; do
- ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die
- done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0)
-}
diff --git a/sys-devel/libtool/metadata.xml b/sys-devel/libtool/metadata.xml
deleted file mode 100644
index 151cc38da6c6..000000000000
--- a/sys-devel/libtool/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:libtool</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild
new file mode 100644
index 000000000000..44a21b6fb09f
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLD on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
new file mode 100644
index 000000000000..2eb282b65da9
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLD on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild
new file mode 100644
index 000000000000..d8b2ae18b0fb
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLD on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild
new file mode 100644
index 000000000000..046a5e6e66f0
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLD on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild
new file mode 100644
index 000000000000..b85bf912c557
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLD on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/metadata.xml b/sys-devel/lld-toolchain-symlinks/metadata.xml
new file mode 100644
index 000000000000..69ca87c01788
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="multilib-symlinks">
+ Install symlinks for all ABI CHOSTs. Note that this can
+ result in gcc being overrode for native builds, as well
+ as conflict with crossdev if used for the same targets.
+ </flag>
+ <flag name="native-symlinks">
+ Install generic 'ld' symlink, as well as ${CTARGET}-ld.
+ These symlinks are installed into slotted LLVM bindir,
+ so they should not take precedence over symlinks installed
+ into /usr/bin by <pkg>sys-devel/binutils-config</pkg>
+ but they can be helpful for binutils-free setups.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index fed0786bf224..122b7c41b995 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -1,9 +1,11 @@
-DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5
-DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7
-DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
-DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
-DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2
-DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646
-DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959
+DIST llvm-gentoo-patchset-16.0.6-r1.tar.xz 17780 BLAKE2B e7c97916df463ff6d3d6374290bad86b3f2a7189fd9da3c6c808cb84160f904f4de1dffa7e98b32d7cacf904beea2df74116384960b0619ff30b7125839fc950 SHA512 74f86aa11614dd86a4af0cba514e98006d6df8ff15effc0c3598c291c7c6139f9310dc2e3ee25e8a3fa960e8a51986a4c48412a8e7269064197102fd9bbeac7c
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-devel/lld/lld-12.0.1.ebuild b/sys-devel/lld/lld-12.0.1.ebuild
deleted file mode 100644
index 12d00d30f2fa..000000000000
--- a/sys-devel/lld/lld-12.0.1.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm llvm.org python-any-r1
-
-DESCRIPTION="The LLVM linker (link editor)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="~sys-devel/llvm-${PV}"
-DEPEND="${RDEPEND}"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
- )"
-
-LLVM_COMPONENTS=( lld libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
-}
-
-src_unpack() {
- llvm.org_src_unpack
-
- # Directory ${WORKDIR}/llvm does not exist with USE="-test",
- # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
- # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
- # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
- # to existent directory ${WORKDIR}/libunwind/include.
- mkdir -p "${WORKDIR}/llvm" || die
-}
-
-src_configure() {
- local mycmakeargs=(
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- )
- use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- cmake_src_configure
-}
-
-src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-lld
-}
diff --git a/sys-devel/lld/lld-13.0.1.ebuild b/sys-devel/lld/lld-13.0.1.ebuild
deleted file mode 100644
index 254b9182c562..000000000000
--- a/sys-devel/lld/lld-13.0.1.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
-
-DESCRIPTION="The LLVM linker (link editor)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="~sys-devel/llvm-${PV}"
-DEPEND="${RDEPEND}"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
- )"
-
-LLVM_COMPONENTS=( lld libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
-}
-
-src_unpack() {
- llvm.org_src_unpack
-
- # Directory ${WORKDIR}/llvm does not exist with USE="-test",
- # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
- # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
- # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
- # to existent directory ${WORKDIR}/libunwind/include.
- mkdir -p "${WORKDIR}/llvm" || die
-}
-
-src_configure() {
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
- local mycmakeargs=(
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- )
- use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- cmake_src_configure
-}
-
-src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-lld
-}
diff --git a/sys-devel/lld/lld-14.0.1.ebuild b/sys-devel/lld/lld-14.0.1.ebuild
deleted file mode 100644
index 24d9edd3e0d3..000000000000
--- a/sys-devel/lld/lld-14.0.1.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
-
-DESCRIPTION="The LLVM linker (link editor)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="~sys-devel/llvm-${PV}"
-DEPEND="${RDEPEND}"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
- )"
-
-LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
-}
-
-src_unpack() {
- llvm.org_src_unpack
-
- # Directory ${WORKDIR}/llvm does not exist with USE="-test",
- # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
- # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
- # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
- # to existent directory ${WORKDIR}/libunwind/include.
- mkdir -p "${WORKDIR}/llvm" || die
-}
-
-src_configure() {
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
- local mycmakeargs=(
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- )
- use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- cmake_src_configure
-}
-
-src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-lld
-}
diff --git a/sys-devel/lld/lld-15.0.0.9999.ebuild b/sys-devel/lld/lld-15.0.0.9999.ebuild
deleted file mode 100644
index e9db4aa03dbe..000000000000
--- a/sys-devel/lld/lld-15.0.0.9999.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
-
-DESCRIPTION="The LLVM linker (link editor)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- ~sys-devel/llvm-${PV}
-"
-RDEPEND="
- ${DEPEND}
-"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
- )
-"
-
-LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
-}
-
-src_unpack() {
- llvm.org_src_unpack
-
- # Directory ${WORKDIR}/llvm does not exist with USE="-test",
- # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
- # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
- # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
- # to existent directory ${WORKDIR}/libunwind/include.
- mkdir -p "${WORKDIR}/llvm" || die
-}
-
-src_configure() {
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
- local mycmakeargs=(
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- )
- use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- cmake_src_configure
-}
-
-src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-lld
-}
diff --git a/sys-devel/lld/lld-14.0.3.ebuild b/sys-devel/lld/lld-15.0.7.ebuild
index 461302a580e7..5040684bb927 100644
--- a/sys-devel/lld/lld-14.0.3.ebuild
+++ b/sys-devel/lld/lld-15.0.7.ebuild
@@ -1,43 +1,48 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..11} )
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
IUSE="debug test"
RESTRICT="!test? ( test )"
DEPEND="
~sys-devel/llvm-${PV}
+ sys-libs/zlib:=
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-15-r2:${LLVM_MAJOR}
+"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
llvm.org_set_globals
python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -59,16 +64,24 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
)
+
use test && mycmakeargs+=(
-DLLVM_BUILD_TESTS=ON
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
cmake_src_configure
}
diff --git a/sys-devel/lld/lld-16.0.6.ebuild b/sys-devel/lld/lld-16.0.6.ebuild
new file mode 100644
index 000000000000..9308190da16c
--- /dev/null
+++ b/sys-devel/lld/lld-16.0.6.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="The LLVM linker (link editor)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos"
+IUSE="debug test zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}[zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
+"
+RDEPEND="
+ ${DEPEND}
+ !sys-devel/lld:0
+"
+BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ )
+"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
+LLVM_TEST_COMPONENTS=( llvm/utils third-party )
+LLVM_PATCHSET=${PV}-r1
+llvm.org_set_globals
+
+python_check_deps() {
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ llvm.org_src_unpack
+
+ # Directory ${WORKDIR}/llvm does not exist with USE="-test",
+ # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
+ # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
+ # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
+ # to existent directory ${WORKDIR}/libunwind/include.
+ mkdir -p "${WORKDIR}/llvm" || die
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_INCLUDE_TESTS=$(usex test)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lld
+}
diff --git a/sys-devel/lld/lld-17.0.6.ebuild b/sys-devel/lld/lld-17.0.6.ebuild
new file mode 100644
index 000000000000..33a9eb571205
--- /dev/null
+++ b/sys-devel/lld/lld-17.0.6.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="The LLVM linker (link editor)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos"
+IUSE="debug test zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
+"
+RDEPEND="
+ ${DEPEND}
+ !sys-devel/lld:0
+"
+BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ )
+"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
+llvm.org_set_globals
+
+python_check_deps() {
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ llvm.org_src_unpack
+
+ # Directory ${WORKDIR}/llvm does not exist with USE="-test",
+ # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
+ # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
+ # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
+ # to existent directory ${WORKDIR}/libunwind/include.
+ mkdir -p "${WORKDIR}/llvm" || die
+}
+
+src_configure() {
+ # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353)
+ filter-lto
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_INCLUDE_TESTS=$(usex test)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lld
+}
diff --git a/sys-devel/lld/lld-18.1.4.ebuild b/sys-devel/lld/lld-18.1.4.ebuild
new file mode 100644
index 000000000000..0d20224dc323
--- /dev/null
+++ b/sys-devel/lld/lld-18.1.4.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs
+
+DESCRIPTION="The LLVM linker (link editor)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos"
+IUSE="debug test zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
+"
+RDEPEND="
+ ${DEPEND}
+ !sys-devel/lld:0
+"
+BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ )
+"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
+llvm.org_set_globals
+
+python_check_deps() {
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ llvm.org_src_unpack
+
+ # Directory ${WORKDIR}/llvm does not exist with USE="-test",
+ # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
+ # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
+ # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
+ # to existent directory ${WORKDIR}/libunwind/include.
+ mkdir -p "${WORKDIR}/llvm" || die
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353)
+ filter-lto
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_INCLUDE_TESTS=$(usex test)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lld
+}
diff --git a/sys-devel/lld/lld-14.0.4.ebuild b/sys-devel/lld/lld-19.0.0.9999.ebuild
index c913a676f6da..5440a5c89919 100644
--- a/sys-devel/lld/lld-14.0.4.ebuild
+++ b/sys-devel/lld/lld-19.0.0.9999.ebuild
@@ -1,43 +1,46 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs
DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv x86"
-IUSE="debug test"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
llvm.org_set_globals
python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -53,22 +56,34 @@ src_unpack() {
}
src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353)
+ filter-lto
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
)
+
use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
cmake_src_configure
}
diff --git a/sys-devel/lld/lld-14.0.5.ebuild b/sys-devel/lld/lld-19.0.0_pre20240410.ebuild
index 461302a580e7..5440a5c89919 100644
--- a/sys-devel/lld/lld-14.0.5.ebuild
+++ b/sys-devel/lld/lld-19.0.0_pre20240410.ebuild
@@ -1,43 +1,46 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs
DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
-IUSE="debug test"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
llvm.org_set_globals
python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -53,22 +56,34 @@ src_unpack() {
}
src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353)
+ filter-lto
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
)
+
use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
cmake_src_configure
}
diff --git a/sys-devel/lld/lld-14.0.6.ebuild b/sys-devel/lld/lld-19.0.0_pre20240420.ebuild
index 461302a580e7..5440a5c89919 100644
--- a/sys-devel/lld/lld-14.0.6.ebuild
+++ b/sys-devel/lld/lld-19.0.0_pre20240420.ebuild
@@ -1,43 +1,46 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs
DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
-IUSE="debug test"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
llvm.org_set_globals
python_check_deps() {
- has_version -b "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -53,22 +56,34 @@ src_unpack() {
}
src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353)
+ filter-lto
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
)
+
use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
cmake_src_configure
}
diff --git a/sys-devel/lld/metadata.xml b/sys-devel/lld/metadata.xml
index 3ad9b7a7c0eb..072910296ca3 100644
--- a/sys-devel/lld/metadata.xml
+++ b/sys-devel/lld/metadata.xml
@@ -4,4 +4,7 @@
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest
index fed0786bf224..bd71f2e58a68 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -1,9 +1,10 @@
-DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5
-DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7
-DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
-DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
-DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2
-DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646
-DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-devel/llvm-common/llvm-common-12.0.1.ebuild b/sys-devel/llvm-common/llvm-common-12.0.1.ebuild
deleted file mode 100644
index 79fd5f8009dd..000000000000
--- a/sys-devel/llvm-common/llvm-common-12.0.1.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE=""
-
-RDEPEND="!sys-devel/llvm:0"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-13.0.1.ebuild b/sys-devel/llvm-common/llvm-common-13.0.1.ebuild
deleted file mode 100644
index e77208540cb8..000000000000
--- a/sys-devel/llvm-common/llvm-common-13.0.1.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE=""
-
-RDEPEND="!sys-devel/llvm:0"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-14.0.1.ebuild b/sys-devel/llvm-common/llvm-common-14.0.1.ebuild
deleted file mode 100644
index 3b5304a686ce..000000000000
--- a/sys-devel/llvm-common/llvm-common-14.0.1.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE=""
-
-RDEPEND="!sys-devel/llvm:0"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-14.0.3.ebuild b/sys-devel/llvm-common/llvm-common-14.0.3.ebuild
deleted file mode 100644
index 104c8747bbee..000000000000
--- a/sys-devel/llvm-common/llvm-common-14.0.3.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-RDEPEND="
- !sys-devel/llvm:0
-"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-14.0.4.ebuild b/sys-devel/llvm-common/llvm-common-14.0.4.ebuild
deleted file mode 100644
index 7590aa728ec8..000000000000
--- a/sys-devel/llvm-common/llvm-common-14.0.4.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-RDEPEND="
- !sys-devel/llvm:0
-"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-14.0.5.ebuild b/sys-devel/llvm-common/llvm-common-14.0.5.ebuild
deleted file mode 100644
index 104c8747bbee..000000000000
--- a/sys-devel/llvm-common/llvm-common-14.0.5.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-RDEPEND="
- !sys-devel/llvm:0
-"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-14.0.6.ebuild b/sys-devel/llvm-common/llvm-common-14.0.6.ebuild
deleted file mode 100644
index 104c8747bbee..000000000000
--- a/sys-devel/llvm-common/llvm-common-14.0.6.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-
-RDEPEND="
- !sys-devel/llvm:0
-"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild
deleted file mode 100644
index df37476f6fbc..000000000000
--- a/sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of LLVM"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-
-RDEPEND="
- !sys-devel/llvm:0
-"
-
-LLVM_COMPONENTS=( llvm/utils/vim )
-llvm.org_set_globals
-
-src_install() {
- insinto /usr/share/vim/vimfiles
- doins -r */
- # some users may find it useful
- newdoc README README.vim
- dodoc vimrc
-}
diff --git a/sys-devel/llvm-common/llvm-common-15.0.7.ebuild b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
new file mode 100644
index 000000000000..3419b7207944
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="emacs"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+BDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+ default
+
+ use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/*/
+ # some users may find it useful
+ newdoc vim/README README.vim
+ dodoc vim/vimrc
+
+ if use emacs ; then
+ elisp-install llvm emacs/*.{el,elc}
+ elisp-make-site-file "${SITEFILE}" llvm
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-common/llvm-common-16.0.6.ebuild b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
new file mode 100644
index 000000000000..ab2cb092abd1
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="emacs"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+BDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+ default
+
+ use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/*/
+ # some users may find it useful
+ newdoc vim/README README.vim
+ dodoc vim/vimrc
+
+ if use emacs ; then
+ elisp-install llvm emacs/*.{el,elc}
+ elisp-make-site-file "${SITEFILE}" llvm
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-common/llvm-common-17.0.6.ebuild b/sys-devel/llvm-common/llvm-common-17.0.6.ebuild
new file mode 100644
index 000000000000..ab2cb092abd1
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-17.0.6.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="emacs"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+BDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+ default
+
+ use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/*/
+ # some users may find it useful
+ newdoc vim/README README.vim
+ dodoc vim/vimrc
+
+ if use emacs ; then
+ elisp-install llvm emacs/*.{el,elc}
+ elisp-make-site-file "${SITEFILE}" llvm
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-common/llvm-common-18.1.4.ebuild b/sys-devel/llvm-common/llvm-common-18.1.4.ebuild
new file mode 100644
index 000000000000..32e5c3f51d9b
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-18.1.4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="emacs"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+BDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+ default
+
+ use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/*/
+ # some users may find it useful
+ newdoc vim/README README.vim
+ dodoc vim/vimrc
+
+ if use emacs ; then
+ elisp-install llvm emacs/*.{el,elc}
+ elisp-make-site-file "${SITEFILE}" llvm
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..2d8f35a84179
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="emacs"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+BDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+ default
+
+ use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/*/
+ # some users may find it useful
+ newdoc vim/README README.vim
+ dodoc vim/vimrc
+
+ if use emacs ; then
+ elisp-install llvm emacs/*.{el,elc}
+ elisp-make-site-file "${SITEFILE}" llvm
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-common/llvm-common-19.0.0_pre20240410.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..2d8f35a84179
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240410.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="emacs"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+BDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+ default
+
+ use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/*/
+ # some users may find it useful
+ newdoc vim/README README.vim
+ dodoc vim/vimrc
+
+ if use emacs ; then
+ elisp-install llvm emacs/*.{el,elc}
+ elisp-make-site-file "${SITEFILE}" llvm
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-common/llvm-common-19.0.0_pre20240420.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..2d8f35a84179
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240420.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp-common llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="emacs"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+BDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+
+LLVM_COMPONENTS=( llvm/utils )
+llvm.org_set_globals
+
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+ default
+
+ use emacs && elisp-compile emacs/*.el
+}
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/*/
+ # some users may find it useful
+ newdoc vim/README README.vim
+ dodoc vim/vimrc
+
+ if use emacs ; then
+ elisp-install llvm emacs/*.{el,elc}
+ elisp-make-site-file "${SITEFILE}" llvm
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sys-devel/llvm-common/metadata.xml b/sys-devel/llvm-common/metadata.xml
index 3ad9b7a7c0eb..072910296ca3 100644
--- a/sys-devel/llvm-common/metadata.xml
+++ b/sys-devel/llvm-common/metadata.xml
@@ -4,4 +4,7 @@
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest
deleted file mode 100644
index 393d9f058670..000000000000
--- a/sys-devel/llvm-roc/Manifest
+++ /dev/null
@@ -1,12 +0,0 @@
-DIST llvm-rocm-ocl-3.10.0.tar.gz 123600166 BLAKE2B 9b69dab6c7d1a8dfe0d90c76b54446ec7f8ef6e59c74ad328208ac07dbf8836ae412dc5c32fdcbfc926a2488e81cd8afef71c3ebca6cd8ff745205028ab380d8 SHA512 3bb7dac13d89cadfb61a231564155f49021437b7c35eae8735b88ceae4a23b7950643f17e3bfebb0868621297202a04d41120d50ea52b6ad8980dabe9bc75509
-DIST llvm-rocm-ocl-3.7.0.tar.gz 116973132 BLAKE2B c1cc8a3b95292d726626d3cb59ec1b96549682bfcbec16030e47cf1318c6ea01bc76f3349f012ce4f1e4d8b9fe192c51a025c2d08cf593622c61fe7c61969ba6 SHA512 0626075bedb3898c96c0bb0be7a2aba4662050a1c738115f661bedc03d744ace7a4581b55c6325060740c13a0e50e72e09272bb02c1186c2c4a40fc9b961dcbe
-DIST llvm-rocm-ocl-3.8.0.tar.gz 117004300 BLAKE2B 13c3213f0fb951fb9d574e8f6d76bb6c632fecadfe93dbe68a9720baa22e35aa3269deef8b533c5a5ff50a2c1ee3dd7a1ea0fae4b8ab8573ec5bfc5ca5d04f4f SHA512 4eca387a132c9d1237ebec7c80319e99c80088766209d05a697d09890f4a82c56ba5f48a5c8c8749bb051c177bb5eab67e00405b04d3191681d0ac7cf1ae868c
-DIST llvm-rocm-ocl-3.9.0.tar.gz 123591368 BLAKE2B 54b44d705e7704921df1914bac6dc1da8e420f9383efb698a9cf6a339b653d71cad29aa077a9e24d6764ca81fb8dc55fa70abb0cfac004d40f7d811e20ec9945 SHA512 3404390506b33c1de1d05980fafb219692985f38b52d852e9a47ab94e57228caa25ccd0d0d69da656281de32c75e001f60cb9f22453e70fea7b39d065d4333af
-DIST llvm-rocm-ocl-4.0.0.tar.gz 123595983 BLAKE2B 69dd47a50a53cf7d8168f872778bcda0e028907c2341b165f40152bdf03b668ee6c209dc60fa1018dde2a946d891f15eb92a38cfbc12bb5798dd132c1ce79bf1 SHA512 2ac3d643e0bee72239089003cd2889711a7cd58dc588467fb0ca0a50bec264fda992aa2e3352d5210011a9dc1eea4dd9eacdc7d0c313cd69c7b491df126a4e4e
-DIST llvm-rocm-ocl-4.0.1.tar.gz 123608276 BLAKE2B dd5a4d6bc198c7fb6fdc2514cd8c4533a2df6ded7a574c9b4762cda3cb65498a464a0e78427db94db05b468a29ce78d3d8131ac7c6e42953fc503896732474e3 SHA512 d23dceaee2badf46cda27aa725bce5b82bab2fba7d1c2220fedb4795eee455de5077b4ff7299ecd6850eeb0bbdb131ea12a699357f373aef818758d845550f04
-DIST llvm-rocm-ocl-4.1.0.tar.gz 128913932 BLAKE2B 15a041ec7b9fec91e409c8ab98ff88f2d15ce58822aa8a77a26ff21416378a4a77a5904fce4e26c5447653da4ec2dbbb5bfec4ae70c72e8e64b2a5f5986ffb92 SHA512 8576e5a43754a9587613f166dc6cad18890812f07bfa55e563ab3de150b6f01ae1b5515aaaf4eef238a7f79e87890533ce791ef07528e4557ea8290c2642ebd3
-DIST llvm-rocm-ocl-4.1.1.tar.gz 128914019 BLAKE2B 9806d1da497e9d9864fd015fc92f5e2d8a6077315d96538064357a38347bc9180948c65cdca9e29574b40f8df62c0660762731564822ac9e8b5364bebf016e43 SHA512 0e4c6b9b0c0330d58616f22d8ec6ebdd6c83aef9ce9968765ac56c022bcd76cba8af5a6cdfb47ed560b33cd67832ac5b026502357af6caec4ab699f1443163fd
-DIST llvm-rocm-ocl-4.2.0.tar.gz 132337711 BLAKE2B f08781f881f2853cd551828ef9190c1253e33ca1bfb13aac790b6484838fe5481be9519609ea9cf4bc09a6c8631c54a567123dfe97c25498c51c464d215049de SHA512 694c37c707c84d18cddb92054d8d59e1eea82c9c9928d0111992cbae1421d6bb614a0889891993b444a821c35fa6e91c801ac8555761c2cd0803f89981475952
-DIST llvm-rocm-ocl-4.3.0.tar.gz 134152148 BLAKE2B aaadb75f0b2f72d3c4dca4b375a38b2806491b854d45f6f95bc398c4b7685fccbc4e6df86869c200f08ced5ddb540344ace2402819cdd3c27c5167a71a78bb3b SHA512 4f85f06d5331770b8697bbe62776579ed02016d899ed9c5328d5953fc5992a0996f7934e7417d6062e77a317d242295803fbeab04b0428d5f257cecd4c25c0cd
-DIST llvm-rocm-ocl-4.5.2.tar.gz 137370130 BLAKE2B f91823b9f0a3b78062eb5e9aa564a31752ab377bebc613892938d4aa6f8e54eb2b00123d0e60e5e703cd41d380cedac07234f024e3812b8df71519d0c7c32625 SHA512 fa4147e73fd37db6735e29cb99c5a7da4edcd1f51af30574d35a359b483aba4b3d4bdefa0845d3991fc0d0758b3e403e7e252033712cc4a8c038d07d9539c18f
-DIST llvm-rocm-ocl-5.0.2.tar.gz 150281451 BLAKE2B e4363266e05e13af761dd6f440dbfc30905f219e428fa3b2595800ba0c80c97cd7e2615d68acd9aea4fc66454ee8a3ff7a52a60d3aed4e93af5007050277e5fe SHA512 9be9f1a0ad1a0089aa27858174ce37c7a02902b6dedc338382f42ed0567823cc4bb11b68c130470590c16d4d92ab2735a06c27d248237ffa2d394253328f6705
diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch b/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch
deleted file mode 100644
index 120ab819f5b4..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Naur a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
---- a/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:49.119055933 +0100
-+++ b/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:13.265056070 +0100
-@@ -2,6 +2,7 @@
- Core
- MC
- Support
-+ Option
- )
-
- find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
-diff -Naur a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt
---- a/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:41:39.521056199 +0100
-+++ b/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:40:23.998056487 +0100
-@@ -79,4 +79,5 @@
- LINK_LIBS
- clangBasic
- ${system_libs}
-+ pthread
- )
diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch
deleted file mode 100644
index a0d3c1df6d99..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://bugs.llvm.org/show_bug.cgi?id=43235
-
-diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h
-index 705f1790b1d..a0314b2c46a 100644
---- a/include/llvm/Support/raw_ostream.h
-+++ b/include/llvm/Support/raw_ostream.h
-@@ -507,9 +507,7 @@ class raw_string_ostream : public raw_ostream {
- /// See raw_ostream::write_impl.
- void write_impl(const char *Ptr, size_t Size) override;
-
-- /// Return the current position within the stream, not counting the bytes
-- /// currently in the buffer.
-- uint64_t current_pos() const override { return OS.size(); }
-+ uint64_t current_pos() const override;
-
- public:
- explicit raw_string_ostream(std::string &O) : OS(O) {}
-diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
-index 4bb315f824a..742e2aced39 100644
---- a/lib/Support/raw_ostream.cpp
-+++ b/lib/Support/raw_ostream.cpp
-@@ -895,6 +895,10 @@ raw_ostream &llvm::nulls() {
- // raw_string_ostream
- //===----------------------------------------------------------------------===//
-
-+/// Return the current position within the stream, not counting the bytes
-+/// currently in the buffer.
-+uint64_t raw_string_ostream::current_pos() const { return OS.size(); }
-+
- raw_string_ostream::~raw_string_ostream() {
- flush();
- }
diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.9.0-tensorflow.patch b/sys-devel/llvm-roc/files/llvm-roc-3.9.0-tensorflow.patch
deleted file mode 100644
index 3e1124457ad3..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-3.9.0-tensorflow.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- llvm-project-rocm-3.9.0.orig/CMakeLists.txt 2020-11-12 22:03:09.902293395 +0100
-+++ llvm-project-rocm-3.9.0/CMakeLists.txt 2020-11-12 22:07:28.185294853 +0100
-@@ -824,6 +824,11 @@
- ${LLVM_INCLUDE_DIR}/llvm/Config/Targets.def
- )
-
-+# They are not referenced. See set_output_directory().
-+set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
-+set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
-+set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
-+
- # For up-to-date instructions for installing the Tensorflow dependency, refer to
- # the bot setup script: https://github.com/google/ml-compiler-opt/blob/master/buildbot/buildbot_init.sh
- # In this case, the latest C API library is available for download from
-@@ -832,18 +837,13 @@
- # LLVM_HAVE_TF_API, through llvm-config.h, so that a user of the LLVM library may
- # also leverage the dependency.
- set(TENSORFLOW_C_LIB_PATH "" CACHE PATH "Path to TensorFlow C library install")
--find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib)
-
--if (tensorflow_c_api)
-+if (TENSORFLOW_C_LIB_PATH)
-+ find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib NO_DEFAULT_PATH REQUIRED)
- set(LLVM_HAVE_TF_API "ON" CACHE BOOL "Full Tensorflow API available")
- include_directories(${TENSORFLOW_C_LIB_PATH}/include)
- endif()
-
--# They are not referenced. See set_output_directory().
--set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
--set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
--set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
--
- # For up-to-date instructions for installing the Tensorflow dependency, refer to
- # the bot setup script: https://github.com/google/ml-compiler-opt/blob/master/buildbot/buildbot_init.sh
- # Specifically, assuming python3 is installed:
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch
deleted file mode 100644
index 225adc709666..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-replace hardcoded hip finder with Gentoo paths.
-
-It is not necessary to check HIP runtime each time.
-
-Author: Benda Xu <heroxbd@gentoo.org>
-
-Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
-===================================================================
---- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
-+++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
-@@ -116,37 +116,8 @@ RocmInstallationDetector::getInstallatio
- return Candidates;
- }
-
-- // Try to find relative to the compiler binary.
-- const char *InstallDir = D.getInstalledDir();
-+ Candidates.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true);
-
-- // Check both a normal Unix prefix position of the clang binary, as well as
-- // the Windows-esque layout the ROCm packages use with the host architecture
-- // subdirectory of bin.
--
-- // Strip off directory (usually bin)
-- StringRef ParentDir = llvm::sys::path::parent_path(InstallDir);
-- StringRef ParentName = llvm::sys::path::filename(ParentDir);
--
-- // Some builds use bin/{host arch}, so go up again.
-- if (ParentName == "bin") {
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- ParentName = llvm::sys::path::filename(ParentDir);
-- }
--
-- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin
-- if (ParentName == "llvm")
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
--
-- Candidates.emplace_back(ParentDir.str(), /*StrictChecking=*/true);
--
-- // Device library may be installed in clang resource directory.
-- Candidates.emplace_back(D.ResourceDir, /*StrictChecking=*/true);
--
-- Candidates.emplace_back(D.SysRoot + "/opt/rocm", /*StrictChecking=*/true);
-- if (ParentName.startswith("aomp")) {
-- // Some versions of the aomp package install to /opt/rocm/aomp/bin
-- Candidates.emplace_back(ParentDir.str());
-- }
- return Candidates;
- }
-
-@@ -273,33 +244,7 @@ void RocmInstallationDetector::detectDev
- }
-
- void RocmInstallationDetector::detectHIPRuntime() {
-- auto Candidates = getInstallationPathCandidates();
-- auto &FS = D.getVFS();
--
-- for (const auto &Candidate : Candidates) {
-- InstallPath = Candidate.Path;
-- if (InstallPath.empty() || !FS.exists(InstallPath))
-- continue;
--
-- BinPath = InstallPath;
-- llvm::sys::path::append(BinPath, "bin");
-- IncludePath = InstallPath;
-- llvm::sys::path::append(IncludePath, "include");
-- LibPath = InstallPath;
-- llvm::sys::path::append(LibPath, "lib");
--
-- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile =
-- FS.getBufferForFile(BinPath + "/.hipVersion");
-- if (!VersionFile && Candidate.StrictChecking)
-- continue;
--
-- if (HIPVersionArg.empty() && VersionFile)
-- ParseHIPVersionFile((*VersionFile)->getBuffer());
--
-- HasHIPRuntime = true;
-- return;
-- }
-- HasHIPRuntime = false;
-+ HasHIPRuntime = true;
- }
-
- void RocmInstallationDetector::print(raw_ostream &OS) const {
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch
deleted file mode 100644
index f14ec4ac0db2..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Author: Wilfried (justxi) Holzke
-
-Adopted from https://github.com/justxi/rocm/blob/master/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch
-
-Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
-===================================================================
---- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
-+++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
-@@ -326,11 +326,6 @@ void RocmInstallationDetector::AddHIPInc
- //
- // ROCm 3.5 does not fully support the wrapper headers. Therefore it needs
- // a workaround.
-- SmallString<128> P(D.ResourceDir);
-- if (UsesRuntimeWrapper)
-- llvm::sys::path::append(P, "include", "cuda_wrappers");
-- CC1Args.push_back("-internal-isystem");
-- CC1Args.push_back(DriverArgs.MakeArgString(P));
- }
-
- if (DriverArgs.hasArg(options::OPT_nogpuinc))
-@@ -341,8 +336,6 @@ void RocmInstallationDetector::AddHIPInc
- return;
- }
-
-- CC1Args.push_back("-internal-isystem");
-- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath()));
- if (UsesRuntimeWrapper)
- CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"});
- }
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.1.0-fix-missing-include.patch b/sys-devel/llvm-roc/files/llvm-roc-4.1.0-fix-missing-include.patch
deleted file mode 100644
index 4914ba2e7f98..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.1.0-fix-missing-include.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From b498303066a63a203d24f739b2d2e0e56dca70d1 Mon Sep 17 00:00:00 2001
-From: serge-sans-paille <sguelton@redhat.com>
-Date: Tue, 10 Nov 2020 14:55:25 +0100
-Subject: [PATCH] [nfc] Fix missing include
-
----
- llvm/utils/benchmark/src/benchmark_register.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h
-index 0705e219f2fa2..4caa5ad4da079 100644
---- a/utils/benchmark/src/benchmark_register.h
-+++ b/utils/benchmark/src/benchmark_register.h
-@@ -1,6 +1,7 @@
- #ifndef BENCHMARK_REGISTER_H
- #define BENCHMARK_REGISTER_H
-
-+#include <limits>
- #include <vector>
-
- #include "check.h"
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch
deleted file mode 100644
index da21ab2fc85a..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --color -uprN orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt
---- orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:57:54.222796911 +0800
-+++ llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:58:35.206796875 +0800
-@@ -11,6 +11,7 @@ add_llvm_component_library(LLVMAMDGPUDis
- MC
- MCDisassembler
- Support
-+ Object
-
- ADD_TO_COMPONENT
- AMDGPU
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch
deleted file mode 100644
index 0f3398951b07..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -Naur a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
---- a/include/llvm/Support/raw_ostream.h 2021-05-22 19:56:44.779955686 +0200
-+++ b/include/llvm/Support/raw_ostream.h 2021-05-22 20:00:49.449954752 +0200
-@@ -610,9 +610,7 @@
- /// See raw_ostream::write_impl.
- void write_impl(const char *Ptr, size_t Size) override;
-
-- /// Return the current position within the stream, not counting the bytes
-- /// currently in the buffer.
-- uint64_t current_pos() const override { return OS.size(); }
-+ uint64_t current_pos() const override;
-
- public:
- explicit raw_string_ostream(std::string &O) : OS(O) {
-diff -Naur a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
---- a/lib/Support/raw_ostream.cpp 2021-05-22 19:59:05.651955148 +0200
-+++ b/lib/Support/raw_ostream.cpp 2021-05-22 20:01:22.929954625 +0200
-@@ -938,6 +938,10 @@
- // raw_string_ostream
- //===----------------------------------------------------------------------===//
-
-+/// Return the current position within the stream, not counting the bytes
-+/// currently in the buffer.
-+uint64_t raw_string_ostream::current_pos() const { return OS.size(); }
-+
- raw_string_ostream::~raw_string_ostream() {
- flush();
- }
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-cyclades.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-cyclades.patch
deleted file mode 100644
index 629ede5bbc76..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-cyclades.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-https://github.com/RadeonOpenCompute/llvm-project/commit/68d5235cb58f988c71b403334cd9482d663841ab.patch
-https://bugs.gentoo.org/800695
-Differential Revision: https://reviews.llvm.org/D102059
-
-From 68d5235cb58f988c71b403334cd9482d663841ab Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar.christina@arm.com>
-Date: Thu, 20 May 2021 18:55:11 +0100
-Subject: [PATCH] libsanitizer: Remove cyclades inclusion in sanitizer
---- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
-@@ -370,15 +370,6 @@ static void ioctl_table_fill() {
-
- #if SANITIZER_GLIBC
- // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
-- _(CYGETDEFTHRESH, WRITE, sizeof(int));
-- _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
-- _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
-- _(CYGETTHRESH, WRITE, sizeof(int));
-- _(CYGETTIMEOUT, WRITE, sizeof(int));
-- _(CYSETDEFTHRESH, NONE, 0);
-- _(CYSETDEFTIMEOUT, NONE, 0);
-- _(CYSETTHRESH, NONE, 0);
-- _(CYSETTIMEOUT, NONE, 0);
- _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
- _(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
- _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-@@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t;
- # include <sys/procfs.h>
- #endif
- #include <sys/user.h>
--#include <linux/cyclades.h>
- #include <linux/if_eql.h>
- #include <linux/if_plip.h>
- #include <linux/lp.h>
-@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
-
- #if SANITIZER_GLIBC
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
-- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
- #if EV_VERSION > (0x010000)
- unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
- #else
-@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
- #endif // SANITIZER_LINUX
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
-- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
-- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
-- unsigned IOCTL_CYGETMON = CYGETMON;
-- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
-- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
-- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
-- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
-- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
-- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
- unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
- unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
- unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
-@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz;
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- extern unsigned struct_ax25_parms_struct_sz;
--extern unsigned struct_cyclades_monitor_sz;
- extern unsigned struct_input_keymap_entry_sz;
- extern unsigned struct_ipx_config_data_sz;
- extern unsigned struct_kbdiacrs_sz;
-@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE;
- #endif // SANITIZER_LINUX
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
--extern unsigned IOCTL_CYGETDEFTHRESH;
--extern unsigned IOCTL_CYGETDEFTIMEOUT;
--extern unsigned IOCTL_CYGETMON;
--extern unsigned IOCTL_CYGETTHRESH;
--extern unsigned IOCTL_CYGETTIMEOUT;
--extern unsigned IOCTL_CYSETDEFTHRESH;
--extern unsigned IOCTL_CYSETDEFTIMEOUT;
--extern unsigned IOCTL_CYSETTHRESH;
--extern unsigned IOCTL_CYSETTIMEOUT;
- extern unsigned IOCTL_EQL_EMANCIPATE;
- extern unsigned IOCTL_EQL_ENSLAVE;
- extern unsigned IOCTL_EQL_GETMASTRCFG;
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch
deleted file mode 100644
index f3d22b996915..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-replace hardcoded hip finder with Gentoo paths.
-
-It is not necessary to check HIP runtime each time.
-
-Author: Benda Xu <heroxbd@gentoo.org>
-Author: Yiyang Wu <xgreenlandforwyy@gmail.com>
-
---- orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
-+++ llvm-project-rocm-4.3.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
-@@ -165,133 +165,8 @@ bool RocmInstallationDetector::parseHIPV
- /// cached and populated only once.
- const SmallVectorImpl<RocmInstallationDetector::Candidate> &
- RocmInstallationDetector::getInstallationPathCandidates() {
--
-- // Return the cached candidate list if it has already been populated.
-- if (!ROCmSearchDirs.empty())
-- return ROCmSearchDirs;
--
-- auto DoPrintROCmSearchDirs = [&]() {
-- if (PrintROCmSearchDirs)
-- for (auto Cand : ROCmSearchDirs) {
-- llvm::errs() << "ROCm installation search path";
-- if (Cand.isSPACK())
-- llvm::errs() << " (Spack " << Cand.SPACKReleaseStr << ")";
-- llvm::errs() << ": " << Cand.Path << '\n';
-- }
-- };
--
-- // For candidate specified by --rocm-path we do not do strict check, i.e.,
-- // checking existence of HIP version file and device library files.
-- if (!RocmPathArg.empty()) {
-- ROCmSearchDirs.emplace_back(RocmPathArg.str());
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-- } else if (const char *RocmPathEnv = ::getenv("ROCM_PATH")) {
-- if (!StringRef(RocmPathEnv).empty()) {
-- ROCmSearchDirs.emplace_back(RocmPathEnv);
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-- }
-- }
--
-- // Try to find relative to the compiler binary.
-- const char *InstallDir = D.getInstalledDir();
--
-- // Check both a normal Unix prefix position of the clang binary, as well as
-- // the Windows-esque layout the ROCm packages use with the host architecture
-- // subdirectory of bin.
-- auto DeduceROCmPath = [](StringRef ClangPath) {
-- // Strip off directory (usually bin)
-- StringRef ParentDir = llvm::sys::path::parent_path(ClangPath);
-- StringRef ParentName = llvm::sys::path::filename(ParentDir);
--
-- // Some builds use bin/{host arch}, so go up again.
-- if (ParentName == "bin") {
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- ParentName = llvm::sys::path::filename(ParentDir);
-- }
--
-- // Detect ROCm packages built with SPACK.
-- // clang is installed at
-- // <rocm_root>/llvm-amdgpu-<rocm_release_string>-<hash>/bin directory.
-- // We only consider the parent directory of llvm-amdgpu package as ROCm
-- // installation candidate for SPACK.
-- if (ParentName.startswith("llvm-amdgpu-")) {
-- auto SPACKPostfix =
-- ParentName.drop_front(strlen("llvm-amdgpu-")).split('-');
-- auto SPACKReleaseStr = SPACKPostfix.first;
-- if (!SPACKReleaseStr.empty()) {
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- return Candidate(ParentDir.str(), /*StrictChecking=*/true,
-- SPACKReleaseStr);
-- }
-- }
--
-- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin
-- // Some versions of the aomp package install to /opt/rocm/aomp/bin
-- if (ParentName == "llvm" || ParentName.startswith("aomp"))
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
--
-- return Candidate(ParentDir.str(), /*StrictChecking=*/true);
-- };
--
-- // Deduce ROCm path by the path used to invoke clang. Do not resolve symbolic
-- // link of clang itself.
-- ROCmSearchDirs.emplace_back(DeduceROCmPath(InstallDir));
--
-- // Deduce ROCm path by the real path of the invoked clang, resolving symbolic
-- // link of clang itself.
-- llvm::SmallString<256> RealClangPath;
-- llvm::sys::fs::real_path(D.getClangProgramPath(), RealClangPath);
-- auto ParentPath = llvm::sys::path::parent_path(RealClangPath);
-- if (ParentPath != InstallDir)
-- ROCmSearchDirs.emplace_back(DeduceROCmPath(ParentPath));
--
-- // Device library may be installed in clang resource directory.
-- ROCmSearchDirs.emplace_back(D.ResourceDir,
-- /*StrictChecking=*/true);
--
-- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm",
-- /*StrictChecking=*/true);
--
-- // Find the latest /opt/rocm-{release} directory.
-- std::error_code EC;
-- std::string LatestROCm;
-- llvm::VersionTuple LatestVer;
-- // Get ROCm version from ROCm directory name.
-- auto GetROCmVersion = [](StringRef DirName) {
-- llvm::VersionTuple V;
-- std::string VerStr = DirName.drop_front(strlen("rocm-")).str();
-- // The ROCm directory name follows the format of
-- // rocm-{major}.{minor}.{subMinor}[-{build}]
-- std::replace(VerStr.begin(), VerStr.end(), '-', '.');
-- V.tryParse(VerStr);
-- return V;
-- };
-- for (llvm::vfs::directory_iterator
-- File = D.getVFS().dir_begin(D.SysRoot + "/opt", EC),
-- FileEnd;
-- File != FileEnd && !EC; File.increment(EC)) {
-- llvm::StringRef FileName = llvm::sys::path::filename(File->path());
-- if (!FileName.startswith("rocm-"))
-- continue;
-- if (LatestROCm.empty()) {
-- LatestROCm = FileName.str();
-- LatestVer = GetROCmVersion(LatestROCm);
-- continue;
-- }
-- auto Ver = GetROCmVersion(FileName);
-- if (LatestVer < Ver) {
-- LatestROCm = FileName.str();
-- LatestVer = Ver;
-- }
-- }
-- if (!LatestROCm.empty())
-- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm,
-- /*StrictChecking=*/true);
--
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-+ ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true);
-+ return ROCmSearchDirs;
- }
-
- RocmInstallationDetector::RocmInstallationDetector(
-@@ -397,7 +272,7 @@ void RocmInstallationDetector::detectDev
- // - ${ROCM_ROOT}/lib/bitcode/*
- // so try to detect these layouts.
- static constexpr std::array<const char *, 2> SubDirsList[] = {
-- {"amdgcn", "bitcode"},
-+ {"lib/amdgcn", "bitcode"},
- {"lib", ""},
- {"lib", "bitcode"},
- };
-@@ -423,42 +298,7 @@ void RocmInstallationDetector::detectDev
- }
-
- void RocmInstallationDetector::detectHIPRuntime() {
-- SmallVector<Candidate, 4> HIPSearchDirs;
-- if (!HIPPathArg.empty())
-- HIPSearchDirs.emplace_back(HIPPathArg.str(), /*StrictChecking=*/true);
-- else
-- HIPSearchDirs.append(getInstallationPathCandidates());
-- auto &FS = D.getVFS();
--
-- for (const auto &Candidate : HIPSearchDirs) {
-- InstallPath = Candidate.Path;
-- if (InstallPath.empty() || !FS.exists(InstallPath))
-- continue;
-- // HIP runtime built by SPACK is installed to
-- // <rocm_root>/hip-<rocm_release_string>-<hash> directory.
-- auto SPACKPath = findSPACKPackage(Candidate, "hip");
-- InstallPath = SPACKPath.empty() ? InstallPath : SPACKPath;
--
-- BinPath = InstallPath;
-- llvm::sys::path::append(BinPath, "bin");
-- IncludePath = InstallPath;
-- llvm::sys::path::append(IncludePath, "include");
-- LibPath = InstallPath;
-- llvm::sys::path::append(LibPath, "lib");
--
-- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile =
-- FS.getBufferForFile(BinPath + "/.hipVersion");
-- if (!VersionFile && Candidate.StrictChecking)
-- continue;
--
-- if (HIPVersionArg.empty() && VersionFile)
-- if (parseHIPVersionFile((*VersionFile)->getBuffer()))
-- continue;
--
-- HasHIPRuntime = true;
-- return;
-- }
-- HasHIPRuntime = false;
-+ HasHIPRuntime = true;
- }
-
- void RocmInstallationDetector::print(raw_ostream &OS) const {
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.5.2-add_libraries.patch b/sys-devel/llvm-roc/files/llvm-roc-4.5.2-add_libraries.patch
deleted file mode 100644
index e2fe9282d837..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.5.2-add_libraries.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
---- a/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:49.119055933 +0100
-+++ b/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:13.265056070 +0100
-@@ -2,6 +2,7 @@
- Core
- MC
- Support
-+ Option
- )
-
- find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.5.2-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-4.5.2-hip-location.patch
deleted file mode 100644
index f6f60cfb1b0f..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-4.5.2-hip-location.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-replace hardcoded hip finder with Gentoo paths.
-
-It is not necessary to check HIP runtime each time.
-
-Author: Benda Xu <heroxbd@gentoo.org>
-Author: Yiyang Wu <xgreenlandforwyy@gmail.com>
-
---- orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
-+++ llvm-project-rocm-4.3.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
-@@ -165,133 +165,7 @@
- /// cached and populated only once.
- const SmallVectorImpl<RocmInstallationDetector::Candidate> &
- RocmInstallationDetector::getInstallationPathCandidates() {
--
-- // Return the cached candidate list if it has already been populated.
-- if (!ROCmSearchDirs.empty())
-- return ROCmSearchDirs;
--
-- auto DoPrintROCmSearchDirs = [&]() {
-- if (PrintROCmSearchDirs)
-- for (auto Cand : ROCmSearchDirs) {
-- llvm::errs() << "ROCm installation search path";
-- if (Cand.isSPACK())
-- llvm::errs() << " (Spack " << Cand.SPACKReleaseStr << ")";
-- llvm::errs() << ": " << Cand.Path << '\n';
-- }
-- };
--
-- // For candidate specified by --rocm-path we do not do strict check, i.e.,
-- // checking existence of HIP version file and device library files.
-- if (!RocmPathArg.empty()) {
-- ROCmSearchDirs.emplace_back(RocmPathArg.str());
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-- } else if (const char *RocmPathEnv = ::getenv("ROCM_PATH")) {
-- if (!StringRef(RocmPathEnv).empty()) {
-- ROCmSearchDirs.emplace_back(RocmPathEnv);
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-- }
-- }
--
-- // Try to find relative to the compiler binary.
-- const char *InstallDir = D.getInstalledDir();
--
-- // Check both a normal Unix prefix position of the clang binary, as well as
-- // the Windows-esque layout the ROCm packages use with the host architecture
-- // subdirectory of bin.
-- auto DeduceROCmPath = [](StringRef ClangPath) {
-- // Strip off directory (usually bin)
-- StringRef ParentDir = llvm::sys::path::parent_path(ClangPath);
-- StringRef ParentName = llvm::sys::path::filename(ParentDir);
--
-- // Some builds use bin/{host arch}, so go up again.
-- if (ParentName == "bin") {
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- ParentName = llvm::sys::path::filename(ParentDir);
-- }
--
-- // Detect ROCm packages built with SPACK.
-- // clang is installed at
-- // <rocm_root>/llvm-amdgpu-<rocm_release_string>-<hash>/bin directory.
-- // We only consider the parent directory of llvm-amdgpu package as ROCm
-- // installation candidate for SPACK.
-- if (ParentName.startswith("llvm-amdgpu-")) {
-- auto SPACKPostfix =
-- ParentName.drop_front(strlen("llvm-amdgpu-")).split('-');
-- auto SPACKReleaseStr = SPACKPostfix.first;
-- if (!SPACKReleaseStr.empty()) {
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- return Candidate(ParentDir.str(), /*StrictChecking=*/true,
-- SPACKReleaseStr);
-- }
-- }
--
-- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin
-- // Some versions of the aomp package install to /opt/rocm/aomp/bin
-- if (ParentName == "llvm" || ParentName.startswith("aomp"))
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- // Some versions of the aomp package install to /opt/rocm/aomp/bin
-- // and it seems ParentDir is already pointing to correct place.
-- return Candidate(ParentDir.str(), /*StrictChecking=*/true);
-- };
--
-- // Deduce ROCm path by the path used to invoke clang. Do not resolve symbolic
-- // link of clang itself.
-- ROCmSearchDirs.emplace_back(DeduceROCmPath(InstallDir));
--
-- // Deduce ROCm path by the real path of the invoked clang, resolving symbolic
-- // link of clang itself.
-- llvm::SmallString<256> RealClangPath;
-- llvm::sys::fs::real_path(D.getClangProgramPath(), RealClangPath);
-- auto ParentPath = llvm::sys::path::parent_path(RealClangPath);
-- if (ParentPath != InstallDir)
-- ROCmSearchDirs.emplace_back(DeduceROCmPath(ParentPath));
--
-- // Device library may be installed in clang resource directory.
-- ROCmSearchDirs.emplace_back(D.ResourceDir,
-- /*StrictChecking=*/true);
--
-- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm",
-- /*StrictChecking=*/true);
--
-- // Find the latest /opt/rocm-{release} directory.
-- std::error_code EC;
-- std::string LatestROCm;
-- llvm::VersionTuple LatestVer;
-- // Get ROCm version from ROCm directory name.
-- auto GetROCmVersion = [](StringRef DirName) {
-- llvm::VersionTuple V;
-- std::string VerStr = DirName.drop_front(strlen("rocm-")).str();
-- // The ROCm directory name follows the format of
-- // rocm-{major}.{minor}.{subMinor}[-{build}]
-- std::replace(VerStr.begin(), VerStr.end(), '-', '.');
-- V.tryParse(VerStr);
-- return V;
-- };
-- for (llvm::vfs::directory_iterator
-- File = D.getVFS().dir_begin(D.SysRoot + "/opt", EC),
-- FileEnd;
-- File != FileEnd && !EC; File.increment(EC)) {
-- llvm::StringRef FileName = llvm::sys::path::filename(File->path());
-- if (!FileName.startswith("rocm-"))
-- continue;
-- if (LatestROCm.empty()) {
-- LatestROCm = FileName.str();
-- LatestVer = GetROCmVersion(LatestROCm);
-- continue;
-- }
-- auto Ver = GetROCmVersion(FileName);
-- if (LatestVer < Ver) {
-- LatestROCm = FileName.str();
-- LatestVer = Ver;
-- }
-- }
-- if (!LatestROCm.empty())
-- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm,
-- /*StrictChecking=*/true);
--
-- DoPrintROCmSearchDirs();
-+ ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true);
- return ROCmSearchDirs;
- }
-
-@@ -397,7 +272,7 @@ void RocmInstallationDetector::detectDev
- // - ${ROCM_ROOT}/lib/bitcode/*
- // so try to detect these layouts.
- static constexpr std::array<const char *, 2> SubDirsList[] = {
-- {"amdgcn", "bitcode"},
-+ {"lib/amdgcn", "bitcode"},
- {"lib", ""},
- {"lib", "bitcode"},
- };
-@@ -424,42 +298,7 @@
- }
-
- void RocmInstallationDetector::detectHIPRuntime() {
-- SmallVector<Candidate, 4> HIPSearchDirs;
-- if (!HIPPathArg.empty())
-- HIPSearchDirs.emplace_back(HIPPathArg.str(), /*StrictChecking=*/true);
-- else
-- HIPSearchDirs.append(getInstallationPathCandidates());
-- auto &FS = D.getVFS();
--
-- for (const auto &Candidate : HIPSearchDirs) {
-- InstallPath = Candidate.Path;
-- if (InstallPath.empty() || !FS.exists(InstallPath))
-- continue;
-- // HIP runtime built by SPACK is installed to
-- // <rocm_root>/hip-<rocm_release_string>-<hash> directory.
-- auto SPACKPath = findSPACKPackage(Candidate, "hip");
-- InstallPath = SPACKPath.empty() ? InstallPath : SPACKPath;
--
-- BinPath = InstallPath;
-- llvm::sys::path::append(BinPath, "bin");
-- IncludePath = InstallPath;
-- llvm::sys::path::append(IncludePath, "include");
-- LibPath = InstallPath;
-- llvm::sys::path::append(LibPath, "lib");
--
-- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile =
-- FS.getBufferForFile(BinPath + "/.hipVersion");
-- if (!VersionFile && Candidate.StrictChecking)
-- continue;
--
-- if (HIPVersionArg.empty() && VersionFile)
-- if (parseHIPVersionFile((*VersionFile)->getBuffer()))
-- continue;
--
-- HasHIPRuntime = true;
-- return;
-- }
-- HasHIPRuntime = false;
-+ HasHIPRuntime = true;
- }
-
- void RocmInstallationDetector::print(raw_ostream &OS) const {
diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch
deleted file mode 100644
index f57989c8c8a3..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Add .note.GNU-stack to mitigate QA notice according to
-https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
-===================================================================
---- llvm-project-rocm-5.0.0.orig/compiler-rt/lib/orc/elfnix_tls.x86-64.S
-+++ llvm-project-rocm-5.0.0/compiler-rt/lib/orc/elfnix_tls.x86-64.S
-@@ -61,4 +61,8 @@ ___orc_rt_elfnix_tls_get_addr:
- popq %rbp
- ret
-
-+#if defined(__linux__) && defined(__ELF__)
-+ .section .note.GNU-stack,"",%progbits
-+#endif
-+
- #endif // defined(__x86_64__)
diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch
deleted file mode 100644
index 614a16d1e810..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-replace hardcoded hip finder with Gentoo paths.
-
-It is not necessary to check HIP runtime each time.
-
-Author: Benda Xu <heroxbd@gentoo.org>
-Author: Yiyang Wu <xgreenlandforwyy@gmail.com>
-
-Index: llvm-project-rocm-5.0.1/clang/lib/Driver/ToolChains/AMDGPU.cpp
-===================================================================
---- llvm-project-rocm-5.0.1.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
-+++ llvm-project-rocm-5.0.1/clang/lib/Driver/ToolChains/AMDGPU.cpp
-@@ -169,139 +169,8 @@ bool RocmInstallationDetector::parseHIPV
- /// cached and populated only once.
- const SmallVectorImpl<RocmInstallationDetector::Candidate> &
- RocmInstallationDetector::getInstallationPathCandidates() {
--
-- // Return the cached candidate list if it has already been populated.
-- if (!ROCmSearchDirs.empty())
-- return ROCmSearchDirs;
--
-- auto DoPrintROCmSearchDirs = [&]() {
-- if (PrintROCmSearchDirs)
-- for (auto Cand : ROCmSearchDirs) {
-- llvm::errs() << "ROCm installation search path";
-- if (Cand.isSPACK())
-- llvm::errs() << " (Spack " << Cand.SPACKReleaseStr << ")";
-- llvm::errs() << ": " << Cand.Path << '\n';
-- }
-- };
--
-- // For candidate specified by --rocm-path we do not do strict check, i.e.,
-- // checking existence of HIP version file and device library files.
-- if (!RocmPathArg.empty()) {
-- ROCmSearchDirs.emplace_back(RocmPathArg.str());
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-- } else if (const char *RocmPathEnv = ::getenv("ROCM_PATH")) {
-- if (!StringRef(RocmPathEnv).empty()) {
-- ROCmSearchDirs.emplace_back(RocmPathEnv);
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-- }
-- }
--
-- // Try to find relative to the compiler binary.
-- const char *InstallDir = D.getInstalledDir();
--
-- // Check both a normal Unix prefix position of the clang binary, as well as
-- // the Windows-esque layout the ROCm packages use with the host architecture
-- // subdirectory of bin.
-- auto DeduceROCmPath = [](StringRef ClangPath) {
-- // Strip off directory (usually bin)
-- StringRef ParentDir = llvm::sys::path::parent_path(ClangPath);
-- StringRef ParentName = llvm::sys::path::filename(ParentDir);
--
-- // Some builds use bin/{host arch}, so go up again.
-- if (ParentName == "bin") {
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- ParentName = llvm::sys::path::filename(ParentDir);
-- }
--
-- // Detect ROCm packages built with SPACK.
-- // clang is installed at
-- // <rocm_root>/llvm-amdgpu-<rocm_release_string>-<hash>/bin directory.
-- // We only consider the parent directory of llvm-amdgpu package as ROCm
-- // installation candidate for SPACK.
-- if (ParentName.startswith("llvm-amdgpu-")) {
-- auto SPACKPostfix =
-- ParentName.drop_front(strlen("llvm-amdgpu-")).split('-');
-- auto SPACKReleaseStr = SPACKPostfix.first;
-- if (!SPACKReleaseStr.empty()) {
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- return Candidate(ParentDir.str(), /*StrictChecking=*/true,
-- SPACKReleaseStr);
-- }
-- }
--
-- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin
-- // Some versions of the aomp package install to /opt/rocm/aomp/bin
-- if (ParentName == "llvm" || ParentName.startswith("aomp"))
-- ParentDir = llvm::sys::path::parent_path(ParentDir);
-- // Some versions of the aomp package install to /opt/rocm/aomp/bin
-- // and it seems ParentDir is already pointing to correct place.
-- return Candidate(ParentDir.str(), /*StrictChecking=*/true);
-- };
--
-- // Deduce ROCm path by the path used to invoke clang. Do not resolve symbolic
-- // link of clang itself.
-- ROCmSearchDirs.emplace_back(DeduceROCmPath(InstallDir));
--
-- // Deduce ROCm path by the real path of the invoked clang, resolving symbolic
-- // link of clang itself.
-- llvm::SmallString<256> RealClangPath;
-- llvm::sys::fs::real_path(D.getClangProgramPath(), RealClangPath);
-- auto ParentPath = llvm::sys::path::parent_path(RealClangPath);
-- if (ParentPath != InstallDir)
-- ROCmSearchDirs.emplace_back(DeduceROCmPath(ParentPath));
--
-- // Device library may be installed in clang or resource directory.
-- auto ClangRoot = llvm::sys::path::parent_path(InstallDir);
-- auto RealClangRoot = llvm::sys::path::parent_path(ParentPath);
-- ROCmSearchDirs.emplace_back(ClangRoot.str(), /*StrictChecking=*/true);
-- if (RealClangRoot != ClangRoot)
-- ROCmSearchDirs.emplace_back(RealClangRoot.str(), /*StrictChecking=*/true);
-- ROCmSearchDirs.emplace_back(D.ResourceDir,
-- /*StrictChecking=*/true);
--
-- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm",
-- /*StrictChecking=*/true);
--
-- // Find the latest /opt/rocm-{release} directory.
-- std::error_code EC;
-- std::string LatestROCm;
-- llvm::VersionTuple LatestVer;
-- // Get ROCm version from ROCm directory name.
-- auto GetROCmVersion = [](StringRef DirName) {
-- llvm::VersionTuple V;
-- std::string VerStr = DirName.drop_front(strlen("rocm-")).str();
-- // The ROCm directory name follows the format of
-- // rocm-{major}.{minor}.{subMinor}[-{build}]
-- std::replace(VerStr.begin(), VerStr.end(), '-', '.');
-- V.tryParse(VerStr);
-- return V;
-- };
-- for (llvm::vfs::directory_iterator
-- File = D.getVFS().dir_begin(D.SysRoot + "/opt", EC),
-- FileEnd;
-- File != FileEnd && !EC; File.increment(EC)) {
-- llvm::StringRef FileName = llvm::sys::path::filename(File->path());
-- if (!FileName.startswith("rocm-"))
-- continue;
-- if (LatestROCm.empty()) {
-- LatestROCm = FileName.str();
-- LatestVer = GetROCmVersion(LatestROCm);
-- continue;
-- }
-- auto Ver = GetROCmVersion(FileName);
-- if (LatestVer < Ver) {
-- LatestROCm = FileName.str();
-- LatestVer = Ver;
-- }
-- }
-- if (!LatestROCm.empty())
-- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm,
-- /*StrictChecking=*/true);
--
-- DoPrintROCmSearchDirs();
-- return ROCmSearchDirs;
-+ ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true);
-+ return ROCmSearchDirs;
- }
-
- RocmInstallationDetector::RocmInstallationDetector(
-@@ -410,7 +279,7 @@ void RocmInstallationDetector::detectDev
- // - ${ROCM_ROOT}/lib/bitcode/*
- // so try to detect these layouts.
- static constexpr std::array<const char *, 2> SubDirsList[] = {
-- {"amdgcn", "bitcode"},
-+ {"lib/amdgcn", "bitcode"},
- {"lib", ""},
- {"lib", "bitcode"},
- };
-@@ -433,42 +302,7 @@ void RocmInstallationDetector::detectDev
- }
-
- void RocmInstallationDetector::detectHIPRuntime() {
-- SmallVector<Candidate, 4> HIPSearchDirs;
-- if (!HIPPathArg.empty())
-- HIPSearchDirs.emplace_back(HIPPathArg.str(), /*StrictChecking=*/true);
-- else
-- HIPSearchDirs.append(getInstallationPathCandidates());
-- auto &FS = D.getVFS();
--
-- for (const auto &Candidate : HIPSearchDirs) {
-- InstallPath = Candidate.Path;
-- if (InstallPath.empty() || !FS.exists(InstallPath))
-- continue;
-- // HIP runtime built by SPACK is installed to
-- // <rocm_root>/hip-<rocm_release_string>-<hash> directory.
-- auto SPACKPath = findSPACKPackage(Candidate, "hip");
-- InstallPath = SPACKPath.empty() ? InstallPath : SPACKPath;
--
-- BinPath = InstallPath;
-- llvm::sys::path::append(BinPath, "bin");
-- IncludePath = InstallPath;
-- llvm::sys::path::append(IncludePath, "include");
-- LibPath = InstallPath;
-- llvm::sys::path::append(LibPath, "lib");
--
-- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile =
-- FS.getBufferForFile(BinPath + "/.hipVersion");
-- if (!VersionFile && Candidate.StrictChecking)
-- continue;
--
-- if (HIPVersionArg.empty() && VersionFile)
-- if (parseHIPVersionFile((*VersionFile)->getBuffer()))
-- continue;
--
-- HasHIPRuntime = true;
-- return;
-- }
-- HasHIPRuntime = false;
-+ HasHIPRuntime = true;
- }
-
- void RocmInstallationDetector::print(raw_ostream &OS) const {
diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch
deleted file mode 100644
index 80598c6f990d..000000000000
--- a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-LLVMOffloadArch should link libdl to fix undefined symbol 'dlsym' when linking
---- llvm.orig/lib/OffloadArch/offload-arch/CMakeLists.txt
-+++ llvm/lib/OffloadArch/offload-arch/CMakeLists.txt
-@@ -3,6 +3,7 @@ add_llvm_tool(offload-arch
- ${CMAKE_CURRENT_SOURCE_DIR}/offload-arch.cpp
- DEPENDS generated-table LLVMOffloadArch
- )
-+target_link_libraries(LLVMOffloadArch PRIVATE ${CMAKE_DL_LIBS})
- target_link_libraries(offload-arch PRIVATE LLVMOffloadArch)
-
- if(CMAKE_HOST_UNIX)
diff --git a/sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild b/sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild
deleted file mode 100644
index 399b74cc8ee3..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
- "${FILESDIR}/${PN}-3.9.0-tensorflow.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild b/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild
deleted file mode 100644
index 9e5adf08c009..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${P}-current_pos.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="clang;lld"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-3.8.0.ebuild b/sys-devel/llvm-roc/llvm-roc-3.8.0.ebuild
deleted file mode 100644
index 69223b7e04a7..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-3.8.0.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-3.9.0.ebuild b/sys-devel/llvm-roc/llvm-roc-3.9.0.ebuild
deleted file mode 100644
index 6dd5e75e0479..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-3.9.0.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
- "${FILESDIR}/${P}-tensorflow.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild
deleted file mode 100644
index 1c7a0fec0170..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
- "${FILESDIR}/${PN}-3.9.0-tensorflow.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild
deleted file mode 100644
index 3967ddabbea5..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
- "${FILESDIR}/${PN}-3.9.0-tensorflow.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
- eend $?
-
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp
- eend $?
- popd >/dev/null || die
- fi
-
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild
deleted file mode 100644
index 1c7a0fec0170..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
- "${FILESDIR}/${PN}-3.9.0-tensorflow.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild
deleted file mode 100644
index 68df2726a379..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
- "${FILESDIR}/${PN}-4.1.0-fix-missing-include.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.1.1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.1.1.ebuild
deleted file mode 100644
index 051b2af18e3f..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.1.1.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="virtual/cblas
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-current_pos.patch"
- "${FILESDIR}/${PN}-4.1.0-fix-missing-include.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild
deleted file mode 100644
index d4d6b886d09e..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.2.0-current_pos.patch"
- "${FILESDIR}/${PN}-4.2.0-add_Object.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-4.2.0-cyclades.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.3.0-r1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.3.0-r1.ebuild
deleted file mode 100644
index 34567ada1922..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.3.0-r1.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.2.0-current_pos.patch"
- "${FILESDIR}/${PN}-4.2.0-add_Object.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-4.3.0-hip-location.patch"
- eapply "${FILESDIR}/${PN}-4.2.0-cyclades.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt || die
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp || die
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp || die
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp || die
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-4.5.2.ebuild b/sys-devel/llvm-roc/llvm-roc-4.5.2.ebuild
deleted file mode 100644
index 59ebbeed8b5b..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-4.5.2.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.2.0-current_pos.patch"
- "${FILESDIR}/${PN}-4.2.0-add_Object.patch"
-)
-
-CMAKE_BUILD_TYPE=Release
-
-src_prepare() {
- cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-4.5.2-add_libraries.patch"
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-4.5.2-hip-location.patch"
- eapply "${FILESDIR}/${PN}-4.2.0-cyclades.patch"
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt || die
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp || die
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp || die
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp || die
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld;llvm"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -Wno-dev
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_BINDINGS=OFF
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_BUILD_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/llvm-roc-5.0.2.ebuild b/sys-devel/llvm-roc/llvm-roc-5.0.2.ebuild
deleted file mode 100644
index 6dc4f6a23e2c..000000000000
--- a/sys-devel/llvm-roc/llvm-roc-5.0.2.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake
-
-DESCRIPTION="Radeon Open Compute llvm,lld,clang"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
-SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
-
-LICENSE="UoI-NCSA rc BSD public-domain"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug +runtime"
-
-RDEPEND="
- dev-libs/libxml2
- sys-libs/zlib
- sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.2.0-current_pos.patch"
- "${FILESDIR}/${PN}-5.0.0-linkdl.patch"
-)
-
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- pushd "${WORKDIR}/llvm-project-rocm-${PV}" || die
- eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
- eapply "${FILESDIR}/${PN}-5.0.0-hip-location.patch"
- eapply "${FILESDIR}/${PN}-5.0.0-add_GNU-stack.patch"
- popd || die
-
- if [[ -n ${EPREFIX} ]]; then
- pushd "${S}"/../clang >/dev/null || die
- sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt || die
- eend $?
- ebegin "Use "${EPREFIX}" as default sysroot"
- cd lib/Driver/ToolChains >/dev/null || die
- ebegin "Use dynamic linker from ${EPREFIX}"
- sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp || die
- eend $?
-
- ebegin "Remove --sysroot call on ld for native toolchain"
- sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp || die
- eend $?
- popd >/dev/null || die
- fi
-
- # handled by sysroot, don't prefixify here.
- sed -e 's:/opt/rocm:/usr/lib/hip:' \
- -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp || die
-
- eapply_user
- cmake_src_prepare
-}
-
-src_configure() {
- PROJECTS="clang;lld;llvm"
-
- if usex runtime; then
- PROJECTS+=";compiler-rt"
- fi
-
- local mycmakeargs=(
- -Wno-dev
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
- -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
- -DLLVM_BUILD_DOCS=NO
- -DLLVM_ENABLE_BINDINGS=OFF
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=NO
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_BUILD_UTILS=ON
- -DLLVM_VERSION_SUFFIX=roc
- -DOCAMLFIND=NO
- )
-
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- cat > "99${PN}" <<-EOF
- LDPATH="${EPREFIX}/usr/lib/llvm/roc/lib"
- EOF
- doenvd "99${PN}"
-}
diff --git a/sys-devel/llvm-roc/metadata.xml b/sys-devel/llvm-roc/metadata.xml
deleted file mode 100644
index e9e51b8f323e..000000000000
--- a/sys-devel/llvm-roc/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>candrews@gentoo.org</email>
- <name>Craig Andrews</name>
- </maintainer>
- <upstream>
- <remote-id type="github">RadeonOpenCompute/llvm-project</remote-id>
- </upstream>
- <use>
- <flag name="runtime">Builds the compiler runtime libraries.</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild
new file mode 100644
index 000000000000..63180b2f53b6
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLVM on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local tools=(
+ addr2line ar dlltool nm objcopy objdump ranlib readelf size
+ strings strip windres
+ )
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${t}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${chost}-${t}"
+ done
+ done
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
new file mode 100644
index 000000000000..c1c22114f553
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLVM on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local tools=(
+ addr2line ar dlltool nm objcopy objdump ranlib readelf size
+ strings strip windres
+ )
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${t}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${chost}-${t}"
+ done
+ done
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild
new file mode 100644
index 000000000000..c1c22114f553
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLVM on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local tools=(
+ addr2line ar dlltool nm objcopy objdump ranlib readelf size
+ strings strip windres
+ )
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${t}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${chost}-${t}"
+ done
+ done
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18.ebuild
new file mode 100644
index 000000000000..c007ffe5deb6
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLVM on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local tools=(
+ addr2line ar dlltool nm objcopy objdump ranlib readelf size
+ strings strip windres
+ )
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${t}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${chost}-${t}"
+ done
+ done
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild
new file mode 100644
index 000000000000..a57062acab8c
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib
+
+DESCRIPTION="Symlinks to use LLVM on binutils-free system"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local tools=(
+ addr2line ar dlltool nm objcopy objdump ranlib readelf size
+ strings strip windres
+ )
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${t}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${chost}-${t}"
+ done
+ done
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/metadata.xml b/sys-devel/llvm-toolchain-symlinks/metadata.xml
new file mode 100644
index 000000000000..d62775dfc3a3
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="multilib-symlinks">
+ Install symlinks for all ABI CHOSTs. Note that this can
+ result in gcc being overrode for native builds, as well
+ as conflict with crossdev if used for the same targets.
+ </flag>
+ <flag name="native-symlinks">
+ Install generic tool symlinks like 'objdump' and 'ranlib',
+ as well as ${CTARGET}-*. These symlinks are installed
+ into slotted LLVM bindir, so they should not take precedence
+ over symlinks installed into /usr/bin
+ by <pkg>sys-devel/binutils-config</pkg> but they can be
+ helpful for binutils-free setups.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index bdbe648fb802..b037daa082bf 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -1,24 +1,17 @@
-DIST llvm-12.0.1-manpages.tar.bz2 191582 BLAKE2B a049cd305c257875d47e92d703c51aee8225854f999eddbd530c7a978704a981b05bc0819ba31a2f2a218d3569b078f0deb01b0eeb385966253b54a0fdc090d1 SHA512 9931a57f843709aed59193524fe980af695e4e23c8f53ec3cff308677ba4fc520ca58032b50b68440c7762305855317d9a705fe5ccbb543fb104f4deb5d10ea5
-DIST llvm-13.0.1-manpages.tar.bz2 202187 BLAKE2B 32a761426dbe4c3c355d30660254305cd88b6d513faee04c78e370cea9d38761108a9be4c4b4ac39b6a74400af1f9d37ffd11ab05acd7340175c8d66845ae7d9 SHA512 9495e1daf588540fdb8b9ee905a9b6be4693bd70b7f42c8e8a0d667242fc24dc853c45918d3bc09d02f0761ad61541bc9749c1498e312da129abdab638a0d572
-DIST llvm-14.0.1-manpages.tar.bz2 86273 BLAKE2B 174b412568565bdd4c3db34b1b2f2482a18ca45a0a6269ca381fe5c77da21b85dafabad29551b262d593006e9b68e6f7fdf43c2ec626204970d1280dd87a5f3d SHA512 49c58094eebecfadff97d62b4e6b0129e07c52ad7fe3ea4ce5c955e6fc9c73ac443b6a6e0f8322cf25e1d88b059c4231c4798d8da04340a46f6f84fb1b386f29
-DIST llvm-14.0.3-manpages.tar.bz2 217443 BLAKE2B ebea48d9015bb0b53e8b799d8d79ac7a8d03f55440e5d3a08a9ce6c8f106c3f37e597c46aaf824dfee87c222775630299a5c277b4b29d43e831116c12932675a SHA512 db762ff7bfde28147276cacb5c5753a1bb4dd08dc8840423d6fc073629cd97bc3c7f54402cb17aa00cfc06f9f775f7ac9478c2661cacf86d5517a968d290beb3
-DIST llvm-14.0.4-manpages.tar.bz2 214161 BLAKE2B 9e8a0a78cce26b0e5235750a2af99542a496d34726046fbfa3274a22a55a75b3210c4af49e768130515c636ae3d6350f909ccb601888c276ce8cbd6b029b7172 SHA512 793dcbac320d26d26c637f2d38de0a55f5a91d13c93fa1aa2753103a07720248ffc16e8f1914ce81e8c291f02797360c052c23b027d773ac05a5563744313828
-DIST llvm-14.0.5-manpages.tar.bz2 217258 BLAKE2B 617f454e8d05f644ba1314d0bf72446e00058a547858469442017fffdd4c629f9240b96fb2107bee0aae7e5e85cfa35a21c072378bb2d0bc8260d1c021751f9d SHA512 051f154e3498dca3da420cafedd4ea4e43bbdb1eaf95f5c15107b05cedbaea4bf2d6b4c9567a95f0b8e513173c975e637391055bcd4802dcd0339b88b23da648
-DIST llvm-14.0.6-manpages.tar.bz2 214038 BLAKE2B c1ec35a5eeb35b720bf9a3a5ea9820eceaa26d9030a876772aca25dd47f8848500b94309ae9e6f3e9bc16e083d91747664e16b01dec06897e294e55fbf6f5cb3 SHA512 ea22af2f6cbfd3183f4e9ba5638e2667ca48562519bd679744d86778fed8da97173a25f57671aa67bcb45a7e4c8fd6cbbf461589a8611e1c8eb1b9eda7cc430f
-DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01
-DIST llvm-gentoo-patchset-14.0.1.tar.xz 4724 BLAKE2B 2689298c687fa8b5fa2545afccc248c00ff6778f1a14e3e7999e5d52a1b0b9c3b2e66e8c008e27c62c6c3c08009dc7d9d083ca53698138258ac972e4ad03c042 SHA512 a9f071ad0a792f558105a64790f9e470d8aaed05bd1baabbe86539760c881f772602a03265e0962d8599f991f7fd44d14a49e2ef9d74bb5eb283f473f4084d32
-DIST llvm-gentoo-patchset-14.0.3.tar.xz 5492 BLAKE2B 48a46d50a81c5572d1573c6923bc404b198f74ee8587a928e0858553dac37f7fa39cc969d72b938ef3d2f04f6872f9e2e2478821ab90c657ecbbacb3f7d99d7a SHA512 b917b549de6d46cd7aab3e59b888b5e5ffb955435b33d6538be2f31dc30217a24740a673cb6bb661087c245121edb079052b179badaf70b86b985ca69b3652a6
-DIST llvm-gentoo-patchset-14.0.4.tar.xz 4072 BLAKE2B cbd8804e33069ca2709503931545a57cfd33c06f28696d876d499285e9add9487a069495b756bbb94d29a162c39ece651defddd302e3ac523c5484c09fb3d2ea SHA512 db00268d01e7ec99b907321384c02468a53020386ee4fc819fabfc1cd0784323044931dac42437968d5fd37190da1b9f8f847af553a65a0595c33cecfd82c293
-DIST llvm-gentoo-patchset-14.0.5.tar.xz 4072 BLAKE2B c35072f70831d5e3c9f7236f8473b098e6b8da4f27ce6a382ff4d3cd235837b25b9a1bc1e406ce0d3feb05e4d1e1c8bf141ff8f218568d5a5339fd1092f86b62 SHA512 646e0515a6cf1aae86f05db4797d7af6e3c9b8a6070f41cbd36535944029e0e5888128e33d8c44af22b5bb9ccba392b9dfeabc7708e5eab11858edefced6b68d
-DIST llvm-gentoo-patchset-14.0.6.tar.xz 4544 BLAKE2B b613582fa048837303168a2d62835688128621236022ca6c232293cb2e4549174ef256e7dcd8303bfef6d5456d0459ddb2cbda4a4d323b82901da4c16f15dcc4 SHA512 fb89a3186c5bffdc6245ed103d79fe6802a86986bd43891b7e128955bd546dffcb5b4083ac9e7966f67ce8dd82322756a11428ab4c62d21f012d614062adab35
-DIST llvm-gentoo-patchset-9999-r3.tar.xz 4076 BLAKE2B 30bdf740606a1718ae45d850803385d425b656fbbe0250f587cad54f55272e3617d5ee0d04f534a58f87408b0a2dea322ebf1bb8cd653a2beba21d0bc5778c62 SHA512 2c7080ffd09d7dcf4c72a97044a5c63ab895250721d60270bc51c2095aef5f9039781892b4c0d14e942611686153f874a1f52a1c854bb8ca093383c08bdc005a
-DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5
-DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7
-DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
-DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
-DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2
-DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646
-DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959
+DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49
+DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b
+DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b53f11a37a23effea41a12322f6908bbe702dc1a97bfd10293061f01f1dbff8693e9324ab3dce2551e78eab128dbd7fea30 SHA512 963ff1b7aa0cb01ed0c0356a0adc3a315d94e78035e928dc81464f553e722633a17596e421c248968e87e22ae66f1ab9cccda5fd3388d1a6d34b5e9c6140ebcb
+DIST llvm-18.1.0-manpages.tar.bz2 270429 BLAKE2B d85d6e23197184dc512019c25805af0aa145eefb4c36215807c1ba70ad47943c05c06dbaafd84a7e6487bdd83814e03277374e095d97b129e3fc8d468c10741c SHA512 5f492c85fad4e04e0148ea509f4b6520de9e2765c51e617363a11aa8e47c2d847f6b0897958ca1d93bccf0f6a9150868b7e04c728bd430c05bf2da30bdeba6cc
+DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df
+DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825
+DIST llvm-gentoo-patchset-17.0.6.tar.xz 1792 BLAKE2B 21b34b436333c0b37522d4340cccc84a572701f6e267cf7c6adfa9be419913f5a6c9ee40a6be5c62d12fbd868912801d30381573c4459c05676e05785cccaefe SHA512 2d90b5e7fcbb950249ef7133fac1ed3dcb758a4d92732119049526cea0b291bd4e9738c4c0d806d70e7d769e1906f8ef3930066c206c00b6ec7d3509ed0fed19
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-devel/llvm/llvm-12.0.1.ebuild b/sys-devel/llvm/llvm-12.0.1.ebuild
deleted file mode 100644
index 3b38dc9ca6f1..000000000000
--- a/sys-devel/llvm/llvm-12.0.1.ebuild
+++ /dev/null
@@ -1,517 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-
-# Those are in lib/Targets, without explicit CMakeLists.txt mention
-ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY VE )
-# Keep in sync with CMakeLists.txt
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
- "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-
-# Additional licenses:
-# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
-# 2. xxhash: BSD.
-# 3. MD5 code: public-domain.
-# 4. ConvertUTF.h: TODO.
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="debug doc exegesis +gold libedit +libffi ncurses test xar xml z3 ${ALL_LLVM_TARGETS[*]}"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- exegesis? ( dev-libs/libpfm:= )
- gold? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- xar? ( app-arch/xar )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- gold? ( sys-libs/binutils-libs )"
-BDEPEND="
- dev-lang/perl
- >=dev-util/cmake-3.16
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
- )
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
- libffi? ( virtual/pkgconfig )
- ${PYTHON_DEPS}"
-# There are no file collisions between these versions but having :0
-# installed means llvm-config there will take precedence.
-RDEPEND="${RDEPEND}
- !sys-devel/llvm:0"
-PDEPEND="sys-devel/llvm-common
- gold? ( >=sys-devel/llvmgold-${SLOT} )"
-
-LLVM_COMPONENTS=( llvm )
-LLVM_MANPAGES=1
-LLVM_PATCHSET=12.0.1
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-check_live_ebuild() {
- local prod_targets=(
- $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
- | tail -n +2 | head -n -1)
- )
- local all_targets=(
- lib/Target/*/
- )
- all_targets=( "${all_targets[@]#lib/Target/}" )
- all_targets=( "${all_targets[@]%/}" )
-
- local exp_targets=() i
- for i in "${all_targets[@]}"; do
- has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
- done
- # reorder
- all_targets=( "${prod_targets[@]}" "${exp_targets[@]}" )
-
- if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
- eqawarn "Expected: ${exp_targets[*]}"
- eqawarn
- fi
-
- if [[ ${all_targets[*]} != ${ALL_LLVM_TARGETS[*]#llvm_targets_} ]]; then
- eqawarn "ALL_LLVM_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_TARGETS[*]#llvm_targets_}"
- eqawarn "Expected: ${all_targets[*]}"
- fi
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # shared libs
- LLVM|LLVMgold)
- ;;
- # TableGen lib + deps
- LLVMDemangle|LLVMSupport|LLVMTableGen)
- ;;
- # static libs
- LLVM*)
- continue
- ;;
- # meta-targets
- distribution|llvm-libraries)
- continue
- ;;
- # used only w/ USE=doc
- docs-llvm-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-src_prepare() {
- # disable use of SDK on OSX, bug #568758
- sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
-
- # Update config.guess to support more systems
- cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
-
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
-
- llvm.org_src_prepare
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # shared libs
- LLVM
- LTO
- Remarks
-
- # tools
- llvm-config
-
- # common stuff
- cmake-exports
- llvm-headers
-
- # libraries needed for clang-tblgen
- LLVMDemangle
- LLVMSupport
- LLVMTableGen
- )
-
- if multilib_is_native_abi; then
- out+=(
- # utilities
- llvm-tblgen
- FileCheck
- llvm-PerfectShuffle
- count
- not
- yaml-bench
-
- # tools
- bugpoint
- dsymutil
- llc
- lli
- lli-child-target
- llvm-addr2line
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-bitcode-strip
- llvm-c-test
- llvm-cat
- llvm-cfi-verify
- llvm-config
- llvm-cov
- llvm-cvtres
- llvm-cxxdump
- llvm-cxxfilt
- llvm-cxxmap
- llvm-diff
- llvm-dis
- llvm-dlltool
- llvm-dwarfdump
- llvm-dwp
- llvm-elfabi
- llvm-exegesis
- llvm-extract
- llvm-gsymutil
- llvm-ifs
- llvm-install-name-tool
- llvm-jitlink
- llvm-jitlink-executor
- llvm-lib
- llvm-libtool-darwin
- llvm-link
- llvm-lipo
- llvm-lto
- llvm-lto2
- llvm-mc
- llvm-mca
- llvm-ml
- llvm-modextract
- llvm-mt
- llvm-nm
- llvm-objcopy
- llvm-objdump
- llvm-opt-report
- llvm-pdbutil
- llvm-profdata
- llvm-profgen
- llvm-ranlib
- llvm-rc
- llvm-readelf
- llvm-readobj
- llvm-reduce
- llvm-rtdyld
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-undname
- llvm-xray
- obj2yaml
- opt
- sancov
- sanstats
- split-file
- verify-uselistorder
- yaml2obj
-
- # python modules
- opt-viewer
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
- )
- fi
- use doc && out+=(
- docs-llvm-html
- )
-
- use gold && out+=(
- LLVMgold
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
- ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- # disable appending VCS revision to the version to improve
- # direct cache hit ratio
- -DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=OFF
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- # cheap hack: LLVM combines both anyway, and the only difference
- # is that the former list is explicitly verified at cmake time
- -DLLVM_TARGETS_TO_BUILD=""
- -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_LIBXML2=$(usex xml)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
- -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
- # used only for llvm-objdump tool
- -DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-
- -DPython3_EXECUTABLE="${PYTHON}"
-
- # disable OCaml bindings (now in dev-ml/llvm-ocaml)
- -DOCAMLFIND=NO
- )
-
- if is_libcxx_linked; then
- # Smart hack: alter version suffix -> SOVERSION when linking
- # against libc++. This way we won't end up mixing LLVM libc++
- # libraries with libstdc++ clang, and the other way around.
- mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
- -DLLVM_ENABLE_LIBCXX=ON
- )
- fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- use test && mycmakeargs+=(
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
-
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=${build_docs}
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=${build_docs}
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
- use gold && mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/llvm-config.h
- )
-
- local LLVM_LDPATHS=()
- multilib-minimal_src_install
-
- # move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
-
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
-}
-
-multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
- newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- # we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
- _EOF_
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
-}
-
-pkg_postinst() {
- elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
- elog "To use these scripts, you will need Python along with the following"
- elog "packages:"
- elog " dev-python/pygments (for opt-viewer)"
- elog " dev-python/pyyaml (for all of them)"
-}
diff --git a/sys-devel/llvm/llvm-13.0.1.ebuild b/sys-devel/llvm/llvm-13.0.1.ebuild
deleted file mode 100644
index 9ae168db4cfb..000000000000
--- a/sys-devel/llvm/llvm-13.0.1.ebuild
+++ /dev/null
@@ -1,513 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-
-# Additional licenses:
-# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
-# 2. xxhash: BSD.
-# 3. MD5 code: public-domain.
-# 4. ConvertUTF.h: TODO.
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
- exegesis? ( dev-libs/libpfm:= )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- xar? ( app-arch/xar )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- binutils-plugin? ( sys-libs/binutils-libs )"
-BDEPEND="
- dev-lang/perl
- >=dev-util/cmake-3.16
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
- )
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
- libffi? ( virtual/pkgconfig )
- test? (
- sys-apps/which
- )
- ${PYTHON_DEPS}"
-# There are no file collisions between these versions but having :0
-# installed means llvm-config there will take precedence.
-RDEPEND="${RDEPEND}
- !sys-devel/llvm:0"
-PDEPEND="sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )"
-
-LLVM_COMPONENTS=( llvm )
-LLVM_MANPAGES=1
-LLVM_PATCHSET=${PV/_/-}
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-check_live_ebuild() {
- local prod_targets=(
- $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
- | tail -n +2 | head -n -1)
- )
- local all_targets=(
- lib/Target/*/
- )
- all_targets=( "${all_targets[@]#lib/Target/}" )
- all_targets=( "${all_targets[@]%/}" )
-
- local exp_targets=() i
- for i in "${all_targets[@]}"; do
- has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
- done
-
- if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
- eqawarn "Expected: ${exp_targets[*]}"
- eqawarn
- fi
-
- if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
- eqawarn "Expected: ${prod_targets[*]}"
- fi
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # shared libs
- LLVM|LLVMgold)
- ;;
- # TableGen lib + deps
- LLVMDemangle|LLVMSupport|LLVMTableGen)
- ;;
- # static libs
- LLVM*)
- continue
- ;;
- # meta-targets
- distribution|llvm-libraries)
- continue
- ;;
- # used only w/ USE=doc
- docs-llvm-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-src_prepare() {
- # disable use of SDK on OSX, bug #568758
- sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
-
- # Update config.guess to support more systems
- cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
-
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
-
- llvm.org_src_prepare
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # shared libs
- LLVM
- LTO
- Remarks
-
- # tools
- llvm-config
-
- # common stuff
- cmake-exports
- llvm-headers
-
- # libraries needed for clang-tblgen
- LLVMDemangle
- LLVMSupport
- LLVMTableGen
- )
-
- if multilib_is_native_abi; then
- out+=(
- # utilities
- llvm-tblgen
- FileCheck
- llvm-PerfectShuffle
- count
- not
- yaml-bench
-
- # tools
- bugpoint
- dsymutil
- llc
- lli
- lli-child-target
- llvm-addr2line
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-bitcode-strip
- llvm-c-test
- llvm-cat
- llvm-cfi-verify
- llvm-config
- llvm-cov
- llvm-cvtres
- llvm-cxxdump
- llvm-cxxfilt
- llvm-cxxmap
- llvm-diff
- llvm-dis
- llvm-dlltool
- llvm-dwarfdump
- llvm-dwp
- llvm-exegesis
- llvm-extract
- llvm-gsymutil
- llvm-ifs
- llvm-install-name-tool
- llvm-jitlink
- llvm-jitlink-executor
- llvm-lib
- llvm-libtool-darwin
- llvm-link
- llvm-lipo
- llvm-lto
- llvm-lto2
- llvm-mc
- llvm-mca
- llvm-ml
- llvm-modextract
- llvm-mt
- llvm-nm
- llvm-objcopy
- llvm-objdump
- llvm-opt-report
- llvm-otool
- llvm-pdbutil
- llvm-profdata
- llvm-profgen
- llvm-ranlib
- llvm-rc
- llvm-readelf
- llvm-readobj
- llvm-reduce
- llvm-rtdyld
- llvm-sim
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-tapi-diff
- llvm-undname
- llvm-windres
- llvm-xray
- obj2yaml
- opt
- sancov
- sanstats
- split-file
- verify-uselistorder
- yaml2obj
-
- # python modules
- opt-viewer
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
- )
- fi
- use doc && out+=(
- docs-llvm-html
- )
-
- use binutils-plugin && out+=(
- LLVMgold
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
- ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- # disable appending VCS revision to the version to improve
- # direct cache hit ratio
- -DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=OFF
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- # cheap hack: LLVM combines both anyway, and the only difference
- # is that the former list is explicitly verified at cmake time
- -DLLVM_TARGETS_TO_BUILD=""
- -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_LIBXML2=$(usex xml)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
- -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
- # used only for llvm-objdump tool
- -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-
- -DPython3_EXECUTABLE="${PYTHON}"
-
- # disable OCaml bindings (now in dev-ml/llvm-ocaml)
- -DOCAMLFIND=NO
- )
-
- if is_libcxx_linked; then
- # Smart hack: alter version suffix -> SOVERSION when linking
- # against libc++. This way we won't end up mixing LLVM libc++
- # libraries with libstdc++ clang, and the other way around.
- mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
- -DLLVM_ENABLE_LIBCXX=ON
- )
- fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- use test && mycmakeargs+=(
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
-
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=${build_docs}
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=${build_docs}
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
- use binutils-plugin && mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/llvm-config.h
- )
-
- local LLVM_LDPATHS=()
- multilib-minimal_src_install
-
- # move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
-
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
-}
-
-multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
- newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- # we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
- _EOF_
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
-}
-
-pkg_postinst() {
- elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
- elog "To use these scripts, you will need Python along with the following"
- elog "packages:"
- elog " dev-python/pygments (for opt-viewer)"
- elog " dev-python/pyyaml (for all of them)"
-}
diff --git a/sys-devel/llvm/llvm-14.0.1.ebuild b/sys-devel/llvm/llvm-14.0.1.ebuild
deleted file mode 100644
index c65be4743574..000000000000
--- a/sys-devel/llvm/llvm-14.0.1.ebuild
+++ /dev/null
@@ -1,515 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-
-# Additional licenses:
-# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
-# 2. xxhash: BSD.
-# 3. MD5 code: public-domain.
-# 4. ConvertUTF.h: TODO.
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
- exegesis? ( dev-libs/libpfm:= )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- xar? ( app-arch/xar )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- binutils-plugin? ( sys-libs/binutils-libs )"
-BDEPEND="
- dev-lang/perl
- >=dev-util/cmake-3.16
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
- )
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
- libffi? ( virtual/pkgconfig )
- ${PYTHON_DEPS}"
-# There are no file collisions between these versions but having :0
-# installed means llvm-config there will take precedence.
-RDEPEND="${RDEPEND}
- !sys-devel/llvm:0"
-PDEPEND="sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )"
-
-LLVM_COMPONENTS=( llvm cmake third-party )
-LLVM_MANPAGES=1
-LLVM_PATCHSET=14.0.1
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-check_live_ebuild() {
- local prod_targets=(
- $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
- | tail -n +2 | head -n -1)
- )
- local all_targets=(
- lib/Target/*/
- )
- all_targets=( "${all_targets[@]#lib/Target/}" )
- all_targets=( "${all_targets[@]%/}" )
-
- local exp_targets=() i
- for i in "${all_targets[@]}"; do
- has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
- done
-
- if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
- eqawarn "Expected: ${exp_targets[*]}"
- eqawarn
- fi
-
- if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
- eqawarn "Expected: ${prod_targets[*]}"
- fi
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # shared libs
- LLVM|LLVMgold)
- ;;
- # TableGen lib + deps
- LLVMDemangle|LLVMSupport|LLVMTableGen)
- ;;
- # static libs
- LLVM*)
- continue
- ;;
- # meta-targets
- distribution|llvm-libraries)
- continue
- ;;
- # used only w/ USE=doc
- docs-llvm-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-src_prepare() {
- # disable use of SDK on OSX, bug #568758
- sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
-
- # Update config.guess to support more systems
- cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
-
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
-
- llvm.org_src_prepare
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # shared libs
- LLVM
- LTO
- Remarks
-
- # tools
- llvm-config
-
- # common stuff
- cmake-exports
- llvm-headers
-
- # libraries needed for clang-tblgen
- LLVMDemangle
- LLVMSupport
- LLVMTableGen
- )
-
- if multilib_is_native_abi; then
- out+=(
- # utilities
- llvm-tblgen
- FileCheck
- llvm-PerfectShuffle
- count
- not
- yaml-bench
-
- # tools
- bugpoint
- dsymutil
- llc
- lli
- lli-child-target
- llvm-addr2line
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-bitcode-strip
- llvm-c-test
- llvm-cat
- llvm-cfi-verify
- llvm-config
- llvm-cov
- llvm-cvtres
- llvm-cxxdump
- llvm-cxxfilt
- llvm-cxxmap
- llvm-debuginfod-find
- llvm-diff
- llvm-dis
- llvm-dlltool
- llvm-dwarfdump
- llvm-dwp
- llvm-exegesis
- llvm-extract
- llvm-gsymutil
- llvm-ifs
- llvm-install-name-tool
- llvm-jitlink
- llvm-jitlink-executor
- llvm-lib
- llvm-libtool-darwin
- llvm-link
- llvm-lipo
- llvm-lto
- llvm-lto2
- llvm-mc
- llvm-mca
- llvm-ml
- llvm-modextract
- llvm-mt
- llvm-nm
- llvm-objcopy
- llvm-objdump
- llvm-opt-report
- llvm-otool
- llvm-pdbutil
- llvm-profdata
- llvm-profgen
- llvm-ranlib
- llvm-rc
- llvm-readelf
- llvm-readobj
- llvm-reduce
- llvm-rtdyld
- llvm-sim
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-tapi-diff
- llvm-tli-checker
- llvm-undname
- llvm-windres
- llvm-xray
- obj2yaml
- opt
- sancov
- sanstats
- split-file
- verify-uselistorder
- yaml2obj
-
- # python modules
- opt-viewer
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
- )
- fi
- use doc && out+=(
- docs-llvm-html
- )
-
- use binutils-plugin && out+=(
- LLVMgold
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
- ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- # disable appending VCS revision to the version to improve
- # direct cache hit ratio
- -DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=OFF
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- # cheap hack: LLVM combines both anyway, and the only difference
- # is that the former list is explicitly verified at cmake time
- -DLLVM_TARGETS_TO_BUILD=""
- -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_LIBXML2=$(usex xml)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
- -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
- # used only for llvm-objdump tool
- -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-
- -DPython3_EXECUTABLE="${PYTHON}"
-
- # disable OCaml bindings (now in dev-ml/llvm-ocaml)
- -DOCAMLFIND=NO
- )
-
- if is_libcxx_linked; then
- # Smart hack: alter version suffix -> SOVERSION when linking
- # against libc++. This way we won't end up mixing LLVM libc++
- # libraries with libstdc++ clang, and the other way around.
- mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
- -DLLVM_ENABLE_LIBCXX=ON
- )
- fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- use test && mycmakeargs+=(
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
-
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=${build_docs}
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=${build_docs}
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
- use binutils-plugin && mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
- CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/llvm-config.h
- )
-
- local LLVM_LDPATHS=()
- multilib-minimal_src_install
-
- # move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
-
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
-}
-
-multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
- newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- # we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
- _EOF_
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
-}
-
-pkg_postinst() {
- elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
- elog "To use these scripts, you will need Python along with the following"
- elog "packages:"
- elog " dev-python/pygments (for opt-viewer)"
- elog " dev-python/pyyaml (for all of them)"
-}
diff --git a/sys-devel/llvm/llvm-14.0.3.ebuild b/sys-devel/llvm/llvm-14.0.3.ebuild
deleted file mode 100644
index 66789e47a596..000000000000
--- a/sys-devel/llvm/llvm-14.0.3.ebuild
+++ /dev/null
@@ -1,526 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-
-# Additional licenses:
-# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
-# 2. xxhash: BSD.
-# 3. MD5 code: public-domain.
-# 4. ConvertUTF.h: TODO.
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
- exegesis? ( dev-libs/libpfm:= )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- xar? ( app-arch/xar )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
-"
-DEPEND="
- ${RDEPEND}
- binutils-plugin? ( sys-libs/binutils-libs )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- dev-lang/perl
- >=dev-util/cmake-3.16
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
- )
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
- libffi? ( virtual/pkgconfig )
- test? (
- sys-apps/which
- )
-"
-# There are no file collisions between these versions but having :0
-# installed means llvm-config there will take precedence.
-RDEPEND="
- ${RDEPEND}
- !sys-devel/llvm:0
-"
-PDEPEND="
- sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
-"
-
-LLVM_COMPONENTS=( llvm cmake third-party )
-LLVM_MANPAGES=1
-LLVM_PATCHSET=${PV}
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-check_live_ebuild() {
- local prod_targets=(
- $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
- | tail -n +2 | head -n -1)
- )
- local all_targets=(
- lib/Target/*/
- )
- all_targets=( "${all_targets[@]#lib/Target/}" )
- all_targets=( "${all_targets[@]%/}" )
-
- local exp_targets=() i
- for i in "${all_targets[@]}"; do
- has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
- done
-
- if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
- eqawarn "Expected: ${exp_targets[*]}"
- eqawarn
- fi
-
- if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
- eqawarn "Expected: ${prod_targets[*]}"
- fi
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # shared libs
- LLVM|LLVMgold)
- ;;
- # TableGen lib + deps
- LLVMDemangle|LLVMSupport|LLVMTableGen)
- ;;
- # static libs
- LLVM*)
- continue
- ;;
- # meta-targets
- distribution|llvm-libraries)
- continue
- ;;
- # used only w/ USE=doc
- docs-llvm-html)
- use doc || continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(${NINJA} -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-src_prepare() {
- # disable use of SDK on OSX, bug #568758
- sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
-
- # Update config.guess to support more systems
- cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
-
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
-
- llvm.org_src_prepare
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # shared libs
- LLVM
- LTO
- Remarks
-
- # tools
- llvm-config
-
- # common stuff
- cmake-exports
- llvm-headers
-
- # libraries needed for clang-tblgen
- LLVMDemangle
- LLVMSupport
- LLVMTableGen
- )
-
- if multilib_is_native_abi; then
- out+=(
- # utilities
- llvm-tblgen
- FileCheck
- llvm-PerfectShuffle
- count
- not
- yaml-bench
-
- # tools
- bugpoint
- dsymutil
- llc
- lli
- lli-child-target
- llvm-addr2line
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-bitcode-strip
- llvm-c-test
- llvm-cat
- llvm-cfi-verify
- llvm-config
- llvm-cov
- llvm-cvtres
- llvm-cxxdump
- llvm-cxxfilt
- llvm-cxxmap
- llvm-debuginfod-find
- llvm-diff
- llvm-dis
- llvm-dlltool
- llvm-dwarfdump
- llvm-dwp
- llvm-exegesis
- llvm-extract
- llvm-gsymutil
- llvm-ifs
- llvm-install-name-tool
- llvm-jitlink
- llvm-jitlink-executor
- llvm-lib
- llvm-libtool-darwin
- llvm-link
- llvm-lipo
- llvm-lto
- llvm-lto2
- llvm-mc
- llvm-mca
- llvm-ml
- llvm-modextract
- llvm-mt
- llvm-nm
- llvm-objcopy
- llvm-objdump
- llvm-opt-report
- llvm-otool
- llvm-pdbutil
- llvm-profdata
- llvm-profgen
- llvm-ranlib
- llvm-rc
- llvm-readelf
- llvm-readobj
- llvm-reduce
- llvm-rtdyld
- llvm-sim
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-tapi-diff
- llvm-tli-checker
- llvm-undname
- llvm-windres
- llvm-xray
- obj2yaml
- opt
- sancov
- sanstats
- split-file
- verify-uselistorder
- yaml2obj
-
- # python modules
- opt-viewer
- )
-
- if llvm_are_manpages_built; then
- out+=(
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
- )
- fi
- use doc && out+=(
- docs-llvm-html
- )
-
- use binutils-plugin && out+=(
- LLVMgold
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-multilib_src_configure() {
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
- ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- # disable appending VCS revision to the version to improve
- # direct cache hit ratio
- -DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=OFF
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- # cheap hack: LLVM combines both anyway, and the only difference
- # is that the former list is explicitly verified at cmake time
- -DLLVM_TARGETS_TO_BUILD=""
- -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_LIBXML2=$(usex xml)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
- -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
- # used only for llvm-objdump tool
- -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-
- -DPython3_EXECUTABLE="${PYTHON}"
-
- # disable OCaml bindings (now in dev-ml/llvm-ocaml)
- -DOCAMLFIND=NO
- )
-
- if is_libcxx_linked; then
- # Smart hack: alter version suffix -> SOVERSION when linking
- # against libc++. This way we won't end up mixing LLVM libc++
- # libraries with libstdc++ clang, and the other way around.
- mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
- -DLLVM_ENABLE_LIBCXX=ON
- )
- fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- use test && mycmakeargs+=(
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- local build_docs=OFF
- if llvm_are_manpages_built; then
- build_docs=ON
- mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- fi
-
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=${build_docs}
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=${build_docs}
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
- use binutils-plugin && mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
- CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake_build check
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/llvm-config.h
- )
-
- local LLVM_LDPATHS=()
- multilib-minimal_src_install
-
- # move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
-}
-
-multilib_src_install() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
-
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
-}
-
-multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
- newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- # we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
- _EOF_
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
- llvm_install_manpages
-}
-
-pkg_postinst() {
- elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
- elog "To use these scripts, you will need Python along with the following"
- elog "packages:"
- elog " dev-python/pygments (for opt-viewer)"
- elog " dev-python/pyyaml (for all of them)"
-}
diff --git a/sys-devel/llvm/llvm-15.0.0.9999.ebuild b/sys-devel/llvm/llvm-15.0.7-r3.ebuild
index 6d34fc401750..6306ee2107c0 100644
--- a/sys-devel/llvm/llvm-15.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-15.0.7-r3.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
+PYTHON_COMPAT=( python3_{10..11} )
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 \
toolchain-funcs
DESCRIPTION="Low Level Virtual Machine"
@@ -17,14 +17,16 @@ HOMEPAGE="https://llvm.org/"
# 4. ConvertUTF.h: TODO.
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS=""
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="
+ +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
RESTRICT="!test? ( test )"
RDEPEND="
sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
exegesis? ( dev-libs/libpfm:= )
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
@@ -32,6 +34,7 @@ RDEPEND="
xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
@@ -40,10 +43,9 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
>=sys-devel/binutils-apple-5.1
)
doc? ( $(python_gen_any_dep '
@@ -60,23 +62,24 @@ RDEPEND="
"
PDEPEND="
sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
LLVM_COMPONENTS=( llvm cmake third-party )
LLVM_MANPAGES=1
-LLVM_PATCHSET=9999-r3
+LLVM_PATCHSET=${PV/_/-}-r3
LLVM_USE_TARGETS=provide
llvm.org_set_globals
python_check_deps() {
use doc || return 0
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+ python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
-check_live_ebuild() {
+check_uptodate() {
local prod_targets=(
$(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
| tail -n +2 | head -n -1)
@@ -173,24 +176,12 @@ src_prepare() {
# Update config.guess to support more systems
cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
+ # Verify that the ebuild is up-to-date
+ check_uptodate
llvm.org_src_prepare
}
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
get_distribution_components() {
local sep=${1-;}
@@ -244,11 +235,13 @@ get_distribution_components() {
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
+ llvm-debuginfod
llvm-debuginfod-find
llvm-diff
llvm-dis
llvm-dlltool
llvm-dwarfdump
+ llvm-dwarfutil
llvm-dwp
llvm-exegesis
llvm-extract
@@ -328,6 +321,16 @@ get_distribution_components() {
}
multilib_src_configure() {
+ if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
+ # Workaround for bug #880677
+ append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
+ fi
+
+ # ODR violations (bug #917536, bug #926529). Just do it for GCC for now
+ # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile
+ # LLVM with LTO anyway (which is not necessarily its fault).
+ tc-is-gcc && filter-lto
+
local ffi_cflags ffi_ldflags
if use libffi; then
ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
@@ -339,7 +342,7 @@ multilib_src_configure() {
# disable appending VCS revision to the version to improve
# direct cache hit ratio
-DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DBUILD_SHARED_LIBS=OFF
@@ -362,6 +365,8 @@ multilib_src_configure() {
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -376,7 +381,7 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
@@ -403,7 +408,7 @@ multilib_src_configure() {
if llvm_are_manpages_built; then
build_docs=ON
mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
@@ -422,7 +427,7 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
+ local tblgen="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
[[ -x "${tblgen}" ]] \
|| die "${tblgen} not found or usable"
mycmakeargs+=(
@@ -431,16 +436,6 @@ multilib_src_configure() {
)
fi
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
-
# LLVM can have very high memory consumption while linking,
# exhausting the limit on 32-bit linker executable
use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
@@ -449,14 +444,14 @@ multilib_src_configure() {
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
@@ -477,7 +472,7 @@ multilib_src_test() {
src_install() {
local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
)
local MULTILIB_WRAPPED_HEADERS=(
@@ -488,7 +483,7 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
}
multilib_src_install() {
@@ -496,28 +491,28 @@ multilib_src_install() {
# move headers to /usr/include for wrapping
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
}
multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
# we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
diff --git a/sys-devel/llvm/llvm-14.0.5.ebuild b/sys-devel/llvm/llvm-16.0.6.ebuild
index ad91093de640..aa171c1cd361 100644
--- a/sys-devel/llvm/llvm-14.0.5.ebuild
+++ b/sys-devel/llvm/llvm-16.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
@@ -17,14 +18,16 @@ HOMEPAGE="https://llvm.org/"
# 4. ConvertUTF.h: TODO.
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="
+ +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
RESTRICT="!test? ( test )"
RDEPEND="
sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
exegesis? ( dev-libs/libpfm:= )
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
@@ -32,6 +35,7 @@ RDEPEND="
xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
@@ -40,20 +44,15 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
)
doc? ( $(python_gen_any_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
') )
libffi? ( virtual/pkgconfig )
- test? (
- sys-apps/which
- )
"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
@@ -63,10 +62,12 @@ RDEPEND="
"
PDEPEND="
sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
-LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_COMPONENTS=( llvm cmake )
+LLVM_TEST_COMPONENTS=( third-party )
LLVM_MANPAGES=1
LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=provide
@@ -75,11 +76,11 @@ llvm.org_set_globals
python_check_deps() {
use doc || return 0
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+ python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
-check_live_ebuild() {
+check_uptodate() {
local prod_targets=(
$(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
| tail -n +2 | head -n -1)
@@ -176,26 +177,10 @@ src_prepare() {
# Update config.guess to support more systems
cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
+ # Verify that the ebuild is up-to-date
+ check_uptodate
llvm.org_src_prepare
-
- # remove regressing test
- # https://github.com/llvm/llvm-project/issues/55761
- rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
}
get_distribution_components() {
@@ -229,6 +214,7 @@ get_distribution_components() {
count
not
yaml-bench
+ UnicodeNameMappingGenerator
# tools
bugpoint
@@ -250,11 +236,14 @@ get_distribution_components() {
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
+ llvm-debuginfo-analyzer
+ llvm-debuginfod
llvm-debuginfod-find
llvm-diff
llvm-dis
llvm-dlltool
llvm-dwarfdump
+ llvm-dwarfutil
llvm-dwp
llvm-exegesis
llvm-extract
@@ -287,6 +276,8 @@ get_distribution_components() {
llvm-readelf
llvm-readobj
llvm-reduce
+ llvm-remark-size-diff
+ llvm-remarkutil
llvm-rtdyld
llvm-sim
llvm-size
@@ -333,6 +324,16 @@ get_distribution_components() {
}
multilib_src_configure() {
+ if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
+ # Workaround for bug #880677
+ append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
+ fi
+
+ # ODR violations (bug #917536, bug #926529). Just do it for GCC for now
+ # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile
+ # LLVM with LTO anyway (which is not necessarily its fault).
+ tc-is-gcc && filter-lto
+
local ffi_cflags ffi_ldflags
if use libffi; then
ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
@@ -344,7 +345,7 @@ multilib_src_configure() {
# disable appending VCS revision to the version to improve
# direct cache hit ratio
-DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DBUILD_SHARED_LIBS=OFF
@@ -356,6 +357,8 @@ multilib_src_configure() {
# is that the former list is explicitly verified at cmake time
-DLLVM_TARGETS_TO_BUILD=""
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_BUILD_TESTS=$(usex test)
-DLLVM_ENABLE_FFI=$(usex libffi)
@@ -367,6 +370,8 @@ multilib_src_configure() {
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -381,23 +386,24 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
-DLLVM_ENABLE_LIBCXX=ON
)
fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
use test && mycmakeargs+=(
-DLLVM_LIT_ARGS="$(get_lit_flags)"
@@ -408,7 +414,7 @@ multilib_src_configure() {
if llvm_are_manpages_built; then
build_docs=ON
mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
@@ -426,25 +432,12 @@ multilib_src_configure() {
)
fi
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
+ # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+ # libncurses, but llvm tries to use libtinfo before libncurses, and ends up
+ # using libtinfo (actually, libncurses.dylib) from system instead of prefix
+ use kernel_Darwin && mycmakeargs+=(
+ -DTerminfo_LIBRARIES=-lncurses
+ )
# LLVM can have very high memory consumption while linking,
# exhausting the limit on 32-bit linker executable
@@ -454,14 +447,14 @@ multilib_src_configure() {
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
@@ -482,7 +475,7 @@ multilib_src_test() {
src_install() {
local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
)
local MULTILIB_WRAPPED_HEADERS=(
@@ -493,7 +486,7 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
}
multilib_src_install() {
@@ -501,28 +494,28 @@ multilib_src_install() {
# move headers to /usr/include for wrapping
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
}
multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
# we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
diff --git a/sys-devel/llvm/llvm-14.0.6.ebuild b/sys-devel/llvm/llvm-17.0.6.ebuild
index ad91093de640..c32eee3908c7 100644
--- a/sys-devel/llvm/llvm-14.0.6.ebuild
+++ b/sys-devel/llvm/llvm-17.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
@@ -17,14 +18,20 @@ HOMEPAGE="https://llvm.org/"
# 4. ConvertUTF.h: TODO.
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="
+ +binutils-plugin debug debuginfod doc exegesis libedit +libffi
+ ncurses test xar xml z3 zstd
+"
RESTRICT="!test? ( test )"
RDEPEND="
sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
+ debuginfod? (
+ net-misc/curl:=
+ dev-cpp/cpp-httplib:=
+ )
exegesis? ( dev-libs/libpfm:= )
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
@@ -32,6 +39,7 @@ RDEPEND="
xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
@@ -40,20 +48,15 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
)
doc? ( $(python_gen_any_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
') )
libffi? ( virtual/pkgconfig )
- test? (
- sys-apps/which
- )
"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
@@ -63,7 +66,8 @@ RDEPEND="
"
PDEPEND="
sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
LLVM_COMPONENTS=( llvm cmake third-party )
@@ -75,11 +79,11 @@ llvm.org_set_globals
python_check_deps() {
use doc || return 0
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+ python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
-check_live_ebuild() {
+check_uptodate() {
local prod_targets=(
$(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
| tail -n +2 | head -n -1)
@@ -126,6 +130,9 @@ check_distribution_components() {
# TableGen lib + deps
LLVMDemangle|LLVMSupport|LLVMTableGen)
;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
# static libs
LLVM*)
continue
@@ -176,26 +183,10 @@ src_prepare() {
# Update config.guess to support more systems
cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
+ # Verify that the ebuild is up-to-date
+ check_uptodate
llvm.org_src_prepare
-
- # remove regressing test
- # https://github.com/llvm/llvm-project/issues/55761
- rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
}
get_distribution_components() {
@@ -218,6 +209,12 @@ get_distribution_components() {
LLVMDemangle
LLVMSupport
LLVMTableGen
+
+ # testing libraries
+ llvm_gtest
+ llvm_gtest_main
+ LLVMTestingAnnotations
+ LLVMTestingSupport
)
if multilib_is_native_abi; then
@@ -229,6 +226,7 @@ get_distribution_components() {
count
not
yaml-bench
+ UnicodeNameMappingGenerator
# tools
bugpoint
@@ -250,11 +248,13 @@ get_distribution_components() {
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
+ llvm-debuginfo-analyzer
llvm-debuginfod-find
llvm-diff
llvm-dis
llvm-dlltool
llvm-dwarfdump
+ llvm-dwarfutil
llvm-dwp
llvm-exegesis
llvm-extract
@@ -287,6 +287,8 @@ get_distribution_components() {
llvm-readelf
llvm-readobj
llvm-reduce
+ llvm-remark-size-diff
+ llvm-remarkutil
llvm-rtdyld
llvm-sim
llvm-size
@@ -327,12 +329,25 @@ get_distribution_components() {
use binutils-plugin && out+=(
LLVMgold
)
+ use debuginfod && out+=(
+ llvm-debuginfod
+ )
fi
printf "%s${sep}" "${out[@]}"
}
multilib_src_configure() {
+ if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
+ # Workaround for bug #880677
+ append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
+ fi
+
+ # ODR violations (bug #917536, bug #926529). Just do it for GCC for now
+ # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile
+ # LLVM with LTO anyway (which is not necessarily its fault).
+ tc-is-gcc && filter-lto
+
local ffi_cflags ffi_ldflags
if use libffi; then
ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
@@ -344,7 +359,7 @@ multilib_src_configure() {
# disable appending VCS revision to the version to improve
# direct cache hit ratio
-DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DBUILD_SHARED_LIBS=OFF
@@ -356,7 +371,10 @@ multilib_src_configure() {
# is that the former list is explicitly verified at cmake time
-DLLVM_TARGETS_TO_BUILD=""
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=ON
-DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
-DLLVM_ENABLE_FFI=$(usex libffi)
-DLLVM_ENABLE_LIBEDIT=$(usex libedit)
@@ -367,6 +385,10 @@ multilib_src_configure() {
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ -DLLVM_ENABLE_CURL=$(usex debuginfod)
+ -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -381,23 +403,24 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
-DLLVM_ENABLE_LIBCXX=ON
)
fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
use test && mycmakeargs+=(
-DLLVM_LIT_ARGS="$(get_lit_flags)"
@@ -408,7 +431,7 @@ multilib_src_configure() {
if llvm_are_manpages_built; then
build_docs=ON
mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
@@ -426,25 +449,14 @@ multilib_src_configure() {
)
fi
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
+ use kernel_Darwin && mycmakeargs+=(
+ # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+ # libncurses, but llvm tries to use libtinfo before libncurses, and ends up
+ # using libtinfo (actually, libncurses.dylib) from system instead of prefix
+ -DTerminfo_LIBRARIES=-lncurses
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
# LLVM can have very high memory consumption while linking,
# exhausting the limit on 32-bit linker executable
@@ -454,14 +466,14 @@ multilib_src_configure() {
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
@@ -482,7 +494,7 @@ multilib_src_test() {
src_install() {
local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
)
local MULTILIB_WRAPPED_HEADERS=(
@@ -493,7 +505,7 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
}
multilib_src_install() {
@@ -501,28 +513,28 @@ multilib_src_install() {
# move headers to /usr/include for wrapping
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
}
multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
# we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
diff --git a/sys-devel/llvm/llvm-18.1.4.ebuild b/sys-devel/llvm/llvm-18.1.4.ebuild
new file mode 100644
index 000000000000..8c3d70f01423
--- /dev/null
+++ b/sys-devel/llvm/llvm-18.1.4.ebuild
@@ -0,0 +1,548 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="https://llvm.org/"
+
+# Additional licenses:
+# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
+# 2. xxhash: BSD.
+# 3. MD5 code: public-domain.
+# 4. ConvertUTF.h: TODO.
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="
+ +binutils-plugin debug debuginfod doc exegesis libedit +libffi
+ ncurses test xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ debuginfod? (
+ net-misc/curl:=
+ dev-cpp/cpp-httplib:=
+ )
+ exegesis? ( dev-libs/libpfm:= )
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
+ libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
+ binutils-plugin? ( sys-libs/binutils-libs )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ sys-devel/gnuconfig
+ kernel_Darwin? (
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
+ )
+ libffi? ( virtual/pkgconfig )
+"
+# There are no file collisions between these versions but having :0
+# installed means llvm-config there will take precedence.
+RDEPEND="
+ ${RDEPEND}
+ !sys-devel/llvm:0
+"
+PDEPEND="
+ sys-devel/llvm-common
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
+"
+
+LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_MANPAGES=1
+LLVM_USE_TARGETS=provide
+llvm.org_set_globals
+
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_any_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
+python_check_deps() {
+ llvm_are_manpages_built || return 0
+
+ python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
+check_uptodate() {
+ local prod_targets=(
+ $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
+ | tail -n +2 | head -n -1)
+ )
+ local all_targets=(
+ lib/Target/*/
+ )
+ all_targets=( "${all_targets[@]#lib/Target/}" )
+ all_targets=( "${all_targets[@]%/}" )
+
+ local exp_targets=() i
+ for i in "${all_targets[@]}"; do
+ has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
+ done
+
+ if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
+ eqawarn "Expected: ${exp_targets[*]}"
+ eqawarn
+ fi
+
+ if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
+ eqawarn "Expected: ${prod_targets[*]}"
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # shared libs
+ LLVM|LLVMgold)
+ ;;
+ # TableGen lib + deps
+ LLVMDemangle|LLVMSupport|LLVMTableGen)
+ ;;
+ # used by lldb
+ LLVMDebuginfod)
+ ;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
+ # static libs
+ LLVM*)
+ continue
+ ;;
+ # meta-targets
+ distribution|llvm-libraries)
+ continue
+ ;;
+ # used only w/ USE=doc
+ docs-llvm-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+src_prepare() {
+ # disable use of SDK on OSX, bug #568758
+ sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
+
+ # Update config.guess to support more systems
+ cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
+
+ # Verify that the ebuild is up-to-date
+ check_uptodate
+
+ llvm.org_src_prepare
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # shared libs
+ LLVM
+ LTO
+ Remarks
+
+ # tools
+ llvm-config
+
+ # common stuff
+ cmake-exports
+ llvm-headers
+
+ # libraries needed for clang-tblgen
+ LLVMDemangle
+ LLVMSupport
+ LLVMTableGen
+
+ # testing libraries
+ llvm_gtest
+ llvm_gtest_main
+ LLVMTestingAnnotations
+ LLVMTestingSupport
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # library used by lldb
+ LLVMDebuginfod
+
+ # utilities
+ llvm-tblgen
+ FileCheck
+ llvm-PerfectShuffle
+ count
+ not
+ yaml-bench
+ UnicodeNameMappingGenerator
+
+ # tools
+ bugpoint
+ dsymutil
+ llc
+ lli
+ lli-child-target
+ llvm-addr2line
+ llvm-ar
+ llvm-as
+ llvm-bcanalyzer
+ llvm-bitcode-strip
+ llvm-c-test
+ llvm-cat
+ llvm-cfi-verify
+ llvm-config
+ llvm-cov
+ llvm-cvtres
+ llvm-cxxdump
+ llvm-cxxfilt
+ llvm-cxxmap
+ llvm-debuginfo-analyzer
+ llvm-debuginfod-find
+ llvm-diff
+ llvm-dis
+ llvm-dlltool
+ llvm-dwarfdump
+ llvm-dwarfutil
+ llvm-dwp
+ llvm-exegesis
+ llvm-extract
+ llvm-gsymutil
+ llvm-ifs
+ llvm-install-name-tool
+ llvm-jitlink
+ llvm-jitlink-executor
+ llvm-lib
+ llvm-libtool-darwin
+ llvm-link
+ llvm-lipo
+ llvm-lto
+ llvm-lto2
+ llvm-mc
+ llvm-mca
+ llvm-ml
+ llvm-modextract
+ llvm-mt
+ llvm-nm
+ llvm-objcopy
+ llvm-objdump
+ llvm-opt-report
+ llvm-otool
+ llvm-pdbutil
+ llvm-profdata
+ llvm-profgen
+ llvm-ranlib
+ llvm-rc
+ llvm-readelf
+ llvm-readobj
+ llvm-readtapi
+ llvm-reduce
+ llvm-remarkutil
+ llvm-rtdyld
+ llvm-sim
+ llvm-size
+ llvm-split
+ llvm-stress
+ llvm-strings
+ llvm-strip
+ llvm-symbolizer
+ llvm-tli-checker
+ llvm-undname
+ llvm-windres
+ llvm-xray
+ obj2yaml
+ opt
+ sancov
+ sanstats
+ split-file
+ verify-uselistorder
+ yaml2obj
+
+ # python modules
+ opt-viewer
+ )
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
+ use doc && out+=(
+ docs-llvm-html
+ )
+
+ use binutils-plugin && out+=(
+ LLVMgold
+ )
+ use debuginfod && out+=(
+ llvm-debuginfod
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
+ # Workaround for bug #880677
+ append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
+ fi
+
+ # ODR violations (bug #917536, bug #926529). Just do it for GCC for now
+ # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile
+ # LLVM with LTO anyway (which is not necessarily its fault).
+ tc-is-gcc && filter-lto
+
+ local ffi_cflags ffi_ldflags
+ if use libffi; then
+ ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ # disable appending VCS revision to the version to improve
+ # direct cache hit ratio
+ -DLLVM_APPEND_VC_REV=OFF
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DLLVM_LINK_LLVM_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+
+ # cheap hack: LLVM combines both anyway, and the only difference
+ # is that the former list is explicitly verified at cmake time
+ -DLLVM_TARGETS_TO_BUILD=""
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=ON
+ -DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
+
+ -DLLVM_ENABLE_FFI=$(usex libffi)
+ -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+ -DLLVM_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+ -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+ -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ -DLLVM_ENABLE_CURL=$(usex debuginfod)
+ -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
+
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+
+ # disable OCaml bindings (now in dev-ml/llvm-ocaml)
+ -DOCAMLFIND=NO
+ )
+
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+ # Smart hack: alter version suffix -> SOVERSION when linking
+ # against libc++. This way we won't end up mixing LLVM libc++
+ # libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
+ mycmakeargs+=(
+ -DLLVM_ENABLE_LIBCXX=ON
+ )
+ fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=${build_docs}
+ -DLLVM_ENABLE_OCAMLDOC=OFF
+ -DLLVM_ENABLE_SPHINX=${build_docs}
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_INSTALL_UTILS=ON
+ )
+ use binutils-plugin && mycmakeargs+=(
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+ )
+ fi
+
+ use kernel_Darwin && mycmakeargs+=(
+ # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+ # libncurses, but llvm tries to use libtinfo before libncurses, and ends up
+ # using libtinfo (actually, libncurses.dylib) from system instead of prefix
+ -DTerminfo_LIBRARIES=-lncurses
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
+ CMakeCache.txt ||
+ die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ tc-env_build cmake_build distribution
+
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
+ pax-mark m "${BUILD_DIR}"/bin/lli
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target
+
+ if use test; then
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
+ fi
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check
+}
+
+src_install() {
+ local MULTILIB_CHOST_TOOLS=(
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
+ )
+
+ local MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/llvm/Config/llvm-config.h
+ )
+
+ local LLVM_LDPATHS=()
+ multilib-minimal_src_install
+
+ # move wrapped headers back
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
+}
+
+multilib_src_install_all() {
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
+ newenvd - "60llvm-${revord}" <<-_EOF_
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ # we need to duplicate it in ROOTPATH for Portage to respect...
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
+ _EOF_
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+}
+
+pkg_postinst() {
+ elog "You can find additional opt-viewer utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
+ elog "To use these scripts, you will need Python along with the following"
+ elog "packages:"
+ elog " dev-python/pygments (for opt-viewer)"
+ elog " dev-python/pyyaml (for all of them)"
+}
diff --git a/sys-devel/llvm/llvm-14.0.4.ebuild b/sys-devel/llvm/llvm-19.0.0.9999.ebuild
index 70a8953289ae..8624219a7e20 100644
--- a/sys-devel/llvm/llvm-14.0.4.ebuild
+++ b/sys-devel/llvm/llvm-19.0.0.9999.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
@@ -17,21 +18,26 @@ HOMEPAGE="https://llvm.org/"
# 4. ConvertUTF.h: TODO.
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="
+ +binutils-plugin +debug debuginfod doc exegesis libedit +libffi
+ ncurses test xml z3 zstd
+"
RESTRICT="!test? ( test )"
RDEPEND="
sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
+ debuginfod? (
+ net-misc/curl:=
+ dev-cpp/cpp-httplib:=
+ )
exegesis? ( dev-libs/libpfm:= )
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
@@ -40,20 +46,11 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
)
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
libffi? ( virtual/pkgconfig )
- test? (
- sys-apps/which
- )
"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
@@ -63,23 +60,32 @@ RDEPEND="
"
PDEPEND="
sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
LLVM_COMPONENTS=( llvm cmake third-party )
LLVM_MANPAGES=1
-LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=provide
llvm.org_set_globals
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_any_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
python_check_deps() {
- use doc || return 0
+ llvm_are_manpages_built || return 0
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+ python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
-check_live_ebuild() {
+check_uptodate() {
local prod_targets=(
$(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
| tail -n +2 | head -n -1)
@@ -126,6 +132,12 @@ check_distribution_components() {
# TableGen lib + deps
LLVMDemangle|LLVMSupport|LLVMTableGen)
;;
+ # used by lldb
+ LLVMDebuginfod)
+ ;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
# static libs
LLVM*)
continue
@@ -176,26 +188,10 @@ src_prepare() {
# Update config.guess to support more systems
cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
+ # Verify that the ebuild is up-to-date
+ check_uptodate
llvm.org_src_prepare
-
- # remove regressing test
- # https://github.com/llvm/llvm-project/issues/55761
- rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
}
get_distribution_components() {
@@ -218,10 +214,19 @@ get_distribution_components() {
LLVMDemangle
LLVMSupport
LLVMTableGen
+
+ # testing libraries
+ llvm_gtest
+ llvm_gtest_main
+ LLVMTestingAnnotations
+ LLVMTestingSupport
)
if multilib_is_native_abi; then
out+=(
+ # library used by lldb
+ LLVMDebuginfod
+
# utilities
llvm-tblgen
FileCheck
@@ -229,6 +234,7 @@ get_distribution_components() {
count
not
yaml-bench
+ UnicodeNameMappingGenerator
# tools
bugpoint
@@ -250,11 +256,13 @@ get_distribution_components() {
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
+ llvm-debuginfo-analyzer
llvm-debuginfod-find
llvm-diff
llvm-dis
llvm-dlltool
llvm-dwarfdump
+ llvm-dwarfutil
llvm-dwp
llvm-exegesis
llvm-extract
@@ -286,7 +294,9 @@ get_distribution_components() {
llvm-rc
llvm-readelf
llvm-readobj
+ llvm-readtapi
llvm-reduce
+ llvm-remarkutil
llvm-rtdyld
llvm-sim
llvm-size
@@ -295,7 +305,6 @@ get_distribution_components() {
llvm-strings
llvm-strip
llvm-symbolizer
- llvm-tapi-diff
llvm-tli-checker
llvm-undname
llvm-windres
@@ -327,12 +336,25 @@ get_distribution_components() {
use binutils-plugin && out+=(
LLVMgold
)
+ use debuginfod && out+=(
+ llvm-debuginfod
+ )
fi
printf "%s${sep}" "${out[@]}"
}
multilib_src_configure() {
+ if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
+ # Workaround for bug #880677
+ append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
+ fi
+
+ # ODR violations (bug #917536, bug #926529). Just do it for GCC for now
+ # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile
+ # LLVM with LTO anyway (which is not necessarily its fault).
+ tc-is-gcc && filter-lto
+
local ffi_cflags ffi_ldflags
if use libffi; then
ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
@@ -344,7 +366,7 @@ multilib_src_configure() {
# disable appending VCS revision to the version to improve
# direct cache hit ratio
-DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DBUILD_SHARED_LIBS=OFF
@@ -356,7 +378,10 @@ multilib_src_configure() {
# is that the former list is explicitly verified at cmake time
-DLLVM_TARGETS_TO_BUILD=""
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=ON
-DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
-DLLVM_ENABLE_FFI=$(usex libffi)
-DLLVM_ENABLE_LIBEDIT=$(usex libedit)
@@ -367,13 +392,15 @@ multilib_src_configure() {
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ -DLLVM_ENABLE_CURL=$(usex debuginfod)
+ -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
-DLLVM_HOST_TRIPLE="${CHOST}"
-DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
-DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
- # used only for llvm-objdump tool
- -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-DPython3_EXECUTABLE="${PYTHON}"
@@ -381,23 +408,24 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
-DLLVM_ENABLE_LIBCXX=ON
)
fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
use test && mycmakeargs+=(
-DLLVM_LIT_ARGS="$(get_lit_flags)"
@@ -408,7 +436,7 @@ multilib_src_configure() {
if llvm_are_manpages_built; then
build_docs=ON
mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
@@ -426,25 +454,14 @@ multilib_src_configure() {
)
fi
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
+ use kernel_Darwin && mycmakeargs+=(
+ # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+ # libncurses, but llvm tries to use libtinfo before libncurses, and ends up
+ # using libtinfo (actually, libncurses.dylib) from system instead of prefix
+ -DTerminfo_LIBRARIES=-lncurses
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
# LLVM can have very high memory consumption while linking,
# exhausting the limit on 32-bit linker executable
@@ -454,14 +471,14 @@ multilib_src_configure() {
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
@@ -482,7 +499,7 @@ multilib_src_test() {
src_install() {
local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
)
local MULTILIB_WRAPPED_HEADERS=(
@@ -493,7 +510,7 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
}
multilib_src_install() {
@@ -501,28 +518,28 @@ multilib_src_install() {
# move headers to /usr/include for wrapping
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
}
multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
# we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
diff --git a/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..8624219a7e20
--- /dev/null
+++ b/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild
@@ -0,0 +1,547 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="https://llvm.org/"
+
+# Additional licenses:
+# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
+# 2. xxhash: BSD.
+# 3. MD5 code: public-domain.
+# 4. ConvertUTF.h: TODO.
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="
+ +binutils-plugin +debug debuginfod doc exegesis libedit +libffi
+ ncurses test xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ debuginfod? (
+ net-misc/curl:=
+ dev-cpp/cpp-httplib:=
+ )
+ exegesis? ( dev-libs/libpfm:= )
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
+ libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
+ binutils-plugin? ( sys-libs/binutils-libs )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ sys-devel/gnuconfig
+ kernel_Darwin? (
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
+ )
+ libffi? ( virtual/pkgconfig )
+"
+# There are no file collisions between these versions but having :0
+# installed means llvm-config there will take precedence.
+RDEPEND="
+ ${RDEPEND}
+ !sys-devel/llvm:0
+"
+PDEPEND="
+ sys-devel/llvm-common
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
+"
+
+LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_MANPAGES=1
+LLVM_USE_TARGETS=provide
+llvm.org_set_globals
+
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_any_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
+python_check_deps() {
+ llvm_are_manpages_built || return 0
+
+ python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
+check_uptodate() {
+ local prod_targets=(
+ $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
+ | tail -n +2 | head -n -1)
+ )
+ local all_targets=(
+ lib/Target/*/
+ )
+ all_targets=( "${all_targets[@]#lib/Target/}" )
+ all_targets=( "${all_targets[@]%/}" )
+
+ local exp_targets=() i
+ for i in "${all_targets[@]}"; do
+ has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
+ done
+
+ if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
+ eqawarn "Expected: ${exp_targets[*]}"
+ eqawarn
+ fi
+
+ if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
+ eqawarn "Expected: ${prod_targets[*]}"
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # shared libs
+ LLVM|LLVMgold)
+ ;;
+ # TableGen lib + deps
+ LLVMDemangle|LLVMSupport|LLVMTableGen)
+ ;;
+ # used by lldb
+ LLVMDebuginfod)
+ ;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
+ # static libs
+ LLVM*)
+ continue
+ ;;
+ # meta-targets
+ distribution|llvm-libraries)
+ continue
+ ;;
+ # used only w/ USE=doc
+ docs-llvm-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+src_prepare() {
+ # disable use of SDK on OSX, bug #568758
+ sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
+
+ # Update config.guess to support more systems
+ cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
+
+ # Verify that the ebuild is up-to-date
+ check_uptodate
+
+ llvm.org_src_prepare
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # shared libs
+ LLVM
+ LTO
+ Remarks
+
+ # tools
+ llvm-config
+
+ # common stuff
+ cmake-exports
+ llvm-headers
+
+ # libraries needed for clang-tblgen
+ LLVMDemangle
+ LLVMSupport
+ LLVMTableGen
+
+ # testing libraries
+ llvm_gtest
+ llvm_gtest_main
+ LLVMTestingAnnotations
+ LLVMTestingSupport
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # library used by lldb
+ LLVMDebuginfod
+
+ # utilities
+ llvm-tblgen
+ FileCheck
+ llvm-PerfectShuffle
+ count
+ not
+ yaml-bench
+ UnicodeNameMappingGenerator
+
+ # tools
+ bugpoint
+ dsymutil
+ llc
+ lli
+ lli-child-target
+ llvm-addr2line
+ llvm-ar
+ llvm-as
+ llvm-bcanalyzer
+ llvm-bitcode-strip
+ llvm-c-test
+ llvm-cat
+ llvm-cfi-verify
+ llvm-config
+ llvm-cov
+ llvm-cvtres
+ llvm-cxxdump
+ llvm-cxxfilt
+ llvm-cxxmap
+ llvm-debuginfo-analyzer
+ llvm-debuginfod-find
+ llvm-diff
+ llvm-dis
+ llvm-dlltool
+ llvm-dwarfdump
+ llvm-dwarfutil
+ llvm-dwp
+ llvm-exegesis
+ llvm-extract
+ llvm-gsymutil
+ llvm-ifs
+ llvm-install-name-tool
+ llvm-jitlink
+ llvm-jitlink-executor
+ llvm-lib
+ llvm-libtool-darwin
+ llvm-link
+ llvm-lipo
+ llvm-lto
+ llvm-lto2
+ llvm-mc
+ llvm-mca
+ llvm-ml
+ llvm-modextract
+ llvm-mt
+ llvm-nm
+ llvm-objcopy
+ llvm-objdump
+ llvm-opt-report
+ llvm-otool
+ llvm-pdbutil
+ llvm-profdata
+ llvm-profgen
+ llvm-ranlib
+ llvm-rc
+ llvm-readelf
+ llvm-readobj
+ llvm-readtapi
+ llvm-reduce
+ llvm-remarkutil
+ llvm-rtdyld
+ llvm-sim
+ llvm-size
+ llvm-split
+ llvm-stress
+ llvm-strings
+ llvm-strip
+ llvm-symbolizer
+ llvm-tli-checker
+ llvm-undname
+ llvm-windres
+ llvm-xray
+ obj2yaml
+ opt
+ sancov
+ sanstats
+ split-file
+ verify-uselistorder
+ yaml2obj
+
+ # python modules
+ opt-viewer
+ )
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
+ use doc && out+=(
+ docs-llvm-html
+ )
+
+ use binutils-plugin && out+=(
+ LLVMgold
+ )
+ use debuginfod && out+=(
+ llvm-debuginfod
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
+ # Workaround for bug #880677
+ append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
+ fi
+
+ # ODR violations (bug #917536, bug #926529). Just do it for GCC for now
+ # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile
+ # LLVM with LTO anyway (which is not necessarily its fault).
+ tc-is-gcc && filter-lto
+
+ local ffi_cflags ffi_ldflags
+ if use libffi; then
+ ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ # disable appending VCS revision to the version to improve
+ # direct cache hit ratio
+ -DLLVM_APPEND_VC_REV=OFF
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DLLVM_LINK_LLVM_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+
+ # cheap hack: LLVM combines both anyway, and the only difference
+ # is that the former list is explicitly verified at cmake time
+ -DLLVM_TARGETS_TO_BUILD=""
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=ON
+ -DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
+
+ -DLLVM_ENABLE_FFI=$(usex libffi)
+ -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+ -DLLVM_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+ -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+ -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ -DLLVM_ENABLE_CURL=$(usex debuginfod)
+ -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
+
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+
+ # disable OCaml bindings (now in dev-ml/llvm-ocaml)
+ -DOCAMLFIND=NO
+ )
+
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+ # Smart hack: alter version suffix -> SOVERSION when linking
+ # against libc++. This way we won't end up mixing LLVM libc++
+ # libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
+ mycmakeargs+=(
+ -DLLVM_ENABLE_LIBCXX=ON
+ )
+ fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=${build_docs}
+ -DLLVM_ENABLE_OCAMLDOC=OFF
+ -DLLVM_ENABLE_SPHINX=${build_docs}
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_INSTALL_UTILS=ON
+ )
+ use binutils-plugin && mycmakeargs+=(
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+ )
+ fi
+
+ use kernel_Darwin && mycmakeargs+=(
+ # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+ # libncurses, but llvm tries to use libtinfo before libncurses, and ends up
+ # using libtinfo (actually, libncurses.dylib) from system instead of prefix
+ -DTerminfo_LIBRARIES=-lncurses
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
+ CMakeCache.txt ||
+ die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ tc-env_build cmake_build distribution
+
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
+ pax-mark m "${BUILD_DIR}"/bin/lli
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target
+
+ if use test; then
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
+ fi
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check
+}
+
+src_install() {
+ local MULTILIB_CHOST_TOOLS=(
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
+ )
+
+ local MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/llvm/Config/llvm-config.h
+ )
+
+ local LLVM_LDPATHS=()
+ multilib-minimal_src_install
+
+ # move wrapped headers back
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
+}
+
+multilib_src_install_all() {
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
+ newenvd - "60llvm-${revord}" <<-_EOF_
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ # we need to duplicate it in ROOTPATH for Portage to respect...
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
+ _EOF_
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+}
+
+pkg_postinst() {
+ elog "You can find additional opt-viewer utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
+ elog "To use these scripts, you will need Python along with the following"
+ elog "packages:"
+ elog " dev-python/pygments (for opt-viewer)"
+ elog " dev-python/pyyaml (for all of them)"
+}
diff --git a/sys-devel/llvm/llvm-19.0.0_pre20240420.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..8624219a7e20
--- /dev/null
+++ b/sys-devel/llvm/llvm-19.0.0_pre20240420.ebuild
@@ -0,0 +1,547 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="https://llvm.org/"
+
+# Additional licenses:
+# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
+# 2. xxhash: BSD.
+# 3. MD5 code: public-domain.
+# 4. ConvertUTF.h: TODO.
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="
+ +binutils-plugin +debug debuginfod doc exegesis libedit +libffi
+ ncurses test xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ debuginfod? (
+ net-misc/curl:=
+ dev-cpp/cpp-httplib:=
+ )
+ exegesis? ( dev-libs/libpfm:= )
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
+ libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
+ binutils-plugin? ( sys-libs/binutils-libs )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ sys-devel/gnuconfig
+ kernel_Darwin? (
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
+ )
+ libffi? ( virtual/pkgconfig )
+"
+# There are no file collisions between these versions but having :0
+# installed means llvm-config there will take precedence.
+RDEPEND="
+ ${RDEPEND}
+ !sys-devel/llvm:0
+"
+PDEPEND="
+ sys-devel/llvm-common
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
+"
+
+LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_MANPAGES=1
+LLVM_USE_TARGETS=provide
+llvm.org_set_globals
+
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( "
+BDEPEND+="
+ $(python_gen_any_dep '
+ dev-python/myst-parser[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+"
+[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) "
+
+python_check_deps() {
+ llvm_are_manpages_built || return 0
+
+ python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
+check_uptodate() {
+ local prod_targets=(
+ $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
+ | tail -n +2 | head -n -1)
+ )
+ local all_targets=(
+ lib/Target/*/
+ )
+ all_targets=( "${all_targets[@]#lib/Target/}" )
+ all_targets=( "${all_targets[@]%/}" )
+
+ local exp_targets=() i
+ for i in "${all_targets[@]}"; do
+ has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
+ done
+
+ if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
+ eqawarn "Expected: ${exp_targets[*]}"
+ eqawarn
+ fi
+
+ if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
+ eqawarn "Expected: ${prod_targets[*]}"
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # shared libs
+ LLVM|LLVMgold)
+ ;;
+ # TableGen lib + deps
+ LLVMDemangle|LLVMSupport|LLVMTableGen)
+ ;;
+ # used by lldb
+ LLVMDebuginfod)
+ ;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
+ # static libs
+ LLVM*)
+ continue
+ ;;
+ # meta-targets
+ distribution|llvm-libraries)
+ continue
+ ;;
+ # used only w/ USE=doc
+ docs-llvm-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+src_prepare() {
+ # disable use of SDK on OSX, bug #568758
+ sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
+
+ # Update config.guess to support more systems
+ cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
+
+ # Verify that the ebuild is up-to-date
+ check_uptodate
+
+ llvm.org_src_prepare
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # shared libs
+ LLVM
+ LTO
+ Remarks
+
+ # tools
+ llvm-config
+
+ # common stuff
+ cmake-exports
+ llvm-headers
+
+ # libraries needed for clang-tblgen
+ LLVMDemangle
+ LLVMSupport
+ LLVMTableGen
+
+ # testing libraries
+ llvm_gtest
+ llvm_gtest_main
+ LLVMTestingAnnotations
+ LLVMTestingSupport
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # library used by lldb
+ LLVMDebuginfod
+
+ # utilities
+ llvm-tblgen
+ FileCheck
+ llvm-PerfectShuffle
+ count
+ not
+ yaml-bench
+ UnicodeNameMappingGenerator
+
+ # tools
+ bugpoint
+ dsymutil
+ llc
+ lli
+ lli-child-target
+ llvm-addr2line
+ llvm-ar
+ llvm-as
+ llvm-bcanalyzer
+ llvm-bitcode-strip
+ llvm-c-test
+ llvm-cat
+ llvm-cfi-verify
+ llvm-config
+ llvm-cov
+ llvm-cvtres
+ llvm-cxxdump
+ llvm-cxxfilt
+ llvm-cxxmap
+ llvm-debuginfo-analyzer
+ llvm-debuginfod-find
+ llvm-diff
+ llvm-dis
+ llvm-dlltool
+ llvm-dwarfdump
+ llvm-dwarfutil
+ llvm-dwp
+ llvm-exegesis
+ llvm-extract
+ llvm-gsymutil
+ llvm-ifs
+ llvm-install-name-tool
+ llvm-jitlink
+ llvm-jitlink-executor
+ llvm-lib
+ llvm-libtool-darwin
+ llvm-link
+ llvm-lipo
+ llvm-lto
+ llvm-lto2
+ llvm-mc
+ llvm-mca
+ llvm-ml
+ llvm-modextract
+ llvm-mt
+ llvm-nm
+ llvm-objcopy
+ llvm-objdump
+ llvm-opt-report
+ llvm-otool
+ llvm-pdbutil
+ llvm-profdata
+ llvm-profgen
+ llvm-ranlib
+ llvm-rc
+ llvm-readelf
+ llvm-readobj
+ llvm-readtapi
+ llvm-reduce
+ llvm-remarkutil
+ llvm-rtdyld
+ llvm-sim
+ llvm-size
+ llvm-split
+ llvm-stress
+ llvm-strings
+ llvm-strip
+ llvm-symbolizer
+ llvm-tli-checker
+ llvm-undname
+ llvm-windres
+ llvm-xray
+ obj2yaml
+ opt
+ sancov
+ sanstats
+ split-file
+ verify-uselistorder
+ yaml2obj
+
+ # python modules
+ opt-viewer
+ )
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
+ use doc && out+=(
+ docs-llvm-html
+ )
+
+ use binutils-plugin && out+=(
+ LLVMgold
+ )
+ use debuginfod && out+=(
+ llvm-debuginfod
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then
+ # Workaround for bug #880677
+ append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
+ fi
+
+ # ODR violations (bug #917536, bug #926529). Just do it for GCC for now
+ # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile
+ # LLVM with LTO anyway (which is not necessarily its fault).
+ tc-is-gcc && filter-lto
+
+ local ffi_cflags ffi_ldflags
+ if use libffi; then
+ ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ # disable appending VCS revision to the version to improve
+ # direct cache hit ratio
+ -DLLVM_APPEND_VC_REV=OFF
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DLLVM_LINK_LLVM_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+
+ # cheap hack: LLVM combines both anyway, and the only difference
+ # is that the former list is explicitly verified at cmake time
+ -DLLVM_TARGETS_TO_BUILD=""
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=ON
+ -DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
+
+ -DLLVM_ENABLE_FFI=$(usex libffi)
+ -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+ -DLLVM_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+ -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+ -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+ -DLLVM_ENABLE_CURL=$(usex debuginfod)
+ -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
+
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+
+ # disable OCaml bindings (now in dev-ml/llvm-ocaml)
+ -DOCAMLFIND=NO
+ )
+
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+ # Smart hack: alter version suffix -> SOVERSION when linking
+ # against libc++. This way we won't end up mixing LLVM libc++
+ # libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
+ mycmakeargs+=(
+ -DLLVM_ENABLE_LIBCXX=ON
+ )
+ fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=${build_docs}
+ -DLLVM_ENABLE_OCAMLDOC=OFF
+ -DLLVM_ENABLE_SPHINX=${build_docs}
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_INSTALL_UTILS=ON
+ )
+ use binutils-plugin && mycmakeargs+=(
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+ )
+ fi
+
+ use kernel_Darwin && mycmakeargs+=(
+ # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
+ # libncurses, but llvm tries to use libtinfo before libncurses, and ends up
+ # using libtinfo (actually, libncurses.dylib) from system instead of prefix
+ -DTerminfo_LIBRARIES=-lncurses
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
+ CMakeCache.txt ||
+ die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ tc-env_build cmake_build distribution
+
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
+ pax-mark m "${BUILD_DIR}"/bin/lli
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target
+
+ if use test; then
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
+ fi
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check
+}
+
+src_install() {
+ local MULTILIB_CHOST_TOOLS=(
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
+ )
+
+ local MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/llvm/Config/llvm-config.h
+ )
+
+ local LLVM_LDPATHS=()
+ multilib-minimal_src_install
+
+ # move wrapped headers back
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
+}
+
+multilib_src_install_all() {
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
+ newenvd - "60llvm-${revord}" <<-_EOF_
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ # we need to duplicate it in ROOTPATH for Portage to respect...
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
+ _EOF_
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+}
+
+pkg_postinst() {
+ elog "You can find additional opt-viewer utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
+ elog "To use these scripts, you will need Python along with the following"
+ elog "packages:"
+ elog " dev-python/pygments (for opt-viewer)"
+ elog " dev-python/pyyaml (for all of them)"
+}
diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml
index c10c45dd8f21..1277d338a5de 100644
--- a/sys-devel/llvm/metadata.xml
+++ b/sys-devel/llvm/metadata.xml
@@ -11,13 +11,17 @@
4. LLVM does not imply things that you would expect from a high-level virtual machine. It does not require garbage collection or run-time code generation (In fact, LLVM makes a great static compiler!). Note that optional LLVM components can be used to build high-level virtual machines and other systems that need these services.</longdescription>
<use>
<flag name="binutils-plugin">Build the binutils plugin</flag>
+ <flag name="debuginfod">Install llvm-debuginfod (requires <pkg>net-misc/curl</pkg> and <pkg>dev-cpp/cpp-httplib</pkg>)</flag>
<flag name="doc">Build and install the HTML documentation and regenerate the man pages</flag>
<flag name="exegesis">Enable performance counter support for llvm-exegesis tool
that can be used to measure host machine instruction characteristics</flag>
- <flag name="gold">Build the binutils plugin</flag>
<flag name="ncurses">Support querying terminal properties using ncurses' terminfo</flag>
<flag name="xar">Support dumping LLVM bitcode sections in Mach-O files
(uses <pkg>app-arch/xar</pkg>)</flag>
<flag name="z3">Enable support for <pkg>sci-mathematics/z3</pkg> constraint solver</flag>
</use>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ <remote-id type="cpe">cpe:/a:llvm:llvm</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/llvmgold/llvmgold-15.ebuild b/sys-devel/llvmgold/llvmgold-15.ebuild
index 5dcc3164a55c..484ce44cf3f7 100644
--- a/sys-devel/llvmgold/llvmgold-15.ebuild
+++ b/sys-devel/llvmgold/llvmgold-15.ebuild
@@ -9,8 +9,7 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS=""
-PROPERTIES="live"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv sparc x86 ~amd64-linux"
RDEPEND="
sys-devel/llvm:${PV}[binutils-plugin]
diff --git a/sys-devel/llvmgold/llvmgold-12.ebuild b/sys-devel/llvmgold/llvmgold-16.ebuild
index 39dbffdba3bc..5eca5d655d97 100644
--- a/sys-devel/llvmgold/llvmgold-12.ebuild
+++ b/sys-devel/llvmgold/llvmgold-16.ebuild
@@ -1,20 +1,20 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
DESCRIPTION="LLVMgold plugin symlink for autoloading"
HOMEPAGE="https://llvm.org/"
-SRC_URI=""
+S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux"
-
-RDEPEND="sys-devel/llvm:${PV}[gold]
- !sys-devel/llvm:0"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv sparc x86 ~amd64-linux"
-S=${WORKDIR}
+RDEPEND="
+ sys-devel/llvm:${PV}[binutils-plugin]
+ !sys-devel/llvm:0
+"
src_install() {
dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
diff --git a/sys-devel/llvmgold/llvmgold-13-r1.ebuild b/sys-devel/llvmgold/llvmgold-17.ebuild
index c92356ad883d..ad52f2c99dcd 100644
--- a/sys-devel/llvmgold/llvmgold-13-r1.ebuild
+++ b/sys-devel/llvmgold/llvmgold-17.ebuild
@@ -1,24 +1,20 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
DESCRIPTION="LLVMgold plugin symlink for autoloading"
HOMEPAGE="https://llvm.org/"
-SRC_URI=""
+S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv sparc x86 ~amd64-linux"
RDEPEND="
- || (
- sys-devel/llvm:${PV}[binutils-plugin(-)]
- sys-devel/llvm:${PV}[gold(-)]
- )
- !sys-devel/llvm:0"
-
-S=${WORKDIR}
+ sys-devel/llvm:${PV}[binutils-plugin]
+ !sys-devel/llvm:0
+"
src_install() {
dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
diff --git a/sys-devel/llvmgold/llvmgold-18.ebuild b/sys-devel/llvmgold/llvmgold-18.ebuild
new file mode 100644
index 000000000000..c169127837a0
--- /dev/null
+++ b/sys-devel/llvmgold/llvmgold-18.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="LLVMgold plugin symlink for autoloading"
+HOMEPAGE="https://llvm.org/"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux"
+
+RDEPEND="
+ sys-devel/llvm:${PV}[binutils-plugin]
+ !sys-devel/llvm:0
+"
+
+src_install() {
+ dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
+ dosym "../../../../lib/llvm/${PV}/$(get_libdir)/LLVMgold.so" \
+ "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
+}
diff --git a/sys-devel/llvmgold/llvmgold-14.ebuild b/sys-devel/llvmgold/llvmgold-19.ebuild
index 2c0474742d85..cc4a41d311fc 100644
--- a/sys-devel/llvmgold/llvmgold-14.ebuild
+++ b/sys-devel/llvmgold/llvmgold-19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -9,7 +9,6 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux"
RDEPEND="
sys-devel/llvm:${PV}[binutils-plugin]
diff --git a/sys-devel/llvmgold/metadata.xml b/sys-devel/llvmgold/metadata.xml
index 3ad9b7a7c0eb..072910296ca3 100644
--- a/sys-devel/llvmgold/metadata.xml
+++ b/sys-devel/llvmgold/metadata.xml
@@ -4,4 +4,7 @@
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/m4/files/m4-1.4.19-fortify-source.patch b/sys-devel/m4/files/m4-1.4.19-fortify-source.patch
new file mode 100644
index 000000000000..d07fe620c3df
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.19-fortify-source.patch
@@ -0,0 +1,50 @@
+https://lists.gnu.org/archive/html/m4-patches/2023-01/msg00001.html
+https://bugs.gentoo.org/890273
+
+From 960b9b4d0774f78d286932251d6f53f638aefb19 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 9 Jan 2023 08:00:34 +0000
+Subject: [PATCH] build: Don't add _FORTIFY_SOURCE if already set by
+ user/toolchain
+
+Newer toolchains (GCC 12+ or Clang 9+, glibc-2.34) allow _FORTIFY_SOURCE=3.
+
+The current macro used in configure.ac will forcefully downgrade to F_S=2
+and emit a warning if the user set something else:
+```
+x86_64-pc-linux-gnu-gcc -DEXEEXT=\"\" -I. -I../lib -DIN_M4_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../lib -I./../lib -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -c -o glthread/thread.o glthread/thread.c
+In file included from glthread/thread.c:20:
+../lib/config.h:202: warning: "_FORTIFY_SOURCE" redefined
+ 202 | # define _FORTIFY_SOURCE 2
+ |
+<built-in>: note: this is the location of the previous definition
+```
+
+See: 390d259efe8e1c7e4b6babb4738fef7427416857
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,7 +133,9 @@ if test "$gl_gcc_warnings" = yes; then
+ [/* Enable compile-time and run-time bounds-checking, and some warnings,
+ without upsetting newer glibc. */
+ #if defined __OPTIMIZE__ && __OPTIMIZE__
+- # define _FORTIFY_SOURCE 2
++ # ifndef _FORTIFY_SOURCE
++ # define _FORTIFY_SOURCE 2
++ # endif
+ #endif
+ ])
+ fi
+--- a/lib/config.hin
++++ b/lib/config.hin
+@@ -198,7 +198,9 @@
+ /* Enable compile-time and run-time bounds-checking, and some warnings,
+ without upsetting newer glibc. */
+ #if defined __OPTIMIZE__ && __OPTIMIZE__
+- # define _FORTIFY_SOURCE 2
++ # ifndef _FORTIFY_SOURCE
++ # define _FORTIFY_SOURCE 2
++ # endif
+ #endif
+
+
diff --git a/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch b/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch
new file mode 100644
index 000000000000..f7bc3f0e9b35
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/879061
+
+https://savannah.gnu.org/bugs/index.php?63307 (make bug)
+https://savannah.gnu.org/support/?110767 (M4 bug)
+
+https://lists.gnu.org/archive/html/bug-m4/2022-11/msg00003.html
+https://savannah.gnu.org/support/download.php?file_id=53951
+
+From ed64def45d68b2af53f1d3d783cc98e9dbe2ff74 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sat, 12 Nov 2022 15:18:41 +0100
+Subject: [PATCH] test-execute-main.c: set default handler for SIGPIPE in tests
+ 3 and 4
+
+make 4.4 sets this to SIG_IGN and the tests fail
+
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+--- a/tests/test-execute-main.c
++++ b/tests/test-execute-main.c
+@@ -132,6 +132,7 @@ main (int argc, char *argv[])
+ #if !(defined _WIN32 && !defined __CYGWIN__)
+ {
+ /* Check SIGPIPE handling with ignore_sigpipe = false. */
++ signal(SIGPIPE, SIG_DFL);
+ const char *prog_argv[3] = { prog_path, "3", NULL };
+ int termsig = 0x7DEADBEE;
+ int ret = execute (progname, prog_argv[0], prog_argv, NULL,
+@@ -145,6 +146,7 @@ main (int argc, char *argv[])
+ #if !(defined _WIN32 && !defined __CYGWIN__)
+ {
+ /* Check SIGPIPE handling with ignore_sigpipe = true. */
++ signal(SIGPIPE, SIG_DFL);
+ const char *prog_argv[3] = { prog_path, "4", NULL };
+ int termsig = 0x7DEADBEE;
+ int ret = execute (progname, prog_argv[0], prog_argv, NULL,
+--
+2.30.2
+
diff --git a/sys-devel/m4/files/m4-1.4.19-race-condition-tests.patch b/sys-devel/m4/files/m4-1.4.19-race-condition-tests.patch
new file mode 100644
index 000000000000..c212777dcd3e
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.19-race-condition-tests.patch
@@ -0,0 +1,34 @@
+https://lists.gnu.org/archive/html/bug-m4/2022-12/msg00000.html
+https://lists.gnu.org/archive/html/bug-m4/2022-12/txtmGJxjX3osy.txt
+
+Fix a sporadic failure of the test-posix_spawn-script test.
+
+From a3efddb96f5f121b8a5bb1310dc82407546fd255 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Thu, 22 Dec 2022 21:19:34 -0800
+Subject: [PATCH] posix_spawnp-tests: fix filename typo
+
+Problem reported for GNU m4 by Mitchell Dorrell in:
+https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html
+* tests/test-posix_spawnp-script.c (DATA_FILENAME):
+Fix typo in file name that caused race with
+test-posix_spawn-script.c.
+---
+ tests/test-posix_spawnp-script.c | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test-posix_spawnp-script.c b/tests/test-posix_spawnp-script.c
+index 1e5fc5c110..d2035ed63e 100644
+--- a/tests/test-posix_spawnp-script.c
++++ b/tests/test-posix_spawnp-script.c
+@@ -28,7 +28,7 @@
+
+ #include "macros.h"
+
+-#define DATA_FILENAME "test-posix_spawn-script.tmp"
++#define DATA_FILENAME "test-posix_spawnp-script.tmp"
+
+ int
+ main ()
+--
+2.25.1
diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19-r2.ebuild
index fcfe153e5958..6c21702d71ba 100644
--- a/sys-devel/m4/m4-1.4.19.ebuild
+++ b/sys-devel/m4/m4-1.4.19-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/m4.asc
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/m4.asc
inherit verify-sig
DESCRIPTION="GNU macro processor"
@@ -17,7 +17,7 @@ else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~floppym/dist/${P}-test-198-sysval-r1.patch.gz"
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-3"
@@ -39,7 +39,10 @@ BDEPEND="app-arch/xz-utils
PATCHES=(
"${FILESDIR}"/ppc-musl.patch
"${FILESDIR}"/loong-fix-build.patch
+ "${FILESDIR}"/${PN}-1.4.19-make-4.4-tests.patch
"${WORKDIR}"/${P}-test-198-sysval-r1.patch
+ "${FILESDIR}"/${P}-fortify-source.patch
+ "${FILESDIR}"/${P}-race-condition-tests.patch
)
src_unpack() {
@@ -75,8 +78,6 @@ src_configure() {
ac_cv_libsigsegv=no
)
- [[ ${USERLAND} != GNU ]] && myeconfargs+=( --program-prefix=g )
-
econf "${myeconfargs[@]}"
}
diff --git a/sys-devel/m4/metadata.xml b/sys-devel/m4/metadata.xml
index 73dda144f9ac..dce0ffc83fe5 100644
--- a/sys-devel/m4/metadata.xml
+++ b/sys-devel/m4/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="savannah">m4</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest
deleted file mode 100644
index f9cbb5a172f0..000000000000
--- a/sys-devel/make/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST make-4.3.tar.gz 2317073 BLAKE2B 5a82ce1f30eb034366ac3b87d2ec6698aae17d7b1a611941cf42136b2453b34236ab55382eab0a593c43cee8b036ba4a054f966c41ba766fdbd2862942be5dff SHA512 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b
-DIST make-4.3.tar.gz.sig 566 BLAKE2B 75bf71602e60f97ec8efa81676329047746d960257ef310b89a059144c00628b6a1ddf7a16a2ac2c3e935b8591475f5043a7c7546668ab39abbc4717c75a6528 SHA512 bf13e2943593b153457c8111179e8ae11cef2d9185a986106a1e70946a260bd930505a5e10002c5a60888e11affc07713c367b8680fd511ad87b2e124d303a99
diff --git a/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch b/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch
deleted file mode 100644
index 743583b5a0a3..000000000000
--- a/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fixed default libpatttern on Darwin, imported from prefix overlay.
-Got merged upstream:
-https://savannah.gnu.org/bugs/?37197
---- a/src/default.c
-+++ b/src/default.c
-@@ -509,7 +509,11 @@
- #ifdef __MSDOS__
- ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
- #else
-+#ifdef __APPLE__
-+ ".LIBPATTERNS", "lib%.dylib lib%.a",
-+#else
- ".LIBPATTERNS", "lib%.so lib%.a",
-+#endif
- #endif
- #endif
-
diff --git a/sys-devel/make/files/make-4.2-default-cxx.patch b/sys-devel/make/files/make-4.2-default-cxx.patch
deleted file mode 100644
index 39e3ee0dd9f9..000000000000
--- a/sys-devel/make/files/make-4.2-default-cxx.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/default.c
-+++ b/src/default.c
-@@ -530,7 +530,7 @@ static const char *default_variables[] =
- "OBJC", "gcc",
- #else
- "CC", "cc",
-- "CXX", "g++",
-+ "CXX", "c++",
- "OBJC", "cc",
- #endif
-
diff --git a/sys-devel/make/make-4.3.ebuild b/sys-devel/make/make-4.3.ebuild
deleted file mode 100644
index 50caf0365bb0..000000000000
--- a/sys-devel/make/make-4.3.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/make.asc
-inherit flag-o-matic verify-sig
-
-DESCRIPTION="Standard tool to compile source trees"
-HOMEPAGE="https://www.gnu.org/software/make/make.html"
-if [[ "$(ver_cut 3)" -ge 90 ]] ; then
- SRC_URI="https://alpha.gnu.org/gnu//make/${P}.tar.gz"
- SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu//make/${P}.tar.gz.sig )"
-else
- SRC_URI="mirror://gnu//make/${P}.tar.gz"
- SRC_URI+=" verify-sig? ( mirror://gnu//make/${P}.tar.gz.sig )"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-LICENSE="GPL-3+"
-SLOT="0"
-IUSE="guile nls static"
-
-DEPEND="guile? ( >=dev-scheme/guile-1.8:= )"
-BDEPEND="nls? ( sys-devel/gettext )
- verify-sig? ( sec-keys/openpgp-keys-make )"
-RDEPEND="${DEPEND}
- nls? ( virtual/libintl )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch
- "${FILESDIR}"/${PN}-4.2-default-cxx.patch
-)
-
-src_configure() {
- use static && append-ldflags -static
- local myeconfargs=(
- --program-prefix=g
- $(use_with guile)
- $(use_enable nls)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc AUTHORS NEWS README*
- if [[ ${USERLAND} == "GNU" ]] ; then
- # we install everywhere as 'gmake' but on GNU systems,
- # symlink 'make' to 'gmake'
- dosym gmake /usr/bin/make
- dosym gmake.1 /usr/share/man/man1/make.1
- fi
-}
diff --git a/sys-devel/make/metadata.xml b/sys-devel/make/metadata.xml
deleted file mode 100644
index 1e62dd910293..000000000000
--- a/sys-devel/make/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:make</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-devel/mold/Manifest b/sys-devel/mold/Manifest
index 0ca5f897179c..c1d532776618 100644
--- a/sys-devel/mold/Manifest
+++ b/sys-devel/mold/Manifest
@@ -1,3 +1,4 @@
-DIST mold-1.2.1.tar.gz 4669615 BLAKE2B ba483a479d3eff0ea1dbce0da8c292b6a95c0faee2ac0f52d7be392e41d70e5ff3d7859e43fd721720bfb8331984823f2762acfd9dc51d3f5d8fd0a4865088c9 SHA512 fc39674b00119d09b3275ed7232356f0b25dad1a0f3a498f9db1a4835b6d4f9ea637ca9a643a05591ea895e8751d9bee43cdcb42303beb082462e76ddb42a0f1
-DIST mold-1.3.0.tar.gz 4689476 BLAKE2B 2696f74095763ecda7407d1e677a568e0fddbaf5a3ba16dd21e998d80ff77968d77f46f981958087ada11ede181bee1f0bb8c511eede549a81f4edd7c9dc1280 SHA512 c9da8ece83049afcb815444c81d090a7bdead85b88898460cd94cfc83766b54793d3aa15ce7ce3bd8070a080d1241684c15ad81485ec39cfef768360c574964a
-DIST mold-1.3.1.tar.gz 4692379 BLAKE2B e34e9416cfc65d2097c4659ddc205a0c4492e50a1c6e4560006757e5c371d27410e38131f353cd0ee60b124e5fe42b0a1c50cdc3a7bed9f666596e608340e4fd SHA512 f576d2fcfee5cb3bade5ba24dcdd3020a16131ce7d4c3a00c3f92b94785ed86f3f040a6f5814b9c975c4c3d90a2b8c36a8101d5fbf1bc0a4be316f4a4a6dcefa
+DIST mold-2.1.0.tar.gz 9278811 BLAKE2B b31e13f92177553adf5069cf35c8c75c7bc28f0af4d1726cdc0c6abc1c9d3baaa5be512c3a8fb9bc3c3110096a79e1c6751c701171769595a2234fc1fa8c441a SHA512 f1c98d349b35b4042109d71f7db6eb8d7d089dc3241735bbd7b5402d513dcc85ca17904828779e5fc8234650fa9fb97f47c3a2f3e89cc2fb3cb9e9110439e5a2
+DIST mold-2.30.0.tar.gz 9957539 BLAKE2B f45924598029dabfb2c02298e1f89aae848cd64e2e87dd80f500de323517db92e62df798feee8a2cd81cb930eff0640c2b9957808a4080f0027884015994ce64 SHA512 7cfba4f0fb332799ad267d3eafb8e2f0057af4484467b3e3fbaf8044220163a2c7e26cd1786510f250844c8b57e30c15167c8dd9688af1773abc580c5605abf3
+DIST mold-2.4.0.tar.gz 9974233 BLAKE2B 0710d9ce0407b64b05a23e04db142d603b38d41cd9e5e322b650680ee2bd8684f57647e9a0b5efc23b2106eb1e38e38143be7d4b357b2d32e4fe0b6a99e41cca SHA512 e332d027f783dfb0a4f48b1fb7daf98e11e830f8de82b971b58ee8a7bae59eaa30b8155e7491b6057f0ce8e0b09ddd0ab1d364f01ea15517e1d089fdb292a4e5
+DIST mold-2.4.1.tar.gz 9957259 BLAKE2B 17aab84c0793dc305d53a3c2f372ddc92395b6941ffe372af55cf94f4dd65ea8d63d4e85dcdb3e76622811e5f95577d6f10612102c373835d6f75f2a3d0bcfed SHA512 d61ee4306ecaa6ba5b4ce120636e70db081bb824a482bb3014429e13294134bc2560b1a9b477c47378f1062107f1c32dba2810e41be199cd6882cd1146971245
diff --git a/sys-devel/mold/files/mold-1.2.1-install-nopython.patch b/sys-devel/mold/files/mold-1.2.1-install-nopython.patch
deleted file mode 100644
index 661d3dcf392f..000000000000
--- a/sys-devel/mold/files/mold-1.2.1-install-nopython.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4fb6d4208cfb20bad4a3491a18e78409b5a8183f Mon Sep 17 00:00:00 2001
-From: Matthew Smith <matt@offtopica.uk>
-Date: Sat, 30 Apr 2022 07:42:50 +0100
-Subject: [PATCH] Don't invoke Python to create libexec/mold/ld symlink
-
-Reverts commits 8073a92614fb59f59570031badab5dd4bc3b4f7f and
-5803c3c200f301adc3abdb66df16d3d669712d70.
-
-Bug #841575
----
- Makefile | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index d1abc850..10e053a9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -204,12 +204,7 @@ install: all
- $(STRIP) $D$(LIBDIR)/mold/mold-wrapper.so
-
- $(INSTALL) -d $D$(LIBEXECDIR)/mold
--
--# We want to make a symblink with a relative path, so that users can
--# move the entire directory to other place without breaking the reference.
--# GNU ln supports `--relative` to do that, but that's not supported by
--# non-GNU systems. So we use Python to compute a relative path.
-- ln -sf `python3 -c "import os.path; print(os.path.relpath('$(BINDIR)/mold', '$(LIBEXECDIR)/mold'))"` $D$(LIBEXECDIR)/mold/ld
-+ ln -sf $(BINDIR)/mold $D$(LIBEXECDIR)/mold/ld
-
- $(INSTALL) -d $D$(MANDIR)/man1
- $(INSTALL_DATA) docs/mold.1 $D$(MANDIR)/man1
---
-2.35.3
-
diff --git a/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch b/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch
deleted file mode 100644
index d2ed0af47b41..000000000000
--- a/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From a4fde946f49cddf4f7c1eceb3b86ca38375cec1d Mon Sep 17 00:00:00 2001
-From: Matthew Smith <matt@offtopica.uk>
-Date: Sun, 26 Jun 2022 13:44:36 +0100
-Subject: [PATCH] Revert "Do not use pkg-config"
-
-This reverts commit 4ef90d4316bbba3a4b8902e38bf5f68171cc6ab7.
---- a/Makefile
-+++ b/Makefile
-@@ -18,6 +18,9 @@ ifeq ($(origin CXX), default)
- CXX = c++
- endif
-
-+# Allow overriding pkg-config binary
-+PKG_CONFIG = pkg-config
-+
- # If you want to keep symbols in the installed binary, run make with
- # `STRIP=true` to run /bin/true instead of the strip command.
- STRIP = strip
-@@ -100,7 +103,8 @@ ifeq ($(OS), Darwin)
- endif
-
- ifeq ($(NEEDS_LIBCRYPTO), 1)
-- MOLD_LDFLAGS += -lcrypto
-+ MOLD_CXXFLAGS += $(shell $(PKG_CONFIG) --cflags-only-I openssl)
-+ MOLD_LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L openssl) -lcrypto
- endif
-
- # '-latomic' flag is needed building on riscv64 system.
diff --git a/sys-devel/mold/files/mold-2.3.0-no-pch.patch b/sys-devel/mold/files/mold-2.3.0-no-pch.patch
new file mode 100644
index 000000000000..e61b5df01f54
--- /dev/null
+++ b/sys-devel/mold/files/mold-2.3.0-no-pch.patch
@@ -0,0 +1,12 @@
+We generally disable PCH in Gentoo because of how buggy it is.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -400,7 +400,7 @@ endif()
+
+ # Add frequently included header files for pre-compiling.
+ # target_precompile_headers is supported by CMake 3.16.0 or newer.
+-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
++if(FALSE)
+ if(MOLD_IS_SOLD)
+ target_precompile_headers(mold PRIVATE
+ "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/elf/mold.h>"
diff --git a/sys-devel/mold/mold-1.3.0.ebuild b/sys-devel/mold/mold-2.1.0.ebuild
index 2a7faac5052d..4140d61806dd 100644
--- a/sys-devel/mold/mold-1.3.0.ebuild
+++ b/sys-devel/mold/mold-2.1.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit toolchain-funcs
+inherit cmake toolchain-funcs
DESCRIPTION="A Modern Linker"
HOMEPAGE="https://github.com/rui314/mold"
@@ -12,28 +12,25 @@ if [[ ${PV} == 9999 ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
fi
-LICENSE="AGPL-3"
+# mold (MIT)
+# - xxhash (BSD-2)
+LICENSE="MIT BSD-2"
SLOT="0"
-RDEPEND=">=dev-cpp/tbb-2021.4.0:=
+RDEPEND="
+ app-arch/zstd:=
+ >=dev-cpp/tbb-2021.7.0-r1:=
sys-libs/zlib
!kernel_Darwin? (
>=dev-libs/mimalloc-2:=
dev-libs/openssl:=
- )"
-# As of 1.1, xxhash is now a header-only dep, but it's now bundled :(
-# TODO: restore SYSTEM_XXHASH upstream?
+ )
+"
DEPEND="${RDEPEND}"
-PATCHES=(
- # Bug #841575
- "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch
- "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch
-)
-
pkg_pretend() {
# Requires a c++20 compiler, see #831473
if [[ ${MERGE_TYPE} != binary ]]; then
@@ -46,7 +43,7 @@ pkg_pretend() {
}
src_prepare() {
- default
+ cmake_src_prepare
# Needs unpackaged dwarfdump
rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die
@@ -66,32 +63,27 @@ src_prepare() {
fi
}
-src_compile() {
- tc-export CC CXX
-
- emake \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- STRIP="true" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)"
-}
-
-src_test() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- check
+src_configure() {
+ local mycmakeargs=(
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -DMOLD_USE_SYSTEM_TBB=ON
+ )
+ cmake_src_configure
}
src_install() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="true" \
- install
+ dobin "${BUILD_DIR}"/${PN}
+
+ # https://bugs.gentoo.org/872773
+ insinto /usr/$(get_libdir)/mold
+ doins "${BUILD_DIR}"/${PN}-wrapper.so
+
+ dodoc docs/{design,execstack}.md
+ doman docs/${PN}.1
+
+ dosym ${PN} /usr/bin/ld.${PN}
+ dosym ${PN} /usr/bin/ld64.${PN}
+ dosym ../../../usr/bin/${PN} /usr/libexec/${PN}/ld
}
diff --git a/sys-devel/mold/mold-1.3.1.ebuild b/sys-devel/mold/mold-2.30.0.ebuild
index 2a7faac5052d..ac067b811ef2 100644
--- a/sys-devel/mold/mold-1.3.1.ebuild
+++ b/sys-devel/mold/mold-2.30.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit toolchain-funcs
+inherit cmake toolchain-funcs
DESCRIPTION="A Modern Linker"
HOMEPAGE="https://github.com/rui314/mold"
@@ -12,28 +12,25 @@ if [[ ${PV} == 9999 ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
fi
-LICENSE="AGPL-3"
+# mold (MIT)
+# - xxhash (BSD-2)
+LICENSE="MIT BSD-2"
SLOT="0"
-RDEPEND=">=dev-cpp/tbb-2021.4.0:=
+RDEPEND="
+ app-arch/zstd:=
+ >=dev-cpp/tbb-2021.7.0-r1:=
+ dev-libs/blake3:=
sys-libs/zlib
!kernel_Darwin? (
>=dev-libs/mimalloc-2:=
- dev-libs/openssl:=
- )"
-# As of 1.1, xxhash is now a header-only dep, but it's now bundled :(
-# TODO: restore SYSTEM_XXHASH upstream?
+ )
+"
DEPEND="${RDEPEND}"
-PATCHES=(
- # Bug #841575
- "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch
- "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch
-)
-
pkg_pretend() {
# Requires a c++20 compiler, see #831473
if [[ ${MERGE_TYPE} != binary ]]; then
@@ -46,7 +43,7 @@ pkg_pretend() {
}
src_prepare() {
- default
+ cmake_src_prepare
# Needs unpackaged dwarfdump
rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die
@@ -66,32 +63,37 @@ src_prepare() {
fi
}
-src_compile() {
- tc-export CC CXX
-
- emake \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- STRIP="true" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
+ -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -DMOLD_USE_SYSTEM_TBB=ON
+ )
+ cmake_src_configure
}
-src_test() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- check
+src_install() {
+ dobin "${BUILD_DIR}"/${PN}
+
+ # https://bugs.gentoo.org/872773
+ insinto /usr/$(get_libdir)/mold
+ doins "${BUILD_DIR}"/${PN}-wrapper.so
+
+ dodoc docs/{design,execstack}.md
+ doman docs/${PN}.1
+
+ dosym ${PN} /usr/bin/ld.${PN}
+ dosym ${PN} /usr/bin/ld64.${PN}
+ dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld
}
-src_install() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="true" \
- install
+src_test() {
+ export TEST_CC="$(tc-getCC)" \
+ TEST_GCC="$(tc-getCC)" \
+ TEST_CXX="$(tc-getCXX)" \
+ TEST_GXX="$(tc-getCXX)"
+ cmake_src_test
}
diff --git a/sys-devel/mold/mold-2.4.0.ebuild b/sys-devel/mold/mold-2.4.0.ebuild
new file mode 100644
index 000000000000..52d41ed470e9
--- /dev/null
+++ b/sys-devel/mold/mold-2.4.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="A Modern Linker"
+HOMEPAGE="https://github.com/rui314/mold"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/rui314/mold.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
+fi
+
+# mold (MIT)
+# - xxhash (BSD-2)
+LICENSE="MIT BSD-2"
+SLOT="0"
+
+RDEPEND="
+ app-arch/zstd:=
+ >=dev-cpp/tbb-2021.7.0-r1:=
+ dev-libs/blake3:=
+ sys-libs/zlib
+ !kernel_Darwin? (
+ >=dev-libs/mimalloc-2:=
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.0-no-pch.patch
+)
+
+pkg_pretend() {
+ # Requires a c++20 compiler, see #831473
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then
+ die "${PN} needs at least gcc 10"
+ elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then
+ die "${PN} needs at least clang 12"
+ fi
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Needs unpackaged dwarfdump
+ rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die
+
+ # Heavy tests, need qemu
+ rm test/elf/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die
+ rm test/elf/lto-{archive,dso,gcc,llvm,version-script}.sh || die
+
+ # Sandbox sadness
+ rm test/elf/run.sh || die
+ sed -i 's|`pwd`/mold-wrapper.so|"& ${LD_PRELOAD}"|' \
+ test/elf/mold-wrapper{,2}.sh || die
+
+ # static-pie tests require glibc built with static-pie support
+ if ! has_version -d 'sys-libs/glibc[static-pie(+)]'; then
+ rm test/elf/{,ifunc-}static-pie.sh || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
+ -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -DMOLD_USE_SYSTEM_TBB=ON
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ dobin "${BUILD_DIR}"/${PN}
+
+ # https://bugs.gentoo.org/872773
+ insinto /usr/$(get_libdir)/mold
+ doins "${BUILD_DIR}"/${PN}-wrapper.so
+
+ dodoc docs/{design,execstack}.md
+ doman docs/${PN}.1
+
+ dosym ${PN} /usr/bin/ld.${PN}
+ dosym ${PN} /usr/bin/ld64.${PN}
+ dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld
+}
+
+src_test() {
+ export TEST_CC="$(tc-getCC)" \
+ TEST_GCC="$(tc-getCC)" \
+ TEST_CXX="$(tc-getCXX)" \
+ TEST_GXX="$(tc-getCXX)"
+ cmake_src_test
+}
diff --git a/sys-devel/mold/mold-1.2.1-r1.ebuild b/sys-devel/mold/mold-2.4.1.ebuild
index 87931221e192..ac067b811ef2 100644
--- a/sys-devel/mold/mold-1.2.1-r1.ebuild
+++ b/sys-devel/mold/mold-2.4.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit toolchain-funcs
+inherit cmake toolchain-funcs
DESCRIPTION="A Modern Linker"
HOMEPAGE="https://github.com/rui314/mold"
@@ -12,27 +12,25 @@ if [[ ${PV} == 9999 ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
fi
-LICENSE="AGPL-3"
+# mold (MIT)
+# - xxhash (BSD-2)
+LICENSE="MIT BSD-2"
SLOT="0"
-RDEPEND=">=dev-cpp/tbb-2021.4.0:=
+RDEPEND="
+ app-arch/zstd:=
+ >=dev-cpp/tbb-2021.7.0-r1:=
+ dev-libs/blake3:=
sys-libs/zlib
!kernel_Darwin? (
>=dev-libs/mimalloc-2:=
- dev-libs/openssl:=
- )"
-# As of 1.1, xxhash is now a header-only dep, but it's now bundled :(
-# TODO: restore SYSTEM_XXHASH upstream?
+ )
+"
DEPEND="${RDEPEND}"
-PATCHES=(
- # Bug #841575
- "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch
-)
-
pkg_pretend() {
# Requires a c++20 compiler, see #831473
if [[ ${MERGE_TYPE} != binary ]]; then
@@ -45,51 +43,57 @@ pkg_pretend() {
}
src_prepare() {
- default
+ cmake_src_prepare
# Needs unpackaged dwarfdump
rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die
# Heavy tests, need qemu
rm test/elf/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die
+ rm test/elf/lto-{archive,dso,gcc,llvm,version-script}.sh || die
# Sandbox sadness
rm test/elf/run.sh || die
- sed -i 's|$mold-wrapper.so|"& ${LD_PRELOAD}"|' \
+ sed -i 's|`pwd`/mold-wrapper.so|"& ${LD_PRELOAD}"|' \
test/elf/mold-wrapper{,2}.sh || die
# static-pie tests require glibc built with static-pie support
if ! has_version -d 'sys-libs/glibc[static-pie(+)]'; then
- rm test/elf/{hello,ifunc}-static-pie.sh || die
+ rm test/elf/{,ifunc-}static-pie.sh || die
fi
}
-src_compile() {
- tc-export CC CXX
-
- emake \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- STRIP="true" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
+ -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -DMOLD_USE_SYSTEM_TBB=ON
+ )
+ cmake_src_configure
}
-src_test() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- check
+src_install() {
+ dobin "${BUILD_DIR}"/${PN}
+
+ # https://bugs.gentoo.org/872773
+ insinto /usr/$(get_libdir)/mold
+ doins "${BUILD_DIR}"/${PN}-wrapper.so
+
+ dodoc docs/{design,execstack}.md
+ doman docs/${PN}.1
+
+ dosym ${PN} /usr/bin/ld.${PN}
+ dosym ${PN} /usr/bin/ld64.${PN}
+ dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld
}
-src_install() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="true" \
- install
+src_test() {
+ export TEST_CC="$(tc-getCC)" \
+ TEST_GCC="$(tc-getCC)" \
+ TEST_CXX="$(tc-getCXX)" \
+ TEST_GXX="$(tc-getCXX)"
+ cmake_src_test
}
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index 2a7faac5052d..ac067b811ef2 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit toolchain-funcs
+inherit cmake toolchain-funcs
DESCRIPTION="A Modern Linker"
HOMEPAGE="https://github.com/rui314/mold"
@@ -12,28 +12,25 @@ if [[ ${PV} == 9999 ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
fi
-LICENSE="AGPL-3"
+# mold (MIT)
+# - xxhash (BSD-2)
+LICENSE="MIT BSD-2"
SLOT="0"
-RDEPEND=">=dev-cpp/tbb-2021.4.0:=
+RDEPEND="
+ app-arch/zstd:=
+ >=dev-cpp/tbb-2021.7.0-r1:=
+ dev-libs/blake3:=
sys-libs/zlib
!kernel_Darwin? (
>=dev-libs/mimalloc-2:=
- dev-libs/openssl:=
- )"
-# As of 1.1, xxhash is now a header-only dep, but it's now bundled :(
-# TODO: restore SYSTEM_XXHASH upstream?
+ )
+"
DEPEND="${RDEPEND}"
-PATCHES=(
- # Bug #841575
- "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch
- "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch
-)
-
pkg_pretend() {
# Requires a c++20 compiler, see #831473
if [[ ${MERGE_TYPE} != binary ]]; then
@@ -46,7 +43,7 @@ pkg_pretend() {
}
src_prepare() {
- default
+ cmake_src_prepare
# Needs unpackaged dwarfdump
rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die
@@ -66,32 +63,37 @@ src_prepare() {
fi
}
-src_compile() {
- tc-export CC CXX
-
- emake \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- STRIP="true" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
+ -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -DMOLD_USE_SYSTEM_TBB=ON
+ )
+ cmake_src_configure
}
-src_test() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- check
+src_install() {
+ dobin "${BUILD_DIR}"/${PN}
+
+ # https://bugs.gentoo.org/872773
+ insinto /usr/$(get_libdir)/mold
+ doins "${BUILD_DIR}"/${PN}-wrapper.so
+
+ dodoc docs/{design,execstack}.md
+ doman docs/${PN}.1
+
+ dosym ${PN} /usr/bin/ld.${PN}
+ dosym ${PN} /usr/bin/ld64.${PN}
+ dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld
}
-src_install() {
- emake \
- SYSTEM_TBB=1 \
- SYSTEM_MIMALLOC=1 \
- DESTDIR="${D}" \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="true" \
- install
+src_test() {
+ export TEST_CC="$(tc-getCC)" \
+ TEST_GCC="$(tc-getCC)" \
+ TEST_CXX="$(tc-getCXX)" \
+ TEST_GXX="$(tc-getCXX)"
+ cmake_src_test
}
diff --git a/sys-devel/native-cctools/files/aix-2/ld b/sys-devel/native-cctools/files/aix-2/ld
deleted file mode 100644
index 8f9841ef32ee..000000000000
--- a/sys-devel/native-cctools/files/aix-2/ld
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /usr/bin/env /bin/ksh
-# Copyright 1999-2018 Gentoo Foundation; Distributed under the GPL v2
-
-# Upon '-soname' and similar flags, create a "shared library" on AIX being an
-# archive file containing an Import File and the shared object file, as in:
-# http://lists.gnu.org/archive/html/libtool/2011-01/msg00023.html
-# with updates in:
-# http://lists.gnu.org/archive/html/libtool/2011-02/msg00000.html
-#
-# This helper script is meant not depend on anything Gentoo specific.
-
-ld=/usr/ccs/bin/ld
-ar=/usr/ccs/bin/ar
-strip=/usr/ccs/bin/strip
-dump=/usr/sbin/dump
-awk=/usr/bin/awk
-rm=/usr/bin/rm
-mkdir=/usr/bin/mkdir
-mv=/usr/bin/mv
-ln=/usr/bin/ln
-
-oldargs=
-output=
-soname=
-newargs=
-OBJECT_MODE=${OBJECT_MODE:-32}
-
-while [[ $# -gt 0 ]]
-do
- arg=$1
- shift
- case ${arg} in
- -rpath=*)
- arg="-R${arg#-rpath=}"
- ;;
- esac
- oldargs="${oldargs} '${arg}'"
- case ${arg} in
- -o)
- newargs="${newargs} -o '$1'"
- output=$1
- oldargs="${oldargs} '$1'"
- shift
- ;;
- -bM:SRE)
- newargs="${newargs} '-G' '-bernotok'"
- ;;
- -soname=*)
- soname=${arg#-soname=}
- ;;
- -h*)
- soname=${arg#-h}
- ;;
- -soname|-h)
- soname=$1
- shift
- ;;
- -b32)
- newargs="${newargs} '${arg}'"
- OBJECT_MODE=32
- ;;
- -b64)
- newargs="${newargs} '${arg}'"
- OBJECT_MODE=64
- ;;
- *)
- newargs="${newargs} '${arg}'"
- ;;
- esac
-done
-
-if [[ -z ${output} || -z ${soname} ]]; then
- eval "exec ${ld} ${oldargs}"
- exit 1
-fi
-
-# Running ld against the orginal target file to retain
-# ld error message when there's a problem with it:
-eval "${ld} -o '${output}' ${newargs}" || exit 1
-
-workdir="${output}.$$"
-
-${rm} -rf "${workdir}" || exit 1
-trap "${rm} -rf '${workdir}'" 0
-
-case ${soname} in
-*\(*\))
- shro=${soname#*\(}
- shro=${shro%\)}
- shri=${shro%.*}.imp
- ;;
-*\[*\])
- shro=${soname#*\[}
- shro=${shro%\]}
- shri=${shro%.*}.imp
- ;;
-none) # loadable only module, not linkable: no import file
- shro='shr.o'
- soname="${output##*/}(${shro})"
- shri=
- ;;
-auto)
- shro='shr.o'
- soname=${output##*/}
- if [[ ${soname} == lib*.so* ]]; then
- # linkable library: need import file
- shri=${shro%.*}.imp
- else
- # loadable only module, not linkable: no import file
- shri=
- fi
- soname="${soname}(${shro})"
- ;;
-*)
- shro='shr.o'
- shri=${shro%.*}.imp
- soname="${soname}(${shro})"
- ;;
-esac
-
-export OBJECT_MODE
-
-${mkdir} "${workdir}" || exit 1
-${strip} -e "${output}" || exit 1
-if [[ -n ${shri} ]]; then
- ${dump} -Tv "${output}" > "${workdir}"/syms || exit 1
- ${awk} '
- BEGIN {
- print "#! '"${soname}"'"
- print "# '"${OBJECT_MODE}"'"
- }
- {
- if ($4 == "EXP" || $4 == "ImpExp") {
- print $8
- } else
- if ($4 == "wEXP") {
- print $8" weak"
- }
- }' <"${workdir}"/syms > "${workdir}"/${shri} || exit 1
-fi
-${mv} "${output}" "${workdir}/${shro}" || exit 1
-${ar} rc "${output}" ${shri:+"${workdir}/${shri}"} "${workdir}/${shro}" || exit 1
-exit 0
diff --git a/sys-devel/native-cctools/files/aix-2/mkexpfile b/sys-devel/native-cctools/files/aix-2/mkexpfile
deleted file mode 100644
index 4e79e4647b06..000000000000
--- a/sys-devel/native-cctools/files/aix-2/mkexpfile
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/sh
-
-nm="${0%mkexpfile}nm"
-showwith=
-expfile="ld.aix.exports.$$"
-srcobjs=
-
-# /bin/sort does not allow TMPDIR to be longer than 85 characters
-test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR
-
-while test $# -gt 0
-do
- arg=$1
- shift
-
- case ${arg} in
- --) for arg in "$@"
- do
- srcobjs="${srcobjs} '${arg}'"
- done
- break
- ;;
- --show-with=*) showwith="${arg#--show-with=}" ;;
- -o) expfile="${1}"; shift ;;
- -o*) expfile="${arg#-o}"; ;;
- *) srcobjs="${srcobjs} '${arg}'" ;;
- esac
-done
-
-/bin/rm -f "${expfile}" || exit 1
-
-if ! type "${nm}" >/dev/null 2>&1
-then
- case ${nm} in
- *-nm) nm=${nm##*/} ;; # use "powerpc-ibm-aix7.1.0.0-nm" from PATH
- */nm|nm) nm=/usr/ccs/bin/nm ;; # native anyway
- esac
- type "${nm}" >/dev/null || exit 1 # let 'type' yell when necessary
-fi
-
-if "${nm}" -V 2>&1 | /bin/grep 'GNU' >/dev/null
-then
- eval "${nm}" -Bpg ${srcobjs} |
- /bin/awk '{
- if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W")) && (substr($3,1,1) != ".")) {
- if ($2 == "W") {
- print $3 " weak"
- } else {
- print $3
- }
- }
- }' |
- /bin/sort -u > "${expfile}" || exit 1
-else
- eval "${nm}" -PCpgl ${srcobjs} |
- /bin/awk '{
- if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W") || ($2 == "V") || ($2 == "Z")) && (substr($1,1,1) != ".")) {
- if (($2 == "W") || ($2 == "V") || ($2 == "Z")) {
- print $1 " weak"
- } else {
- print $1
- }
- }
- }' |
- /bin/sort -u > "${expfile}" || exit 1
-fi
-
-echo "${showwith}${expfile}"
-
-exit 0
diff --git a/sys-devel/native-cctools/files/aix-2/nm b/sys-devel/native-cctools/files/aix-2/nm
deleted file mode 100644
index 5ba1d650d23a..000000000000
--- a/sys-devel/native-cctools/files/aix-2/nm
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-
-# /usr/bin/sort (used by nm) cannot work with TMPDIR longer than 85 characters.
-test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR
-
-exec /usr/ccs/bin/nm ${1+"$@"}
diff --git a/sys-devel/native-cctools/native-cctools-4.ebuild b/sys-devel/native-cctools/native-cctools-4.ebuild
deleted file mode 100644
index f961a43cc039..000000000000
--- a/sys-devel/native-cctools/native-cctools-4.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit eutils
-
-DESCRIPTION="Host OS native assembler as and static linker ld"
-HOMEPAGE="https://prefix.gentoo.org/"
-SRC_URI=""
-
-LICENSE="GPL-2" # actually, we don't know, the wrapper is
-SLOT="0"
-
-AIX_V='aix-2'
-
-KEYWORDS="~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
-
-IUSE=""
-
-DEPEND="sys-devel/binutils-config"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- mkdir -p "${S}"
-}
-
-src_install() {
- LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
- BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}
-
- keepdir ${LIBPATH} || die
- dodir ${BINPATH}
-
- # allow for future hosts with different paths
- nativepath=""
- wrappers=()
- case ${CHOST} in
- *-solaris*)
- nativepath=/usr/sfw/bin
- ;;
- *-aix*)
- nativepath=/usr/ccs/bin
- wrappers=("${wrappers[@]}" "ld=${FILESDIR}/${AIX_V}/ld")
- wrappers=("${wrappers[@]}" "nm=${FILESDIR}/${AIX_V}/nm")
- wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/${AIX_V}/mkexpfile")
- ;;
- *-apple-darwin*|*-netbsd*|*-openbsd*)
- nativepath=/usr/bin
- ;;
- *-interix*)
- nativepath=/opt/gcc.3.3/bin
- ;;
- *)
- die "Don't know where the native linker for your platform is"
- ;;
- esac
-
- what="addr2line as ar c++filt gprof ld nm objcopy objdump \
- ranlib readelf elfdump size strings strip"
- # Darwin things
- what="${what} install_name_tool ld64 libtool lipo nmedit \
- otool otool64 pagestuff redo_prebinding segedit"
-
- # copy from the host os
- cd "${ED}${BINPATH}"
- for b in ${what} ; do
- if [[ ${CHOST} == *-darwin* && ${b} == libtool ]] ; then
- echo "linking darwin libtool ${nativepath}/${b}"
- ln -s "${nativepath}/${b}" "${b}"
- elif [[ -x ${nativepath}/g${b} ]] ; then
- einfo "linking ${nativepath}/g${b}"
- ln -s "${nativepath}/g${b}" "${b}"
- elif [[ -x ${nativepath}/${b} ]] ; then
- einfo "linking ${nativepath}/${b}"
- ln -s "${nativepath}/${b}" "${b}"
- else
- ewarn "skipping ${b} (not in ${nativepath})"
- fi
- done
-
- # post fix for Darwin's ranlib (doesn't like it when its called other than
- # that, as libtool and ranlib are one tool)
- if [[ ${CHOST} == *-darwin* ]] ; then
- rm -f ranlib
- cat <<-EOF > ranlib
- #!/usr/bin/env bash
- exec ${nativepath}/ranlib "\$@"
- EOF
- chmod 755 ranlib
- fi
-
- exeinto ${BINPATH}
- local wrapper source target
- for wrapper in "${wrappers[@]}" ; do
- source=${wrapper#*=}
- target=${wrapper%%=*}
- rm -f "${target}"
- newexe "${source}" "${target}" || die
- done
- # Generate an env.d entry for this binutils
- insinto /etc/env.d/binutils
- cat <<-EOF > "${T}"/env.d
- TARGET="${CHOST}"
- VER="native-${PV}"
- LIBPATH="${EPREFIX}/${LIBPATH}"
- FAKE_TARGETS="${CHOST}"
- EOF
- newins "${T}"/env.d ${CHOST}-native-${PV}
-}
-
-pkg_postinst() {
- binutils-config ${CHOST}-native-${PV}
-}
diff --git a/sys-devel/native-cctools/native-cctools-5.ebuild b/sys-devel/native-cctools/native-cctools-5-r1.ebuild
index 821c9fafacdf..6ebf381895db 100644
--- a/sys-devel/native-cctools/native-cctools-5.ebuild
+++ b/sys-devel/native-cctools/native-cctools-5-r1.ebuild
@@ -1,9 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
-
-inherit eutils
+EAPI="8"
DESCRIPTION="Host OS native assembler as and static linker ld"
HOMEPAGE="https://prefix.gentoo.org/"
@@ -12,9 +10,7 @@ SRC_URI=""
LICENSE="GPL-2" # actually, we don't know, the wrapper is
SLOT="0"
-AIX_V='aix-2'
-
-KEYWORDS="~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE=""
@@ -39,18 +35,9 @@ src_install() {
*-solaris*)
nativepath=/usr/sfw/bin
;;
- *-aix*)
- nativepath=/usr/ccs/bin
- wrappers=("${wrappers[@]}" "ld=${FILESDIR}/${AIX_V}/ld")
- wrappers=("${wrappers[@]}" "nm=${FILESDIR}/${AIX_V}/nm")
- wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/${AIX_V}/mkexpfile")
- ;;
- *-apple-darwin*|*-netbsd*|*-openbsd*)
+ *-apple-darwin*)
nativepath=/usr/bin
;;
- *-interix*)
- nativepath=/opt/gcc.3.3/bin
- ;;
*)
die "Don't know where the native linker for your platform is"
;;
diff --git a/sys-devel/nvptx-tools/Manifest b/sys-devel/nvptx-tools/Manifest
new file mode 100644
index 000000000000..59a28d80175c
--- /dev/null
+++ b/sys-devel/nvptx-tools/Manifest
@@ -0,0 +1 @@
+DIST nvptx-tools-0_pre20230122.tar.gz 789116 BLAKE2B f05b922827c0215a2484c4f91f3424ca866bb91435a3d60559fc9f1f63c06559377f1c8071c9e8e5607ec4dbff1c22d095385ac86d35f43ade29d9df6699f3ff SHA512 9d3bceef2ef7942ea6ec8b6c6b1b9144f0a020bfabc2583ba4ef73db8ef299ffadbc6dbe27748c728bd16aee0ecd6f0fbe1f8bb064bde986bb4e0475b2494870
diff --git a/sys-devel/autoconf-archive/metadata.xml b/sys-devel/nvptx-tools/metadata.xml
index de9d78424186..26ea6434862c 100644
--- a/sys-devel/autoconf-archive/metadata.xml
+++ b/sys-devel/nvptx-tools/metadata.xml
@@ -2,8 +2,10 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
</maintainer>
- <stabilize-allarches/>
+ <upstream>
+ <remote-id type="github">SourceryTools/nvptx-tools</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild b/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild
new file mode 100644
index 000000000000..a73728161032
--- /dev/null
+++ b/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Collection of tools for use with nvptx-none GCC toolchains"
+HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/SourceryTools/nvptx-tools"
+ inherit git-r3
+else
+ MY_COMMIT="93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b"
+ SRC_URI="https://github.com/SourceryTools/nvptx-tools/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-${MY_COMMIT}
+
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+BDEPEND="
+ test? (
+ dev-python/lit
+ dev-util/dejagnu
+ )
+"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+ # Reject newlib-on-glibc type installs
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
+ case ${CHOST} in
+ *-newlib|nvptx-*) ;;
+ *) die "Use sys-devel/crossdev to build a nvptx(-none) toolchain" ;;
+ esac
+ fi
+}
diff --git a/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild
new file mode 100644
index 000000000000..a73728161032
--- /dev/null
+++ b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Collection of tools for use with nvptx-none GCC toolchains"
+HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/SourceryTools/nvptx-tools"
+ inherit git-r3
+else
+ MY_COMMIT="93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b"
+ SRC_URI="https://github.com/SourceryTools/nvptx-tools/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-${MY_COMMIT}
+
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+BDEPEND="
+ test? (
+ dev-python/lit
+ dev-util/dejagnu
+ )
+"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+ # Reject newlib-on-glibc type installs
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
+ case ${CHOST} in
+ *-newlib|nvptx-*) ;;
+ *) die "Use sys-devel/crossdev to build a nvptx(-none) toolchain" ;;
+ esac
+ fi
+}
diff --git a/sys-devel/parity/Manifest b/sys-devel/parity/Manifest
deleted file mode 100644
index c3d3a17e4c48..000000000000
--- a/sys-devel/parity/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST parity-2.0.1.tar.bz2 371662 BLAKE2B c0fca272665bbe346d5d5ca18e06c65209df61454310811b939239f8ba25ec7a08ad2f864fb43780329dc1f0120afdb6ea4ee2b4b42d2888860358aa1dc176f4 SHA512 3c96c87b87f40cb7affd6ee9a87c8e7cf628aedb44a2d3d89370a5b5e32a43cb15a897ae27425e9d6a00581ffd50a70c7a7481f1ca259eddd1e6f2310b554eb9
diff --git a/sys-devel/parity/metadata.xml b/sys-devel/parity/metadata.xml
deleted file mode 100644
index 2dc9f71e7299..000000000000
--- a/sys-devel/parity/metadata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">ssi-schaefer/parity</remote-id>
- </upstream>
- <use>
- <flag name="vc8_0">Enable support for Visual Studio 2005</flag>
- <flag name="vc9_0">Enable support for Visual Studio 2008</flag>
- <flag name="vc10_0">Enable support for Visual Studio 2010</flag>
- <flag name="vc11_0">Enable support for Visual Studio 2012</flag>
- <flag name="vc12_0">Enable support for Visual Studio 2013</flag>
- <flag name="vc14_0">Enable support for Visual Studio 2015</flag>
- <flag name="vc15">Enable support for Visual Studio 2017</flag>
- <flag name="vc16">Enable support for Visual Studio 2019</flag>
- <flag name="vcx64">Enable support for 64bit Visual Studio compilers</flag>
- <flag name="vcx86">Enable support for 32bit Visual Studio compilers</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-devel/parity/parity-2.0.1.ebuild b/sys-devel/parity/parity-2.0.1.ebuild
deleted file mode 100644
index 3de370518ab4..000000000000
--- a/sys-devel/parity/parity-2.0.1.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == 9999 ]]; then
- inherit autotools git-r3
- EGIT_REPO_URI="git@github.com:ssi-schaefer/parity.git https://github.com/ssi-schaefer/parity.git"
- BDEPEND="dev-util/confix"
-else
- SRC_URI="https://github.com/ssi-schaefer/${PN}/releases/download/${PV}/${P}.tar.bz2"
- KEYWORDS="~x64-cygwin"
-fi
-DESCRIPTION="A POSIX to native Win32 Cross-Compiler Tool (requires Visual Studio)"
-HOMEPAGE="https://github.com/ssi-schaefer/parity"
-
-parity-vcarchs() { echo x64=x86_64 x86=i686 ; }
-parity-vcvers-legacy() { echo 8_0 9_0 ; }
-parity-vcvers-current() { echo 10_0 11_0 12_0 14_0 15 16 ; }
-parity-vcvers() {
- parity-vcvers-legacy
- parity-vcvers-current
-}
-
-LICENSE="LGPL-3"
-SLOT="0"
-IUSE="$(
- for a in $(parity-vcarchs); do echo "+vc${a%=*}"; done
- for v in $(parity-vcvers-legacy); do echo "vc${v}"; done
- for v in $(parity-vcvers-current); do echo "+vc${v}"; done
-)"
-
-if [[ ${PV} == 9999 ]]; then
- src_prepare() {
- default
- confix --output || die
- eautoreconf
- }
-fi
-
-parity-enabled-vcarchs() {
- local enabled= a
- for a in $(parity-vcarchs) ; do
- if use vc${a%=*} ; then
- enabled+=",${a#*=}"
- fi
- done
- echo ${enabled#,}
-}
-
-parity-enabled-vcvers() {
- local enabled= v
- for v in $(parity-vcvers) ; do
- if use vc${v} ; then
- enabled+=",${v/_/.}"
- fi
- done
- echo ${enabled#,}
-}
-
-src_configure() {
- local myconf=(
- --enable-msvc-archs="$(parity-enabled-vcarchs)"
- --enable-msvc-versions="$(parity-enabled-vcvers)"
- --disable-default-msvc-version
- )
- econf "${myconf[@]}"
-}
-
-pkg_postinst() {
- if [[ -n ${ROOT} ]] ; then
- einfo "To enable all available MSVC versions, on the target machine please run:"
- einfo " '${EPREFIX}/usr/bin/parity-setup' --enable-all"
- else
- "${EPREFIX}"/usr/bin/parity-setup --enable-all
- fi
-}
diff --git a/sys-devel/patch/patch-2.7.6-r4.ebuild b/sys-devel/patch/patch-2.7.6-r4.ebuild
index 25e164eeee97..0ea78585b038 100644
--- a/sys-devel/patch/patch-2.7.6-r4.ebuild
+++ b/sys-devel/patch/patch-2.7.6-r4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/patch.asc
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/patch.asc
inherit flag-o-matic verify-sig
DESCRIPTION="Utility to apply diffs to files"
@@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static test xattr"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/patch/patch-2.7.6-r5.ebuild b/sys-devel/patch/patch-2.7.6-r5.ebuild
new file mode 100644
index 000000000000..e1dfc88fa933
--- /dev/null
+++ b/sys-devel/patch/patch-2.7.6-r5.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/patch.asc
+inherit flag-o-matic verify-sig
+
+DESCRIPTION="Utility to apply diffs to files"
+HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
+SRC_URI="mirror://gnu/patch/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="static test xattr"
+RESTRICT="!test? ( test )"
+
+RDEPEND="xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( sys-apps/ed )
+ verify-sig? ( sec-keys/openpgp-keys-patch )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-test-suite.patch
+ "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch
+ "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch
+ "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch
+ "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch
+ "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch
+)
+
+src_configure() {
+ use static && append-ldflags -static
+
+ local myeconfargs=(
+ $(use_enable xattr)
+ # rename to gpatch for better BSD compatibility
+ --program-prefix=g
+ )
+ # Do not let $ED mess up the search for `ed` 470210.
+ ac_cv_path_ED=$(type -P ed) \
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ # symlink to the standard name
+ dosym gpatch /usr/bin/patch
+ dosym gpatch.1 /usr/share/man/man1/patch.1
+}
diff --git a/sys-devel/pmake/Manifest b/sys-devel/pmake/Manifest
deleted file mode 100644
index 149a5aafe345..000000000000
--- a/sys-devel/pmake/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST pmake_1.111-3.3.debian.tar.gz 31648 BLAKE2B 31aca433bbeac4275d4c2af0cfd33ef81b0086b0dec107edfc1fba55b15480367ebf62abccd6e2e48f0c7ccc25c59f0b07eed7ac950a5037b73c267b066a9638 SHA512 b22a1d9e371712732f196d91ac3eb9239fa98ee8ee05754576e7a5878cab88976cb10bb6be90706df5ac738373f519468403c23f6a3ff3860a2968b3222a66ed
-DIST pmake_1.111.orig.tar.gz 264383 BLAKE2B 54dd510251441b54c9f5d7f6061109b0222191b3acdded1394b51b72b87bbd4255edd80fab46976d92c58929693b6809a9f2c4f001cab8c9cdaabfac9f3adac9 SHA512 ad48708ea014d6a38ad36303504c52992b51a1e815564f1710849d859b1fc3cd58c4a1a71f54ec902c9b69112e9cd1e1a64282ff738439cdb209a4f75c364c22
diff --git a/sys-devel/pmake/files/pmake-1.111.1-ldflags.patch b/sys-devel/pmake/files/pmake-1.111.1-ldflags.patch
deleted file mode 100644
index d6047d48994b..000000000000
--- a/sys-devel/pmake/files/pmake-1.111.1-ldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: pmake/Makefile.boot
-===================================================================
---- pmake.orig/Makefile.boot
-+++ pmake/Makefile.boot
-@@ -36,7 +36,7 @@ LIBOBJ= lst.lib/lstAppend.o lst.lib/lstA
-
- bmake: ${OBJ} ${LIBOBJ}
- # @echo 'make of make and make.0 started.'
-- ${CC} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS}
-+ ${CC} ${LDFLAGS} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS}
- @ls -l $@
- # nroff -h -man make.1 > make.0
- # @echo 'make of make and make.0 completed.'
diff --git a/sys-devel/pmake/files/pmake-1.98-skipdots.patch b/sys-devel/pmake/files/pmake-1.98-skipdots.patch
deleted file mode 100644
index 6783a9799919..000000000000
--- a/sys-devel/pmake/files/pmake-1.98-skipdots.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN pmake-2.0.orig/dir.c pmake-2.0/dir.c
---- pmake-2.0.orig/dir.c 2005-02-08 09:26:28.932978574 -0500
-+++ pmake-2.0/dir.c 2005-02-08 09:36:18.208704201 -0500
-@@ -1528,6 +1528,8 @@
- Hash_InitTable (&p->files, -1);
-
- while ((dp = readdir (d)) != (struct dirent *) NULL) {
-+ if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
-+ continue;
- #if defined(sun) && defined(d_ino) /* d_ino is a sunos4 #define for d_fileno */
- /*
- * The sun directory library doesn't check for a 0 inode
diff --git a/sys-devel/pmake/metadata.xml b/sys-devel/pmake/metadata.xml
deleted file mode 100644
index 85e4ed814fa2..000000000000
--- a/sys-devel/pmake/metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-</pkgmetadata>
diff --git a/sys-devel/pmake/pmake-1.111.3.3.ebuild b/sys-devel/pmake/pmake-1.111.3.3.ebuild
deleted file mode 100644
index 53db11c875df..000000000000
--- a/sys-devel/pmake/pmake-1.111.3.3.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs linux-info
-
-MY_P="${PN}-$(ver_cut 1-2)"
-DEBIAN_SOURCE="${PN}_$(ver_cut 1-2).orig.tar.gz"
-DEBIAN_PATCH="${PN}_$(ver_rs 2 '-').debian.tar.gz"
-
-DESCRIPTION="BSD build tool to create programs in parallel. Debian's version of NetBSD's make"
-HOMEPAGE="http://www.netbsd.org/"
-SRC_URI="
- mirror://debian/pool/main/p/pmake/${DEBIAN_SOURCE}
- mirror://debian/pool/main/p/pmake/${DEBIAN_PATCH}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-
-S="${WORKDIR}/${PN}"
-
-PATCHES=(
- "${WORKDIR}"/debian/patches
-
- # pmake makes the assumption that . and .. are the first two
- # entries in a directory, which doesn't always appear to be the
- # case on ext3... (05 Apr 2004 agriffis)
- "${FILESDIR}"/${PN}-1.98-skipdots.patch
-
- # Don't ignore ldflags
- "${FILESDIR}"/${PN}-1.111.1-ldflags.patch
-)
-
-src_compile() {
- # The following CFLAGS are almost directly from Red Hat 8.0 and
- # debian/rules, so assume it's okay to void out the __COPYRIGHT
- # and __RCSID. I've checked the source and don't see the point,
- # but whatever... (07 Feb 2004 agriffis)
- CFLAGS="${CFLAGS} -Wall -Wno-unused -D_GNU_SOURCE \
- -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_SETENV \
- -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -I. \
- -DMACHINE=\\\"gentoo\\\" -DMACHINE_ARCH=\\\"$(tc-arch-kernel)\\\" \
- -D_PATH_DEFSHELLDIR=\\\"${EPREFIX}/bin\\\" \
- -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk\\\" \
- -DHAVE_VSNPRINTF"
- if [[ "${USERLAND}" == "GNU" ]]; then
- CFLAGS="${CFLAGS} -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk/${PN}\\\""
- fi
-
- emake -f Makefile.boot \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}"
-}
-
-src_install() {
- # Don't install these on BSD, else they conflict
- if [[ ${USERLAND} == GNU ]]; then
- insinto /usr/share/mk/${PN}
- doins -r mk/.
- fi
-
- newbin bmake pmake
- dobin mkdep
-
- doman mkdep.1
- newman make.1 pmake.1
-
- dodoc PSD.doc/tutorial.ms
-
- if [[ ${USERLAND} == BSD ]]; then
- dosym pmake /usr/bin/make
- dosym pmake.1.gz /usr/share/man/man1/make.1.gz
- fi
-}
diff --git a/sys-devel/qbe/Manifest b/sys-devel/qbe/Manifest
new file mode 100644
index 000000000000..739ffea8e281
--- /dev/null
+++ b/sys-devel/qbe/Manifest
@@ -0,0 +1,5 @@
+DIST qbe-1.1.tar.xz 244740 BLAKE2B fdadca56ff5a6b56f30e0a99724908e356b3c1b545e5b35a27080a92ca0d417ff53deb8f4c0a31b9289acab58fb79568384669004b0275cddd83afb198a7a5aa SHA512 1e5d7d1df3d73849dbf19dd1d84c9bba63a5041622823a5a239496032f9d82bd1640dd2bbd03e28c8a180b8e66a1fe10deb940b5d8fde996bf593f7e8d943e8b
+DIST qbe-1.2.tar.xz 246364 BLAKE2B b4cf4562caf6db191f1b2bfd078e2dfebfbe526a454552691ff78fba7b2d6c27b09df8ea5c795b49b9509a73b6981c17684d6e887999878f6e5bc7923c5047ef SHA512 b3ffd172e95346b3bfae1d2aff4c22a32af8bd4443d073f6fbb711f41db01f072ca7a8108901508cd4a8366567dab46510e0438716d35548591fdf37cee49971
+DIST qbe-dbgfile.patch 3813 BLAKE2B fbe0dd9c4fab8399054c091bb50fd8002c43108c53f2177ea000784f0707e9fb4fe432d637d03ccd87247f0ab1d232d5ba81e3a3e61347b7e1f31bb61b701c62 SHA512 41694848c95341f16618cd8f8d3222415e551b36b3428467e7ad066e257bc235dedbae4a1da4a6ae9034d102e359ecd69f51c580ad3f613e0e427df1882d1c65
+DIST qbe-info-tracking.patch 6305 BLAKE2B 03cb80de722e642812558fe7fe93eb3683f0fb54a2d78a1ceacf68016c779dee47f314651f0a6f1690d8b3ddc3089d41a894caafa83ec408d46b9375d24c9e3d SHA512 00d37894fca754f23024a8d64591e22f74b8f50022de77c1b25b474a68d204f0d89f2f3dbbfb822c5293ebccdadd923516c28b1e3c358c07de7a284fa0ef722f
+DIST qbe-parseline-tweaks.patch 1519 BLAKE2B 88940d42dbed988a5ecff68f18a1fab9c5024d5fb4d8219a1984f676808f9b5dbc4c4a729bf419358e0be71244aa4b97e23b3575aa4458a5c4059f7f1cd2151e SHA512 8701657032f26f8f7fe0de768573c5f111f80e5cc9d62fb4bfcf895b421532f039f08234bca8b4156b097f80893483fa8323cde3a8f3c8a5c729412328097bb2
diff --git a/sys-devel/qconf/metadata.xml b/sys-devel/qbe/metadata.xml
index ad30d60d9ef0..fc3c6c671309 100644
--- a/sys-devel/qconf/metadata.xml
+++ b/sys-devel/qbe/metadata.xml
@@ -1,15 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
- <email>rion4ik@gmail.com</email>
- <name>Sergey Ilinykh</name>
+ <email>contact@hacktivis.me</email>
+ <name>Haelwenn (lanodan) Monnier</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
- <upstream>
- <remote-id type="github">psi-plus/qconf</remote-id>
- </upstream>
</pkgmetadata>
diff --git a/sys-devel/qbe/qbe-1.1-r1.ebuild b/sys-devel/qbe/qbe-1.1-r1.ebuild
new file mode 100644
index 000000000000..375946b25243
--- /dev/null
+++ b/sys-devel/qbe/qbe-1.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="git://c9x.me/qbe.git"
+ inherit git-r3
+else
+ SRC_URI="
+ https://c9x.me/compile/release/${P}.tar.xz
+ https://c9x.me/git/qbe.git/patch/?id=0d929287d77ccc3fb52ca8bd072678b5ae2c81c8 -> qbe-info-tracking.patch
+ https://c9x.me/git/qbe.git/patch/?id=baf11b7175c468d3d9408d332b1c0d529a4957ee -> qbe-parseline-tweaks.patch
+ https://c9x.me/git/qbe.git/patch/?id=36946a5142c40b733d25ea5ca469f7949ee03439 -> qbe-dbgfile.patch
+ "
+
+ # 64-bit RISC-V only
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+DESCRIPTION="Pure-C embeddable compiler backend"
+HOMEPAGE="https://c9x.me/compile/"
+
+LICENSE="MIT"
+SLOT="0"
+
+DOCS=( README doc )
+
+PATCHES=(
+ "${DISTDIR}/qbe-info-tracking.patch"
+ "${DISTDIR}/qbe-parseline-tweaks.patch"
+ "${DISTDIR}/qbe-dbgfile.patch"
+)
+
+src_compile() {
+ tc-export CC
+
+ emake CFLAGS="-std=c99 ${CPPFLAGS} ${CFLAGS}"
+}
+
+src_install() {
+ einstalldocs
+ emake install DESTDIR="${ED}" PREFIX=/usr
+}
diff --git a/sys-devel/qbe/qbe-1.2.ebuild b/sys-devel/qbe/qbe-1.2.ebuild
new file mode 100644
index 000000000000..baaab97b66c1
--- /dev/null
+++ b/sys-devel/qbe/qbe-1.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="git://c9x.me/qbe.git"
+ inherit git-r3
+else
+ SRC_URI="https://c9x.me/compile/release/${P}.tar.xz"
+
+ # 64-bit RISC-V only
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+DESCRIPTION="Pure-C embeddable compiler backend"
+HOMEPAGE="https://c9x.me/compile/"
+
+LICENSE="MIT"
+SLOT="0"
+
+DOCS=( README doc )
+
+src_prepare() {
+ default
+
+ sed -i 's;^CC *=.*;CC ?= cc;' Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+
+ emake CFLAGS="-std=c99 ${CPPFLAGS} ${CFLAGS}"
+}
+
+src_install() {
+ einstalldocs
+ emake install DESTDIR="${ED}" PREFIX=/usr
+}
diff --git a/sys-devel/qbe/qbe-9999.ebuild b/sys-devel/qbe/qbe-9999.ebuild
new file mode 100644
index 000000000000..baaab97b66c1
--- /dev/null
+++ b/sys-devel/qbe/qbe-9999.ebuild
@@ -0,0 +1,41 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="git://c9x.me/qbe.git"
+ inherit git-r3
+else
+ SRC_URI="https://c9x.me/compile/release/${P}.tar.xz"
+
+ # 64-bit RISC-V only
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+DESCRIPTION="Pure-C embeddable compiler backend"
+HOMEPAGE="https://c9x.me/compile/"
+
+LICENSE="MIT"
+SLOT="0"
+
+DOCS=( README doc )
+
+src_prepare() {
+ default
+
+ sed -i 's;^CC *=.*;CC ?= cc;' Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+
+ emake CFLAGS="-std=c99 ${CPPFLAGS} ${CFLAGS}"
+}
+
+src_install() {
+ einstalldocs
+ emake install DESTDIR="${ED}" PREFIX=/usr
+}
diff --git a/sys-devel/qconf/Manifest b/sys-devel/qconf/Manifest
deleted file mode 100644
index 87fc52a38213..000000000000
--- a/sys-devel/qconf/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST qconf-2.5.tar.gz 100704 BLAKE2B 01dcca053e020cfc76e8595927dd3cedb6c82ade24381c95935c87994037ca5129f5e9e0ec58dd0e0fc6815b1500249b767367fbf7a16549459f814bb1591368 SHA512 4ce032eb5b9ba2d584807b3283b0dd5cf973c2fdd6792dfec13c54bb7c639d23eeaab03eb52f1a395113d973d2b01d87bf713d717e691641203865b934c7da5e
diff --git a/sys-devel/qconf/qconf-2.5.ebuild b/sys-devel/qconf/qconf-2.5.ebuild
deleted file mode 100644
index ca303a7e0854..000000000000
--- a/sys-devel/qconf/qconf-2.5.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit qmake-utils
-
-DESCRIPTION="./configure like generator for qmake-based projects"
-HOMEPAGE="https://github.com/psi-im/qconf"
-SRC_URI="https://github.com/psi-im/qconf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~hppa ppc ppc64 ~sparc x86"
-IUSE=""
-
-DEPEND="
- dev-qt/qtcore:5
- dev-qt/qtxml:5
-"
-RDEPEND="${DEPEND}"
-
-src_configure() {
- # not autotools configure, so don't use econf
- ./configure \
- --prefix="${EPREFIX}"/usr \
- --qtdir="$(qt5_get_libdir)/qt5" \
- --extraconf=QMAKE_STRIP= \
- --verbose || die "configure failed"
-
- # just to set all the Gentoo toolchain flags
- eqmake5
-}
-
-src_install() {
- emake INSTALL_ROOT="${D}" install
- einstalldocs
- dodoc -r examples
-}
diff --git a/sys-devel/reflex/Manifest b/sys-devel/reflex/Manifest
new file mode 100644
index 000000000000..62eca417a802
--- /dev/null
+++ b/sys-devel/reflex/Manifest
@@ -0,0 +1,2 @@
+DIST reflex-20230523.tgz 480999 BLAKE2B a7306367bdf5bfb542a44f29c382a5d889a176059d95539916ab3132de06401edfd0c6a476ec66f433d56398039524d79c6879e1f24b4e813ebbba98ea434ed3 SHA512 9704b6dc3327bc017175bef21f34f53ff6614a76692deacb4af99c29bd4330e5fb7f71af6497d233acceab148bc8a7911d41d3ca224110812e5883c90cc801f2
+DIST reflex-20230523.tgz.asc 729 BLAKE2B 0249d1bc4f6d6395be0f51f90e1f9834bc63cd7e4b5565e71ff0502746f45ea04b611c8db70d62513dfe95d492512cf1935f4e70d582c960f38d11e06853f54f SHA512 48e2f84c8932a038366159ea6a26eac73510bb69b6bc3c5027195682ade4ef3a33ade082b41e4d08af0c23c6692abc8ee46b261796d72709aa9568070c16c20b
diff --git a/sys-devel/reflex/metadata.xml b/sys-devel/reflex/metadata.xml
new file mode 100644
index 000000000000..f885e82281a5
--- /dev/null
+++ b/sys-devel/reflex/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
+ </maintainer>
+ <upstream>
+ <changelog>https://invisible-island.net/reflex/NEWS.html</changelog>
+ <remote-id type="github">ThomasDickey/reflex-snapshots</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-devel/reflex/reflex-20230523.ebuild b/sys-devel/reflex/reflex-20230523.ebuild
new file mode 100644
index 000000000000..08eac7186712
--- /dev/null
+++ b/sys-devel/reflex/reflex-20230523.ebuild
@@ -0,0 +1,22 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc
+inherit verify-sig
+
+DESCRIPTION="This is a variant of the flex fast lexical scanner"
+HOMEPAGE="https://invisible-island.net/reflex/"
+SRC_URI="https://invisible-island.net/archives/${PN}/${P}.tgz"
+SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${P}.tgz.asc )"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86"
+
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
+
+src_configure() {
+ econf --with-manpage-format=formatted
+}
diff --git a/sys-devel/remake/Manifest b/sys-devel/remake/Manifest
deleted file mode 100644
index b96c6a20d2ab..000000000000
--- a/sys-devel/remake/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST remake-4.3+dbg-1.5.tar.gz 2546056 BLAKE2B c5c1b254d0533e0d9787d408f79e8aba93cab5185de76519dabef7ddca5c9d2021671099f9ff80df345732552f859ce31d1131b89cd56fb185bae4cee676b412 SHA512 90aa9674ed5d88b72fda5a99a103d0b1a643d10b18c1de1186478b026f6b4da73628bff75a180df880157b5cbfff1bfd782f4ee81880e0635d79113fcc0f7497
diff --git a/sys-devel/remake/files/remake-4.3.1.1.5-fno-common.patch b/sys-devel/remake/files/remake-4.3.1.1.5-fno-common.patch
deleted file mode 100644
index 6c8650472e4e..000000000000
--- a/sys-devel/remake/files/remake-4.3.1.1.5-fno-common.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-Adapted version of https://github.com/rocky/remake/commit/08113a28b9be25cf157ace5d63c2d36d7dbefc04
---- a/src/debugger/file2line.c
-+++ b/src/debugger/file2line.c
-@@ -26,6 +26,8 @@ Boston, MA 02111-1307, USA. */
- #include "../src/rule.h"
- #include "./file2line.h"
-
-+struct hash_table file2lines;
-+
- unsigned long
- file2lines_hash_1 (const void *key)
- {
---- a/src/debugger/file2line.h
-+++ b/src/debugger/file2line.h
-@@ -19,15 +19,15 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
- #ifndef REMAKE_FILE2LINE
- #define REMAKE_FILE2LINE
--struct hash_table file2lines;
-+extern struct hash_table file2lines;
-
- typedef enum {
- F2L_TARGET,
- F2L_PATTERN
- } f2l_entry_t;
-
--
--typedef struct lineo_array_s
-+
-+typedef struct lineo_array_s
- {
- const char *hname; /**< Name stored in hash table */
- unsigned int size; /**< Number of entries in array */
-@@ -40,13 +40,13 @@ typedef struct lineo_array_s
- only. So we do this on demand.
- */
- extern bool file2lines_init(void);
--extern file_t *target_for_file_and_line (const char *psz_filename,
-+extern file_t *target_for_file_and_line (const char *psz_filename,
- unsigned int lineno,
- /*out*/ f2l_entry_t *entry_type);
- extern void file2lines_dump(void);
- #endif
-
--/*
-+/*
- * Local variables:
- * eval: (c-set-style "gnu")
- * indent-tabs-mode: nil
---- a/src/dep.h
-+++ b/src/dep.h
-@@ -139,7 +139,7 @@ struct dep *copy_dep_chain (const struct dep *d);
- struct goaldep *read_all_makefiles (const char **makefiles);
-
- /*! The chain of makefiles read by read_makefile. */
--struct goaldep *read_makefiles;
-+extern struct goaldep *read_makefiles;
-
- void eval_buffer (char *buffer, const gmk_floc *floc);
- enum update_status update_goal_chain (struct goaldep *goals);
---- a/src/globals.h
-+++ b/src/globals.h
-@@ -89,6 +89,6 @@ extern int in_debugger;
- extern bool b_debugger_preread;
-
- /* Remember the original value of the SHELL variable, from the environment. */
--struct variable shell_var;
-+extern struct variable shell_var;
-
- #endif /*GLOBALS_H*/
---- a/src/main.c
-+++ b/src/main.c
-@@ -45,6 +45,8 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
- # include <fcntl.h>
- #endif
-
-+struct goaldep *read_makefiles;
-+
- extern void initialize_stopchar_map ();
-
- #if defined HAVE_WAITPID || defined HAVE_WAIT3
---- a/src/make.h
-+++ b/src/make.h
-@@ -324,7 +324,7 @@ extern int unixy_shell;
- #endif
- #ifdef SET_STACK_SIZE
- # include <sys/resource.h>
--struct rlimit stack_limit;
-+extern struct rlimit stack_limit;
- #endif
-
- /* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
---- a/src/print.h
-+++ b/src/print.h
-@@ -39,7 +39,7 @@ void fatal_err (target_stack_node_t *p_call, const char *fmt, ...);
-
- /* Think of the below not as an enumeration but as #defines done in a
- way that we'll be able to use the value in a gdb. */
--enum debug_print_enums_e {
-+extern enum debug_print_enums_e {
- MAX_STACK_SHOW = 1000,
- } debug_print_enums1;
-
diff --git a/sys-devel/remake/metadata.xml b/sys-devel/remake/metadata.xml
deleted file mode 100644
index 17bb5f7f22f9..000000000000
--- a/sys-devel/remake/metadata.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">rocky/remake</remote-id>
- <remote-id type="sourceforge">bashdb</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-devel/remake/remake-4.3.1.1.5.ebuild b/sys-devel/remake/remake-4.3.1.1.5.ebuild
deleted file mode 100644
index 091440c48e65..000000000000
--- a/sys-devel/remake/remake-4.3.1.1.5.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-MY_MAKE_BASE=$(ver_cut 1-2)
-MY_REMAKE_PATCH=$(ver_cut 4-)
-MY_P="${PN}-${MY_MAKE_BASE}+dbg-${MY_REMAKE_PATCH}"
-
-DESCRIPTION="Patched version of GNU Make with improved error reporting, tracing, and debugging"
-HOMEPAGE="http://bashdb.sourceforge.net/remake/"
-SRC_URI="https://github.com/rocky/remake/releases/download/release_${MY_P/remake-/}/${MY_P}.tar.gz"
-S="${WORKDIR}"/${MY_P}
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sparc x86"
-IUSE="guile readline"
-
-DEPEND="readline? ( sys-libs/readline:0= )"
-RDEPEND="${DEPEND}
- guile? ( >=dev-scheme/guile-1.8:= )"
-BDEPEND="guile? ( >=dev-scheme/guile-1.8 )"
-
-PATCHES=(
- "${FILESDIR}"/${P}-fno-common.patch
-)
-
-src_configure() {
- use readline || export vl_cv_lib_readline=no
- econf $(use_with guile)
-}
-
-src_install() {
- default
-
- # delete files GNU make owns and remake doesn't care about.
- rm -r "${ED}"/usr/include || die
- rm "${ED}"/usr/share/info/make.info* || die
-}
diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest
index 94306c397950..c313ce130552 100644
--- a/sys-devel/rust-std/Manifest
+++ b/sys-devel/rust-std/Manifest
@@ -1 +1,8 @@
-DIST rustc-1.59.0-src.tar.xz 128942756 BLAKE2B b28114f14c9a0fec7db56fde79a985360fd8438c3b14eede49ed12e540c2636be960d0fd800c569af193886ac76fe8bf604d5dae59214ae08cb0cc6cc0ca404e SHA512 acace866871d13a55d365f65d7e15c192c3cd33096862571df6317e066b7474d668b95ae281e0244967778c05f1e33966c3c55616218bd25d3770a2b2d4f0365
+DIST rustc-1.68.2-src.tar.xz 147835648 BLAKE2B 4b6deab818d915afe67a96f4d32a758c15a832041a77d9da5d065a903ea2718e0e7ebbc0cd1baaa436b655bdb93a62e0fb76f9e37aed595c064e0857201bb091 SHA512 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3
+DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4
+DIST rustc-1.72.0-src.tar.xz 151630408 BLAKE2B 7b26e5a9335f9262567b2a6aaf3b8ad6dc813688f532c54502c12c7b59d02082a082fe49ae370b0748fb13f8245dad13a58927d8563ba96fdf3639d4a128f236 SHA512 aed27c1babfec7f9b0815bc395302cff4f8e8ed83d8d3bde202f6c86fba4aec14ad2d3e99f4e22618c6727d876262511bfbcd83513731ea4b9c664462c97945b
+DIST rustc-1.73.0-src.tar.xz 154319536 BLAKE2B 077bdedb36fdbc30db3c6331ac6014615eb79393ad42e38488d037ba38eaa6542467d39b2a14228d0bf6717110f915bf6fdcf0074c6293f413720cc748316eff SHA512 75c59680a82cb9d076b9434744a1c65908524ef769293952f5d9c5779d9a9c6fa4d9aa0c7e7d6b7566a21a50a27cd6ae452b5283a4d4606b2fa1acc24dfd8e0c
+DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
+DIST rustc-1.75.0-src.tar.xz 159624388 BLAKE2B 8937b80585eddaa3e1f1ef948899d14a170308518c6fef9fe569560cdd870053776956743f796055f2119399b9ca6c0df12fedd789ae46324d071e5126c4e495 SHA512 7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606
+DIST rustc-1.76.0-src.tar.xz 162267908 BLAKE2B 0cf726841a837d9906d82a6216e65edad1e3e4a798ccd1ca3824c2098d0c45473854b8bf183c6e9ca70ba095752e77c4f5ef575d98c07243d609857214175f5e SHA512 92e16cfdeb91bde341fe6c2774d92868275b07aa1d46d870ddc9291eadfe4ea9af93e06586fa7d6b8d60534903945cbbe706d354c90272712989c58d2bf174bf
+DIST rustc-1.77.1-src.tar.xz 162796048 BLAKE2B 18a9fd095808ba78bf50ec94f7fd4087a1033ec79750aa593bacf64219c77ef90c030d41a7d8bc43f7ec8eb30b316c225024be4aeb517100ff6723487f8bb282 SHA512 e057ae638e4c3e54fdb367d48f4b85458121cee0d0ee1ed72f346940b8acad2f16cd9cc8abc16fcf4a17bf244b3300bb56a7e7be3bd0c23b034692c983b84fe8
diff --git a/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch b/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch
new file mode 100644
index 000000000000..c68ceba15e82
--- /dev/null
+++ b/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch
@@ -0,0 +1,45 @@
+From 4b7e0a0b56aa2446e670dfd6558380a1039a86aa Mon Sep 17 00:00:00 2001
+From: Arlo Siemsen <arsiem@microsoft.com>
+Date: Thu, 4 Jan 2024 11:40:56 -0600
+Subject: [PATCH] Handle vendored sources when remapping paths
+
+Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
+---
+ src/bootstrap/src/core/builder.rs | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
+index 4e20babc55a..3770d0687b2 100644
+--- a/src/bootstrap/src/core/builder.rs
++++ b/src/bootstrap/src/core/builder.rs
+@@ -1799,15 +1799,20 @@ pub fn cargo(
+ }
+
+ if self.config.rust_remap_debuginfo {
+- // FIXME: handle vendored sources
+- let registry_src = t!(home::cargo_home()).join("registry").join("src");
+ let mut env_var = OsString::new();
+- for entry in t!(std::fs::read_dir(registry_src)) {
+- if !env_var.is_empty() {
+- env_var.push("\t");
+- }
+- env_var.push(t!(entry).path());
++ if self.config.vendor {
++ let vendor = self.build.src.join("vendor");
++ env_var.push(vendor);
+ env_var.push("=/rust/deps");
++ } else {
++ let registry_src = t!(home::cargo_home()).join("registry").join("src");
++ for entry in t!(std::fs::read_dir(registry_src)) {
++ if !env_var.is_empty() {
++ env_var.push("\t");
++ }
++ env_var.push(t!(entry).path());
++ env_var.push("=/rust/deps");
++ }
+ }
+ cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var);
+ }
+--
+2.43.0
+
diff --git a/sys-devel/rust-std/metadata.xml b/sys-devel/rust-std/metadata.xml
index 8615dcf23eb8..99067849043d 100644
--- a/sys-devel/rust-std/metadata.xml
+++ b/sys-devel/rust-std/metadata.xml
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>gyakovlev@gentoo.org</email>
- <name>Georgy Yakovlev</name>
+ <maintainer type="person" proxied="yes">
+ <email>randy@electronsweatshop.com</email>
+ <name>Randy Barlow</name>
+ </maintainer>
+ <maintainer type="person" proxied="yes">
+ <email>navi@vlhl.dev</email>
+ <name>Anna Figueiredo Gomes</name>
</maintainer>
<maintainer type="project">
<email>rust@gentoo.org</email>
diff --git a/sys-devel/rust-std/rust-std-1.59.0.ebuild b/sys-devel/rust-std/rust-std-1.68.2.ebuild
index b3528f3325e7..dec75d768962 100644
--- a/sys-devel/rust-std/rust-std-1.59.0.ebuild
+++ b/sys-devel/rust-std/rust-std-1.68.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2020-2022 Gentoo Authors
+# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{9..11} )
inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
diff --git a/sys-devel/rust-std/rust-std-1.71.1.ebuild b/sys-devel/rust-std/rust-std-1.71.1.ebuild
new file mode 100644
index 000000000000..dec75d768962
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.71.1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+S="${WORKDIR}/${P/-std/c}-src"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}
diff --git a/sys-devel/rust-std/rust-std-1.72.0.ebuild b/sys-devel/rust-std/rust-std-1.72.0.ebuild
new file mode 100644
index 000000000000..dec75d768962
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.72.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+S="${WORKDIR}/${P/-std/c}-src"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}
diff --git a/sys-devel/rust-std/rust-std-1.73.0.ebuild b/sys-devel/rust-std/rust-std-1.73.0.ebuild
new file mode 100644
index 000000000000..1432096c3a0d
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.73.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+S="${WORKDIR}/${P/-std/c}-src"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}
diff --git a/sys-devel/rust-std/rust-std-1.74.1.ebuild b/sys-devel/rust-std/rust-std-1.74.1.ebuild
new file mode 100644
index 000000000000..1432096c3a0d
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.74.1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+S="${WORKDIR}/${P/-std/c}-src"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}
diff --git a/sys-devel/rust-std/rust-std-1.75.0.ebuild b/sys-devel/rust-std/rust-std-1.75.0.ebuild
new file mode 100644
index 000000000000..c63efccf3b0c
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.75.0.ebuild
@@ -0,0 +1,159 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+PATCHES=(
+ "${FILESDIR}"/1.75.0-handle-vendored-sources.patch # remove for >=1.77.0
+)
+
+S="${WORKDIR}/${P/-std/c}-src"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}
diff --git a/sys-devel/rust-std/rust-std-1.76.0.ebuild b/sys-devel/rust-std/rust-std-1.76.0.ebuild
new file mode 100644
index 000000000000..c63efccf3b0c
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.76.0.ebuild
@@ -0,0 +1,159 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+PATCHES=(
+ "${FILESDIR}"/1.75.0-handle-vendored-sources.patch # remove for >=1.77.0
+)
+
+S="${WORKDIR}/${P/-std/c}-src"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}
diff --git a/sys-devel/rust-std/rust-std-1.77.1.ebuild b/sys-devel/rust-std/rust-std-1.77.1.ebuild
new file mode 100644
index 000000000000..7037dfd72e6f
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.77.1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org"
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ ~dev-lang/rust-${PV}:=
+"
+
+DEPEND="||
+ (
+ >="${CATEGORY}"/gcc-4.7:*
+ >="${CATEGORY}"/clang-3.5:*
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+S="${WORKDIR}/${P/-std/c}-src"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_cross() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_pretend() {
+ is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ # do the great cleanup
+ strip-flags
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+ strip-unsupported-flags
+
+ local rust_root x
+ rust_root="$(rustc --print sysroot)"
+ rtarget="$(rust_abi ${CTARGET})"
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom.
+ rbuild="$(rust_abi ${CBUILD})"
+ rhost="$(rust_abi ${CHOST})"
+
+ echo
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do
+ einfo "$(printf '%10s' ${x^^}:) ${!x}"
+ done
+
+ cat <<- EOF > "${S}"/config.toml
+ [build]
+ build = "${rbuild}"
+ host = ["${rhost}"]
+ target = ["${rtarget}"]
+ cargo = "${rust_root}/bin/cargo"
+ rustc = "${rust_root}/bin/rustc"
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ verbose = 2
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ dist-src = false
+ remap-debuginfo = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ [target.${rtarget}]
+ ar = "$(tc-getAR ${CTARGET})"
+ cc = "$(tc-getCC ${CTARGET})"
+ cxx = "$(tc-getCXX ${CTARGET})"
+ linker = "$(tc-getCC ${CTARGET})"
+ ranlib = "$(tc-getRANLIB ${CTARGET})"
+ $(usev elibc_musl 'crt-static = false')
+ EOF
+
+ einfo "${PN^} configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ env RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ library/std --stage 0 || die
+}
+
+src_test() {
+ ewarn "${PN} can't run tests"
+}
+
+src_install() {
+ local rustlib="lib/rust/${PV}/lib/rustlib"
+ dodir "/usr/${rustlib}"
+ pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+ popd > /dev/null || die
+}
diff --git a/sys-devel/slibtool/Manifest b/sys-devel/slibtool/Manifest
deleted file mode 100644
index 0a7b2da67762..000000000000
--- a/sys-devel/slibtool/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST slibtool-0.5.34.tar.xz 79720 BLAKE2B 3a692d7485dcf2277f7ed99fe1ad67cf5fd33d8fe0a527d64634b0e7f956a5f58b92d812396f00d872ceb8509e058ae1a026f16a65feb2e79a9fff7bd60290da SHA512 3f7f6e4f45c4c2ae5ba5533152f08269cd77ca6fa2f3a515802bc23c7ac505b2d7340098fa98962c79035129cfd4077205596309f4acd1d634b9a1d6e2c0e96c
-DIST slibtool-0.5.34.tar.xz.sig 833 BLAKE2B 52df017d8ae3056e259a5283b0a4cea119a5ab4ce95e6c894d0d2e98fc10db101039a57c9a2a771f677c9d0afaad9273095ebdb078fca146a3d67ea25e9261fb SHA512 9f8415431a0b43e7be9a808dd6ed138a9b34b7b2c4af3ab406bdbc456ec31c877f13bc0b056ab9a50bec0b0cf1b654a133085f8523e70c8cb7d3851652d34ff7
diff --git a/sys-devel/slibtool/metadata.xml b/sys-devel/slibtool/metadata.xml
deleted file mode 100644
index 26b0002e202f..000000000000
--- a/sys-devel/slibtool/metadata.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person" proxied="yes">
- <email>felix.janda@posteo.de</email>
- <name>Felix Janda</name>
- </maintainer>
- <maintainer type="person">
- <email>sam@gentoo.org</email>
- <name>Sam James</name>
- </maintainer>
- <maintainer type="project" proxied="proxy">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-devel/slibtool/slibtool-0.5.34.ebuild b/sys-devel/slibtool/slibtool-0.5.34.ebuild
deleted file mode 100644
index c176e886d89c..000000000000
--- a/sys-devel/slibtool/slibtool-0.5.34.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs
-
-# git.foss21.org is the official repository per upstream
-DESCRIPTION="A skinny libtool implementation, written in C"
-HOMEPAGE="https://git.foss21.org/slibtool"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://git.foss21.org/slibtool"
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/midipix.asc
- inherit verify-sig
-
- SRC_URI="https://dl.midipix.org/slibtool/${P}.tar.xz"
- SRC_URI+=" verify-sig? ( https://dl.midipix.org/slibtool/${P}.tar.xz.sig )"
-
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-midipix )"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-
-src_configure() {
- # Custom configure script (not generated by autoconf)
- ./configure \
- --compiler="$(tc-getCC)" \
- --host=${CHOST} \
- --prefix="${EPREFIX}"/usr \
- --libdir="$(get_libdir)" \
- || die
-}
diff --git a/sys-devel/slibtool/slibtool-9999.ebuild b/sys-devel/slibtool/slibtool-9999.ebuild
deleted file mode 100644
index 200a19a514d4..000000000000
--- a/sys-devel/slibtool/slibtool-9999.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs
-
-# git.foss21.org is the official repository per upstream
-DESCRIPTION="A skinny libtool implementation, written in C"
-HOMEPAGE="https://git.foss21.org/slibtool"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://git.foss21.org/slibtool"
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/midipix.asc
- inherit verify-sig
-
- SRC_URI="https://dl.midipix.org/slibtool/${P}.tar.xz"
- SRC_URI+=" verify-sig? ( https://dl.midipix.org/slibtool/${P}.tar.xz.sig )"
-
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-midipix )"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-
-src_configure() {
- # Custom configure script (not generated by autoconf)
- ./configure \
- --compiler="$(tc-getCC)" \
- --host=${CHOST} \
- --prefix="${EPREFIX}"/usr \
- --libdir="$(get_libdir)" \
- || die
-}
diff --git a/sys-devel/ucpp/Manifest b/sys-devel/ucpp/Manifest
deleted file mode 100644
index 9e88317c43e1..000000000000
--- a/sys-devel/ucpp/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST ucpp-1.3.5.tar.xz 289468 BLAKE2B 6a038cc5d02f080747a321a55af66f2072503a5c0a554492ea8aed34ff9c3b7b85e3778114e18c3e09f06f1472a1479f39c96997404e0345153a1f84e3f9daee SHA512 3ded8f7bc2b238adb6e7f4162aee48e039dfe7cee31b700c38e8f147634d47cd1ceaf39c343549b0d4a58358e6b9743f7e84f87b253dc19c05e543d68ade24ce
diff --git a/sys-devel/ucpp/metadata.xml b/sys-devel/ucpp/metadata.xml
deleted file mode 100644
index 838b9553c0a1..000000000000
--- a/sys-devel/ucpp/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>office@gentoo.org</email>
- <name>Gentoo Office project</name>
- </maintainer>
- <maintainer type="project">
- <email>sci@gentoo.org</email>
- <name>Gentoo Science Project</name>
- </maintainer>
- <upstream>
- <remote-id type="gitlab">scarabeusiv/ucpp</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-devel/ucpp/ucpp-1.3.5.ebuild b/sys-devel/ucpp/ucpp-1.3.5.ebuild
deleted file mode 100644
index b82c336b6ab7..000000000000
--- a/sys-devel/ucpp/ucpp-1.3.5.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="Library for preprocessing C compliant to ISO-C99"
-HOMEPAGE="https://gitlab.com/scarabeusiv/ucpp"
-SRC_URI="https://gitlab.com/scarabeusiv/${PN}/uploads/79f08e39c676f15ed8a59335f6c9b924/${P}.tar.xz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ppc ~ppc64 x86 ~amd64-linux"
-
-src_configure() {
- econf \
- --disable-werror \
- --disable-static
-}
-
-src_install() {
- default
-
- # no static archives
- find "${ED}" -name '*.la' -type f -delete || die
-}