summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/autoconf-archive/Manifest1
-rw-r--r--sys-devel/autoconf-archive/autoconf-archive-2022.09.03.ebuild18
-rw-r--r--sys-devel/autoconf-archive/metadata.xml12
-rw-r--r--sys-devel/autoconf-dickey/Manifest3
-rw-r--r--sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild46
-rw-r--r--sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild53
-rw-r--r--sys-devel/autoconf-dickey/metadata.xml12
-rw-r--r--sys-devel/autoconf-wrapper/Manifest2
-rw-r--r--sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild28
-rw-r--r--sys-devel/autoconf-wrapper/autoconf-wrapper-20221207.ebuild34
-rw-r--r--sys-devel/autoconf-wrapper/autoconf-wrapper-99999999.ebuild35
-rw-r--r--sys-devel/autoconf-wrapper/metadata.xml13
-rw-r--r--sys-devel/autoconf/Manifest4
-rw-r--r--sys-devel/autoconf/autoconf-2.13-r2.ebuild56
-rw-r--r--sys-devel/autoconf/autoconf-2.13-r7.ebuild58
-rw-r--r--sys-devel/autoconf/autoconf-2.69-r5.ebuild58
-rw-r--r--sys-devel/autoconf/autoconf-2.69-r8.ebuild63
-rw-r--r--sys-devel/autoconf/autoconf-2.71-r1.ebuild81
-rw-r--r--sys-devel/autoconf/autoconf-2.71-r5.ebuild88
-rw-r--r--sys-devel/autoconf/autoconf-9999.ebuild58
-rw-r--r--sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch331
-rw-r--r--sys-devel/autoconf/files/autoconf-2.13-K-R-decls-clang.patch346
-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-K-R-decls-clang.patch394
-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-AC_C_BIGENDIAN-lto.patch50
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch35
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch94
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang.patch114
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-darwin.patch11
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-make-4.4.patch25
-rw-r--r--sys-devel/autoconf/files/autoconf-2.71-time.patch49
-rw-r--r--sys-devel/autoconf/metadata.xml11
-rw-r--r--sys-devel/autogen/autogen-5.18.16-r3.ebuild (renamed from sys-devel/autogen/autogen-5.18.16-r1.ebuild)37
-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/automake-wrapper/automake-wrapper-11-r1.ebuild32
-rw-r--r--sys-devel/automake-wrapper/automake-wrapper-99999999.ebuild41
-rw-r--r--sys-devel/automake-wrapper/files/am-wrapper-11.sh186
-rw-r--r--sys-devel/automake-wrapper/metadata.xml13
-rw-r--r--sys-devel/automake/Manifest2
-rw-r--r--sys-devel/automake/automake-1.11.6-r3.ebuild98
-rw-r--r--sys-devel/automake/automake-1.16.5.ebuild133
-rw-r--r--sys-devel/automake/automake-9999.ebuild127
-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-perl-escape-curly-bracket-r1.patch37
-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.ebuild2
-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.ebuild2
-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)16
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild2
-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/Manifest1
-rw-r--r--sys-devel/binutils-config/binutils-config-5.4.1.ebuild43
-rw-r--r--sys-devel/binutils-config/binutils-config-5.5.ebuild4
-rw-r--r--sys-devel/binutils-config/binutils-config-9999.ebuild2
-rw-r--r--sys-devel/binutils-hppa64/Manifest8
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild17
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild17
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild (renamed from sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild)19
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild (renamed from sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild)21
-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.xml1
-rw-r--r--sys-devel/binutils/Manifest8
-rw-r--r--sys-devel/binutils/binutils-2.32-r2.ebuild26
-rw-r--r--sys-devel/binutils/binutils-2.33.1-r1.ebuild26
-rw-r--r--sys-devel/binutils/binutils-2.34-r2.ebuild26
-rw-r--r--sys-devel/binutils/binutils-2.35.2.ebuild28
-rw-r--r--sys-devel/binutils/binutils-2.36.1-r2.ebuild28
-rw-r--r--sys-devel/binutils/binutils-2.37_p1-r2.ebuild28
-rw-r--r--sys-devel/binutils/binutils-2.38-r2.ebuild28
-rw-r--r--sys-devel/binutils/binutils-2.39-r5.ebuild (renamed from sys-devel/binutils/binutils-2.39-r4.ebuild)30
-rw-r--r--sys-devel/binutils/binutils-2.40-r9.ebuild (renamed from sys-devel/binutils/binutils-2.40.ebuild)55
-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.ebuild164
-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.xml1
-rw-r--r--sys-devel/bison/bison-3.8.2-r2.ebuild16
-rw-r--r--sys-devel/bmake/Manifest3
-rw-r--r--sys-devel/bmake/bmake-20220928.ebuild57
-rw-r--r--sys-devel/bmake/bmake-20230120.ebuild57
-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/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/Manifest15
-rw-r--r--sys-devel/clang-common/clang-common-13.0.1.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.7-r8.ebuild (renamed from sys-devel/clang-common/clang-common-15.0.7-r1.ebuild)47
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0.9999.ebuild168
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_pre20230107-r1.ebuild168
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_pre20230127.ebuild168
-rw-r--r--sys-devel/clang-common/clang-common-16.0.6-r4.ebuild (renamed from sys-devel/clang-common/clang-common-16.0.0_rc1.ebuild)97
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0.9999.ebuild168
-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.xml11
-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-13.0.1.ebuild24
-rw-r--r--sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild26
-rw-r--r--sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild (renamed from sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230127.ebuild)5
-rw-r--r--sys-devel/clang-runtime/clang-runtime-17.0.0.9999.ebuild41
-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.ebuild (renamed from sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230107.ebuild)3
-rw-r--r--sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild (renamed from sys-devel/clang-runtime/clang-runtime-16.0.0.9999.ebuild)4
-rw-r--r--sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild (renamed from sys-devel/clang-runtime/clang-runtime-16.0.0_rc1.ebuild)4
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild3
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild5
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild6
-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.ebuild (renamed from sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-14-r2.ebuild)4
-rw-r--r--sys-devel/clang/Manifest26
-rw-r--r--sys-devel/clang/clang-13.0.1.ebuild427
-rw-r--r--sys-devel/clang/clang-14.0.6-r1.ebuild445
-rw-r--r--sys-devel/clang/clang-15.0.7-r3.ebuild (renamed from sys-devel/clang/clang-15.0.7-r1.ebuild)14
-rw-r--r--sys-devel/clang/clang-16.0.0_pre20230107.ebuild473
-rw-r--r--sys-devel/clang/clang-16.0.6.ebuild (renamed from sys-devel/clang/clang-16.0.0_rc1.ebuild)23
-rw-r--r--sys-devel/clang/clang-17.0.6.ebuild (renamed from sys-devel/clang/clang-16.0.0.9999.ebuild)36
-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-17.0.0.9999.ebuild)57
-rw-r--r--sys-devel/clang/clang-19.0.0_pre20240410.ebuild (renamed from sys-devel/clang/clang-16.0.0_pre20230127.ebuild)57
-rw-r--r--sys-devel/clang/clang-19.0.0_pre20240420.ebuild475
-rw-r--r--sys-devel/clang/metadata.xml3
-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/Manifest2
-rw-r--r--sys-devel/cproc/cproc-0_pre20240413.ebuild (renamed from sys-devel/cproc/cproc-0_pre20220805.ebuild)10
-rw-r--r--sys-devel/cproc/cproc-9999.ebuild10
-rw-r--r--sys-devel/crossdev/Manifest3
-rw-r--r--sys-devel/crossdev/crossdev-20221228.ebuild34
-rw-r--r--sys-devel/crossdev/crossdev-20240209.ebuild (renamed from sys-devel/crossdev/crossdev-20220909.ebuild)15
-rw-r--r--sys-devel/crossdev/crossdev-99999999.ebuild14
-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-r1.ebuild28
-rw-r--r--sys-devel/ct-ng/metadata.xml14
-rw-r--r--sys-devel/dev86/metadata.xml3
-rw-r--r--sys-devel/distcc/distcc-3.4-r1.ebuild6
-rw-r--r--sys-devel/distcc/distcc-3.4-r2.ebuild182
-rw-r--r--sys-devel/distcc/distcc-3.4-r3.ebuild186
-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/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.ebuild4
-rw-r--r--sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild4
-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/flex-2.6.4-r6.ebuild (renamed from sys-devel/flex/flex-2.6.4-r5.ebuild)5
-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.10.ebuild60
-rw-r--r--sys-devel/gcc-config/gcc-config-2.11.ebuild (renamed from sys-devel/gcc-config/gcc-config-2.8.ebuild)4
-rw-r--r--sys-devel/gcc-config/gcc-config-9999.ebuild4
-rw-r--r--sys-devel/gcc/Manifest51
-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.4.1_p20221208.ebuild58
-rw-r--r--sys-devel/gcc/gcc-10.4.1_p20230119-r1.ebuild58
-rw-r--r--sys-devel/gcc/gcc-10.4.1_p20230126.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.3.1_p20221209.ebuild52
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20230120-r1.ebuild52
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20230127.ebuild52
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240111.ebuild65
-rw-r--r--sys-devel/gcc/gcc-11.4.1_p20240404.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.2.0.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.2.1_p20221126.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.2.1_p20230121-r1.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.2.1_p20230128.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240209.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20240419.ebuild65
-rw-r--r--sys-devel/gcc/gcc-12.3.9999.ebuild57
-rw-r--r--sys-devel/gcc/gcc-12.4.9999.ebuild62
-rw-r--r--sys-devel/gcc/gcc-13.0.1.9999.ebuild51
-rw-r--r--sys-devel/gcc/gcc-13.0.1_pre20230122.ebuild53
-rw-r--r--sys-devel/gcc/gcc-13.0.1_pre20230129-r1.ebuild53
-rw-r--r--sys-devel/gcc/gcc-13.2.1_p20240210.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_pre20240421.ebuild66
-rw-r--r--sys-devel/gcc/gcc-14.0.9999.ebuild51
-rw-r--r--sys-devel/gcc/gcc-15.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.ebuild29
-rw-r--r--sys-devel/gcc/metadata.xml31
-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/Manifest4
-rw-r--r--sys-devel/gdb/files/gdb-12.1-configure-clang16.patch112
-rw-r--r--sys-devel/gdb/files/gdb-12.1-core-file-detach.patch155
-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-12.1-r2.ebuild294
-rw-r--r--sys-devel/gdb/gdb-12.1-r3.ebuild293
-rw-r--r--sys-devel/gdb/gdb-12.1-r4.ebuild299
-rw-r--r--sys-devel/gdb/gdb-13.0.90_p20230110.ebuild301
-rw-r--r--sys-devel/gdb/gdb-13.0.90_p20230126.ebuild307
-rw-r--r--sys-devel/gdb/gdb-9999.ebuild307
-rw-r--r--sys-devel/gdb/metadata.xml22
-rw-r--r--sys-devel/gettext/Manifest4
-rw-r--r--sys-devel/gettext/gettext-0.21.1.ebuild23
-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/Manifest2
-rw-r--r--sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch64
-rw-r--r--sys-devel/gnuconfig/gnuconfig-20230731.ebuild (renamed from sys-devel/gnuconfig/gnuconfig-20221007.ebuild)6
-rw-r--r--sys-devel/gnuconfig/gnuconfig-99999999.ebuild6
-rw-r--r--sys-devel/icecream/icecream-1.4.ebuild4
-rw-r--r--sys-devel/kgcc64/Manifest25
-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-10.4.0.ebuild)14
-rw-r--r--sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild47
-rw-r--r--sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild47
-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-12.2.0.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/Manifest1
-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-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.7-grep-3.8.patch31
-rw-r--r--sys-devel/libtool/files/libtool-2.4.7-werror-lto.patch47
-rw-r--r--sys-devel/libtool/libtool-2.4.7-r1.ebuild118
-rw-r--r--sys-devel/libtool/libtool-2.4.7.ebuild115
-rw-r--r--sys-devel/libtool/libtool-9999.ebuild117
-rw-r--r--sys-devel/libtool/metadata.xml11
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild3
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild6
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild6
-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.ebuild (renamed from sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r2.ebuild)4
-rw-r--r--sys-devel/lld/Manifest16
-rw-r--r--sys-devel/lld/lld-13.0.1-r1.ebuild80
-rw-r--r--sys-devel/lld/lld-14.0.6-r1.ebuild80
-rw-r--r--sys-devel/lld/lld-15.0.7.ebuild6
-rw-r--r--sys-devel/lld/lld-16.0.6.ebuild (renamed from sys-devel/lld/lld-16.0.0.9999.ebuild)10
-rw-r--r--sys-devel/lld/lld-17.0.0.9999.ebuild90
-rw-r--r--sys-devel/lld/lld-17.0.6.ebuild (renamed from sys-devel/lld/lld-16.0.0_pre20230107.ebuild)15
-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-16.0.0_pre20230127.ebuild)21
-rw-r--r--sys-devel/lld/lld-19.0.0_pre20240410.ebuild (renamed from sys-devel/lld/lld-16.0.0_rc1.ebuild)21
-rw-r--r--sys-devel/lld/lld-19.0.0_pre20240420.ebuild93
-rw-r--r--sys-devel/llvm-common/Manifest15
-rw-r--r--sys-devel/llvm-common/llvm-common-13.0.1.ebuild27
-rw-r--r--sys-devel/llvm-common/llvm-common-14.0.6.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-15.0.7.ebuild36
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.0.9999.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.0_pre20230107.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.0_pre20230127.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.0_rc1.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.6.ebuild54
-rw-r--r--sys-devel/llvm-common/llvm-common-17.0.0.9999.ebuild28
-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-roc/Manifest1
-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.2.0-current_pos.patch28
-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-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.ebuild3
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild5
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild6
-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.ebuild (renamed from sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14-r1.ebuild)4
-rw-r--r--sys-devel/llvm/Manifest26
-rw-r--r--sys-devel/llvm/llvm-13.0.1.ebuild501
-rw-r--r--sys-devel/llvm/llvm-14.0.6-r2.ebuild518
-rw-r--r--sys-devel/llvm/llvm-15.0.7-r3.ebuild (renamed from sys-devel/llvm/llvm-15.0.7.ebuild)33
-rw-r--r--sys-devel/llvm/llvm-16.0.6.ebuild (renamed from sys-devel/llvm/llvm-16.0.0_rc1.ebuild)45
-rw-r--r--sys-devel/llvm/llvm-17.0.0.9999.ebuild514
-rw-r--r--sys-devel/llvm/llvm-17.0.6.ebuild (renamed from sys-devel/llvm/llvm-16.0.0.9999.ebuild)78
-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-16.0.0_pre20230107.ebuild)105
-rw-r--r--sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild (renamed from sys-devel/llvm/llvm-16.0.0_pre20230127.ebuild)105
-rw-r--r--sys-devel/llvm/llvm-19.0.0_pre20240420.ebuild547
-rw-r--r--sys-devel/llvm/metadata.xml2
-rw-r--r--sys-devel/llvmgold/llvmgold-16.ebuild4
-rw-r--r--sys-devel/llvmgold/llvmgold-17.ebuild5
-rw-r--r--sys-devel/llvmgold/llvmgold-18.ebuild (renamed from sys-devel/llvmgold/llvmgold-13-r2.ebuild)15
-rw-r--r--sys-devel/llvmgold/llvmgold-19.ebuild (renamed from sys-devel/llvmgold/llvmgold-14.ebuild)3
-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-r1.ebuild101
-rw-r--r--sys-devel/m4/m4-1.4.19-r2.ebuild (renamed from sys-devel/m4/m4-1.4.19.ebuild)12
-rw-r--r--sys-devel/make/Manifest6
-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.ebuild76
-rw-r--r--sys-devel/make/make-4.4.0.90.ebuild76
-rw-r--r--sys-devel/make/make-4.4.ebuild76
-rw-r--r--sys-devel/make/make-9999.ebuild76
-rw-r--r--sys-devel/mold/Manifest7
-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.10.1.ebuild)6
-rw-r--r--sys-devel/mold/mold-2.30.0.ebuild (renamed from sys-devel/mold/mold-1.8.0-r1.ebuild)22
-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.9.0.ebuild)22
-rw-r--r--sys-devel/mold/mold-9999.ebuild22
-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/make/metadata.xml)6
-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.ebuild4
-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/Manifest6
-rw-r--r--sys-devel/qbe/qbe-1.1-r1.ebuild46
-rw-r--r--sys-devel/qbe/qbe-1.2.ebuild (renamed from sys-devel/qbe/qbe-1.0.ebuild)8
-rw-r--r--sys-devel/qbe/qbe-9999.ebuild8
-rw-r--r--sys-devel/qconf/Manifest1
-rw-r--r--sys-devel/qconf/metadata.xml15
-rw-r--r--sys-devel/qconf/qconf-2.5.ebuild39
-rw-r--r--sys-devel/reflex/Manifest4
-rw-r--r--sys-devel/reflex/reflex-20230523.ebuild (renamed from sys-devel/reflex/reflex-20221012.ebuild)15
-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)2
-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
412 files changed, 12265 insertions, 15179 deletions
diff --git a/sys-devel/autoconf-archive/Manifest b/sys-devel/autoconf-archive/Manifest
deleted file mode 100644
index 61f502f3c838..000000000000
--- a/sys-devel/autoconf-archive/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST autoconf-archive-2022.09.03.tar.xz 676144 BLAKE2B 9511b1bd2afee78209261d9757c3fc6bf079eb6ea82bc039530532cfaaea8a7d977f6310265c0af2fde377edc9bddfcabf1e81c426a9716d5bf4b4eb7bb64a4a SHA512 157b5b6a979d5ec5bfab6ddf34422da620fec1e95f4c901821abbb7361544af77747b4a449029b84750d75679d6130a591e98da8772de2c121ecdea163f0340b
diff --git a/sys-devel/autoconf-archive/autoconf-archive-2022.09.03.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2022.09.03.ebuild
deleted file mode 100644
index 03257458af52..000000000000
--- a/sys-devel/autoconf-archive/autoconf-archive-2022.09.03.ebuild
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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, bug #540246
-RDEPEND="
- !=gnome-base/gnome-common-3.14.0-r0
- !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]
-"
diff --git a/sys-devel/autoconf-archive/metadata.xml b/sys-devel/autoconf-archive/metadata.xml
deleted file mode 100644
index 9eca8509dc82..000000000000
--- a/sys-devel/autoconf-archive/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="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <stabilize-allarches/>
- <upstream>
- <remote-id type="github">autoconf-archive/autoconf-archive</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-devel/autoconf-dickey/Manifest b/sys-devel/autoconf-dickey/Manifest
deleted file mode 100644
index db6ee2c323ab..000000000000
--- a/sys-devel/autoconf-dickey/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST autoconf-2.52-20210509.tgz 874991 BLAKE2B bf8ff6496887f23cce167dfcc5177117ab5514996884998b3237c21e355b34301aabb71dacbff1e171ef21530d745345e584d876b3b5571f4faf863135b4269f SHA512 0203bbe096a2ecbee6bf012fec10a8f90e0b391d5988e202d2a1c718aa856d6c4953fb5e2be215ae635cd6b876b0229d6de1ffc7e2b35cd14684ef7c8294e546
-DIST autoconf-2.52-20221202.tgz 877960 BLAKE2B 52ef77d98f5d6e64e4c13e09ef92b3141703238953ad27b6e232cb62407cd56b07a1cad79f4405606f400246e85650925a7035b73119cda70d7faf049b61105c SHA512 8becd8791dbdbcf0801bbed8cbdf70666db10e3c6882b3f8e63e1cf04163818345be573018d96a2e0a28770e13cc452126fb9cb23b223df598c50f59e69c2d1a
-DIST autoconf-2.52-20221202.tgz.asc 729 BLAKE2B 64a528da36243271d1ae1e95e4182c663c571021e617554076bed78e5c12a3f16a2554e3b41ad6372751090ac05770bc59f090ca1e5226aa2c7c5fda48026bbf SHA512 dadf6805072cc072bbd16a939b285c7ab378e23aa0b9e6c808eb11bf40b679cc97cc748c524ac7255a0b47a4815dcd2796c606f963dbbce52a93956ccc8814fd
diff --git a/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild b/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild
deleted file mode 100644
index e0389543c326..000000000000
--- a/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# TODO: verify-sig, adapt toolchain-autoconf to take econf args?
-# TODO: review our old autoconf-2.52 patches?
-
-MY_P=${PN/-dickey}-${PV/_p/-}
-DESCRIPTION="Fork of sys-devel/autoconf for Thomas Dickey's packages"
-HOMEPAGE="https://invisible-island.net/autoconf/autoconf.html"
-SRC_URI="https://invisible-island.net/archives/autoconf/${MY_P}.tgz"
-S="${WORKDIR}"/${MY_P}
-
-LICENSE="GPL-2"
-SLOT="$(ver_cut 1-2)"
-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"
-
-BDEPEND="
- >=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.6
-"
-RDEPEND="${BDEPEND}"
-
-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
-
- default
-}
-
-src_configure() {
- local myeconfargs=(
- --datadir="${EPREFIX}"/usr/share/${PN}
- --program-suffix=-dickey
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_test() {
- # -j1 for bug #869278
- emake -j1 check
-}
diff --git a/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild b/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild
deleted file mode 100644
index e1ebff9a61c1..000000000000
--- a/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# TODO: adapt toolchain-autoconf to take econf args?
-# TODO: review our old autoconf-2.52 patches?
-
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc
-inherit verify-sig
-
-MY_P=${PN/-dickey}-${PV/_p/-}
-DESCRIPTION="Fork of sys-devel/autoconf for Thomas Dickey's packages"
-HOMEPAGE="https://invisible-island.net/autoconf/autoconf.html"
-SRC_URI="https://invisible-island.net/archives/autoconf/${MY_P}.tgz"
-SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/autoconf/${MY_P}.tgz.asc )"
-S="${WORKDIR}"/${MY_P}
-
-LICENSE="GPL-2"
-SLOT="$(ver_cut 1-2)"
-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"
-
-RDEPEND="
- >=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.6
-"
-BDEPEND="
- ${RDEPEND}
- verify-sig? ( sec-keys/openpgp-keys-thomasdickey )
-"
-
-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
-
- default
-}
-
-src_configure() {
- local myeconfargs=(
- --datadir="${EPREFIX}"/usr/share/${PN}
- --program-suffix=-dickey
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_test() {
- # -j1 for bug #869278
- emake -j1 check
-}
diff --git a/sys-devel/autoconf-dickey/metadata.xml b/sys-devel/autoconf-dickey/metadata.xml
deleted file mode 100644
index af5286fc415a..000000000000
--- a/sys-devel/autoconf-dickey/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="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <upstream>
- <changelog>https://invisible-island.net/autoconf/autoconf-252/ChangeLog</changelog>
- <remote-id type="github">ThomasDickey/my-autoconf-snapshots</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-devel/autoconf-wrapper/Manifest b/sys-devel/autoconf-wrapper/Manifest
deleted file mode 100644
index 1f689e9a86bc..000000000000
--- a/sys-devel/autoconf-wrapper/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST autotools-wrappers-at-20220130.tar.gz 3625 BLAKE2B c587d778a0c3331d14498308ae720dabdbcf27349ef0a3a2d5db56bb0ef597a5b1ab43388f1456e7888b40f043d68b0d89b420ac7404008f9a813ef78ae7e96f SHA512 700204b6024636dc808339aac15fb19bb645b654d4777ba8bf0febded5eb6af98659d04ed23819a8a638b6ee905e62292995bf2f838c30dedacb1a6bc0d04f1a
-DIST autotools-wrappers-at-20221207.tar.gz 3646 BLAKE2B 82bec40e03ae5ec133252fd3c05c3fed537bb415e800918df9c9d783d48a9d76cbe60c53dd7daf6d94653d79fc52be8c089183dda996e8a72dd03ffa83098613 SHA512 12ea99721e6fc60a3ed7351d6c228aaf6e4eef0bd0444eda8cd742f74fa91150ef07bb52f6bcad4a350269e8032f5d4e204d2f2108b0d9c441ddd7f9755862b7
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/autoconf-wrapper-20221207.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-20221207.ebuild
deleted file mode 100644
index 9788b3e841eb..000000000000
--- a/sys-devel/autoconf-wrapper/autoconf-wrapper-20221207.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MY_P="autotools-wrappers-at-${PV}"
-
-DESCRIPTION="Wrapper for autoconf to manage multiple autoconf versions"
-HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI=" https://anongit.gentoo.org/git/proj/autotools-wrappers.git"
- inherit git-r3
-else
- 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"
- S="${WORKDIR}/${MY_P}"
-
- 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-2"
-SLOT="0"
-
-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/autoconf-wrapper-99999999.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-99999999.ebuild
deleted file mode 100644
index 00ae3761530d..000000000000
--- a/sys-devel/autoconf-wrapper/autoconf-wrapper-99999999.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
-
-MY_P="autotools-wrappers-at-${PV}"
-
-DESCRIPTION="Wrapper for autoconf to manage multiple autoconf versions"
-HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/autotools-wrappers.git"
- inherit git-r3
-else
- 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"
- S="${WORKDIR}/${MY_P}"
-
- 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-2"
-SLOT="0"
-
-src_install() {
- exeinto /usr/$(get_libdir)/misc
- doexe ac-wrapper.sh
-
- dodir /usr/bin
-
- local x=
- for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do
- dosym -r /usr/$(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 2847c0b0420f..000000000000
--- a/sys-devel/autoconf-wrapper/metadata.xml
+++ /dev/null
@@ -1,13 +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>
- <stabilize-allarches/>
- <upstream>
- <remote-id type="gentoo">proj/autotools-wrappers</remote-id>
- <remote-id type="github">gentoo/autotools-wrappers</remote-id>
- </upstream>
-</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 f26c02ae862c..000000000000
--- a/sys-devel/autoconf/autoconf-2.13-r2.ebuild
+++ /dev/null
@@ -1,56 +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"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- dev-lang/perl
- sys-devel/m4
- test? ( dev-util/dejagnu )
-"
-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.13-r7.ebuild b/sys-devel/autoconf/autoconf-2.13-r7.ebuild
deleted file mode 100644
index 055d8286769d..000000000000
--- a/sys-devel/autoconf/autoconf-2.13-r7.ebuild
+++ /dev/null
@@ -1,58 +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"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- dev-lang/perl
- sys-devel/m4
- test? ( dev-util/dejagnu )
-"
-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}"/${P}-perl-5.26.patch
- "${FILESDIR}"/${P}-K-R-decls-clang.patch
- "${FILESDIR}"/${P}-Clang-16-fixes-for-various-tests.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 f51aa71c2d0a..000000000000
--- a/sys-devel/autoconf/autoconf-2.69-r5.ebuild
+++ /dev/null
@@ -1,58 +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
- 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.69-r8.ebuild b/sys-devel/autoconf/autoconf-2.69-r8.ebuild
deleted file mode 100644
index 3730430ac8a4..000000000000
--- a/sys-devel/autoconf/autoconf-2.69-r8.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} == 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/autoconf-wrapper-13
- !~sys-devel/${P}:2.5
-"
-
-[[ ${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
- "${FILESDIR}"/${P}-K-R-decls-clang.patch
-
- "${WORKDIR}"/patches/${P}-texinfo.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 7ef4e0bcbeb7..000000000000
--- a/sys-devel/autoconf/autoconf-2.71-r1.ebuild
+++ /dev/null
@@ -1,81 +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"
-
-# for 2.71, our Perl time resolution patch changes our min Perl from 5.6
-# (vanilla upstream for 2.71) to 5.8.
-BDEPEND=">=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.8"
-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-2.71-r5.ebuild b/sys-devel/autoconf/autoconf-2.71-r5.ebuild
deleted file mode 100644
index 7749d47f435e..000000000000
--- a/sys-devel/autoconf/autoconf-2.71-r5.ebuild
+++ /dev/null
@@ -1,88 +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"
-
-# for 2.71, our Perl time resolution patch changes our min Perl from 5.6
-# (vanilla upstream for 2.71) to 5.8.
-BDEPEND=">=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.8"
-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}-AC_LANG_CALL_C_cxx.patch
- "${FILESDIR}"/${P}-time.patch
- "${FILESDIR}"/${P}-AC_C_BIGENDIAN-lto.patch
- "${FILESDIR}"/${P}-K-R-decls-clang.patch
- "${FILESDIR}"/${P}-make-4.4.patch
- "${FILESDIR}"/${P}-K-R-decls-clang-deux.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 61ddd6318e4d..000000000000
--- a/sys-devel/autoconf/autoconf-9999.ebuild
+++ /dev/null
@@ -1,58 +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
- 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.10"
-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-Clang-16-fixes-for-various-tests.patch b/sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch
deleted file mode 100644
index d158f7974e81..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch
+++ /dev/null
@@ -1,331 +0,0 @@
-From cb92e8110d1f274b28d5c156a93c525d2b748644 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Wed, 9 Nov 2022 08:27:53 +0000
-Subject: [PATCH] Clang 16 fixes for various tests
-
-Fixes -Wimplicit-int and -Wimplicit-function-declaration
-issues in various built-in tests.
-
-Noticed when building XEmacs 21.4 (thanks to matsl for reporting).
-
-Bug: https://bugs.gentoo.org/874366
-Signed-off-by: Sam James <sam@gentoo.org>
---- a/acgeneral.m4
-+++ b/acgeneral.m4
-@@ -1988,7 +1988,8 @@ changequote([, ])dnl
- AC_MSG_CHECKING(size of $1)
- AC_CACHE_VAL(AC_CV_NAME,
- [AC_TRY_RUN([#include <stdio.h>
--main(void)
-+#include <stdlib.h>
-+int main(void)
- {
- FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
---- a/acspecific.m4
-+++ b/acspecific.m4
-@@ -371,7 +371,7 @@ changequote(, )dnl
- sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
- changequote([, ])dnl
- AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
--[echo 'foo(void){}' > conftest.c
-+[echo 'int foo(void){}' > conftest.c
- # Make sure it works both with $CC and with simple cc.
- # We do the test twice because some compilers refuse to overwrite an
- # existing .o file with -o, though they will create one.
-@@ -706,6 +706,7 @@ fi
- if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- AC_TRY_RUN([#include <ctype.h>
-+#include <stdlib.h>
- #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-@@ -819,6 +820,7 @@ esac
-
- AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
- [AC_TRY_RUN([#include <sys/types.h>
-+#include <stdlib.h>
- #include <$ac_header_dirent>
- int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
-@@ -907,6 +909,8 @@ AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
- changequote(<<, >>)dnl
- <<
- /* Thanks to Mike Rendell for this test. */
-+#include <stdlib.h>
-+#include <unistd.h>
- #include <sys/types.h>
- #define NGID 256
- #undef MAX
-@@ -988,6 +992,7 @@ AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
- [AC_REQUIRE([AC_HEADER_DIRENT])dnl
- AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
- [AC_TRY_RUN([#include <sys/types.h>
-+#include <stdlib.h>
- #include <$ac_header_dirent>
- int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
-@@ -1001,7 +1006,9 @@ AC_DEFUN(AC_FUNC_FNMATCH,
- # Some versions of Solaris or SCO have a broken fnmatch function.
- # So we run a test program. If we are cross-compiling, take no chance.
- # Thanks to John Oleynick and Franc,ois Pinard for this test.
--[AC_TRY_RUN([int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }],
-+[AC_TRY_RUN([#include <stdlib.h>
-+#include <fnmatch.h>
-+int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }],
- ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
- ac_cv_func_fnmatch_works=no)])
- if test $ac_cv_func_fnmatch_works = yes; then
-@@ -1038,6 +1045,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
- #include <sys/types.h>
- #include <fcntl.h>
- #include <sys/mman.h>
-+#include <stdlib.h>
-
- /* This mess was copied from the GNU getpagesize.h. */
- #ifndef HAVE_GETPAGESIZE
-@@ -1165,49 +1173,17 @@ AC_DEFUN(AC_FUNC_GETPGRP,
- *
- * Snarfed from Chet Ramey's bash pgrp.c test program
- */
--#include <stdio.h>
--#include <sys/types.h>
--
--int pid;
--int pg1, pg2, pg3, pg4;
--int ng, np, s, child;
-+#include <stdlib.h>
-
- int main(void)
- {
-- pid = getpid();
-- pg1 = getpgrp(0);
-- pg2 = getpgrp();
-- pg3 = getpgrp(pid);
-- pg4 = getpgrp(1);
--
-- /*
-- * If all of these values are the same, it's pretty sure that
-- * we're on a system that ignores getpgrp's first argument.
-- */
-- if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
-- exit(0);
--
-- child = fork();
-- if (child < 0)
-- exit(1);
-- else if (child == 0) {
-- np = getpid();
-- /*
-- * If this is Sys V, this will not work; pgrp will be
-- * set to np because setpgrp just changes a pgrp to be
-- * the same as the pid.
-- */
-- setpgrp(np, pg1);
-- ng = getpgrp(0); /* Same result for Sys V and BSD */
-- if (ng == pg1) {
-- exit(1);
-- } else {
-- exit(0);
-- }
-- } else {
-- wait(&s);
-- exit(s>>8);
-- }
-+ /* XXX: Gentoo: This function used to check for
-+ BSD vs POSIX getpgrp but the test fails to compile
-+ on modern POSIX systems when not relying on implicit
-+ function declarations. It has no value anyway on such
-+ systems and it's been removed in newer autoconf.
-+ */
-+ exit(0);
- }
- ], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no,
- AC_MSG_ERROR(cannot check getpgrp if cross compiling))
-@@ -1220,9 +1196,7 @@ fi
- AC_DEFUN(AC_FUNC_SETPGRP,
- [AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void,
- AC_TRY_RUN([
--#ifdef HAVE_UNISTD_H
--#include <unistd.h>
--#endif
-+#include <stdlib.h>
-
- /*
- * If this system has a BSD-style setpgrp, which takes arguments, exit
-@@ -1230,10 +1204,13 @@ AC_TRY_RUN([
- */
- int main(void)
- {
-- if (setpgrp(1,1) == -1)
-- exit(0);
-- else
-- exit(1);
-+ /* XXX: Gentoo: This function used to check for
-+ BSD vs POSIX gsetpgrp but the test fails to compile
-+ on modern POSIX systems when not relying on implicit
-+ function declarations. It has no value anyway on such
-+ systems and it's been removed in newer autoconf.
-+ */
-+ exit(1);
- }
- ], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes,
- AC_MSG_ERROR(cannot check setpgrp if cross compiling))
-@@ -1255,9 +1232,11 @@ AC_DEFUN(AC_FUNC_VFORK,
- AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
- AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
- [AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
-+#include <stdlib.h>
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/wait.h>
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
-@@ -1270,11 +1249,11 @@ AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
- but some compilers (e.g. gcc -O) don't grok <vfork.h>.
- Test for this by using a static variable whose address
- is put into a register that is clobbered by the vfork. */
--static
-+static void
- #ifdef __cplusplus
- sparc_address_test (int arg)
- #else
--sparc_address_test (arg) int arg;
-+sparc_address_test (int arg)
- #endif
- {
- static pid_t child;
-@@ -1359,6 +1338,8 @@ AC_DEFUN(AC_FUNC_WAIT3,
- #include <sys/time.h>
- #include <sys/resource.h>
- #include <stdio.h>
-+#include <stdlib.h>
-+#include <unistd.h>
- /* HP-UX has wait3 but does not fill in rusage at all. */
- int main(void) {
- struct rusage r;
-@@ -1452,7 +1433,8 @@ done
- fi
-
- AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
--[AC_TRY_RUN([find_stack_direction ()
-+[AC_TRY_RUN([#include <stdlib.h>
-+int find_stack_direction ()
- {
- static char *addr = 0;
- auto char dummy;
-@@ -1582,6 +1564,8 @@ AC_DEFUN(AC_FUNC_UTIME_NULL,
- # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
- AC_TRY_RUN([#include <sys/types.h>
- #include <sys/stat.h>
-+#include <stdlib.h>
-+#include <utime.h>
- int main(void) {
- struct stat s, t;
- exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
-@@ -1598,6 +1582,7 @@ fi
- AC_DEFUN(AC_FUNC_STRCOLL,
- [AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
- [AC_TRY_RUN([#include <string.h>
-+#include <stdlib.h>
- int main (void)
- {
- exit (strcoll ("abc", "def") >= 0 ||
-@@ -1614,6 +1599,7 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
- [AC_CACHE_CHECK(whether setvbuf arguments are reversed,
- ac_cv_func_setvbuf_reversed,
- [AC_TRY_RUN([#include <stdio.h>
-+#include <stdlib.h>
- /* If setvbuf has the reversed format, exit 0. */
- int main (void) {
- /* This call has the arguments reversed.
-@@ -1646,7 +1632,8 @@ LIBS="-lintl $LIBS"])])])
-
- AC_DEFUN(AC_FUNC_MEMCMP,
- [AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
--[AC_TRY_RUN([
-+[AC_TRY_RUN([#include <stdlib.h>
-+#include <string.h>
- int main(void)
- {
- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
-@@ -1805,6 +1792,7 @@ AC_TRY_RUN(
- #if !defined(__STDC__) || __STDC__ != 1
- #define volatile
- #endif
-+#include <stdlib.h>
- int main(void) {
- volatile char c = 255; exit(c < 0);
- }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
-@@ -1819,7 +1807,8 @@ AC_DEFUN(AC_C_LONG_DOUBLE,
- [if test "$GCC" = yes; then
- ac_cv_c_long_double=yes
- else
--AC_TRY_RUN([int main(void) {
-+AC_TRY_RUN([#include <stdlib.h>
-+int main(void) {
- /* The Stardent Vistra knows sizeof(long double), but does not support it. */
- long double foo = 0.0;
- /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
-@@ -1834,7 +1823,8 @@ fi
- AC_DEFUN(AC_INT_16_BITS,
- [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl
- AC_MSG_CHECKING(whether int is 16 bits)
--AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }],
-+AC_TRY_RUN([#include <stdlib.h>
-+int main(void) { exit(sizeof(int) != 2); }],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no))
- ])
-@@ -1842,7 +1832,8 @@ AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }],
- AC_DEFUN(AC_LONG_64_BITS,
- [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl
- AC_MSG_CHECKING(whether long int is 64 bits)
--AC_TRY_RUN([int main(void) { exit(sizeof(long int) != 8); }],
-+AC_TRY_RUN([#include <stdlib.h>
-+int main(void) { exit(sizeof(long int) != 8); }],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no))
- ])
-@@ -1862,7 +1853,8 @@ AC_TRY_COMPILE([#include <sys/types.h>
- not big endian
- #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
- if test $ac_cv_c_bigendian = unknown; then
--AC_TRY_RUN([int main (void) {
-+AC_TRY_RUN([#include <stdlib.h>
-+int main (void) {
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
-@@ -1885,7 +1877,7 @@ AC_DEFUN(AC_C_INLINE,
- [AC_CACHE_CHECK([for inline], ac_cv_c_inline,
- [ac_cv_c_inline=no
- for ac_kw in inline __inline__ __inline; do
-- AC_TRY_COMPILE(, [} $ac_kw foo(void) {], [ac_cv_c_inline=$ac_kw; break])
-+ AC_TRY_COMPILE(, [} $ac_kw int foo(void) {], [ac_cv_c_inline=$ac_kw; break])
- done
- ])
- case "$ac_cv_c_inline" in
-@@ -2275,7 +2267,10 @@ AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
- i.e. the pid of the child, which means that wait was restarted
- after getting the signal. */
- #include <sys/types.h>
-+#include <sys/wait.h>
- #include <signal.h>
-+#include <stdlib.h>
-+#include <unistd.h>
- ucatch (isig) { }
- int main (void) {
- int i = fork (), status;
-@@ -2444,7 +2439,7 @@ if test "$ac_x_libraries" = NO; then
- # Don't add to $LIBS permanently.
- ac_save_LIBS="$LIBS"
- LIBS="-l$x_direct_test_library $LIBS"
--AC_TRY_LINK(, [${x_direct_test_function}()],
-+AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(0)],
- [LIBS="$ac_save_LIBS"
- # We can link X programs with no special library path.
- ac_x_libraries=],
diff --git a/sys-devel/autoconf/files/autoconf-2.13-K-R-decls-clang.patch b/sys-devel/autoconf/files/autoconf-2.13-K-R-decls-clang.patch
deleted file mode 100644
index 42c3018aea8c..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.13-K-R-decls-clang.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-https://bugs.gentoo.org/870412
-https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b
-
-Backport the K&R decls fix to 2.13 to avoid configure tests
-failing (often "silently", i.e. doesn't fail the build of
-the package overall, just leads to wrong results) with
-newer compilers like the upcoming Clang 16.
-
-From d8ad1096be4352c588b9bc1e16b6758f4f32b96a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
-Date: Mon, 19 Sep 2022 01:38:29 +0200
-Subject: [PATCH] ac{general,specific}: declare void param lists, where apt
-
---- a/acgeneral.m4
-+++ b/acgeneral.m4
-@@ -1542,7 +1542,7 @@ extern "C"
- ])dnl
- [/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
--char $1();
-+char $1(void);
- ]),
- [$1()],
- [$2],
-@@ -1597,7 +1597,7 @@ extern "C"
- ])dnl
- [/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
--char $2();
-+char $2(void);
- ])),
- [$2()],
- eval "ac_cv_lib_$ac_lib_var=yes",
-@@ -1733,7 +1733,7 @@ dnl [#]line __oline__ "[$]0"
- [#]line __oline__ "configure"
- #include "confdefs.h"
- [$1]
--int main() {
-+int main(void) {
- [$2]
- ; return 0; }
- ])EOF
-@@ -1777,7 +1777,7 @@ dnl [#]line __oline__ "[$]0"
- [#]line __oline__ "configure"
- #include "confdefs.h"
- [$1]
--int main() {
-+int main(void) {
- [$2]
- ; return 0; }
- ])EOF
-@@ -1934,7 +1934,7 @@ extern "C"
- ])dnl
- [/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
--char $1();
-+char $1(void);
- ], [
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
-@@ -1988,7 +1988,7 @@ changequote([, ])dnl
- AC_MSG_CHECKING(size of $1)
- AC_CACHE_VAL(AC_CV_NAME,
- [AC_TRY_RUN([#include <stdio.h>
--main()
-+main(void)
- {
- FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
---- a/acspecific.m4
-+++ b/acspecific.m4
-@@ -202,7 +202,7 @@ AC_DEFUN(AC_PROG_CC_WORKS,
- [AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
- AC_LANG_SAVE
- AC_LANG_C
--AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
-+AC_TRY_COMPILER([int main(void){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
- AC_LANG_RESTORE
- AC_MSG_RESULT($ac_cv_prog_cc_works)
- if test $ac_cv_prog_cc_works = no; then
-@@ -217,7 +217,7 @@ AC_DEFUN(AC_PROG_CXX_WORKS,
- [AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
--AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
-+AC_TRY_COMPILER([int main(void){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
- AC_LANG_RESTORE
- AC_MSG_RESULT($ac_cv_prog_cxx_works)
- if test $ac_cv_prog_cxx_works = no; then
-@@ -300,7 +300,7 @@ fi])])
-
- AC_DEFUN(AC_PROG_CC_G,
- [AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
--[echo 'void f(){}' > conftest.c
-+[echo 'void f(void){}' > conftest.c
- if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
- else
-@@ -311,7 +311,7 @@ rm -f conftest*
-
- AC_DEFUN(AC_PROG_CXX_G,
- [AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
--[echo 'void f(){}' > conftest.cc
-+[echo 'void f(void){}' > conftest.cc
- if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
- ac_cv_prog_cxx_g=yes
- else
-@@ -371,7 +371,7 @@ changequote(, )dnl
- sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
- changequote([, ])dnl
- AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
--[echo 'foo(){}' > conftest.c
-+[echo 'foo(void){}' > conftest.c
- # Make sure it works both with $CC and with simple cc.
- # We do the test twice because some compilers refuse to overwrite an
- # existing .o file with -o, though they will create one.
-@@ -709,7 +709,7 @@ AC_TRY_RUN([#include <ctype.h>
- #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
--int main () { int i; for (i = 0; i < 256; i++)
-+int main (void) { int i; for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
- exit (0); }
- ], , ac_cv_header_stdc=no, :)
-@@ -820,7 +820,7 @@ esac
- AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
- [AC_TRY_RUN([#include <sys/types.h>
- #include <$ac_header_dirent>
--int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
-+int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
- if test $ac_cv_func_closedir_void = yes; then
- AC_DEFINE(VOID_CLOSEDIR)
-@@ -911,7 +911,7 @@ changequote(<<, >>)dnl
- #define NGID 256
- #undef MAX
- #define MAX(x, y) ((x) > (y) ? (x) : (y))
--main()
-+int main(void)
- {
- gid_t gidset[NGID];
- int i, n;
-@@ -973,7 +973,7 @@ AC_DEFUN(AC_TYPE_SIGNAL,
- #ifdef __cplusplus
- extern "C" void (*signal (int, void (*)(int)))(int);
- #else
--void (*signal ()) ();
-+void (*signal (void)) (void);
- #endif
- ],
- [int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])
-@@ -989,7 +989,7 @@ AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
- AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
- [AC_TRY_RUN([#include <sys/types.h>
- #include <$ac_header_dirent>
--int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
-+int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
- if test $ac_cv_func_closedir_void = yes; then
- AC_DEFINE(CLOSEDIR_VOID)
-@@ -1001,7 +1001,7 @@ AC_DEFUN(AC_FUNC_FNMATCH,
- # Some versions of Solaris or SCO have a broken fnmatch function.
- # So we run a test program. If we are cross-compiling, take no chance.
- # Thanks to John Oleynick and Franc,ois Pinard for this test.
--[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }],
-+[AC_TRY_RUN([int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }],
- ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
- ac_cv_func_fnmatch_works=no)])
- if test $ac_cv_func_fnmatch_works = yes; then
-@@ -1083,11 +1083,11 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
- #ifdef __cplusplus
- extern "C" { void *malloc(unsigned); }
- #else
--char *malloc();
-+char *malloc(...);
- #endif
-
- int
--main()
-+main(void)
- {
- char *data, *data2, *data3;
- int i, pagesize;
-@@ -1172,7 +1172,7 @@ int pid;
- int pg1, pg2, pg3, pg4;
- int ng, np, s, child;
-
--main()
-+int main(void)
- {
- pid = getpid();
- pg1 = getpgrp(0);
-@@ -1228,7 +1228,7 @@ AC_TRY_RUN([
- * If this system has a BSD-style setpgrp, which takes arguments, exit
- * successfully.
- */
--main()
-+int main(void)
- {
- if (setpgrp(1,1) == -1)
- exit(0);
-@@ -1291,7 +1291,7 @@ sparc_address_test (arg) int arg;
- }
- }
- }
--main() {
-+int main(void) {
- pid_t parent = getpid ();
- pid_t child;
-
-@@ -1360,7 +1360,7 @@ AC_DEFUN(AC_FUNC_WAIT3,
- #include <sys/resource.h>
- #include <stdio.h>
- /* HP-UX has wait3 but does not fill in rusage at all. */
--main() {
-+int main(void) {
- struct rusage r;
- int i;
- /* Use a field that we can force nonzero --
-@@ -1416,7 +1416,7 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
- #pragma alloca
- # else
- # ifndef alloca /* predefined by HP cc +Olibcalls */
--char *alloca ();
-+char *alloca (...);
- # endif
- # endif
- # endif
-@@ -1464,7 +1464,7 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
- else
- return (&dummy > addr) ? 1 : -1;
- }
--main ()
-+int main (void)
- {
- exit (find_stack_direction() < 0);
- }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
-@@ -1582,7 +1582,7 @@ AC_DEFUN(AC_FUNC_UTIME_NULL,
- # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
- AC_TRY_RUN([#include <sys/types.h>
- #include <sys/stat.h>
--main() {
-+int main(void) {
- struct stat s, t;
- exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
- && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
-@@ -1598,7 +1598,7 @@ fi
- AC_DEFUN(AC_FUNC_STRCOLL,
- [AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
- [AC_TRY_RUN([#include <string.h>
--main ()
-+int main (void)
- {
- exit (strcoll ("abc", "def") >= 0 ||
- strcoll ("ABC", "DEF") >= 0 ||
-@@ -1615,7 +1615,7 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
- ac_cv_func_setvbuf_reversed,
- [AC_TRY_RUN([#include <stdio.h>
- /* If setvbuf has the reversed format, exit 0. */
--main () {
-+int main (void) {
- /* This call has the arguments reversed.
- A reversed system may check and see that the address of main
- is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
-@@ -1647,7 +1647,7 @@ LIBS="-lintl $LIBS"])])])
- AC_DEFUN(AC_FUNC_MEMCMP,
- [AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
- [AC_TRY_RUN([
--main()
-+int main(void)
- {
- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
- exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
-@@ -1805,7 +1805,7 @@ AC_TRY_RUN(
- #if !defined(__STDC__) || __STDC__ != 1
- #define volatile
- #endif
--main() {
-+int main(void) {
- volatile char c = 255; exit(c < 0);
- }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
- fi])
-@@ -1819,7 +1819,7 @@ AC_DEFUN(AC_C_LONG_DOUBLE,
- [if test "$GCC" = yes; then
- ac_cv_c_long_double=yes
- else
--AC_TRY_RUN([int main() {
-+AC_TRY_RUN([int main(void) {
- /* The Stardent Vistra knows sizeof(long double), but does not support it. */
- long double foo = 0.0;
- /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
-@@ -1834,7 +1834,7 @@ fi
- AC_DEFUN(AC_INT_16_BITS,
- [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl
- AC_MSG_CHECKING(whether int is 16 bits)
--AC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
-+AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no))
- ])
-@@ -1842,7 +1842,7 @@ AC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
- AC_DEFUN(AC_LONG_64_BITS,
- [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl
- AC_MSG_CHECKING(whether long int is 64 bits)
--AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }],
-+AC_TRY_RUN([int main(void) { exit(sizeof(long int) != 8); }],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no))
- ])
-@@ -1862,7 +1862,7 @@ AC_TRY_COMPILE([#include <sys/types.h>
- not big endian
- #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
- if test $ac_cv_c_bigendian = unknown; then
--AC_TRY_RUN([main () {
-+AC_TRY_RUN([int main (void) {
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
-@@ -1885,7 +1885,7 @@ AC_DEFUN(AC_C_INLINE,
- [AC_CACHE_CHECK([for inline], ac_cv_c_inline,
- [ac_cv_c_inline=no
- for ac_kw in inline __inline__ __inline; do
-- AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
-+ AC_TRY_COMPILE(, [} $ac_kw foo(void) {], [ac_cv_c_inline=$ac_kw; break])
- done
- ])
- case "$ac_cv_c_inline" in
-@@ -2277,7 +2277,7 @@ AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
- #include <sys/types.h>
- #include <signal.h>
- ucatch (isig) { }
--main () {
-+int main (void) {
- int i = fork (), status;
- if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
- signal (SIGINT, ucatch);
-@@ -2654,7 +2654,7 @@ AC_CACHE_VAL(ac_cv_exeext,
- ac_cv_exeext=.exe
- else
- rm -f conftest*
-- echo 'int main () { return 0; }' > conftest.$ac_ext
-+ echo 'int main (void) { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if AC_TRY_EVAL(ac_link); then
- for file in conftest.*; do
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-K-R-decls-clang.patch b/sys-devel/autoconf/files/autoconf-2.69-K-R-decls-clang.patch
deleted file mode 100644
index 77444ebc5be6..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.69-K-R-decls-clang.patch
+++ /dev/null
@@ -1,394 +0,0 @@
-https://bugs.gentoo.org/870412
-https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b
-(and contains a backport of https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=bf5a75953b6d504f0405b1ca33b039b8dd39eef4)
-
-Backport the K&R decls fix to 2.69 to avoid configure tests
-failing (often "silently", i.e. doesn't fail the build of
-the package overall, just leads to wrong results) with
-newer compilers like the upcoming Clang 16.
-
-From e6f401b94b58bb9bb58cd668a996e27663d3e6c7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
-Date: Mon, 19 Sep 2022 12:11:24 +0200
-Subject: [PATCH] backport K&R decl fixes
-
---- a/lib/autoconf/c.m4
-+++ b/lib/autoconf/c.m4
-@@ -97,7 +97,7 @@ m4_define([AC_LANG_PROGRAM(C)],
- m4_ifdef([_AC_LANG_PROGRAM_C_F77_HOOKS], [_AC_LANG_PROGRAM_C_F77_HOOKS])[]dnl
- m4_ifdef([_AC_LANG_PROGRAM_C_FC_HOOKS], [_AC_LANG_PROGRAM_C_FC_HOOKS])[]dnl
- int
--main ()
-+main (void)
- {
- dnl Do *not* indent the following line: there may be CPP directives.
- dnl Don't move the `;' right after for the same reason.
-@@ -130,7 +130,7 @@ m4_if([$2], [main], ,
- #ifdef __cplusplus
- extern "C"
- #endif
--char $2 ();])], [return $2 ();])])
-+char $2 (void);])], [return $2 ();])])
-
-
- # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
-@@ -154,7 +154,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
- #define $1 innocuous_$1
-
- /* System header to define __stub macros and hopefully few prototypes,
-- which can conflict with char $1 (); below.
-+ which can conflict with char $1 (void); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-@@ -172,7 +172,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
- #ifdef __cplusplus
- extern "C"
- #endif
--char $1 ();
-+char $1 (void);
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-@@ -201,8 +201,8 @@ return test_array @<:@0@:>@;
- # But we include them only after the EXPRESSION has been evaluated.
- m4_define([AC_LANG_INT_SAVE(C)],
- [AC_LANG_PROGRAM([$1
--static long int longval () { return $2; }
--static unsigned long int ulongval () { return $2; }
-+static long int longval (void) { return $2; }
-+static unsigned long int ulongval (void) { return $2; }
- @%:@include <stdio.h>
- @%:@include <stdlib.h>],
- [
-@@ -1625,8 +1625,8 @@ for ac_kw in inline __inline__ __inline; do
- AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [#ifndef __cplusplus
- typedef int foo_t;
--static $ac_kw foo_t static_foo () {return 0; }
--$ac_kw foo_t foo () {return 0; }
-+static $ac_kw foo_t static_foo (void) {return 0; }
-+$ac_kw foo_t foo (void) {return 0; }
- #endif
- ])],
- [ac_cv_c_inline=$ac_kw])
-@@ -1949,7 +1949,7 @@ m4_define([_AC_LANG_OPENMP(C)],
- choke me
- #endif
- #include <omp.h>
--int main () { return omp_get_num_threads (); }
-+int main (void) { return omp_get_num_threads (); }
- ])
-
- # _AC_LANG_OPENMP(C++)
---- a/lib/autoconf/functions.m4
-+++ b/lib/autoconf/functions.m4
-@@ -463,9 +463,6 @@ AC_CACHE_CHECK([whether closedir returns void],
- [ac_cv_func_closedir_void],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
- #include <$ac_header_dirent>
--#ifndef __cplusplus
--int closedir ();
--#endif
- ],
- [[return closedir (opendir (".")) != 0;]])],
- [ac_cv_func_closedir_void=no],
-@@ -893,7 +890,7 @@ AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull,
- [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
- # include <stdlib.h>
- #else
--char *malloc ();
-+char *malloc (long);
- #endif
- ]],
- [return ! malloc (0);])],
-@@ -1029,7 +1026,7 @@ static const char *tz_strings[] = {
- /* Return 0 if mktime fails to convert a date in the spring-forward gap.
- Based on a problem report from Andreas Jaeger. */
- static int
--spring_forward_gap ()
-+spring_forward_gap (void)
- {
- /* glibc (up to about 1998-10-07) failed this test. */
- struct tm tm;
-@@ -1066,7 +1063,7 @@ mktime_test (time_t now)
- }
-
- static int
--irix_6_4_bug ()
-+irix_6_4_bug (void)
- {
- /* Based on code from Ariel Faigon. */
- struct tm tm;
-@@ -1108,7 +1105,7 @@ bigtime_test (int j)
- }
-
- static int
--year_2050_test ()
-+year_2050_test (void)
- {
- /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
- ignoring leap seconds. */
-@@ -1138,7 +1135,7 @@ year_2050_test ()
- }
-
- int
--main ()
-+main (void)
- {
- time_t t, delta;
- int i, j;
-@@ -1232,7 +1229,7 @@ AC_CACHE_CHECK([for working mmap], [ac_cv_func_mmap_fixed_mapped],
- #include <sys/mman.h>
-
- #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
--char *malloc ();
-+char *malloc (void *, long);
- #endif
-
- /* This mess was copied from the GNU getpagesize.h. */
-@@ -1268,7 +1265,7 @@ char *malloc ();
- #endif /* no HAVE_GETPAGESIZE */
-
- int
--main ()
-+main (void)
- {
- char *data, *data2, *data3;
- const char *cdata2;
-@@ -1398,7 +1395,7 @@ AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull,
- [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
- # include <stdlib.h>
- #else
--char *realloc ();
-+char *realloc (void *, long);
- #endif
- ]],
- [return ! realloc (0, 0);])],
-@@ -1547,11 +1544,8 @@ AC_DEFUN([AC_FUNC_STRTOD],
- AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod,
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
- ]AC_INCLUDES_DEFAULT[
--#ifndef strtod
--double strtod ();
--#endif
- int
--main()
-+main(void)
- {
- {
- /* Some versions of Linux strtod mis-parse strings with leading '+'. */
-@@ -1645,8 +1639,7 @@ AC_CACHE_CHECK([whether strerror_r returns char *],
- # former has a strerror_r that returns char*, while the latter
- # has a strerror_r that returns `int'.
- # This test should segfault on the DEC system.
-- AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
-- extern char *strerror_r ();],
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
- [[char buf[100];
- char x = *strerror_r (0, buf, sizeof buf);
- return ! isalpha (x);]])],
-@@ -1879,7 +1872,7 @@ sparc_address_test (arg) int arg;
- }
-
- int
--main ()
-+main (void)
- {
- pid_t parent = getpid ();
- pid_t child;
-@@ -1985,7 +1978,7 @@ AC_CACHE_CHECK([for wait3 that fills in rusage],
- #include <sys/wait.h>
- /* HP-UX has wait3 but does not fill in rusage at all. */
- int
--main ()
-+main (void)
- {
- struct rusage r;
- int i;
---- a/lib/autoconf/headers.m4
-+++ b/lib/autoconf/headers.m4
-@@ -712,7 +712,7 @@ if test $ac_cv_header_stdc = yes; then
-
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- int
--main ()
-+main (void)
- {
- int i;
- for (i = 0; i < 256; i++)
---- a/lib/autoconf/specific.m4
-+++ b/lib/autoconf/specific.m4
-@@ -257,7 +257,7 @@ void ucatch (dummy) int dummy; { }
- #endif
-
- int
--main ()
-+main (void)
- {
- int i = fork (), status;
-
---- a/lib/autoconf/types.m4
-+++ b/lib/autoconf/types.m4
-@@ -267,7 +267,7 @@ AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
- #define MAX(x, y) ((x) > (y) ? (x) : (y))
-
- int
--main ()
-+main (void)
- {
- gid_t gidset[NGID];
- int i, n;
---- a/tests/c.at
-+++ b/tests/c.at
-@@ -354,7 +354,7 @@ AT_DATA([foo.c],
- #endif
- #include <stdio.h>
-
--int main ()
-+int main (void)
- {
- #ifdef _OPENMP
- #pragma omp parallel
-@@ -404,7 +404,7 @@ foo.@OBJEXT@: foo.cpp
- ]])
-
- AT_DATA([foo.cpp],
--[[int main ()
-+[[int main (void)
- {
- return 0;
- }
---- a/tests/compile.at
-+++ b/tests/compile.at
-@@ -124,7 +124,7 @@ AC_PROG_CC
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME
- choke me
- #endif
--int main ()
-+int main (void)
- {
- return 0;
- }
-@@ -150,7 +150,7 @@ AC_LANG([C++])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME
- choke me
- #endif
--int main ()
-+int main (void)
- {
- return 0;
- }
-@@ -249,7 +249,7 @@ AT_CHECK([sed -n 's/ *$//; /#define PACKAGE/,$p' stdout], [],
-
- const char hw[] = "Hello, World\n";
- int
--main ()
-+main (void)
- {
- fputs (hw, stdout);
- ;
-@@ -269,7 +269,7 @@ AT_KEYWORDS([AC_LANG_DEFINES_PROVIDED])
-
- AT_DATA([configure.ac],
- [[AC_INIT
--AC_COMPILE_IFELSE([int main () { return 0; }], [],
-+AC_COMPILE_IFELSE([int main (void) { return 0; }], [],
- [AC_MSG_ERROR([compiling trivial program failed])])
- ]])
-
-@@ -280,7 +280,7 @@ AT_CHECK_CONFIGURE([-q])
-
- AT_DATA([configure.ac],
- [[AC_INIT
--AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main () { return 0; }], [],
-+AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main (void) { return 0; }], [],
- [AC_MSG_ERROR([compiling trivial program failed])])
- ]])
-
-@@ -324,7 +324,7 @@ test $estatus != 2 &&
- AC_MSG_ERROR([did not get as 2 exit status: $estatus])])
-
- # The old stinky one.
--AC_TRY_RUN([int main () { return 3; }],
-+AC_TRY_RUN([int main (void) { return 3; }],
- [AC_MSG_ERROR([saw `return 3' as a success])],
- [estatus=$?
- test $estatus != 3 &&
---- a/tests/fortran.at
-+++ b/tests/fortran.at
-@@ -223,7 +223,7 @@ void FOOBAR_F77 (double *x, double *y);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int F77_DUMMY_MAIN () { return 1; }
-+ int F77_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main(int argc, char *argv[])
-@@ -301,7 +301,7 @@ void FOOBAR_FC(double *x, double *y);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int FC_DUMMY_MAIN () { return 1; }
-+ int FC_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main (int argc, char *argv[])
-@@ -533,7 +533,7 @@ void @foobar@ (int *x);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int F77_DUMMY_MAIN () { return 1; }
-+ int F77_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main(int argc, char *argv[])
-@@ -607,7 +607,7 @@ void @foobar@ (int *x);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int FC_DUMMY_MAIN () { return 1; }
-+ int FC_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main(int argc, char *argv[])
---- a/tests/semantics.at
-+++ b/tests/semantics.at
-@@ -107,7 +107,7 @@ AT_CHECK_MACRO([AC_CHECK_DECLS],
- [[int yes = 1;
- enum { myenum };
- struct { int x[20]; } mystruct;
-- extern int myfunc();
-+ extern int myfunc (void);
- #define mymacro1(arg) arg
- #define mymacro2]])
- # The difference in space-before-open-paren is intentional.
---- a/lib/autoconf/c.m4
-+++ b/lib/autoconf/c.m4
-@@ -1106,9 +1106,7 @@ struct stat;
- /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
- struct buf { int x; };
- FILE * (*rcsopen) (struct buf *, struct stat *, int);
--static char *e (p, i)
-- char **p;
-- int i;
-+static char *e (char **p, int i)
- {
- return p[i];
- }
---- a/lib/autoconf/specific.m4
-+++ b/lib/autoconf/specific.m4
-@@ -251,10 +251,9 @@ AC_INCLUDES_DEFAULT
- /* Some platforms explicitly require an extern "C" signal handler
- when using C++. */
- #ifdef __cplusplus
--extern "C" void ucatch (int dummy) { }
--#else
--void ucatch (dummy) int dummy; { }
-+extern "C"
- #endif
-+void ucatch (int dummy) { }
-
- int
- main (void)
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-AC_C_BIGENDIAN-lto.patch b/sys-devel/autoconf/files/autoconf-2.71-AC_C_BIGENDIAN-lto.patch
deleted file mode 100644
index 48fbdc6f544b..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.71-AC_C_BIGENDIAN-lto.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=234fc6c86613ed3f366dd1d88996e4d5d85ee222
-
-From 234fc6c86613ed3f366dd1d88996e4d5d85ee222 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Wed, 27 Jul 2022 08:53:35 -0700
-Subject: Port AC_C_BIGENDIAN to cross gcc -std=c11 -flto
-
-* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Improve the
-inherently-unportable grep trick well enough to survive gcc
--std=c11 -flto when cross-compiling (sr#110687).
---- a/lib/autoconf/c.m4
-+++ b/lib/autoconf/c.m4
-@@ -1838,8 +1838,8 @@ AC_DEFUN([AC_C_BIGENDIAN],
- [ac_cv_c_bigendian=no],
- [ac_cv_c_bigendian=yes],
- [# Try to guess by grepping values from an object file.
-- AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM(
-+ AC_LINK_IFELSE(
-+ [AC_LANG_SOURCE(
- [[unsigned short int ascii_mm[] =
- { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
- unsigned short int ascii_ii[] =
-@@ -1854,13 +1854,20 @@ AC_DEFUN([AC_C_BIGENDIAN],
- int use_ebcdic (int i) {
- return ebcdic_mm[i] + ebcdic_ii[i];
- }
-- extern int foo;
-- ]],
-- [[return use_ascii (foo) == use_ebcdic (foo);]])],
-- [if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-+ int
-+ main (int argc, char **argv)
-+ {
-+ /* Intimidate the compiler so that it does not
-+ optimize the arrays away. */
-+ char *p = argv[0];
-+ ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
-+ ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
-+ return use_ascii (argc) == use_ebcdic (*p);
-+ }]])],
-+ [if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
- ac_cv_c_bigendian=yes
- fi
-- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-+ if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
-cgit v1.1
diff --git a/sys-devel/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch b/sys-devel/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch
deleted file mode 100644
index 5b53d17135bc..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=b27bc3e230bb12fdd9a813e38e82bc4c3e22b4cc
-
-Note: we drop the comma from the comment because some packages
-have bad quoting, and while that will need to be sorted when/if
-autoconf 2.72 is released, we've got our hands full with the
-Clang situation right now (bug #871753).
-
-From b27bc3e230bb12fdd9a813e38e82bc4c3e22b4cc Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Tue, 31 Aug 2021 16:30:46 -0700
-Subject: Port AC_LANG_CALL(C) to C++
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-* lib/autoconf/c.m4 (AC_LANG_CALL(C)): Add an extern "C" if C++.
-Problem reported by Vincent Lefèvre (sr #110532).
---- a/lib/autoconf/c.m4
-+++ b/lib/autoconf/c.m4
-@@ -126,7 +126,13 @@ m4_define([AC_LANG_CALL(C)],
- m4_if([$2], [main], ,
- [/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
-+ builtin and then its argument prototype would still apply.
-+ The 'extern "C"' is for builds by C++ compilers;
-+ although this is not generally supported in C code supporting it here
-+ has little cost and some practical benefit (sr 110532). */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
- char $2 ();])], [return $2 ();])])
-
-
-cgit v1.1
diff --git a/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch b/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch
deleted file mode 100644
index 6a3d6580a3f6..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-https://bugs.gentoo.org/870412
-https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=bf5a75953b6d504f0405b1ca33b039b8dd39eef4
-
-Backport the K&R decls fix to 2.71 to avoid configure tests
-failing (often "silently", i.e. doesn't fail the build of
-the package overall, just leads to wrong results) with
-newer compilers like the upcoming Clang 16.
-
-From bf5a75953b6d504f0405b1ca33b039b8dd39eef4 Mon Sep 17 00:00:00 2001
-From: Zack Weinberg <zackw@panix.com>
-Date: Thu, 10 Nov 2022 12:05:30 -0500
-Subject: More fixes for compilers that reject K&R function definitions.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This fixes all of the remaining failures exposed by running the
-testsuite with GCC 12 and
-CC='cc -Wimplicit-function-declaration -Wold-style-definition
- -Wimplicit-int -Werror'
-.
-
-* lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS): Don’t use K&R function
- definitions.
-* lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise.
- (AC_FUNC_MKTIME): Declare functions taking no arguments as ‘fn (void)’
- not ‘fn ()’.
-* lib/autoconf/c.m4 (_AC_C_C99_TEST_GLOBALS): Declare free().
---- a/lib/autoconf/c.m4
-+++ b/lib/autoconf/c.m4
-@@ -1153,9 +1153,7 @@ struct stat;
- /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
- struct buf { int x; };
- struct buf * (*rcsopen) (struct buf *, struct stat *, int);
--static char *e (p, i)
-- char **p;
-- int i;
-+static char *e (char **p, int i)
- {
- return p[i];
- }
-@@ -1212,6 +1210,7 @@ extern int puts (const char *);
- extern int printf (const char *, ...);
- extern int dprintf (int, const char *, ...);
- extern void *malloc (size_t);
-+extern void free (void *);
-
- // Check varargs macros. These examples are taken from C99 6.10.3.5.
- // dprintf is used instead of fprintf to avoid needing to declare
---- a/lib/autoconf/functions.m4
-+++ b/lib/autoconf/functions.m4
-@@ -1091,7 +1091,7 @@ static const char *tz_strings[] = {
- /* Return 0 if mktime fails to convert a date in the spring-forward gap.
- Based on a problem report from Andreas Jaeger. */
- static int
--spring_forward_gap ()
-+spring_forward_gap (void)
- {
- /* glibc (up to about 1998-10-07) failed this test. */
- struct tm tm;
-@@ -1128,7 +1128,7 @@ mktime_test (time_t now)
- }
-
- static int
--irix_6_4_bug ()
-+irix_6_4_bug (void)
- {
- /* Based on code from Ariel Faigon. */
- struct tm tm;
-@@ -1170,7 +1170,7 @@ bigtime_test (int j)
- }
-
- static int
--year_2050_test ()
-+year_2050_test (void)
- {
- /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
- ignoring leap seconds. */
---- a/lib/autoconf/specific.m4
-+++ b/lib/autoconf/specific.m4
-@@ -361,10 +361,9 @@ AC_INCLUDES_DEFAULT
- /* Some platforms explicitly require an extern "C" signal handler
- when using C++. */
- #ifdef __cplusplus
--extern "C" void ucatch (int dummy) { }
--#else
--void ucatch (dummy) int dummy; { }
-+extern "C"
- #endif
-+void ucatch (int dummy) { }
-
- int
- main (void)
-cgit v1.1
diff --git a/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang.patch b/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang.patch
deleted file mode 100644
index e2e451e86920..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-https://bugs.gentoo.org/870412
-https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b
-
-Backport the K&R decls fix to 2.71 to avoid configure tests
-failing (often "silently", i.e. doesn't fail the build of
-the package overall, just leads to wrong results) with
-newer compilers like the upcoming Clang 16.
-
-From 8b5e2016c7ed2d67f31b03a3d2e361858ff5299b Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Thu, 1 Sep 2022 16:19:50 -0500
-Subject: Port to compilers that moan about K&R func decls
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-* lib/autoconf/c.m4 (AC_LANG_CALL, AC_LANG_FUNC_LINK_TRY):
-Use '(void)' rather than '()' in function prototypes, as the latter
-provokes fatal errors in some compilers nowadays.
-* lib/autoconf/functions.m4 (AC_FUNC_STRTOD):
-* tests/fortran.at (AC_F77_DUMMY_MAIN usage):
-* tests/semantics.at (AC_CHECK_DECLS):
-Don’t use () in a function decl.
---- a/lib/autoconf/c.m4
-+++ b/lib/autoconf/c.m4
-@@ -133,7 +133,7 @@ m4_if([$2], [main], ,
- #ifdef __cplusplus
- extern "C"
- #endif
--char $2 ();])], [return $2 ();])])
-+char $2 (void);])], [return $2 ();])])
-
-
- # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
-@@ -157,7 +157,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
- #define $1 innocuous_$1
-
- /* System header to define __stub macros and hopefully few prototypes,
-- which can conflict with char $1 (); below. */
-+ which can conflict with char $1 (void); below. */
-
- #include <limits.h>
- #undef $1
-@@ -168,7 +168,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
- #ifdef __cplusplus
- extern "C"
- #endif
--char $1 ();
-+char $1 (void);
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
---- a/lib/autoconf/functions.m4
-+++ b/lib/autoconf/functions.m4
-@@ -1613,9 +1613,6 @@ AC_DEFUN([AC_FUNC_STRTOD],
- AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod,
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
- ]AC_INCLUDES_DEFAULT[
--#ifndef strtod
--double strtod ();
--#endif
- int
- main (void)
- {
---- a/tests/fortran.at
-+++ b/tests/fortran.at
-@@ -233,7 +233,7 @@ void FOOBAR_F77 (double *x, double *y);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int F77_DUMMY_MAIN () { return 1; }
-+ int F77_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main(int argc, char *argv[])
-@@ -315,7 +315,7 @@ void FOOBAR_FC(double *x, double *y);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int FC_DUMMY_MAIN () { return 1; }
-+ int FC_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main (int argc, char *argv[])
-@@ -561,7 +561,7 @@ void @foobar@ (int *x);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int F77_DUMMY_MAIN () { return 1; }
-+ int F77_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main(int argc, char *argv[])
-@@ -637,7 +637,7 @@ void @foobar@ (int *x);
- # ifdef __cplusplus
- extern "C"
- # endif
-- int FC_DUMMY_MAIN () { return 1; }
-+ int FC_DUMMY_MAIN (void) { return 1; }
- #endif
-
- int main(int argc, char *argv[])
---- a/tests/semantics.at
-+++ b/tests/semantics.at
-@@ -207,7 +207,7 @@ AT_CHECK_MACRO([AC_CHECK_DECLS],
- [[extern int yes;
- enum { myenum };
- extern struct mystruct_s { int x[20]; } mystruct;
-- extern int myfunc();
-+ extern int myfunc (int);
- #define mymacro1(arg) arg
- #define mymacro2]])
- # Ensure we can detect missing declarations of functions whose
-cgit v1.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-make-4.4.patch b/sys-devel/autoconf/files/autoconf-2.71-make-4.4.patch
deleted file mode 100644
index 4dcf05996180..000000000000
--- a/sys-devel/autoconf/files/autoconf-2.71-make-4.4.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=31f673434ee402258b45e958c88acc8725d82b1a
-https://savannah.gnu.org/bugs/?63040
-https://bugs.gentoo.org/869257
-
-From 31f673434ee402258b45e958c88acc8725d82b1a Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 9 Sep 2022 16:54:11 -0500
-Subject: Port to GNU make 4.4
-
-* cfg.mk (PATH): Assign eagerly, and simplify shell use, avoiding
-use of the shell entirely if PWD is set, as it should be.
-Problem reported by Sergei Trofimovich in:
-https://lists.gnu.org/r/autoconf-patches/2022-09/msg00007.html
---- a/cfg.mk
-+++ b/cfg.mk
-@@ -18,7 +18,7 @@
- # This file is '-include'd into GNUmakefile.
-
- # Build with our own versions of these tools, when possible.
--export PATH = $(shell echo "`pwd`/tests:$$PATH")
-+export PATH := $(or $(PWD),$(shell pwd))/tests:$(PATH)
-
- # Remove the autoreconf-provided INSTALL, so that we regenerate it.
- _autoreconf = autoreconf -i -v && rm -f INSTALL
-cgit v1.1
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 4ff4a48125bc..000000000000
--- a/sys-devel/autoconf/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="savannah">autoconf</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-devel/autogen/autogen-5.18.16-r1.ebuild b/sys-devel/autogen/autogen-5.18.16-r3.ebuild
index 147472e14b0a..e908a1837ef5 100644
--- a/sys-devel/autogen/autogen-5.18.16-r1.ebuild
+++ b/sys-devel/autogen/autogen-5.18.16-r3.ebuild
@@ -1,22 +1,26 @@
-# 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"
@@ -31,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() {
@@ -59,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/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/automake-wrapper-99999999.ebuild b/sys-devel/automake-wrapper/automake-wrapper-99999999.ebuild
deleted file mode 100644
index ecb9a1b0530c..000000000000
--- a/sys-devel/automake-wrapper/automake-wrapper-99999999.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Wrapper for automake to manage multiple automake versions"
-HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/autotools-wrappers.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/autotools-wrappers.git/snapshot/${MY_P}.tar.gz"
-
- 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}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-
-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() {
- exeinto /usr/$(get_libdir)/misc
- doexe am-wrapper.sh
-
- local x=
- for x in automake aclocal ; do
- dosym -r /usr/$(get_libdir)/misc/am-wrapper.sh /usr/bin/${x}
- done
-
- 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 2847c0b0420f..000000000000
--- a/sys-devel/automake-wrapper/metadata.xml
+++ /dev/null
@@ -1,13 +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>
- <stabilize-allarches/>
- <upstream>
- <remote-id type="gentoo">proj/autotools-wrappers</remote-id>
- <remote-id type="github">gentoo/autotools-wrappers</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-devel/automake/Manifest b/sys-devel/automake/Manifest
deleted file mode 100644
index ee180dcca549..000000000000
--- a/sys-devel/automake/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST automake-1.11.6.tar.xz 1092908 BLAKE2B 17254d81d6920c32aa877b6c892025de8e4060b8bcbe50fff841ada513dd462ddde8fc6838b4976098a812f8fda047e7186cb62cea8175df615dde75a9959144 SHA512 6e4cdf69f07734954f770fd4a7211a8c9dc69fe25a7746bd3c1e01d3139c94cab2900399e87371548833e99687e0d2b59c5e746ab2fdfbc7d47f2c1d439137ba
-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 2aea15120d4a..000000000000
--- a/sys-devel/automake/automake-1.11.6-r3.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2022 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-5.6
- >=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.16.5.ebuild b/sys-devel/automake/automake-1.16.5.ebuild
deleted file mode 100644
index 055d581c2515..000000000000
--- a/sys-devel/automake/automake-1.16.5.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-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 ~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"
- 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-5.6
- >=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 -b 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. bug #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 df5d9b7ecfc6..000000000000
--- a/sys-devel/automake/automake-9999.ebuild
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-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-5.6
- >=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} )
-"
-
-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 -b 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. bug #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-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.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-r6.ebuild b/sys-devel/bc/bc-1.07.1-r6.ebuild
index 0d884fd7d23f..b3c954931a8e 100644
--- a/sys-devel/bc/bc-1.07.1-r6.ebuild
+++ b/sys-devel/bc/bc-1.07.1-r6.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://gnu/bc/${P}.tar.gz"
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="
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-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-3.2.6-r1.ebuild
index d096612de55a..22d10d9f7b20 100644
--- a/sys-devel/binutils-apple/binutils-apple-3.2.6-r1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-3.2.6-r1.ebuild
@@ -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 5c87dd7ecf22..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
@@ -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-r2.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild
index 8d4f21c88bb0..b1c82e7522e4 100644
--- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild
@@ -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 f9cff1890d47..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.5.tar.xz 7344 BLAKE2B decef43013ca2f7c6d36c12d08d55f499d866b6b1b55ed58f8b2df3761077b5e2c4d09d1f2c40762d42c2d3b9827575833a502b79180ef13b845f1a39a5f2feb SHA512 6f6e21799b47e38cd61621e4ec018dc0db4811f363c0817025c3e3be651d3790b30a0cab233f35fe40b1d57c88daa246037f24a7488187f4e47cca589d87d45b
diff --git a/sys-devel/binutils-config/binutils-config-5.4.1.ebuild b/sys-devel/binutils-config/binutils-config-5.4.1.ebuild
deleted file mode 100644
index eafb482fa18a..000000000000
--- a/sys-devel/binutils-config/binutils-config-5.4.1.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2022 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/${CATEGORY}/${PN}/${P}.tar.xz"
- 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"
-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.5.ebuild b/sys-devel/binutils-config/binutils-config-5.5.ebuild
index 4a85f28d4cdb..b6729edc8359 100644
--- a/sys-devel/binutils-config/binutils-config-5.5.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.5.ebuild
@@ -8,13 +8,13 @@ if [[ ${PV} == 9999 ]]; 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"
+ 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/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild
index 4a85f28d4cdb..c1bb9c114e91 100644
--- a/sys-devel/binutils-config/binutils-config-9999.ebuild
+++ b/sys-devel/binutils-config/binutils-config-9999.ebuild
@@ -14,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"
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 4a952e86bb1f..1ab98699a912 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -2,7 +2,11 @@ DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
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-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
+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-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
+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-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.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index 559d2f8de6ce..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,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
@@ -60,10 +60,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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 9bc8365ff2fb..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
@@ -61,10 +61,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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.39-r4.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild
index 5076d24dc8fc..9b2ba15370d8 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-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
@@ -22,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=5
+PATCH_VER=6
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -61,10 +61,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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.40.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
index a02cbef8641b..9b2ba15370d8 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.40.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -22,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=1
+PATCH_VER=6
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -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,10 +61,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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.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 3b4c9e9ea2e1..5e566060dac2 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -17,6 +17,7 @@
<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/binutils/Manifest b/sys-devel/binutils/Manifest
index 8ce6050a8086..bc60a64f9804 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -12,7 +12,11 @@ DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
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-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
+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-1.tar.xz 12260 BLAKE2B d525502e08012080417634fd41981550362d4d799952e89f388af2a6e5db5b80e88bfdb0b5b1d2a1bcf8ebda529eefbced8fa2ae84c7fe3ddb10184e98d4b369 SHA512 140f80be786511f63651e67bf25c2992de6a21bac00a3252dcf98becc3f9379c8070ef1380d5542bbf2e1908c50dab2c7ebb651d13bb97609594fe9fd9f1f079
+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-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 df54d7b7423d..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -76,7 +76,7 @@ DEPEND="${RDEPEND}
doc? ( sys-apps/texinfo )
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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,12 +151,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local x
echo
@@ -286,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 04c74a25e107..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -68,7 +68,7 @@ DEPEND="${RDEPEND}
doc? ( sys-apps/texinfo )
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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,12 +144,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local x
echo
@@ -279,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 941890975f99..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -69,7 +69,7 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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,12 +141,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local x
echo
@@ -280,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 3e9e6183b4cd..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -58,10 +58,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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,12 +158,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local x
echo
@@ -304,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 dcaa4a446b58..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -58,10 +58,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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,12 +153,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local x
echo
@@ -299,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 333ff355ede5..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -58,10 +58,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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,12 +159,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
@@ -318,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 bea67260a9ec..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -58,10 +58,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -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,12 +164,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
@@ -326,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.39-r4.ebuild b/sys-devel/binutils/binutils-2.39-r5.ebuild
index 3adccc27a417..efeadfc827de 100644
--- a/sys-devel/binutils/binutils-2.39-r4.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -20,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=5
+PATCH_VER=6
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -59,10 +59,10 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -120,17 +120,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
@@ -171,12 +160,7 @@ src_configure() {
# Keep things sane
strip-flags
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
@@ -341,6 +325,10 @@ src_compile() {
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
diff --git a/sys-devel/binutils/binutils-2.40.ebuild b/sys-devel/binutils/binutils-2.40-r9.ebuild
index 0d5192d3560a..a8b13b594c74 100644
--- a/sys-devel/binutils/binutils-2.40.ebuild
+++ b/sys-devel/binutils/binutils-2.40-r9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,7 +9,7 @@ DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="cet doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
+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
@@ -19,7 +19,7 @@ IUSE="cet doc gold gprofng multitarget +nls pgo +plugins static-libs test vanill
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=1
+PATCH_VER=7
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -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
#
@@ -52,6 +52,9 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}"
@@ -59,11 +62,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
zstd? ( virtual/pkgconfig )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -112,6 +115,12 @@ 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
+ fi
fi
fi
@@ -121,17 +130,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
@@ -174,6 +172,8 @@ src_configure() {
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
@@ -236,6 +236,11 @@ 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
@@ -276,9 +281,7 @@ src_configure() {
# {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
@@ -319,11 +322,11 @@ src_compile() {
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
- emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+ emake tooldir="${EPREFIX}${TOOLPATH}" 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
@@ -334,10 +337,14 @@ src_compile() {
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 V=1 check
+ emake -k check
}
src_install() {
@@ -346,7 +353,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
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 c8e0d5f94944..8576f0e43ff0 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,7 +9,7 @@ DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="cet doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
+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 @@ IUSE="cet doc gold gprofng multitarget +nls pgo +plugins static-libs test vanill
# 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,7 +28,7 @@ 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)
@@ -52,6 +52,9 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}"
@@ -59,11 +62,11 @@ BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
- sys-devel/bc
+ app-alternatives/bc
)
nls? ( sys-devel/gettext )
zstd? ( virtual/pkgconfig )
- sys-devel/flex
+ app-alternatives/lex
app-alternatives/yacc
"
@@ -112,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
@@ -121,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
@@ -174,14 +173,7 @@ src_configure() {
use cet && filter-flags -mindirect-branch -mindirect-branch=*
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
- # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
- # https://github.com/gentoo/gentoo/pull/28355
- # mold needs this too but right now tc-ld-is-mold is also not available
- if tc-ld-is-lld; then
- append-ldflags -Wl,--undefined-version
- fi
-
- use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local x
echo
@@ -245,30 +237,20 @@ 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
-
- # 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)
-
+ --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)"
@@ -277,17 +259,13 @@ src_configure() {
$(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
@@ -306,15 +284,63 @@ src_configure() {
$(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
@@ -328,11 +354,15 @@ src_compile() {
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
- emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+ # 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
@@ -343,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() {
@@ -355,7 +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
@@ -439,6 +487,8 @@ src_install() {
# 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
}
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 9b80e61912f4..3cc106863437 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -13,6 +13,7 @@
<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/bison-3.8.2-r2.ebuild b/sys-devel/bison/bison-3.8.2-r2.ebuild
index 5b827b301fd4..b778f945857a 100644
--- a/sys-devel/bison/bison-3.8.2-r2.ebuild
+++ b/sys-devel/bison/bison-3.8.2-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
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/"
@@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${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="examples nls static test"
RESTRICT="!test? ( test )"
@@ -25,7 +25,7 @@ DEPEND="
"
RDEPEND="${DEPEND}"
BDEPEND="
- sys-devel/flex
+ app-alternatives/lex
test? ( dev-lang/perl )
verify-sig? ( sec-keys/openpgp-keys-bison )
"
@@ -68,6 +68,10 @@ src_configure() {
econf "${myeconfargs[@]}"
}
+src_test() {
+ emake check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
+}
+
src_install() {
default
@@ -91,7 +95,7 @@ pkg_postinst() {
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 unsual otherwise."
+ 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
diff --git a/sys-devel/bmake/Manifest b/sys-devel/bmake/Manifest
deleted file mode 100644
index 95d5d4a04272..000000000000
--- a/sys-devel/bmake/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST bmake-20220928.tar.gz 821224 BLAKE2B 9b377a9a8d329d229aae37fd852a68629edb78f7f0f16bf8aeb59df4da886fe89d8b7defd8294fa49fca397d4726e704eb9c95936561fe8a3a0a1fdfe4e5b861 SHA512 13fde6517d79080c5a548b1e47e4fbf00d54752f48b40d10542926b26a3be22da70877ca2b977b43366ec1b632a76a6974c78155c39895910e01e4142e7675a0
-DIST bmake-20230120.tar.gz 823514 BLAKE2B 45e96f4911b8965b44ebe30c636819b36cb33a9733304f3bb8a99a806356ef1f01925c48a0fd25cf57b65524ae6ef544b6a79974bf1f92b749a242323a068fdd SHA512 b3c54f723adaf3329af14247d9891b1732d2b6dc9856e30be6fd65f3cd7aab85c4fcef1ef9799eaca5203357e2be5a6564d7e9108844b459654b1fa3767f721a
-DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b
diff --git a/sys-devel/bmake/bmake-20220928.ebuild b/sys-devel/bmake/bmake-20220928.ebuild
deleted file mode 100644
index 15621472a9d8..000000000000
--- a/sys-devel/bmake/bmake-20220928.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2023 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 ~loong ~ppc ~ppc64 ~x86"
-
-# Skip failing test (sandbox and csh)
-PATCHES=(
- "${FILESDIR}"/${PN}-20210206-tests.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-20230120.ebuild b/sys-devel/bmake/bmake-20230120.ebuild
deleted file mode 100644
index 7c7d277872cc..000000000000
--- a/sys-devel/bmake/bmake-20230120.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2023 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 ~loong ~ppc ~ppc64 ~x86"
-
-# Skip failing test (sandbox and csh)
-PATCHES=(
- "${FILESDIR}"/${PN}-20210206-tests.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/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 854f3e11851b..bd71f2e58a68 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -1,9 +1,10 @@
-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 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.0rc1.src.tar.xz 118364920 BLAKE2B 449fa321722e77d1a595d0f1f52a4e9492954d928355402f6e07e6c8a20e4ebfc03690ef8272b92eb5cdd58c97ca37fa6baf847d399e36a84e3ea7d94d1ea6ca SHA512 a24074ea8e21af49b0545f02bdec4727e8df841e59340dc189cc5a144a70fc6880e82381fba622ac62c7504f7bf394c916c773ee25904e8faf41eaedce6ae9e0
-DIST llvm-project-16.0.0rc1.src.tar.xz.sig 566 BLAKE2B 29a593f74b05ef6268f0b2ee5ebd810a244e7c6b27dd94f709b22bca8e6c8367f8321a6ec61f85476cd399f31519ac2a3c978014afae29490c1e70d26eb6c35f SHA512 dcca03d41ee3cc7d5b150184b03eb9f2e579603ce9cd5289360d1ca47169174afc26a85079cf096ec91e23f487f0b38bb6cd5fb7e5197530582155b16a5ce748
-DIST llvm-project-46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d.tar.gz 180436731 BLAKE2B 51c30c3f11dd55a225b8ebe4ded752ce9e8eb58751e7458c29901dbdd3673f94892d337d111d696e779e3f7ef0bca6c7d79709e2072a4bf3a001d8813125d571 SHA512 ebbe0f8becac39d63433dcc3de474c40f1215fc8faab94fa2ba869d28e66b27e4fe088377bd7ae64575a6d7b07017b88bf92e5488a3185a753e647d8da352bbf
-DIST llvm-project-6dc85bd3fde7df2999fda07e9e9f2e83d52c6125.tar.gz 175208511 BLAKE2B cf87cf7e9bf7c74aab8ccda0f153369cb81798047fdd48025c3c7030857b128babbaafb667385a5c8e9916e16038b14fee39f1623d329471e73c39c2f2d7bbfa SHA512 e6dc0cacd6c079be8a00364e4c244782d764d9a8d514d65f9078427cb4a0c1663ff88761bfbc1e955a1a990451439110497c2cb7af7f56b2c91f2e9db4389894
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
+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-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.6.ebuild b/sys-devel/clang-common/clang-common-14.0.6.ebuild
deleted file mode 100644
index 38e08a5dea81..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.7-r1.ebuild b/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild
index 651827d21197..4d200fba7af7 100644
--- a/sys-devel/clang-common/clang-common-15.0.7-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -20,13 +20,13 @@ PDEPEND="
sys-devel/clang:*
default-compiler-rt? (
sys-devel/clang-runtime[compiler-rt]
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
+ 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} )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
!default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
+ default-lld? ( >=sys-devel/lld-${PV} )
!default-lld? ( sys-devel/binutils )
"
IDEPEND="
@@ -87,30 +87,53 @@ src_install() {
@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.
- -fstack-clash-protection
- -fstack-protector-strong
+ -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
- #ifndef _FORTIFY_SOURCE
- #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
- #define _FORTIFY_SOURCE ${fortify_level}
- #endif
- #endif
+ #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
diff --git a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
deleted file mode 100644
index be17e87b775a..000000000000
--- a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2023 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=""
-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 )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- !default-compiler-rt? ( sys-devel/gcc )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- !default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
- !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
- 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.
- -fstack-clash-protection
- -fstack-protector-strong
- -fPIE
- -include "${EPREFIX}/usr/include/gentoo/fortify.h"
- EOF
-
- dodir /usr/include/gentoo
-
- 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
- #ifndef _FORTIFY_SOURCE
- #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
- #define _FORTIFY_SOURCE ${fortify_level}
- #endif
- #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
-
- # constructs banned by C2x
- -Werror=deprecated-non-prototype
-
- # deprecated but large blast radius
- #-Werror=strict-prototypes
- 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.0_pre20230107-r1.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20230107-r1.ebuild
deleted file mode 100644
index 3c407f5a1af6..000000000000
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20230107-r1.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2023 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="~loong"
-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 )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- !default-compiler-rt? ( sys-devel/gcc )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- !default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
- !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
- 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.
- -fstack-clash-protection
- -fstack-protector-strong
- -fPIE
- -include "${EPREFIX}/usr/include/gentoo/fortify.h"
- EOF
-
- dodir /usr/include/gentoo
-
- 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
- #ifndef _FORTIFY_SOURCE
- #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
- #define _FORTIFY_SOURCE ${fortify_level}
- #endif
- #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
-
- # constructs banned by C2x
- -Werror=deprecated-non-prototype
-
- # deprecated but large blast radius
- #-Werror=strict-prototypes
- 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.0_pre20230127.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20230127.ebuild
deleted file mode 100644
index be17e87b775a..000000000000
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20230127.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2023 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=""
-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 )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- !default-compiler-rt? ( sys-devel/gcc )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- !default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
- !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
- 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.
- -fstack-clash-protection
- -fstack-protector-strong
- -fPIE
- -include "${EPREFIX}/usr/include/gentoo/fortify.h"
- EOF
-
- dodir /usr/include/gentoo
-
- 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
- #ifndef _FORTIFY_SOURCE
- #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
- #define _FORTIFY_SOURCE ${fortify_level}
- #endif
- #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
-
- # constructs banned by C2x
- -Werror=deprecated-non-prototype
-
- # deprecated but large blast radius
- #-Werror=strict-prototypes
- 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.0_rc1.ebuild b/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild
index be17e87b775a..8185d75d346e 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_rc1.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -10,23 +10,23 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="0"
-KEYWORDS=""
+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 llvm-libunwind
- hardened stricter
+ 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 )
- !llvm-libunwind? ( sys-libs/libunwind )
+ 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} )
+ default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] )
!default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
+ default-lld? ( >=sys-devel/lld-${PV} )
!default-lld? ( sys-devel/binutils )
"
IDEPEND="
@@ -87,30 +87,52 @@ src_install() {
@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.
- -fstack-clash-protection
- -fstack-protector-strong
+ -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
- #ifndef _FORTIFY_SOURCE
- #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
- #define _FORTIFY_SOURCE ${fortify_level}
- #endif
- #endif
+ #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
@@ -124,28 +146,6 @@ src_install() {
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
-
- # constructs banned by C2x
- -Werror=deprecated-non-prototype
-
- # deprecated but large blast radius
- #-Werror=strict-prototypes
- 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
@@ -153,6 +153,29 @@ src_install() {
@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() {
diff --git a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild
deleted file mode 100644
index be17e87b775a..000000000000
--- a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2023 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=""
-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 )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- !default-compiler-rt? ( sys-devel/gcc )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- !default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
- !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
- 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.
- -fstack-clash-protection
- -fstack-protector-strong
- -fPIE
- -include "${EPREFIX}/usr/include/gentoo/fortify.h"
- EOF
-
- dodir /usr/include/gentoo
-
- 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
- #ifndef _FORTIFY_SOURCE
- #if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
- #define _FORTIFY_SOURCE ${fortify_level}
- #endif
- #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
-
- # constructs banned by C2x
- -Werror=deprecated-non-prototype
-
- # deprecated but large blast radius
- #-Werror=strict-prototypes
- 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-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 7ea033c083c9..da45c87b0e27 100644
--- a/sys-devel/clang-common/metadata.xml
+++ b/sys-devel/clang-common/metadata.xml
@@ -8,6 +8,17 @@
<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>
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-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.6.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild
deleted file mode 100644
index 9837077e6c50..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-16.0.0_pre20230127.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild
index 67b42357665e..25889f60d661 100644
--- a/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230127.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 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="${PV%%.*}"
-KEYWORDS=""
+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 )"
-PROPERTIES="live"
RDEPEND="
compiler-rt? (
diff --git a/sys-devel/clang-runtime/clang-runtime-17.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-17.0.0.9999.ebuild
deleted file mode 100644
index 67b42357665e..000000000000
--- a/sys-devel/clang-runtime/clang-runtime-17.0.0.9999.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2023 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=""
-IUSE="+compiler-rt libcxx openmp +sanitize"
-REQUIRED_USE="sanitize? ( compiler-rt )"
-PROPERTIES="live"
-
-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-16.0.0_pre20230107.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild
index b4fc2669d5d7..323c0b62c062 100644
--- a/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230107.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -10,7 +10,6 @@ HOMEPAGE="https://clang.llvm.org/"
LICENSE="metapackage"
SLOT="${PV%%.*}"
-KEYWORDS="~loong"
IUSE="+compiler-rt libcxx openmp +sanitize"
REQUIRED_USE="sanitize? ( compiler-rt )"
diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild
index 5eda72abae30..323c0b62c062 100644
--- a/sys-devel/clang-runtime/clang-runtime-16.0.0.9999.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.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
@@ -10,10 +10,8 @@ HOMEPAGE="https://clang.llvm.org/"
LICENSE="metapackage"
SLOT="${PV%%.*}"
-KEYWORDS=""
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.0_rc1.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild
index 67b42357665e..323c0b62c062 100644
--- a/sys-devel/clang-runtime/clang-runtime-16.0.0_rc1.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -10,10 +10,8 @@ HOMEPAGE="https://clang.llvm.org/"
LICENSE="metapackage"
SLOT="${PV%%.*}"
-KEYWORDS=""
IUSE="+compiler-rt libcxx openmp +sanitize"
REQUIRED_USE="sanitize? ( compiler-rt )"
-PROPERTIES="live"
RDEPEND="
compiler-rt? (
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
index f47d83a2cdef..988214f580c9 100644
--- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,7 +7,6 @@ inherit multilib
DESCRIPTION="Symlinks to use Clang on GCC-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
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
index 574b2739f3a0..436e2673639f 100644
--- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,12 +7,11 @@ inherit multilib
DESCRIPTION="Symlinks to use Clang on GCC-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS="~loong"
+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
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild
index 7924646e117e..436e2673639f 100644
--- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,13 +7,11 @@ inherit multilib
DESCRIPTION="Symlinks to use Clang on GCC-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS=""
-PROPERTIES="live"
+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
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-14-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild
index e8399381397f..3496a0f89b67 100644
--- a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-14-r2.ebuild
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,12 +7,10 @@ inherit multilib
DESCRIPTION="Symlinks to use Clang on GCC-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
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
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index 56210b031d68..ca97e13c826f 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -1,15 +1,17 @@
-DIST llvm-13.0.1-manpages.tar.bz2 202187 BLAKE2B 32a761426dbe4c3c355d30660254305cd88b6d513faee04c78e370cea9d38761108a9be4c4b4ac39b6a74400af1f9d37ffd11ab05acd7340175c8d66845ae7d9 SHA512 9495e1daf588540fdb8b9ee905a9b6be4693bd70b7f42c8e8a0d667242fc24dc853c45918d3bc09d02f0761ad61541bc9749c1498e312da129abdab638a0d572
-DIST llvm-14.0.6-manpages.tar.bz2 218186 BLAKE2B 4491296e490936a2d7b518e19a0ff6312b89abeef3fbe5da5d0b93bb2add1088ddf64a0b00ec8846062d19b1ad31e53eadee7ce03c9034aab554e183d1baccf6 SHA512 f8328dc2ec1e8d941d47e583ee31fae7bdcebb3f854b5c8a4a84bd19a79bf5427ad204012c81349bc05a291e41cf48e5129b4578bbd5d4490dd01e1c0b5823bf
DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49
-DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01
-DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
-DIST llvm-gentoo-patchset-15.0.7.tar.xz 19300 BLAKE2B b70e81d744c2eba5cd851e7b690ce8979b3064973f522be7c93bfb541860000a4bc8b17219f8788dfc8a527217dd13946cf7836640698ddd3d4b3fde493dfbf8 SHA512 daffff6ae4a0874aff1a423b4bb36701ecb5a35a36ae91d4ed7fda58b83e50ffcdc30498c84be4711fd3e1f227bf312dbe930019203e0a131944439af2aa94f7
-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 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.0rc1.src.tar.xz 118364920 BLAKE2B 449fa321722e77d1a595d0f1f52a4e9492954d928355402f6e07e6c8a20e4ebfc03690ef8272b92eb5cdd58c97ca37fa6baf847d399e36a84e3ea7d94d1ea6ca SHA512 a24074ea8e21af49b0545f02bdec4727e8df841e59340dc189cc5a144a70fc6880e82381fba622ac62c7504f7bf394c916c773ee25904e8faf41eaedce6ae9e0
-DIST llvm-project-16.0.0rc1.src.tar.xz.sig 566 BLAKE2B 29a593f74b05ef6268f0b2ee5ebd810a244e7c6b27dd94f709b22bca8e6c8367f8321a6ec61f85476cd399f31519ac2a3c978014afae29490c1e70d26eb6c35f SHA512 dcca03d41ee3cc7d5b150184b03eb9f2e579603ce9cd5289360d1ca47169174afc26a85079cf096ec91e23f487f0b38bb6cd5fb7e5197530582155b16a5ce748
-DIST llvm-project-46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d.tar.gz 180436731 BLAKE2B 51c30c3f11dd55a225b8ebe4ded752ce9e8eb58751e7458c29901dbdd3673f94892d337d111d696e779e3f7ef0bca6c7d79709e2072a4bf3a001d8813125d571 SHA512 ebbe0f8becac39d63433dcc3de474c40f1215fc8faab94fa2ba869d28e66b27e4fe088377bd7ae64575a6d7b07017b88bf92e5488a3185a753e647d8da352bbf
-DIST llvm-project-6dc85bd3fde7df2999fda07e9e9f2e83d52c6125.tar.gz 175208511 BLAKE2B cf87cf7e9bf7c74aab8ccda0f153369cb81798047fdd48025c3c7030857b128babbaafb667385a5c8e9916e16038b14fee39f1623d329471e73c39c2f2d7bbfa SHA512 e6dc0cacd6c079be8a00364e4c244782d764d9a8d514d65f9078427cb4a0c1663ff88761bfbc1e955a1a990451439110497c2cb7af7f56b2c91f2e9db4389894
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
+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-13.0.1.ebuild b/sys-devel/clang/clang-13.0.1.ebuild
deleted file mode 100644
index c3a97feedae7..000000000000
--- a/sys-devel/clang/clang-13.0.1.ebuild
+++ /dev/null
@@ -1,427 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..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
-
- 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
- ;;
- # 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=(
- -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
- -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.6-r1.ebuild b/sys-devel/clang/clang-14.0.6-r1.ebuild
deleted file mode 100644
index 5cdb584470ac..000000000000
--- a/sys-devel/clang/clang-14.0.6-r1.ebuild
+++ /dev/null
@@ -1,445 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..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 )"
-
-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=${PV}-r2
-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
-
- 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
-
- # 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=(
- -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
- -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.7-r1.ebuild b/sys-devel/clang/clang-15.0.7-r3.ebuild
index 578c01ab0ea2..131afb227f0e 100644
--- a/sys-devel/clang/clang-15.0.7-r1.ebuild
+++ b/sys-devel/clang/clang-15.0.7-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit cmake llvm llvm.org multilib multilib-minimal \
prefix python-single-r1 toolchain-funcs
@@ -33,7 +33,6 @@ RDEPEND="
"
BDEPEND="
${PYTHON_DEPS}
- >=dev-util/cmake-3.16
doc? ( $(python_gen_cond_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
@@ -55,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
@@ -429,6 +428,13 @@ 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
diff --git a/sys-devel/clang/clang-16.0.0_pre20230107.ebuild b/sys-devel/clang/clang-16.0.0_pre20230107.ebuild
deleted file mode 100644
index f6e6fd239ce2..000000000000
--- a/sys-devel/clang/clang-16.0.0_pre20230107.ebuild
+++ /dev/null
@@ -1,473 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-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="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="~loong"
-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}
- >=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-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/lib/Testing/Support
- llvm/utils
- third-party
-)
-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=${LLVM_MAJOR} 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
-
- 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
- c-index-test
- clang
- clang-format
- clang-offload-bundler
- clang-offload-packager
- clang-refactor
- clang-repl
- clang-rename
- clang-scan-deps
- diagtool
- hmaptool
-
- # 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() {
- 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// /;}"
-
- -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
-
- -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
-
- -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_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}
-
- # Hack to install clang-tblgen: https://reviews.llvm.org/D141092
- -DLLVM_BUILD_UTILS=ON
- )
- 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
-
- # 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
- 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/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
- 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-16.0.0_rc1.ebuild b/sys-devel/clang/clang-16.0.6.ebuild
index b45257440e78..bd1e86a5edd7 100644
--- a/sys-devel/clang/clang-16.0.0_rc1.ebuild
+++ b/sys-devel/clang/clang-16.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -15,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
+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 )"
@@ -33,7 +34,6 @@ RDEPEND="
"
BDEPEND="
${PYTHON_DEPS}
- >=dev-util/cmake-3.16
doc? ( $(python_gen_cond_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
@@ -55,6 +55,7 @@ LLVM_TEST_COMPONENTS=(
llvm/utils
third-party
)
+LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=llvm
llvm.org_set_globals
@@ -195,6 +196,7 @@ get_distribution_components() {
c-index-test
clang
clang-format
+ clang-linker-wrapper
clang-offload-bundler
clang-offload-packager
clang-refactor
@@ -253,6 +255,8 @@ get_distribution_components() {
}
multilib_src_configure() {
+ tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670
+
local mycmakeargs=(
-DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
@@ -268,6 +272,10 @@ multilib_src_configure() {
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ # 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
@@ -275,6 +283,9 @@ 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
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
diff --git a/sys-devel/clang/clang-16.0.0.9999.ebuild b/sys-devel/clang/clang-17.0.6.ebuild
index b45257440e78..71d4d04a4823 100644
--- a/sys-devel/clang/clang-16.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-17.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -15,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
+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 )"
@@ -33,7 +34,6 @@ RDEPEND="
"
BDEPEND="
${PYTHON_DEPS}
- >=dev-util/cmake-3.16
doc? ( $(python_gen_cond_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
@@ -50,10 +50,9 @@ LLVM_COMPONENTS=(
llvm/lib/Transforms/Hello
)
LLVM_MANPAGES=1
+LLVM_PATCHSET=${PV}-r1
LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing
llvm/utils
- third-party
)
LLVM_USE_TARGETS=llvm
llvm.org_set_globals
@@ -195,6 +194,7 @@ get_distribution_components() {
c-index-test
clang
clang-format
+ clang-linker-wrapper
clang-offload-bundler
clang-offload-packager
clang-refactor
@@ -268,18 +268,26 @@ multilib_src_configure() {
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
+ # 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_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
-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}"
)
@@ -355,12 +363,6 @@ 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() {
@@ -429,7 +431,7 @@ multilib_src_install() {
# (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/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || 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)
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-17.0.0.9999.ebuild b/sys-devel/clang/clang-19.0.0.9999.ebuild
index b45257440e78..79df96923121 100644
--- a/sys-devel/clang/clang-17.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-19.0.0.9999.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -15,8 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
-IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
+IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -33,11 +33,7 @@ RDEPEND="
"
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="
@@ -51,13 +47,20 @@ LLVM_COMPONENTS=(
)
LLVM_MANPAGES=1
LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing
llvm/utils
- third-party
)
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
@@ -69,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=${LLVM_MAJOR} 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
@@ -195,6 +193,7 @@ get_distribution_components() {
c-index-test
clang
clang-format
+ clang-linker-wrapper
clang-offload-bundler
clang-offload-packager
clang-refactor
@@ -253,6 +252,8 @@ get_distribution_components() {
}
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}"
@@ -268,18 +269,26 @@ multilib_src_configure() {
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
+ # 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_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
-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}"
)
@@ -355,12 +364,6 @@ 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() {
@@ -429,7 +432,7 @@ multilib_src_install() {
# (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/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || 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)
diff --git a/sys-devel/clang/clang-16.0.0_pre20230127.ebuild b/sys-devel/clang/clang-19.0.0_pre20240410.ebuild
index b45257440e78..79df96923121 100644
--- a/sys-devel/clang/clang-16.0.0_pre20230127.ebuild
+++ b/sys-devel/clang/clang-19.0.0_pre20240410.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -15,8 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
-IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
+IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -33,11 +33,7 @@ RDEPEND="
"
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="
@@ -51,13 +47,20 @@ LLVM_COMPONENTS=(
)
LLVM_MANPAGES=1
LLVM_TEST_COMPONENTS=(
- llvm/lib/Testing
llvm/utils
- third-party
)
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
@@ -69,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=${LLVM_MAJOR} 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
@@ -195,6 +193,7 @@ get_distribution_components() {
c-index-test
clang
clang-format
+ clang-linker-wrapper
clang-offload-bundler
clang-offload-packager
clang-refactor
@@ -253,6 +252,8 @@ get_distribution_components() {
}
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}"
@@ -268,18 +269,26 @@ multilib_src_configure() {
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
+ # 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_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
-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}"
)
@@ -355,12 +364,6 @@ 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() {
@@ -429,7 +432,7 @@ multilib_src_install() {
# (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/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || 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)
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 2dfafd05460d..07d06647c9a6 100644
--- a/sys-devel/clang/metadata.xml
+++ b/sys-devel/clang/metadata.xml
@@ -27,9 +27,6 @@ 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>
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
index 3bb5cf1ed1d2..c5136579d5a9 100644
--- a/sys-devel/cproc/Manifest
+++ b/sys-devel/cproc/Manifest
@@ -1 +1 @@
-DIST cproc-6fabc79d81de56b6c1cdcc2242933fd792e2ddf9.tar.gz 80893 BLAKE2B f708649714f0fbc3e7b60dc87585603970eb350de4ce1f02fe9b5783714ef09fa38b4b4ec7a8b0553047e84edc0f752963c84df32dacd9585c435098e57be47c SHA512 355e3ca8fb481d9e32d0621787beee7b0e6f53f107bbb9512f89382c599daa581b89e7da3957c09b81a994ebce9f06df08df0833b010b055a8ff947c8cc8d02e
+DIST cproc-c19a0bd9b78be94b455af55ad8ceb9be49410974.tar.gz 84602 BLAKE2B 89a01f1382015737ed43e1c7ec36737c05c0818f422b8714b5ac60bfce0830572bd06f0f0b99457e675b52826671b18e872461154a8479d3f5da808e01dd08de SHA512 630d7d933a489be80519366c27650eb3b33443ec068f0d5c4749cc1f87061228b0496f2e31a7b5f0c7eb8608849ac692113f884eab03664a3e12a78f36dbc7fa
diff --git a/sys-devel/cproc/cproc-0_pre20220805.ebuild b/sys-devel/cproc/cproc-0_pre20240413.ebuild
index 163ffe80afba..cb98d7443072 100644
--- a/sys-devel/cproc/cproc-0_pre20220805.ebuild
+++ b/sys-devel/cproc/cproc-0_pre20240413.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -9,7 +9,7 @@ if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc"
inherit git-r3
else
- CPROC_COMMIT="6fabc79d81de56b6c1cdcc2242933fd792e2ddf9"
+ 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}"
@@ -26,12 +26,6 @@ SLOT="0"
DEPEND="sys-devel/qbe"
RDEPEND="${DEPEND}"
-src_prepare() {
- default
-
- rm -r "${S}/qbe" || die
-}
-
src_configure() {
tc-export CC
diff --git a/sys-devel/cproc/cproc-9999.ebuild b/sys-devel/cproc/cproc-9999.ebuild
index 163ffe80afba..cb98d7443072 100644
--- a/sys-devel/cproc/cproc-9999.ebuild
+++ b/sys-devel/cproc/cproc-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -9,7 +9,7 @@ if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc"
inherit git-r3
else
- CPROC_COMMIT="6fabc79d81de56b6c1cdcc2242933fd792e2ddf9"
+ 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}"
@@ -26,12 +26,6 @@ SLOT="0"
DEPEND="sys-devel/qbe"
RDEPEND="${DEPEND}"
-src_prepare() {
- default
-
- rm -r "${S}/qbe" || die
-}
-
src_configure() {
tc-export CC
diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest
index 7953946f2dc9..b2e88d73c28e 100644
--- a/sys-devel/crossdev/Manifest
+++ b/sys-devel/crossdev/Manifest
@@ -1,2 +1 @@
-DIST crossdev-20220909.tar.xz 29480 BLAKE2B 9c3ef9d9b8f13c81f9d2e21f8914158c04035a105ee1ac90ba30cb23a69744c9c6959bbcfd2e50d29144fc79937e5e585054d2eedfb2ced65a88467e509243be SHA512 86e8900a13095b7b12b00d739d28e2921f98818cd62daccfe6d750ce02113d0ef2d5e470b500bbfb80a9cf8f05b2a13882ac9963c3f1a4e1b7454bc1201df183
-DIST crossdev-20221228.tar.xz 29568 BLAKE2B 0458a338a872a27058240c816abfcf9116703d18b687da0050213f834d5aba5df87552e16999fca7d0340aab5b8738ee0edb6ccfb656579b99f20357c077e326 SHA512 16d9d72f74c3b0d6c587c16eb8bea405c7c8eb3effc59fac55027d02348db2e10aacd9098b6f42479574a014783022737325acfaf63031e430fdf90391fa574b
+DIST crossdev-20240209.tar.xz 30904 BLAKE2B b23c6c86796ce37968ce23a9399b068ecb78d6beb8e9b02ac11cd9e8b2f1c82f8905e615417525aa94d51f5da763841a8b9fc7cdc9b64d087a52b077adc92635 SHA512 5834cad934707f173529d7258f8230222e8d18903dea723b0051e06a8d974cab92f6aa7bbeef3a64aec0efd2d0b01f80b63503e78e30ddc1ba7e9a6a4ff08977
diff --git a/sys-devel/crossdev/crossdev-20221228.ebuild b/sys-devel/crossdev/crossdev-20221228.ebuild
deleted file mode 100644
index a3a84da996ad..000000000000
--- a/sys-devel/crossdev/crossdev-20221228.ebuild
+++ /dev/null
@@ -1,34 +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 ~loong ~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-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-20220909.ebuild b/sys-devel/crossdev/crossdev-20240209.ebuild
index 62e271684dde..060ebf803d66 100644
--- a/sys-devel/crossdev/crossdev-20220909.ebuild
+++ b/sys-devel/crossdev/crossdev-20240209.ebuild
@@ -1,14 +1,16 @@
-# 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"
+ 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
@@ -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 a3a84da996ad..8938d96f9d54 100644
--- a/sys-devel/crossdev/crossdev-99999999.ebuild
+++ b/sys-devel/crossdev/crossdev-99999999.ebuild
@@ -1,14 +1,16 @@
-# 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"
+ 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
@@ -22,6 +24,7 @@ RDEPEND="
>=sys-apps/portage-2.1
app-shells/bash
sys-apps/gentoo-functions
+ sys-apps/config-site
"
BDEPEND="app-arch/xz-utils"
@@ -31,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/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 395b0a138b3c..000000000000
--- a/sys-devel/ct-ng/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST crosstool-ng-1.24.0.tar.xz 1622432 BLAKE2B e0f3f26083dd10a35ac79fc78debe98db7914f5d7fd710ed6b4c788a7a0d56e22d22966f186e8315ae99a6141d1d5b80686e86ad8b0549514a07dfda5913a348 SHA512 89b8794a4184ad4928750e29712ed4f194aa1d0b93768d67ff64f30c30f1b1e165647cafc6de94d68d3ef70e50446e544dad65aa36137511a32ee7a667dddfb4
diff --git a/sys-devel/ct-ng/ct-ng-1.24.0-r1.ebuild b/sys-devel/ct-ng/ct-ng-1.24.0-r1.ebuild
deleted file mode 100644
index f9859d8ffd57..000000000000
--- a/sys-devel/ct-ng/ct-ng-1.24.0-r1.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"
-
-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.xz"
-
-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 fea2ef2c50c1..000000000000
--- a/sys-devel/ct-ng/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-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 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/distcc-3.4-r1.ebuild b/sys-devel/distcc/distcc-3.4-r1.ebuild
index 595748d35f48..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-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..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-r2.ebuild b/sys-devel/distcc/distcc-3.4-r2.ebuild
new file mode 100644
index 000000000000..8aeae8cfb6ff
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.4-r2.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+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"
+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"
+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+:3 )
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] )
+"
+DEPEND="${RDEPEND}
+ sys-libs/binutils-libs"
+BDEPEND="
+ dev-build/autoconf-archive
+ virtual/pkgconfig"
+RDEPEND+="
+ acct-user/distcc
+ dev-util/shadowman
+ >=sys-devel/gcc-config-1.4.1
+ selinux? ( sec-policy/selinux-distcc )
+ xinetd? ( sys-apps/xinetd )"
+
+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.
+ use hardened && eapply "${FILESDIR}/distcc-hardened.patch"
+
+ sed -i \
+ -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \
+ -e "s:@PYTHON@:${EPYTHON}:" \
+ pump.in || die "sed failed"
+
+ sed \
+ -e "s:@EPREFIX@:${EPREFIX:-/}:" \
+ -e "s:@libdir@:/usr/lib:" \
+ "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die
+
+ # TODO: gdb tests fail due to gdb failing to find .c file
+ sed -i -e '/Gdb.*Case,/d' test/testdistcc.py || die
+
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
+ python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config"
+ eautoreconf
+}
+
+src_configure() {
+ # https://github.com/distcc/distcc/issues/454
+ append-cppflags -DPY_SSIZE_T_CLEAN
+
+ local myconf=(
+ --disable-Werror
+ --libdir="${EPREFIX}"/usr/lib
+ $(use_enable ipv6 rfc2553)
+ $(use_with gtk)
+ --without-gnome
+ $(use_with gssapi auth)
+ $(use_with zeroconf avahi)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # sandbox breaks some tests, and hangs some too
+ # retest once #590084 is fixed
+ local -x SANDBOX_ON=0
+ emake -j1 check
+}
+
+src_install() {
+ # override GZIP_BIN to stop it from compressing manpages
+ emake -j1 DESTDIR="${D}" GZIP_BIN=false install
+ python_optimize
+
+ newinitd "${FILESDIR}/distccd.initd" distccd
+ systemd_newunit "${FILESDIR}/distccd.service-1" distccd.service
+ systemd_install_serviced "${FILESDIR}/distccd.service.conf"
+
+ cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die
+ if use zeroconf; then
+ cat >> "${T}/distccd" <<-EOF || die
+
+ # Enable zeroconf support in distccd
+ DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf"
+ EOF
+
+ sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die
+ fi
+ doconfd "${T}/distccd"
+
+ newenvd - 02distcc <<-EOF || die
+ # This file is managed by distcc-config; use it to change these settings.
+ # DISTCC_LOG and DISTCC_DIR should not be set.
+ DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}"
+ DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}"
+ DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}"
+ DISTCC_TCP_CORK="${DISTCC_TCP_CORK}"
+ DISTCC_SSH="${DISTCC_SSH}"
+ UNCACHED_ERR_FD="${UNCACHED_ERR_FD}"
+ DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}"
+ DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}"
+ EOF
+
+ keepdir /usr/lib/distcc
+
+ dobin "${T}/distcc-config"
+
+ if use gtk; then
+ einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui"
+ einfo "This is to have a little sensability in naming schemes between distccmon programs"
+ mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die
+ dosym distccmon-gui /usr/bin/distccmon-gnome
+ fi
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ newins "doc/example/xinetd" distcc
+ fi
+
+ insinto /usr/share/shadowman/tools
+ newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin"
+ newins - distccd <<<"${EPREFIX}/usr/lib/distcc"
+
+ rm -r "${ED}/etc/default" || die
+ rm "${ED}/etc/distcc/clients.allow" || die
+ rm "${ED}/etc/distcc/commands.allow.sh" || die
+}
+
+pkg_postinst() {
+ # remove the old paths when switching from libXX to lib
+ if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \
+ -d ${EROOT}/usr/$(get_libdir)/distcc ]]; then
+ rm -r -f "${EROOT}/usr/$(get_libdir)/distcc" || die
+ fi
+
+ if [[ -z ${ROOT} ]]; then
+ eselect compiler-shadow update distcc
+ eselect compiler-shadow update distccd
+ fi
+
+ elog
+ elog "Tips on using distcc with Gentoo can be found at"
+ elog "https://wiki.gentoo.org/wiki/Distcc"
+ elog
+ elog "distcc-pump is known to cause breakage with multiple packages."
+ elog "Do NOT enable it globally."
+ elog
+ elog "To use the distccmon programs with Gentoo you should use this command:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5"
+
+ if use gtk; then
+ elog "Or:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
+ fi
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then
+ eselect compiler-shadow remove distcc
+ fi
+}
diff --git a/sys-devel/distcc/distcc-3.4-r3.ebuild b/sys-devel/distcc/distcc-3.4-r3.ebuild
new file mode 100644
index 000000000000..aacc1981dc3e
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.4-r3.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+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"
+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"
+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+:3 )
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] )
+"
+DEPEND="${RDEPEND}
+ sys-libs/binutils-libs"
+BDEPEND="
+ dev-build/autoconf-archive
+ virtual/pkgconfig"
+RDEPEND+="
+ acct-user/distcc
+ dev-util/shadowman
+ >=sys-devel/gcc-config-1.4.1
+ selinux? ( sec-policy/selinux-distcc )
+ xinetd? ( sys-apps/xinetd )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0-xinetd.patch"
+ # SOCKSv5 support needed for Portage, bug #537616
+ "${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"
+
+ sed -i \
+ -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \
+ -e "s:@PYTHON@:${EPYTHON}:" \
+ pump.in || die "sed failed"
+
+ sed \
+ -e "s:@EPREFIX@:${EPREFIX:-/}:" \
+ -e "s:@libdir@:/usr/lib:" \
+ "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die
+
+ # TODO: gdb tests fail due to gdb failing to find .c file
+ sed -i -e '/Gdb.*Case,/d' test/testdistcc.py || die
+
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
+ python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config"
+ eautoreconf
+}
+
+src_configure() {
+ # https://github.com/distcc/distcc/issues/454
+ append-cppflags -DPY_SSIZE_T_CLEAN
+
+ local myconf=(
+ --disable-Werror
+ --libdir="${EPREFIX}"/usr/lib
+ $(use_enable ipv6 rfc2553)
+ $(use_with gtk)
+ --without-gnome
+ $(use_with gssapi auth)
+ $(use_with zeroconf avahi)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # sandbox breaks some tests, and hangs some too
+ # retest once #590084 is fixed
+ local -x SANDBOX_ON=0
+ emake -j1 check
+}
+
+src_install() {
+ # override GZIP_BIN to stop it from compressing manpages
+ emake -j1 DESTDIR="${D}" GZIP_BIN=false install
+ python_optimize
+
+ newinitd "${FILESDIR}/distccd.initd" distccd
+ systemd_newunit "${FILESDIR}/distccd.service-1" distccd.service
+ systemd_install_serviced "${FILESDIR}/distccd.service.conf"
+
+ cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die
+ if use zeroconf; then
+ cat >> "${T}/distccd" <<-EOF || die
+
+ # Enable zeroconf support in distccd
+ DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf"
+ EOF
+
+ sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die
+ fi
+ doconfd "${T}/distccd"
+
+ newenvd - 02distcc <<-EOF || die
+ # This file is managed by distcc-config; use it to change these settings.
+ # DISTCC_LOG and DISTCC_DIR should not be set.
+ DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}"
+ DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}"
+ DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}"
+ DISTCC_TCP_CORK="${DISTCC_TCP_CORK}"
+ DISTCC_SSH="${DISTCC_SSH}"
+ UNCACHED_ERR_FD="${UNCACHED_ERR_FD}"
+ DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}"
+ DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}"
+ EOF
+
+ keepdir /usr/lib/distcc
+
+ dobin "${T}/distcc-config"
+
+ if use gtk; then
+ einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui"
+ einfo "This is to have a little sensability in naming schemes between distccmon programs"
+ mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die
+ dosym distccmon-gui /usr/bin/distccmon-gnome
+ fi
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ newins "doc/example/xinetd" distcc
+ fi
+
+ insinto /usr/share/shadowman/tools
+ newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin"
+ newins - distccd <<<"${EPREFIX}/usr/lib/distcc"
+
+ rm -r "${ED}/etc/default" || die
+ rm "${ED}/etc/distcc/clients.allow" || die
+ rm "${ED}/etc/distcc/commands.allow.sh" || die
+}
+
+pkg_postinst() {
+ # remove the old paths when switching from libXX to lib
+ if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \
+ -d ${EROOT}/usr/$(get_libdir)/distcc ]]; then
+ rm -r -f "${EROOT}/usr/$(get_libdir)/distcc" || die
+ fi
+
+ if [[ -z ${ROOT} ]]; then
+ eselect compiler-shadow update distcc
+ eselect compiler-shadow update distccd
+ fi
+
+ elog
+ elog "Tips on using distcc with Gentoo can be found at"
+ elog "https://wiki.gentoo.org/wiki/Distcc"
+ elog
+ elog "distcc-pump is known to cause breakage with multiple packages."
+ elog "Do NOT enable it globally."
+ elog
+ elog "To use the distccmon programs with Gentoo you should use this command:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5"
+
+ if use gtk; then
+ elog "Or:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
+ fi
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then
+ eselect compiler-shadow remove distcc
+ fi
+}
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/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 849d80e9c0e8..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-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -21,7 +21,7 @@ DEPEND="${RDEPEND}"
BDEPEND="
dev-vcs/subversion
sys-apps/lsb-release
- >=sys-devel/bmake-20210314-r1
+ >=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 8d13d4a22fac..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-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -25,7 +25,7 @@ DEPEND="${RDEPEND}"
BDEPEND="
dev-vcs/subversion
sys-apps/lsb-release
- >=sys-devel/bmake-20210314-r1
+ >=dev-build/bmake-20210314-r1
app-alternatives/yacc"
src_prepare() {
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/flex-2.6.4-r5.ebuild b/sys-devel/flex/flex-2.6.4-r6.ebuild
index 64dbde0f449c..fd91a0206e3b 100644
--- a/sys-devel/flex/flex-2.6.4-r5.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
@@ -12,7 +12,7 @@ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotool
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 )"
@@ -28,6 +28,7 @@ PDEPEND="app-alternatives/lex"
PATCHES=(
"${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
)
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 ba7fe333bdac..d36547d79ebd 100644
--- a/sys-devel/gcc-config/Manifest
+++ b/sys-devel/gcc-config/Manifest
@@ -1,2 +1 @@
-DIST gcc-config-2.10.tar.xz 18040 BLAKE2B de902fcf9169290a09988b56fa75f1bf24f702ce98a8fe37b6d4fe090bab615716c32a9e219d25a2257c60099eb4424b86cc1a1565c1b4f3dbcd6c9acad6f340 SHA512 cced56c52d97cbace5fb7e1fc9c73b413454bc5c53641c9429a7da88a0b31db2c70a8b90a4b4b0fbe1e732f21a5f979a4721a7bc8537666f8277b7755bd4af52
-DIST gcc-config-2.8.tar.xz 17968 BLAKE2B aa34e681ef0c86bb846d89b816b46276f5c7c32974c785a9611a903a4fe165c997a34664abe17aa4d8720a96f194054e5d8c371a6c9270b1c235d7539094436c SHA512 5e91df44fb7782b9ad41ed06fbd53f74868c059f892c6c2b8195ebaa899905dd9f502562887f1a3765dd6b61698e956d01c6fa6f97a535cf16e26e70fcd902ba
+DIST gcc-config-2.11.tar.xz 18068 BLAKE2B 0d76321adea9eff545e042ad847b70a5b3d8ecb8c248fdf58f71c88a7b03c0aca39f7d39e332808b89c3f6d0fb3fc3114bc2d8dfa1ade6460c0b12c3420d876f SHA512 38ea52c2d16287fc2c8efa0ee76e24563851b4fa1ee7dce601507df1530e7a867281f178ad4228505eb2aaf46164024a18825cd6771d847ff1a60a85d6e96d3e
diff --git a/sys-devel/gcc-config/gcc-config-2.10.ebuild b/sys-devel/gcc-config/gcc-config-2.10.ebuild
deleted file mode 100644
index 1b01042208ff..000000000000
--- a/sys-devel/gcc-config/gcc-config-2.10.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-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 ~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"
-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
-
- if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then
- # Warn about obsolete /usr/bin/gcj for bug #804178
- ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!"
- ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)."
- ewarn "If you have no idea what this means, please delete the file:"
- ewarn " rm ${EROOT}/usr/bin/gcj"
- fi
-}
diff --git a/sys-devel/gcc-config/gcc-config-2.8.ebuild b/sys-devel/gcc-config/gcc-config-2.11.ebuild
index e9660497da1e..f387c81e5cb3 100644
--- a/sys-devel/gcc-config/gcc-config-2.8.ebuild
+++ b/sys-devel/gcc-config/gcc-config-2.11.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
@@ -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-9999.ebuild b/sys-devel/gcc-config/gcc-config-9999.ebuild
index 7ff12f007e38..a314266369ef 100644
--- a/sys-devel/gcc-config/gcc-config-9999.ebuild
+++ b/sys-devel/gcc-config/gcc-config-9999.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
@@ -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/Manifest b/sys-devel/gcc/Manifest
index 970d621e1d40..d33f4a7a1d23 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,34 +1,25 @@
-DIST gcc-10-20221208.tar.xz 72098912 BLAKE2B 8167b3d91fb95c727caa3a76d8bd6d70e0d0bd79eda72305f3005c9f7163dcd425c75386ba55b2d71644ecf83d998a4bccb6fd265bb615dcdd104f27cadb8e76 SHA512 5e49159d86300eaa4c2f34fb3537b5f257931e861a1a1217dbabcfcd5ef9da224d4a6023aaf8d24c8893ecd204ec0cd6e96349ae0dd445d62d92ebb041aeb054
-DIST gcc-10-20230119.tar.xz 72112952 BLAKE2B 6e28cba9f6ff5c9f9231828bb400c82b8658a4f9c0166c28a6a12d71728d4460904152a8c84bbeff88c06b7f9378937b7b61bf4a871a10c56bd005170dc5fde2 SHA512 6cbb567ef1da1b6fa65892b6e71c3b7cd37e0c483e049720ea1987d444a0e7b4eb15d1e99f4e35995acdce560a811a779574eeba52bb252c61325accedd6a5c5
-DIST gcc-10-20230126.tar.xz 72121284 BLAKE2B add27f5cacaf5c36c4c54e2c71f6e60edd03242bf52e1729aa708cc6d927814f3640cccbf9711d105c252b90e980e0ab071a2204c7859045c35bacaac9664c7a SHA512 619f73041be838b0e48a10f5dbe4bb775367fc13511f4b98d65c4336b397f1ccae2df64f11b7cd066e2635783b2d61f815c3ab0a6478ec3c98dd7b33728d2ae5
-DIST gcc-10.4.0-musl-patches-1.tar.xz 3808 BLAKE2B 804d1fcc451dcd03be71240dd498ec2d179869571d44012967c48dccf5a478dd8c55000a964a80fdd5584d739a777dee1c83241cffce514ef002df2572854a67 SHA512 83e4a9c0f7062baf0c606a2bcc56a818494991403d7577dea65f04bbc25bdb786a5889b80d45d80e7f4be07c1aef786802cbfcfafd1a17ec255a2d4e93a77570
-DIST gcc-10.4.0-patches-5.tar.xz 17056 BLAKE2B f336d69a8ad105b8c4a84e8248a5b8a88175d3f1d67d32c6bee1780d252d86947059bd624992e6292610e86c9012f4d901a1a54df0d184dd023d404a0707700e SHA512 aa8fb42f20587f8519e7b06037da4d8f7d386b63e228b239a0445a51df4e401940fcd81482381d966622054aef3e0db06d1def5c74ac3d3dcc9c75c3b966c758
-DIST gcc-10.4.0.tar.xz 75018092 BLAKE2B ec1169025d3896b70ab80a4b8ce5040763a95529fc7e120c6bc3a3eb1db5cf938ebde347c1e595a8ff7d4081e79ded6252702d7a1a09648449b7a0783188e434 SHA512 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648
DIST gcc-10.5.0-musl-patches-2.tar.xz 3452 BLAKE2B 5387e516d07d81477b3f39b8b3bd986bf861d32cd25dc5481c97bd3620d00c918c5661e86857f66dbf28a655401a53e43417f638c443e44cbfdbf5e950caac4d SHA512 86f2ce31cc4fc4fb5a6043fb527bf822d895e1a6220652024f78a1cbd5a962edb6be8dc5f43c32053e075f39bb2350ea8f14e7d57e0473dd2933a7b44676bde5
-DIST gcc-10.5.0-patches-1.tar.xz 17180 BLAKE2B d8ecc7cc15fa1ab420fa9eff11173a1d5544b369720e8c54fc59375e591ebd0a429b7e81a2a3df86bd2eaf19e4b8148bf2e1b0c8410de3944d4801ce412016b2 SHA512 5855aa23ee0b262c20a1b6fd2d4a947180c079dc00e0fa675043edceee0c822eec0dc752f5fcb281b70c04e50c6fcaf6c5d5160ab15d3f0c51fa030eb2d79d26
-DIST gcc-10.5.0-patches-4.tar.xz 17880 BLAKE2B f368b741fd42199c85b770ec45a5232d27295cf7796163251f24fa963f2264c473e161bb34e66b43c4b227e41859d540a66331111392478b280b289d359806c6 SHA512 94f7fbd1b4672f0378c85ac3a96f7954cd22bd7cc1013c32519bbe1cae0ebb5183e14469c61dfc9d931b8d1c261f2ead1c4b47278104d1b5189a0c787aabc40e
-DIST gcc-10.5.0-patches-5.tar.xz 17324 BLAKE2B e97b471fb6115fd0421be8a6390f7d88312de7ac0132fde3aa43dbf2a49d3bc640ec05f766f20363f033adeaf0430e90c42b5a6f92a422d1a82128f119e769f6 SHA512 2589b8a3be0bc60dd7b205ef9955dfd1ba525508879b30ee8057779d2677783c7c13a0bf901bc2a126e15c52d440663e6fe22a299d935e0706a037406e1cfb31
-DIST gcc-11-20221209.tar.xz 76240768 BLAKE2B 3be0f1ece4473bbbf10f7242102f330a6e246c8481da5bd32620dcb15d2acd008bad60d2576a301f03e444e3d93a3c72d5184740c6fb3de2bc05e1863b68a0bc SHA512 33d9581d434c012526eb4d49a4453cf77c57b459fd43f84e49bc764745e0772939eac007e119269f4f1989755df8678613732a84474c691b0c2452237c5b38a3
-DIST gcc-11-20230120.tar.xz 76201244 BLAKE2B 07bc819dad3e2ee3747f09f43fd73a4263f06274362728174b32d9ead52ea95c25ea6a192397378b9b4c4f958285d97488d28e425c26129d23f143b1a8668fbc SHA512 81f71aeb706b4ccb89e2af5201770fd72cc3190b9b5eac0b5a25a522626b9c4015a2e5d13e4bd1360ac0f7f1be27df51fc530c15ce3c3d782f39f34d5c58803e
-DIST gcc-11-20230127.tar.xz 76128480 BLAKE2B 4fdff08bd120fbff1b1e87d09606a9049fa28f456444c07c5d0dc3738216be3c2b418137bbb57ac79e584b68cf277033707c63a5e2ecb75497f3778f7cf3fef6 SHA512 772f4ea802aba04a63a50272b59c293b0f1a143c00b88beae98c9bef4ef3a36ad4fd50ec670113d1d031e831262fe50e0b1017536f02c8553be61b05708678b8
+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-20240404.tar.xz 76246936 BLAKE2B 09eed1bff289e960018b8c9c5d39e43ebcff78d344feba45d7889149e0de0d2727a54a0359471eab9a28cb38d5750b488c62cbffbf937ab7238eab51f3e7d0b7 SHA512 431f0b8d78f2b5e910ca8de8e8f64594f070639c17bc65a074650c217a5262cb9081db7e090bd3396e30ef50e92ed3ada0d163b4cabf04f2ae78fd02dba8c05a
+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-3.tar.xz 15200 BLAKE2B a393df941a2a31164f477d6bc0032e28319e8f0bd87200eb453708f85aa8c0bf5d67e733ee7b75cf6d14743e18cc941cee1b77a8247f8c5683d17a98cbeb280f SHA512 6f6096d95c7c62780d1070097739882393a8df5172c3a5ae811a8d4d1c98a0cd14a34f3f7e95410c8f210aec434330ac3b8876c688faeb130d7bb8fa3333ece9
-DIST gcc-11.4.0-patches-7.tar.xz 14416 BLAKE2B 3ebf62cba04cac8830a93a99d11c21347c38891db3a81493a10e02e8b7af0c86389ffbede50672dfe1189a77a67b832f8f97a1d95d43eff11db131a143b1d03d SHA512 41e2ed1ccf6d3631accccdab057877c79c99eb1b3c32f9d35628bca6c633c4f8dadb1d7f93bed2e4d7ff9f36cc9e46ea00f0e57e8af64b2e5f4b3b01285c6da3
-DIST gcc-11.4.0-patches-8.tar.xz 13788 BLAKE2B a1406d5dcd906ed51ef06bb6571c216d83f74ab5ba05d2f1783d20619ee4ae9a4aa60c15917c861c24b708621b1605411011df9d217472f92001ec1c59a22b5b SHA512 b18b068422911216063948e21f0ec01073edb45c828a351282730111642638a0a42b97394a3f7522f892fe79e30b391372c829b542ce64fd0dc58c2a83f091bf
-DIST gcc-12-20221126.tar.xz 79631864 BLAKE2B 3bb97ef4a1a17ab8b92b431b1f792c11131085a1b523efa08c5b4f995b44bf628be371564813e5affb1f8e2320bb8a9b04532e57b2deeef26b33f517783daa5e SHA512 163e0aa39dc5c24980f84000bd6ccd4b7c24581831b7a4cdbd63e4726be5c2b1933d034ce12c65cf95e4c0ebe1175af7e32facace465bfd7c7c377401350a2df
-DIST gcc-12-20230121.tar.xz 79652428 BLAKE2B f4f0e6474d179454dc56dd05c823fca919a894e9efdc64625bb13045c7bd549a7bab59dfb4052d45d594d4484801ab5b18cf3f3d6277be54eaec24a53abd439c SHA512 b6c2486916418a64fab64c3655329bc18ca93ee4eca240e8779bd6d8280124fcd07b1aa8eff979fd317656646ecdba9353107887338354d8bd2c1f68c1609349
-DIST gcc-12-20230128.tar.xz 79655464 BLAKE2B 6c4c6397749a3c9d11af8dd6ca1bd39312a9b06289f1f41fcf21df0cb55e3ab0b6e0efe44f4b8656ad41d6d49f6443ddda454ea5bbc956ef116cc011befe25c1 SHA512 7086b66509a9f7080805d9c4f8abf463c8e37729158eb2da60d9de97f9cdfd8664fe481a75c3730b78e12812bc9711c29554370f1af227c664ee6d3cf8708ede
-DIST gcc-12.2.0-musl-patches-7.tar.xz 3652 BLAKE2B 295ea907efea854a3c2447d472bedb24714d78b7b725476b1eac3898d89c0c549da8e69db28911205bb3293f62cf344a90ade0898ecf5fed57ff00fcf8547a9f SHA512 7a7a440bc08de8dcb37c080ea0c27904adaaadaaaafaab24d90becd2d009243dcfc886d8f674ce3ccddb4ebb5ad17f04d841064d9ec2e2e2e96a1afac3002111
-DIST gcc-12.2.0-patches-1.tar.xz 12864 BLAKE2B a5ae0a85dfc1b6f0bd968f0d5262ebed14ec9cdb3249e3a4c571578c54eda0e53708ee7fe8e03e506366c7f3cf7926eced9b390d9dee948c1249298c0fabd9fb SHA512 f3d793b89a2a0385d596162fb0c653d4acdf21ae418cb792c1786a01fde0391bd0719715dbf07d53636f127168f5cd99108a1dc11cf6cea889b7d82385bcc258
-DIST gcc-12.2.0-patches-10.tar.xz 14252 BLAKE2B 99368db982227728a6a9e2b1f694999f041f38db4a3806b6a740c86218735f9b561197bc150423a3caad0b5fd335c95d1aca130a519754423cd44a083e655373 SHA512 f7f0d8185e908926046f579793dba5916dc27392b85bfe50a7e70c213c3ba29479dfdb1b27514765b76bc897c4dbb530680e59c4deca7a245a808ed566120e4c
-DIST gcc-12.2.0-patches-11.tar.xz 13652 BLAKE2B 3747d3e337ec2f2758fba90f5ffffb1ff62129e5752031c43934211806d96e1153039e4cd6d8d28c19fdf5d5f0d1f4875388dbb177a300aacd50124e38a7ed7c SHA512 50f9a6b0bd8b18dfb0bdc0a7179f26bd4cf8de7970c0b64a0cd9c8c92c002708ae961b9c904b735f15f827b3b8dab447515112d9b64e8f59568eb1e208029277
-DIST gcc-12.2.0-patches-2.tar.xz 13952 BLAKE2B a9e798911acaf45c3f585f69721130cfbecec016727a50ac0f4767b37a2ab9df39e0828abb07f1e429619cc102808f81af8422fef0265415c287d303d9d97fc0 SHA512 1808a05e98094577099d115ff5f3e136e3fc8f39fbe35c5183fd7775383f94439212e5e4174ab8d0ae8c0874e227ff84a958ffdfa1c99c9a8306a9842d126ef9
-DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
-DIST gcc-13-20230122.tar.xz 82869800 BLAKE2B fff4bee436910ba587640600a95c2a89ddec415e12f629c941c8b27d28202c62b39dac2ca0b5d82d9fb4ca271310b178e89202f488f5ef4a7fbc63cd3ecfd7d7 SHA512 a24c0acedc81f72104fe13aba7403ee8920949089971aad5a296de7b46b8969d82b77df92bfd4ef2537b2e5c2010b72d3a33e3bf35ff734d9c49a7a1746026b5
-DIST gcc-13-20230129.tar.xz 82957104 BLAKE2B 15a8db17737a774c528116cc43a507cb702070371a15a9e65352f2485dc37651f99cb0d985258bff8267d7af2690933758016f60703b0ef3f5c44bb977baf955 SHA512 242038dbdedc5e9e0ea3b6832bfbea32411ad84360598dd1a57c3cb4ced01ced2d3a75ef440bcca71e457128731244d5c586bc553cd40709db3c23c93cb82c63
-DIST gcc-13.1.0-patches-5.tar.xz 11404 BLAKE2B 5ba2b4002e917750757a28fa4c7ff6ff7090c35f28eb984aee6ad7fc0ac80c88a9d08e1d4d9efa98e6bd3f06e89df47b10b51f8294bb7d2ef0d1ac3fd2a1a963 SHA512 6864738794237bd7430c612404dd4b84e275362cb5abd081284a91e5b24c1b0aa97d90b9543168c72147be146887219715325d52ae2920912d9c4e17e7224aa3
-DIST gcc-13.1.0-patches-6.tar.xz 11552 BLAKE2B 65ad3f4f9f767712ba11146edc25c7cc8ceb66a42f031059f904a4bb36171065489f4b72f55f85665fac275c11bf1f9a19d546747eaba7d835d2bdccf4211db7 SHA512 4d8f7f59469a64ca541a62bb48983603db540434c5763dd157960f176b05f69360a36a0b057263e6c21148a74ec5e3eeb78f8eef0924a3a4f6af1c83bbcb1c67
-DIST gcc-8.5.0-patches-2.tar.bz2 16921 BLAKE2B 619a47f74edf05fa01c9de59d0ff7abb027a01cf0bdec91ac41046166192f4eae561684136c4a6a5e077f64754bb5b0710905129f31b0def21d88f92e6bba7fb SHA512 b6095d4570895e2c4dd58fed5756194aea27391b813e5e2de42b2749cb318c4bea2087eb0ff92c70e7f98ae4482c49d476db57be83d7beb19fd462aa61714ab2
+DIST gcc-11.4.0-patches-12.tar.xz 13824 BLAKE2B e4df9e0dc9512882022aaf325ebf65c540169454c91dd31f913c6f57f6eb291c79ae919671b53db1549799d4a70c09298bf45ed82ad05eb1f961443cc958369d SHA512 87fed0c3f8e28c9f702443db58350bb615110b27ebe334b5de2ea60678e2548c56cd75cffade210d69634e2ac0a9311f5100ddb45d97645aa76d5688bc421a61
+DIST gcc-12-20240209.tar.xz 79824868 BLAKE2B 1ae5a646da470f06648c4766c77475ceb287c5f6647d5102f1aef6590f973233d5e7f83b5e0241488d49dba59dd605c211938379e68a393a2dccb3834103ae4b SHA512 9f9a04f4477f41bb2a5662aedef2af75b039de50c2dc99310e504e6080cb7aae06a1255337ea2e563975cb108ddc6766adbbaf4e3d5d5712801d7ba9a5209dbd
+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-3.tar.xz 14852 BLAKE2B 7a5f1f43063b15f424099afd72096212fbbbc5151ff01f2de15dfb6e7cf274981c8cfaedba9ef61576c9096fb172fc550a7deb5cd7d9366fd249fd5dd3951f76 SHA512 aa89e4c2ae02f4fb42229ad5167f2eaa3a8fae51118645bf07199fe2124b9c83948590662b053d08002ef709fa870ea88315fd4ccbe4441a74e9cb62edcb82fb
+DIST gcc-13-20240210.tar.xz 84354416 BLAKE2B 5807623d3f7dd751b6dfe164cfd50d57b2f93485c23c3c2228a4a846a9a94cdad52a5e6f2806e5e7ee2a7b5526386ebdb339c44c7ea023d69f8652088a1b114d SHA512 14a01ced7ac2bfd9fc93de4e3819b4d0823fbe129d3f1faabeb707e9e3e2613b4173321b58b3648a7250e3b7ff5d94edfee60e6c38682f31a1f7b57b1c01433f
+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-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-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-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.5.0-patches-1.tar.xz 13772 BLAKE2B 2e2e84a28a729cd271a23716ff3fe08b7209b72254af279f04dd15dbd39482fb7d905dc9293dc326536e14bca9a53397bd7e1c4b617ed8cbe42bcf617fcce3fb SHA512 50e292e665bfae18bf71c0714074025b4f7cb87042862071815874f7c5b241acac3b8f60d85b8970b11978103c2e7616c02d789f6c3b091d7b736b65c535b743
+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-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.4.1_p20221208.ebuild b/sys-devel/gcc/gcc-10.4.1_p20221208.ebuild
deleted file mode 100644
index d109ff1e84d4..000000000000
--- a/sys-devel/gcc/gcc-10.4.1_p20221208.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2023 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.5.0"
-PATCH_VER="1"
-MUSL_VER="2"
-MUSL_GCC_VER="10.5.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_p20230119-r1.ebuild b/sys-devel/gcc/gcc-10.4.1_p20230119-r1.ebuild
deleted file mode 100644
index c11d6837193f..000000000000
--- a/sys-devel/gcc/gcc-10.4.1_p20230119-r1.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2023 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.5.0"
-PATCH_VER="4"
-MUSL_VER="2"
-MUSL_GCC_VER="10.5.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_p20230126.ebuild b/sys-devel/gcc/gcc-10.4.1_p20230126.ebuild
deleted file mode 100644
index 68d9c2522686..000000000000
--- a/sys-devel/gcc/gcc-10.4.1_p20230126.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2023 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.5.0"
-PATCH_VER="5"
-MUSL_VER="2"
-MUSL_GCC_VER="10.5.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 a4652e862572..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_DEV="sam"
-TOOLCHAIN_PATCH_SUFFIX="xz"
-#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="5"
-MUSL_VER="1"
-MUSL_GCC_VER="10.4.0"
-
-if [[ $(ver_cut 3) == 9999 ]] ; then
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="6"
+MUSL_VER="2"
+MUSL_GCC_VER="10.5.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=$(($(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
+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 6cba90ba4ee4..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.5.0"
-MUSL_GCC_VER="10.5.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.3.1_p20221209.ebuild b/sys-devel/gcc/gcc-11.3.1_p20221209.ebuild
deleted file mode 100644
index f947b7097d30..000000000000
--- a/sys-devel/gcc/gcc-11.3.1_p20221209.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 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="3"
-PATCH_GCC_VER="11.4.0"
-MUSL_VER="2"
-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_p20230120-r1.ebuild b/sys-devel/gcc/gcc-11.3.1_p20230120-r1.ebuild
deleted file mode 100644
index 877d1c2ecf87..000000000000
--- a/sys-devel/gcc/gcc-11.3.1_p20230120-r1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 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="7"
-PATCH_GCC_VER="11.4.0"
-MUSL_VER="2"
-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_p20230127.ebuild b/sys-devel/gcc/gcc-11.3.1_p20230127.ebuild
deleted file mode 100644
index 3029159b6f13..000000000000
--- a/sys-devel/gcc/gcc-11.3.1_p20230127.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 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="8"
-PATCH_GCC_VER="11.4.0"
-MUSL_VER="2"
-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_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_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.2.0.ebuild b/sys-devel/gcc/gcc-12.2.0.ebuild
deleted file mode 100644
index 3b7175fe4ae0..000000000000
--- a/sys-devel/gcc/gcc-12.2.0.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="1"
-PATCH_GCC_VER="12.2.0"
-MUSL_VER="7"
-MUSL_GCC_VER="12.2.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 ~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.2.1_p20221126.ebuild b/sys-devel/gcc/gcc-12.2.1_p20221126.ebuild
deleted file mode 100644
index 18f3ae78e0cf..000000000000
--- a/sys-devel/gcc/gcc-12.2.1_p20221126.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="2"
-PATCH_GCC_VER="12.2.0"
-MUSL_VER="7"
-MUSL_GCC_VER="12.2.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 ~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.2.1_p20230121-r1.ebuild b/sys-devel/gcc/gcc-12.2.1_p20230121-r1.ebuild
deleted file mode 100644
index 148aa2769b3f..000000000000
--- a/sys-devel/gcc/gcc-12.2.1_p20230121-r1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="10"
-PATCH_GCC_VER="12.2.0"
-MUSL_VER="7"
-MUSL_GCC_VER="12.2.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 ~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.2.1_p20230128.ebuild b/sys-devel/gcc/gcc-12.2.1_p20230128.ebuild
deleted file mode 100644
index f5950cb3f072..000000000000
--- a/sys-devel/gcc/gcc-12.2.1_p20230128.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="11"
-PATCH_GCC_VER="12.2.0"
-MUSL_VER="7"
-MUSL_GCC_VER="12.2.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 ~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.3.1_p20240209.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240209.ebuild
new file mode 100644
index 000000000000..db88043beff8
--- /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_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.3.9999.ebuild b/sys-devel/gcc/gcc-12.3.9999.ebuild
deleted file mode 100644
index 914addefed5a..000000000000
--- a/sys-devel/gcc/gcc-12.3.9999.ebuild
+++ /dev/null
@@ -1,57 +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.2.0"
-MUSL_GCC_VER="12.2.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 ~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.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.1.9999.ebuild b/sys-devel/gcc/gcc-13.0.1.9999.ebuild
deleted file mode 100644
index ca9d13f5ddf7..000000000000
--- a/sys-devel/gcc/gcc-13.0.1.9999.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2023 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.0.1_pre20230122.ebuild b/sys-devel/gcc/gcc-13.0.1_pre20230122.ebuild
deleted file mode 100644
index 41e7410862f1..000000000000
--- a/sys-devel/gcc/gcc-13.0.1_pre20230122.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2023 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="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"
- 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[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.1_pre20230129-r1.ebuild b/sys-devel/gcc/gcc-13.0.1_pre20230129-r1.ebuild
deleted file mode 100644
index 0a4096b91eca..000000000000
--- a/sys-devel/gcc/gcc-13.0.1_pre20230129-r1.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="6"
-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"
- 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[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_p20240210.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240210.ebuild
new file mode 100644
index 000000000000..8d6404580a0e
--- /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_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_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..cad728a64de1
--- /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=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-15.0.9999.ebuild b/sys-devel/gcc/gcc-15.0.9999.ebuild
new file mode 100644
index 000000000000..73d93bfe4250
--- /dev/null
+++ b/sys-devel/gcc/gcc-15.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 ~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-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 133de2006773..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=8
TOOLCHAIN_PATCH_DEV="sam"
PATCH_GCC_VER="9.5.0"
-PATCH_VER="1"
+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 d1c5c038131d..853d96579504 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -8,22 +8,43 @@
<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).
+ Enable support for control flow hijacking protection.
- Only effective on amd64/x86.
+ 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.
- When combined with USE=hardened, GCC will set -fcf-protection
+ 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.
@@ -64,8 +85,7 @@
other programs with LTO. This USE flag is for whether
GCC itself is built and optimized with 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="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>
@@ -89,7 +109,6 @@
</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).
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 1d9e7d93596c..000000000000
--- a/sys-devel/gdb/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST gdb-12.1-patches-1.tar.xz 12340 BLAKE2B 071ff492f6cf7b0969d76db6f7414eeec564daf773c3334fb0d3f669e328bb4ae403ba8c709f3e33a56caa92273f762a5597a34dd7e7a1056f473b7ede2d8e59 SHA512 dc4a1a8d501dd1adfdcd6dcbd2559f1e2cc6aadeb18eacb2e9152f6858510e7392253db9568fe782da6d160221412e3e13dfd42a47a2a4a1addba2c1804a45b5
-DIST gdb-12.1.tar.xz 22470332 BLAKE2B 7f6f853d1640908cf2c79932cdc1ba02549a07721c005d9c7ce2946a715761719cc164a4e68235a18664ec8a029afe3a2a0cfb57e1635f280076d6bed91317fd SHA512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d
-DIST gdb-weekly-13.0.90.20230110.tar.xz 24802804 BLAKE2B d13bc0ce3bfd0197be31610385014df815c72a86f34b44beced0882267e8b5eecdd50545a85d84c5648771bb9a01b7e63680a424ad36e4d23c15470af6270f21 SHA512 d0c186c661b4648668213a5210f10d09ccbceb077e9e61a88cb1431e8feae4ad2ce74365024bb5f282f78225e118e808c5df30af9c46c4c368a41d4385f8918f
-DIST gdb-weekly-13.0.90.20230126.tar.xz 24808672 BLAKE2B 5331e3f60d2dde7fb139e1e9e2507cbcc7e72d7b6f2afd8f284997955f21f4138fd05e2ee1eeb07c3d3ab1b5ab35046774ab9580013822231a56849f8cc2168c SHA512 53d2623b23edfa8c25bdc26cb87577060cbd2a030eb47df84f5c025339e1a344d28c970e7d196fbb91f5f9dfba0647cf370acf4d17f6492aa2f4e14763623321
diff --git a/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch b/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch
deleted file mode 100644
index 3b2c15de4895..000000000000
--- a/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0075c53724f78c78aa1692cc8e3bf1433eeb0b9f
-https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=885b6660c17fb91980b5682514ef54668e544b02
-https://bugzilla.redhat.com/show_bug.cgi?id=2143992
-
-From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
-From: Keith Seitz <keiths@redhat.com>
-Date: Tue, 29 Nov 2022 13:43:34 -0800
-Subject: gdb-rhbz2143992-libiberty-fix-c89isms-in-configure.patch
-
-;; libiberty: Fix C89-isms in configure tests
-;; (Florian Weimer, RHBZ 2143992)
-
- libiberty/
-
- * acinclude.m4 (ac_cv_func_strncmp_works): Add missing
- int return type and parameter list to the definition of main.
- Include <stdlib.h> and <string.h> for prototypes.
- (ac_cv_c_stack_direction): Add missing
- int return type and parameter list to the definitions of
- main, find_stack_direction. Include <stdlib.h> for exit
- prototype.
- * configure: Regenerate.
-
---- a/libiberty/acinclude.m4
-+++ b/libiberty/acinclude.m4
-@@ -24,6 +24,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
- [AC_TRY_RUN([
- /* Test by Jim Wilson and Kaveh Ghazi.
- Check whether strncmp reads past the end of its string parameters. */
-+#include <stdlib.h>
-+#include <string.h>
- #include <sys/types.h>
-
- #ifdef HAVE_FCNTL_H
-@@ -51,7 +53,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
-
- #define MAP_LEN 0x10000
-
--main ()
-+int
-+main (void)
- {
- #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
- char *p;
-@@ -157,7 +160,10 @@ if test $ac_cv_os_cray = yes; then
- fi
-
- AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
--[AC_TRY_RUN([find_stack_direction ()
-+[AC_TRY_RUN([#include <stdlib.h>
-+
-+int
-+find_stack_direction (void)
- {
- static char *addr = 0;
- auto char dummy;
-@@ -169,7 +175,9 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
- else
- return (&dummy > addr) ? 1 : -1;
- }
--main ()
-+
-+int
-+main (void)
- {
- exit (find_stack_direction() < 0);
- }],
---- a/libiberty/configure
-+++ b/libiberty/configure
-@@ -6918,7 +6918,10 @@ else
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--find_stack_direction ()
-+#include <stdlib.h>
-+
-+int
-+find_stack_direction (void)
- {
- static char *addr = 0;
- auto char dummy;
-@@ -6930,7 +6933,9 @@ find_stack_direction ()
- else
- return (&dummy > addr) ? 1 : -1;
- }
--main ()
-+
-+int
-+main (void)
- {
- exit (find_stack_direction() < 0);
- }
-@@ -7755,6 +7760,8 @@ else
-
- /* Test by Jim Wilson and Kaveh Ghazi.
- Check whether strncmp reads past the end of its string parameters. */
-+#include <stdlib.h>
-+#include <string.h>
- #include <sys/types.h>
-
- #ifdef HAVE_FCNTL_H
-@@ -7782,7 +7789,8 @@ else
-
- #define MAP_LEN 0x10000
-
--main ()
-+int
-+main (void)
- {
- #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
- char *p;
-
diff --git a/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch b/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch
deleted file mode 100644
index c0f8a8ee0269..000000000000
--- a/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=0fe74cb9ad35add9c6da4df5c9879f254d918a6a
-
-From: Pedro Alves <pedro@palves.net>
-Date: Wed, 22 Jun 2022 18:44:37 +0100
-Subject: [PATCH] Fix core-file -> detach -> crash (corefiles/29275)
-
-After loading a core file, you're supposed to be able to use "detach"
-to unload the core file. That unfortunately regressed starting with
-GDB 11, with these commits:
-
- 1192f124a308 - gdb: generalize commit_resume, avoid commit-resuming when threads have pending statuses
- 408f66864a1a - detach in all-stop with threads running
-
-resulting in a GDB crash:
-
- ...
- Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
- 0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
- 2899 if (proc_target->commit_resumed_state)
- (top-gdb) bt
- #0 0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899
- #1 0x0000555555e848bf in scoped_disable_commit_resumed::reset (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3023
- #2 0x0000555555e84a0c in scoped_disable_commit_resumed::reset_and_commit (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3049
- #3 0x0000555555e739cd in detach_command (args=0x0, from_tty=1) at ../../src/gdb/infcmd.c:2791
- #4 0x0000555555c0ba46 in do_simple_func (args=0x0, from_tty=1, c=0x55555662a600) at ../../src/gdb/cli/cli-decode.c:95
- #5 0x0000555555c112b0 in cmd_func (cmd=0x55555662a600, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:2514
- #6 0x0000555556173b1f in execute_command (p=0x5555565c5916 "", from_tty=1) at ../../src/gdb/top.c:699
-
-The code that crashes looks like:
-
- static void
- maybe_set_commit_resumed_all_targets ()
- {
- scoped_restore_current_thread restore_thread;
-
- for (inferior *inf : all_non_exited_inferiors ())
- {
- process_stratum_target *proc_target = inf->process_target ();
-
- if (proc_target->commit_resumed_state)
- ^^^^^^^^^^^
-
-With 'proc_target' above being null. all_non_exited_inferiors filters
-out inferiors that have pid==0. We get here at the end of
-detach_command, after core_target::detach has already run, at which
-point the inferior _should_ have pid==0 and no process target. It is
-clear it no longer has a process target, but, it still has a pid!=0
-somehow.
-
-The reason the inferior still has pid!=0, is that core_target::detach
-just unpushes, and relies on core_target::close to actually do the
-getting rid of the core and exiting the inferior. The problem with
-that is that detach_command grabs an extra strong reference to the
-process stratum target, so the unpush_target inside
-core_target::detach doesn't actually result in a call to
-core_target::close.
-
-Fix this my moving the cleaning up the core inferior to a shared
-routine called by both core_target::close and core_target::detach. We
-still need to cleanup the inferior from within core_file::close
-because there are paths to it that want to get rid of the core without
-going through detach. E.g., "core-file" -> "run".
-
-This commit includes a new test added to gdb.base/corefile.exp to
-cover the "core-file core" -> "detach" scenario.
-
-Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29275
-
-Change-Id: Ic42bdd03182166b19f598428b0dbc2ce6f67c893
---- a/gdb/corelow.c
-+++ b/gdb/corelow.c
-@@ -120,6 +120,9 @@ public:
-
- private: /* per-core data */
-
-+ /* Get rid of the core inferior. */
-+ void clear_core ();
-+
- /* The core's section table. Note that these target sections are
- *not* mapped in the current address spaces' set of target
- sections --- those should come only from pure executable or
-@@ -290,10 +293,8 @@ core_target::build_file_mappings ()
- /* An arbitrary identifier for the core inferior. */
- #define CORELOW_PID 1
-
--/* Close the core target. */
--
- void
--core_target::close ()
-+core_target::clear_core ()
- {
- if (core_bfd)
- {
-@@ -307,6 +308,14 @@ core_target::close ()
-
- current_program_space->cbfd.reset (nullptr);
- }
-+}
-+
-+/* Close the core target. */
-+
-+void
-+core_target::close ()
-+{
-+ clear_core ();
-
- /* Core targets are heap-allocated (see core_target_open), so here
- we delete ourselves. */
-@@ -592,9 +601,15 @@ core_target_open (const char *arg, int from_tty)
- void
- core_target::detach (inferior *inf, int from_tty)
- {
-- /* Note that 'this' is dangling after this call. unpush_target
-- closes the target, and our close implementation deletes
-- 'this'. */
-+ /* Get rid of the core. Don't rely on core_target::close doing it,
-+ because target_detach may be called with core_target's refcount > 1,
-+ meaning core_target::close may not be called yet by the
-+ unpush_target call below. */
-+ clear_core ();
-+
-+ /* Note that 'this' may be dangling after this call. unpush_target
-+ closes the target if the refcount reaches 0, and our close
-+ implementation deletes 'this'. */
- inf->unpush_target (this);
-
- /* Clear the register cache and the frame cache. */
---- a/gdb/testsuite/gdb.base/corefile.exp
-+++ b/gdb/testsuite/gdb.base/corefile.exp
-@@ -207,6 +207,16 @@ gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (
-
- gdb_test "core" "No core file now."
-
-+# Test that we can unload the core with the "detach" command.
-+
-+proc_with_prefix corefile_detach {} {
-+ clean_restart $::binfile
-+
-+ gdb_test "core-file $::corefile" "Core was generated by .*" "load core"
-+ gdb_test "detach" "No core file now\\." "detach core"
-+}
-+
-+corefile_detach
-
- # Test a run (start) command will clear any loaded core file.
-
-@@ -222,6 +232,8 @@ proc corefile_test_run {} {
- return
- }
-
-+ clean_restart $::binfile
-+
- gdb_test "core-file $corefile" "Core was generated by .*" "run: load core again"
- gdb_test "info files" "\r\nLocal core dump file:\r\n.*" "run: sanity check we see the core file"
-
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-12.1-r2.ebuild b/sys-devel/gdb/gdb-12.1-r2.ebuild
deleted file mode 100644
index 3fd6e33a28d9..000000000000
--- a/sys-devel/gdb/gdb-12.1-r2.ebuild
+++ /dev/null
@@ -1,294 +0,0 @@
-# Copyright 1999-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 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"
-# Also, ia64 kernel crashes when gdb testsuite is running.
-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
- app-alternatives/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
- "${FILESDIR}"/${P}-core-file-detach.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-r3.ebuild b/sys-devel/gdb/gdb-12.1-r3.ebuild
deleted file mode 100644
index 8eb1d3628dc8..000000000000
--- a/sys-devel/gdb/gdb-12.1-r3.ebuild
+++ /dev/null
@@ -1,293 +0,0 @@
-# Copyright 1999-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 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
-
-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 sim 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"
-# Also, ia64 kernel crashes when gdb testsuite is running.
-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
- app-alternatives/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
- "${FILESDIR}"/${P}-core-file-detach.patch
- "${FILESDIR}"/${P}-configure-clang16.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 sim)
- $(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-r4.ebuild b/sys-devel/gdb/gdb-12.1-r4.ebuild
deleted file mode 100644
index 6bb7083f4b01..000000000000
--- a/sys-devel/gdb/gdb-12.1-r4.ebuild
+++ /dev/null
@@ -1,299 +0,0 @@
-# Copyright 1999-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 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_DEV="sam"
-PATCH_VER="1"
-
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="
- ${SRC_URI}
- ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${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 sim source-highlight test vanilla xml xxhash"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!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
- app-alternatives/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
- "${FILESDIR}"/${P}-core-file-detach.patch
- "${FILESDIR}"/${P}-configure-clang16.patch
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- [[ -d "${WORKDIR}"/${P}-patches-${PATCH_VER} ]] && eapply "${WORKDIR}"/${P}-patches-${PATCH_VER}
-
- 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 sim)
- $(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_test() {
- # Run the unittests (nabbed invocation from Fedora's spec file) at least
- emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
-
- # Too many failures
- # 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"
- # Also, ia64 kernel crashes when gdb testsuite is running.
- #emake -k check
-}
-
-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
-
- # 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-13.0.90_p20230110.ebuild b/sys-devel/gdb/gdb-13.0.90_p20230110.ebuild
deleted file mode 100644
index 5a1837450675..000000000000
--- a/sys-devel/gdb/gdb-13.0.90_p20230110.ebuild
+++ /dev/null
@@ -1,301 +0,0 @@
-# Copyright 1999-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 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_p2???????| *.*.90_p2???????)
- # Weekly snapshots
- MY_PV="${PV/_p/.}"
- SRC_URI="
- https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
- https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
- "
- S="${WORKDIR}/${PN}-${MY_PV}"
- ;;
- *)
- # Normal upstream release
- SRC_URI="
- mirror://gnu/gdb/${P}.tar.xz
- https://sourceware.org/pub/gdb/releases/${P}.tar.xz
- "
- ;;
-esac
-
-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
- # for testing on loong only
- #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"
- KEYWORDS="~loong"
-fi
-
-IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
-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"
-# Also, ia64 kernel crashes when gdb testsuite is running.
-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
- )
- zstd? ( app-arch/zstd:= )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- app-alternatives/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 sim)
- $(use_enable source-highlight)
- $(use multitarget && echo --enable-targets=all)
- $(use_with python python "${EPYTHON}")
- $(use_with xxhash)
- $(use_with guile)
- $(use_with zstd)
- )
-
- 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-13.0.90_p20230126.ebuild b/sys-devel/gdb/gdb-13.0.90_p20230126.ebuild
deleted file mode 100644
index 9eb29deacc90..000000000000
--- a/sys-devel/gdb/gdb-13.0.90_p20230126.ebuild
+++ /dev/null
@@ -1,307 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging
-# tips & notes.
-
-PYTHON_COMPAT=( python3_{9..11} )
-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_p2???????| *.*.90_p2???????)
- # Weekly snapshots
- MY_PV="${PV/_p/.}"
- SRC_URI="
- https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
- https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
- "
- S="${WORKDIR}/${PN}-${MY_PV}"
- ;;
- *)
- # Normal upstream release
- SRC_URI="
- mirror://gnu/gdb/${P}.tar.xz
- https://sourceware.org/pub/gdb/releases/${P}.tar.xz
- "
- ;;
-esac
-
-PATCH_DEV=""
-PATCH_VER=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="
- ${SRC_URI}
- ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${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
- # for testing on loong only
- #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"
- KEYWORDS="~loong"
-fi
-
-IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!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
- )
- zstd? ( app-arch/zstd:= )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- app-alternatives/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 sim)
- $(use_enable source-highlight)
- $(use multitarget && echo --enable-targets=all)
- $(use_with python python "${EPYTHON}")
- $(use_with xxhash)
- $(use_with guile)
- $(use_with zstd)
- )
-
- 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_test() {
- # Run the unittests (nabbed invocation from Fedora's spec file) at least
- emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
-
- # Too many failures
- # 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"
- # Also, ia64 kernel crashes when gdb testsuite is running.
- #emake -k check
-}
-
-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
-
- # 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 9eb29deacc90..000000000000
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ /dev/null
@@ -1,307 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging
-# tips & notes.
-
-PYTHON_COMPAT=( python3_{9..11} )
-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_p2???????| *.*.90_p2???????)
- # Weekly snapshots
- MY_PV="${PV/_p/.}"
- SRC_URI="
- https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
- https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
- "
- S="${WORKDIR}/${PN}-${MY_PV}"
- ;;
- *)
- # Normal upstream release
- SRC_URI="
- mirror://gnu/gdb/${P}.tar.xz
- https://sourceware.org/pub/gdb/releases/${P}.tar.xz
- "
- ;;
-esac
-
-PATCH_DEV=""
-PATCH_VER=""
-DESCRIPTION="GNU debugger"
-HOMEPAGE="https://sourceware.org/gdb/"
-SRC_URI="
- ${SRC_URI}
- ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${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
- # for testing on loong only
- #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"
- KEYWORDS="~loong"
-fi
-
-IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!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
- )
- zstd? ( app-arch/zstd:= )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- app-alternatives/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 sim)
- $(use_enable source-highlight)
- $(use multitarget && echo --enable-targets=all)
- $(use_with python python "${EPYTHON}")
- $(use_with xxhash)
- $(use_with guile)
- $(use_with zstd)
- )
-
- 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_test() {
- # Run the unittests (nabbed invocation from Fedora's spec file) at least
- emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
-
- # Too many failures
- # 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"
- # Also, ia64 kernel crashes when gdb testsuite is running.
- #emake -k check
-}
-
-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
-
- # 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 5baff33ff49e..000000000000
--- a/sys-devel/gdb/metadata.xml
+++ /dev/null
@@ -1,22 +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="sim">Build gdb's simulators for various hardware platforms. See https://sourceware.org/gdb/wiki/Sim.</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 0d369ce9163e..fe3a242e1a81 100644
--- a/sys-devel/gettext/Manifest
+++ b/sys-devel/gettext/Manifest
@@ -1,2 +1,6 @@
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/gettext-0.21.1.ebuild b/sys-devel/gettext/gettext-0.21.1.ebuild
index 654d28fe3fbd..4988b01ddbeb 100644
--- a/sys-devel/gettext/gettext-0.21.1.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=8
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gettext.asc
-inherit java-pkg-opt-2 libtool 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 )"
@@ -70,7 +68,12 @@ PATCHES=(
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
}
@@ -89,7 +92,9 @@ src_prepare() {
elibtoolize
- use elibc_musl && eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+ if use elibc_musl || use elibc_Darwin; then
+ eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+ fi
}
multilib_src_configure() {
@@ -114,12 +119,12 @@ multilib_src_configure() {
--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 60579c526325..0a977480cafd 100644
--- a/sys-devel/gnuconfig/Manifest
+++ b/sys-devel/gnuconfig/Manifest
@@ -1 +1 @@
-DIST gnuconfig-20221007.tar.xz 71208 BLAKE2B 9112bd82af083043d5eae3a5ffde8174df842f3a817b1b42c17e3202a9189cff8e9f422e956e1cdd82e326949a23e27a353f72f98a6f63818e5a67096f650fed SHA512 91ca2faca02d5d78f937da70a4af026b1ba585519b9eaa2463cacd79f0f6a85ef6e1f7e0bed4243474b6e880c0b6387ca09f00eb2d40a27c3a26b6817b1bb70a
+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-20221007.ebuild b/sys-devel/gnuconfig/gnuconfig-20230731.ebuild
index 135754812a30..36482deca301 100644
--- a/sys-devel/gnuconfig/gnuconfig-20221007.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
diff --git a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
index 712d8c0126e5..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
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 dcbdd672a599..33b317e8f850 100644
--- a/sys-devel/kgcc64/Manifest
+++ b/sys-devel/kgcc64/Manifest
@@ -1,8 +1,17 @@
-DIST gcc-10.4.0-musl-patches-1.tar.xz 3808 BLAKE2B 804d1fcc451dcd03be71240dd498ec2d179869571d44012967c48dccf5a478dd8c55000a964a80fdd5584d739a777dee1c83241cffce514ef002df2572854a67 SHA512 83e4a9c0f7062baf0c606a2bcc56a818494991403d7577dea65f04bbc25bdb786a5889b80d45d80e7f4be07c1aef786802cbfcfafd1a17ec255a2d4e93a77570
-DIST gcc-10.4.0-patches-5.tar.xz 17056 BLAKE2B f336d69a8ad105b8c4a84e8248a5b8a88175d3f1d67d32c6bee1780d252d86947059bd624992e6292610e86c9012f4d901a1a54df0d184dd023d404a0707700e SHA512 aa8fb42f20587f8519e7b06037da4d8f7d386b63e228b239a0445a51df4e401940fcd81482381d966622054aef3e0db06d1def5c74ac3d3dcc9c75c3b966c758
-DIST gcc-10.4.0.tar.xz 75018092 BLAKE2B ec1169025d3896b70ab80a4b8ce5040763a95529fc7e120c6bc3a3eb1db5cf938ebde347c1e595a8ff7d4081e79ded6252702d7a1a09648449b7a0783188e434 SHA512 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648
-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-12.2.0-musl-patches-1.tar.xz 3844 BLAKE2B 004432806696f7d0a32366270ac45695e858abee73a255e44dc6e0a225339e4cad40aab0d51dfe9a55d5aa4b4001f5726064bb2eea3212a0874b2d27e229abd7 SHA512 c354edcd641a9dfaf902a0ff4c44c75065d0cf1c36bbf6c3c35c2e23bff22b8f70bcf4458a5a0ef86371e9f2fafca8a54ca822e35820ff442c9458a2819c3606
-DIST gcc-12.2.0-patches-1.tar.xz 12864 BLAKE2B a5ae0a85dfc1b6f0bd968f0d5262ebed14ec9cdb3249e3a4c571578c54eda0e53708ee7fe8e03e506366c7f3cf7926eced9b390d9dee948c1249298c0fabd9fb SHA512 f3d793b89a2a0385d596162fb0c653d4acdf21ae418cb792c1786a01fde0391bd0719715dbf07d53636f127168f5cd99108a1dc11cf6cea889b7d82385bcc258
-DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
+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-10.4.0.ebuild b/sys-devel/kgcc64/kgcc64-10.5.0.ebuild
index c78e173424f2..c2a2eb1fd4b3 100644
--- a/sys-devel/kgcc64/kgcc64-10.4.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-10.5.0.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
@@ -12,15 +12,15 @@ case ${CHOST} in
i?86*) CTARGET=x86_64-${CHOST#*-};;
esac
export CTARGET
+
TOOLCHAIN_ALLOWED_LANGS="c"
TOOLCHAIN_PATCH_DEV="sam"
-TOOLCHAIN_PATCH_SUFFIX="xz"
-#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="5"
-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"
GCC_TARGET_NO_MULTILIB=true
+PYTHON_COMPAT=( python3_{10..11} )
inherit toolchain
diff --git a/sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild b/sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild
new file mode 100644
index 000000000000..805aef87b2bb
--- /dev/null
+++ b/sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild
@@ -0,0 +1,47 @@
+# 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
+
+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"
+
+# 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 )"
+
+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.4.1_p20240208.ebuild b/sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild
new file mode 100644
index 000000000000..1105de63f8d0
--- /dev/null
+++ b/sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild
@@ -0,0 +1,47 @@
+# 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
+
+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"
+
+# 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 )"
+
+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_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-12.2.0.ebuild b/sys-devel/kgcc64/kgcc64-13.2.1_p20240113-r1.ebuild
index b26a5781d901..e14486eae1a8 100644
--- a/sys-devel/kgcc64/kgcc64-12.2.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-13.2.1_p20240113-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -14,11 +14,12 @@ esac
export CTARGET
TOOLCHAIN_ALLOWED_LANGS="c"
TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="1"
-PATCH_GCC_VER="12.2.0"
-MUSL_VER="1"
-MUSL_GCC_VER="12.2.0"
+PATCH_VER="12"
+PATCH_GCC_VER="13.2.0"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
GCC_TARGET_NO_MULTILIB=true
+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 d36ba6c57618..000000000000
--- a/sys-devel/libtool/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-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-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.7-grep-3.8.patch b/sys-devel/libtool/files/libtool-2.4.7-grep-3.8.patch
deleted file mode 100644
index 8f1de478aece..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.7-grep-3.8.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/892635
-https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg00004.html
-
-From 414deacee0f564afdf2d7750450274c581330a59 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= <fberat@redhat.com>
-Date: Wed, 21 Dec 2022 13:14:03 +0100
-Subject: [PATCH] tests: Fix grep warning about stray \ before /
-
-Recent version of grep emit a warning if stray \ is found before /.
-This leads to the link-order test failure.
-
- * tests/link-order.at: Remove unneeded \ before /
---- a/tests/link-order.at
-+++ b/tests/link-order.at
-@@ -99,12 +99,12 @@ aix* | interix*) ;; # These systems have different path syntax
- case $hardcode_direct$hardcode_direct_absolute in
- yesno)
- AT_CHECK([if $EGREP relinking stderr; then
-- $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
-+ $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
- else :; fi], [0], [ignore], [], [echo "wrong link order"])
- ;;
- *)
- AT_CHECK([if $EGREP relinking stderr; then
-- $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
-+ $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
- else :; fi], [0], [ignore], [], [echo "wrong link order"])
- ;;
- esac
---
-2.38.1
diff --git a/sys-devel/libtool/files/libtool-2.4.7-werror-lto.patch b/sys-devel/libtool/files/libtool-2.4.7-werror-lto.patch
deleted file mode 100644
index c0db69f3e2b6..000000000000
--- a/sys-devel/libtool/files/libtool-2.4.7-werror-lto.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg00000.html
-
-From d72817b1ee5d7b666bf30b0234e32423252d6ad8 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Sat, 10 Dec 2022 02:00:22 +0000
-Subject: [PATCH] Allow -Werror and -Werror=* through flag filtering
-
-* build-aux/ltmain.in (func_mode_link): allow -Werror and -Werror=* through
- flat filtering at link time.
-
- This is needed for detecting likely-runtime problems with LTO using
- e.g. -Werror=odr or -Werror=lto-type-mismatch.
-
-Bug: https://bugs.gentoo.org/884767
-Signed-off-by: Sam James <sam@gentoo.org>
---- a/build-aux/ltmain.in
-+++ b/build-aux/ltmain.in
-@@ -5408,10 +5408,11 @@ func_mode_link ()
- # -fsanitize=* Clang/GCC memory and address sanitizer
- # -fuse-ld=* Linker select flags for GCC
- # -Wa,* Pass flags directly to the assembler
-+ # -Werror, -Werror=* Report (specified) warnings as errors
- -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=*|-fuse-ld=*|-Wa,*)
-+ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
- func_append compile_command " $arg"
---- a/build-aux/ltmain.sh
-+++ a/build-aux/ltmain.sh
-@@ -5408,10 +5408,11 @@ func_mode_link ()
- # -fsanitize=* Clang/GCC memory and address sanitizer
- # -fuse-ld=* Linker select flags for GCC
- # -Wa,* Pass flags directly to the assembler
-+ # -Werror, -Werror=* Report (specified) warnings as errors
- -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=*|-fuse-ld=*|-Wa,*)
-+ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
- func_append compile_command " $arg"
---
-2.38.1
diff --git a/sys-devel/libtool/libtool-2.4.7-r1.ebuild b/sys-devel/libtool/libtool-2.4.7-r1.ebuild
deleted file mode 100644
index f9db3294ea9e..000000000000
--- a/sys-devel/libtool/libtool-2.4.7-r1.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2023 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
- "${FILESDIR}"/${PN}-2.4.7-werror-lto.patch
- "${FILESDIR}"/${PN}-2.4.7-grep-3.8.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=true
- 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-2.4.7.ebuild b/sys-devel/libtool/libtool-2.4.7.ebuild
deleted file mode 100644
index 7b2a962644b8..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=true
- 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 17e669733130..000000000000
--- a/sys-devel/libtool/libtool-9999.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2023 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
- "${FILESDIR}"/${PN}-2.4.7-grep-3.8.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=true
- 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
index 2252eb1bae77..44a21b6fb09f 100644
--- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,7 +7,6 @@ inherit multilib
DESCRIPTION="Symlinks to use LLD on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
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
index 75dc4a1de3c4..2eb282b65da9 100644
--- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,13 +7,11 @@ inherit multilib
DESCRIPTION="Symlinks to use LLD on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS=""
-PROPERTIES="live"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos"
IUSE="multilib-symlinks +native-symlinks"
RDEPEND="
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild
index a882c715a3a7..d8b2ae18b0fb 100644
--- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,13 +7,11 @@ inherit multilib
DESCRIPTION="Symlinks to use LLD on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS=""
-PROPERTIES="live"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos"
IUSE="multilib-symlinks +native-symlinks"
RDEPEND="
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-14-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild
index ee8671571c75..b85bf912c557 100644
--- a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r2.ebuild
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,12 +7,10 @@ inherit multilib
DESCRIPTION="Symlinks to use LLD on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
IUSE="multilib-symlinks +native-symlinks"
RDEPEND="
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index 854f3e11851b..122b7c41b995 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -1,9 +1,11 @@
-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 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.0rc1.src.tar.xz 118364920 BLAKE2B 449fa321722e77d1a595d0f1f52a4e9492954d928355402f6e07e6c8a20e4ebfc03690ef8272b92eb5cdd58c97ca37fa6baf847d399e36a84e3ea7d94d1ea6ca SHA512 a24074ea8e21af49b0545f02bdec4727e8df841e59340dc189cc5a144a70fc6880e82381fba622ac62c7504f7bf394c916c773ee25904e8faf41eaedce6ae9e0
-DIST llvm-project-16.0.0rc1.src.tar.xz.sig 566 BLAKE2B 29a593f74b05ef6268f0b2ee5ebd810a244e7c6b27dd94f709b22bca8e6c8367f8321a6ec61f85476cd399f31519ac2a3c978014afae29490c1e70d26eb6c35f SHA512 dcca03d41ee3cc7d5b150184b03eb9f2e579603ce9cd5289360d1ca47169174afc26a85079cf096ec91e23f487f0b38bb6cd5fb7e5197530582155b16a5ce748
-DIST llvm-project-46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d.tar.gz 180436731 BLAKE2B 51c30c3f11dd55a225b8ebe4ded752ce9e8eb58751e7458c29901dbdd3673f94892d337d111d696e779e3f7ef0bca6c7d79709e2072a4bf3a001d8813125d571 SHA512 ebbe0f8becac39d63433dcc3de474c40f1215fc8faab94fa2ba869d28e66b27e4fe088377bd7ae64575a6d7b07017b88bf92e5488a3185a753e647d8da352bbf
-DIST llvm-project-6dc85bd3fde7df2999fda07e9e9f2e83d52c6125.tar.gz 175208511 BLAKE2B cf87cf7e9bf7c74aab8ccda0f153369cb81798047fdd48025c3c7030857b128babbaafb667385a5c8e9916e16038b14fee39f1623d329471e73c39c2f2d7bbfa SHA512 e6dc0cacd6c079be8a00364e4c244782d764d9a8d514d65f9078427cb4a0c1663ff88761bfbc1e955a1a990451439110497c2cb7af7f56b2c91f2e9db4389894
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
+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-13.0.1-r1.ebuild b/sys-devel/lld/lld-13.0.1-r1.ebuild
deleted file mode 100644
index 5712cb6ffe16..000000000000
--- a/sys-devel/lld/lld-13.0.1-r1.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..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="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- ~sys-devel/llvm-${PV}
-"
-RDEPEND="
- ${DEPEND}
- !sys-devel/lld:0
-"
-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() {
- 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_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.6-r1.ebuild b/sys-devel/lld/lld-14.0.6-r1.ebuild
deleted file mode 100644
index c1885a85845f..000000000000
--- a/sys-devel/lld/lld-14.0.6-r1.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..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="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- ~sys-devel/llvm-${PV}
-"
-RDEPEND="
- ${DEPEND}
- !sys-devel/lld:0
-"
-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() {
- 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_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.7.ebuild b/sys-devel/lld/lld-15.0.7.ebuild
index 9f1faebcbbbf..5040684bb927 100644
--- a/sys-devel/lld/lld-15.0.7.ebuild
+++ b/sys-devel/lld/lld-15.0.7.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="The LLVM linker (link editor)"
@@ -26,7 +26,6 @@ RDEPEND="
BDEPEND="
sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
$(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
@@ -69,6 +68,7 @@ src_configure() {
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
)
use test && mycmakeargs+=(
diff --git a/sys-devel/lld/lld-16.0.0.9999.ebuild b/sys-devel/lld/lld-16.0.6.ebuild
index d22c1fb13951..9308190da16c 100644
--- a/sys-devel/lld/lld-16.0.0.9999.ebuild
+++ b/sys-devel/lld/lld-16.0.6.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="The LLVM linker (link editor)"
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos"
IUSE="debug test zstd"
RESTRICT="!test? ( test )"
@@ -27,7 +27,6 @@ RDEPEND="
BDEPEND="
sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
$(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
@@ -37,6 +36,7 @@ PDEPEND="
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() {
@@ -69,6 +69,8 @@ src_configure() {
-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+=(
diff --git a/sys-devel/lld/lld-17.0.0.9999.ebuild b/sys-devel/lld/lld-17.0.0.9999.ebuild
deleted file mode 100644
index d22c1fb13951..000000000000
--- a/sys-devel/lld/lld-17.0.0.9999.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..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="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
-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? (
- >=dev-util/cmake-3.16
- $(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.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)
- )
-
- 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-16.0.0_pre20230107.ebuild b/sys-devel/lld/lld-17.0.6.ebuild
index d22c1fb13951..33a9eb571205 100644
--- a/sys-devel/lld/lld-16.0.0_pre20230107.ebuild
+++ b/sys-devel/lld/lld-17.0.6.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="The LLVM linker (link editor)"
@@ -11,12 +11,12 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos"
IUSE="debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}[zstd=]
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
sys-libs/zlib:=
zstd? ( app-arch/zstd:= )
"
@@ -27,7 +27,6 @@ RDEPEND="
BDEPEND="
sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
$(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
@@ -36,7 +35,6 @@ PDEPEND="
"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils third-party )
llvm.org_set_globals
python_check_deps() {
@@ -60,6 +58,9 @@ src_unpack() {
}
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"
@@ -69,6 +70,8 @@ src_configure() {
-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+=(
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-16.0.0_pre20230127.ebuild b/sys-devel/lld/lld-19.0.0.9999.ebuild
index d22c1fb13951..5440a5c89919 100644
--- a/sys-devel/lld/lld-16.0.0_pre20230127.ebuild
+++ b/sys-devel/lld/lld-19.0.0.9999.ebuild
@@ -1,22 +1,21 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+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=""
-IUSE="debug test zstd"
+IUSE="+debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}[zstd=]
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
sys-libs/zlib:=
zstd? ( app-arch/zstd:= )
"
@@ -27,7 +26,6 @@ RDEPEND="
BDEPEND="
sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
$(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
@@ -36,7 +34,6 @@ PDEPEND="
"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils third-party )
llvm.org_set_globals
python_check_deps() {
@@ -44,7 +41,6 @@ python_check_deps() {
}
pkg_setup() {
- LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -60,6 +56,11 @@ 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"
@@ -69,6 +70,8 @@ src_configure() {
-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+=(
diff --git a/sys-devel/lld/lld-16.0.0_rc1.ebuild b/sys-devel/lld/lld-19.0.0_pre20240410.ebuild
index d22c1fb13951..5440a5c89919 100644
--- a/sys-devel/lld/lld-16.0.0_rc1.ebuild
+++ b/sys-devel/lld/lld-19.0.0_pre20240410.ebuild
@@ -1,22 +1,21 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+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=""
-IUSE="debug test zstd"
+IUSE="+debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}[zstd=]
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
sys-libs/zlib:=
zstd? ( app-arch/zstd:= )
"
@@ -27,7 +26,6 @@ RDEPEND="
BDEPEND="
sys-devel/llvm:${LLVM_MAJOR}
test? (
- >=dev-util/cmake-3.16
$(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
@@ -36,7 +34,6 @@ PDEPEND="
"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils third-party )
llvm.org_set_globals
python_check_deps() {
@@ -44,7 +41,6 @@ python_check_deps() {
}
pkg_setup() {
- LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -60,6 +56,11 @@ 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"
@@ -69,6 +70,8 @@ src_configure() {
-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+=(
diff --git a/sys-devel/lld/lld-19.0.0_pre20240420.ebuild b/sys-devel/lld/lld-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..5440a5c89919
--- /dev/null
+++ b/sys-devel/lld/lld-19.0.0_pre20240420.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.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}"
+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/llvm-common/Manifest b/sys-devel/llvm-common/Manifest
index 854f3e11851b..bd71f2e58a68 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -1,9 +1,10 @@
-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 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.0rc1.src.tar.xz 118364920 BLAKE2B 449fa321722e77d1a595d0f1f52a4e9492954d928355402f6e07e6c8a20e4ebfc03690ef8272b92eb5cdd58c97ca37fa6baf847d399e36a84e3ea7d94d1ea6ca SHA512 a24074ea8e21af49b0545f02bdec4727e8df841e59340dc189cc5a144a70fc6880e82381fba622ac62c7504f7bf394c916c773ee25904e8faf41eaedce6ae9e0
-DIST llvm-project-16.0.0rc1.src.tar.xz.sig 566 BLAKE2B 29a593f74b05ef6268f0b2ee5ebd810a244e7c6b27dd94f709b22bca8e6c8367f8321a6ec61f85476cd399f31519ac2a3c978014afae29490c1e70d26eb6c35f SHA512 dcca03d41ee3cc7d5b150184b03eb9f2e579603ce9cd5289360d1ca47169174afc26a85079cf096ec91e23f487f0b38bb6cd5fb7e5197530582155b16a5ce748
-DIST llvm-project-46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d.tar.gz 180436731 BLAKE2B 51c30c3f11dd55a225b8ebe4ded752ce9e8eb58751e7458c29901dbdd3673f94892d337d111d696e779e3f7ef0bca6c7d79709e2072a4bf3a001d8813125d571 SHA512 ebbe0f8becac39d63433dcc3de474c40f1215fc8faab94fa2ba869d28e66b27e4fe088377bd7ae64575a6d7b07017b88bf92e5488a3185a753e647d8da352bbf
-DIST llvm-project-6dc85bd3fde7df2999fda07e9e9f2e83d52c6125.tar.gz 175208511 BLAKE2B cf87cf7e9bf7c74aab8ccda0f153369cb81798047fdd48025c3c7030857b128babbaafb667385a5c8e9916e16038b14fee39f1623d329471e73c39c2f2d7bbfa SHA512 e6dc0cacd6c079be8a00364e4c244782d764d9a8d514d65f9078427cb4a0c1663ff88761bfbc1e955a1a990451439110497c2cb7af7f56b2c91f2e9db4389894
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
+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-13.0.1.ebuild b/sys-devel/llvm-common/llvm-common-13.0.1.ebuild
deleted file mode 100644
index c8abb7bab805..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.6.ebuild b/sys-devel/llvm-common/llvm-common-14.0.6.ebuild
deleted file mode 100644
index 2be11dd95e44..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.7.ebuild b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
index 5c69c0a3337c..3419b7207944 100644
--- a/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
+++ b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit llvm.org
+inherit elisp-common llvm.org
DESCRIPTION="Common files shared between multiple slots of LLVM"
HOMEPAGE="https://llvm.org/"
@@ -11,18 +11,44 @@ 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/vim )
+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 */
+ doins -r vim/*/
# some users may find it useful
- newdoc README README.vim
- dodoc vimrc
+ 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.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0.9999.ebuild
deleted file mode 100644
index df37476f6fbc..000000000000
--- a/sys-devel/llvm-common/llvm-common-16.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-16.0.0_pre20230107.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0_pre20230107.ebuild
deleted file mode 100644
index 54af5bde6db7..000000000000
--- a/sys-devel/llvm-common/llvm-common-16.0.0_pre20230107.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2023 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="~loong"
-
-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-16.0.0_pre20230127.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0_pre20230127.ebuild
deleted file mode 100644
index ce5f03ca34a5..000000000000
--- a/sys-devel/llvm-common/llvm-common-16.0.0_pre20230127.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2023 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-16.0.0_rc1.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0_rc1.ebuild
deleted file mode 100644
index ce5f03ca34a5..000000000000
--- a/sys-devel/llvm-common/llvm-common-16.0.0_rc1.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2023 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-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.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-17.0.0.9999.ebuild
deleted file mode 100644
index ce5f03ca34a5..000000000000
--- a/sys-devel/llvm-common/llvm-common-17.0.0.9999.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2023 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-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-roc/Manifest b/sys-devel/llvm-roc/Manifest
deleted file mode 100644
index b9b116396d77..000000000000
--- a/sys-devel/llvm-roc/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST llvm-rocm-ocl-5.0.2.tar.gz 150281451 BLAKE2B e4363266e05e13af761dd6f440dbfc30905f219e428fa3b2595800ba0c80c97cd7e2615d68acd9aea4fc66454ee8a3ff7a52a60d3aed4e93af5007050277e5fe SHA512 9be9f1a0ad1a0089aa27858174ce37c7a02902b6dedc338382f42ed0567823cc4bb11b68c130470590c16d4d92ab2735a06c27d248237ffa2d394253328f6705
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.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-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-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
index c5ec5834758e..63180b2f53b6 100644
--- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,7 +7,6 @@ inherit multilib
DESCRIPTION="Symlinks to use LLVM on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
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
index c24f550dfe79..c1c22114f553 100644
--- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,12 +7,11 @@ inherit multilib
DESCRIPTION="Symlinks to use LLVM on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS="~loong"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
IUSE="multilib-symlinks +native-symlinks"
RDEPEND="
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild
index 588158b795e1..c1c22114f553 100644
--- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,13 +7,11 @@ inherit multilib
DESCRIPTION="Symlinks to use LLVM on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="${PV}"
-KEYWORDS=""
-PROPERTIES="live"
+KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
IUSE="multilib-symlinks +native-symlinks"
RDEPEND="
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-14-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild
index 8d59c568c625..a57062acab8c 100644
--- a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14-r1.ebuild
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,12 +7,10 @@ inherit multilib
DESCRIPTION="Symlinks to use LLVM on binutils-free system"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
-SRC_URI=""
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="
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 2309542ac3fa..b037daa082bf 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -1,15 +1,17 @@
-DIST llvm-13.0.1-manpages.tar.bz2 202187 BLAKE2B 32a761426dbe4c3c355d30660254305cd88b6d513faee04c78e370cea9d38761108a9be4c4b4ac39b6a74400af1f9d37ffd11ab05acd7340175c8d66845ae7d9 SHA512 9495e1daf588540fdb8b9ee905a9b6be4693bd70b7f42c8e8a0d667242fc24dc853c45918d3bc09d02f0761ad61541bc9749c1498e312da129abdab638a0d572
-DIST llvm-14.0.6-manpages.tar.bz2 218186 BLAKE2B 4491296e490936a2d7b518e19a0ff6312b89abeef3fbe5da5d0b93bb2add1088ddf64a0b00ec8846062d19b1ad31e53eadee7ce03c9034aab554e183d1baccf6 SHA512 f8328dc2ec1e8d941d47e583ee31fae7bdcebb3f854b5c8a4a84bd19a79bf5427ad204012c81349bc05a291e41cf48e5129b4578bbd5d4490dd01e1c0b5823bf
DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49
-DIST llvm-gentoo-patchset-13.0.1-r1.tar.xz 6716 BLAKE2B 3ad6a2f5d28b1a15574943f0a869afdbfa77cc99e4686c961f0b4c3fc1ee18fbf2870b6df516c2062aa46775a0c6a1a2fe74d9f389b80f13bb13cead8c5277ec SHA512 7a586a95369a2d8736d0cc0aa249951ac256aa2baea08a150ce313ff58a2150d5b72998bd51b7a62147c3cbfa23f8ac2a0c7f6254d15cc9c097346018b1b3be1
-DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
-DIST llvm-gentoo-patchset-15.0.7.tar.xz 19300 BLAKE2B b70e81d744c2eba5cd851e7b690ce8979b3064973f522be7c93bfb541860000a4bc8b17219f8788dfc8a527217dd13946cf7836640698ddd3d4b3fde493dfbf8 SHA512 daffff6ae4a0874aff1a423b4bb36701ecb5a35a36ae91d4ed7fda58b83e50ffcdc30498c84be4711fd3e1f227bf312dbe930019203e0a131944439af2aa94f7
-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 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.0rc1.src.tar.xz 118364920 BLAKE2B 449fa321722e77d1a595d0f1f52a4e9492954d928355402f6e07e6c8a20e4ebfc03690ef8272b92eb5cdd58c97ca37fa6baf847d399e36a84e3ea7d94d1ea6ca SHA512 a24074ea8e21af49b0545f02bdec4727e8df841e59340dc189cc5a144a70fc6880e82381fba622ac62c7504f7bf394c916c773ee25904e8faf41eaedce6ae9e0
-DIST llvm-project-16.0.0rc1.src.tar.xz.sig 566 BLAKE2B 29a593f74b05ef6268f0b2ee5ebd810a244e7c6b27dd94f709b22bca8e6c8367f8321a6ec61f85476cd399f31519ac2a3c978014afae29490c1e70d26eb6c35f SHA512 dcca03d41ee3cc7d5b150184b03eb9f2e579603ce9cd5289360d1ca47169174afc26a85079cf096ec91e23f487f0b38bb6cd5fb7e5197530582155b16a5ce748
-DIST llvm-project-46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d.tar.gz 180436731 BLAKE2B 51c30c3f11dd55a225b8ebe4ded752ce9e8eb58751e7458c29901dbdd3673f94892d337d111d696e779e3f7ef0bca6c7d79709e2072a4bf3a001d8813125d571 SHA512 ebbe0f8becac39d63433dcc3de474c40f1215fc8faab94fa2ba869d28e66b27e4fe088377bd7ae64575a6d7b07017b88bf92e5488a3185a753e647d8da352bbf
-DIST llvm-project-6dc85bd3fde7df2999fda07e9e9f2e83d52c6125.tar.gz 175208511 BLAKE2B cf87cf7e9bf7c74aab8ccda0f153369cb81798047fdd48025c3c7030857b128babbaafb667385a5c8e9916e16038b14fee39f1623d329471e73c39c2f2d7bbfa SHA512 e6dc0cacd6c079be8a00364e4c244782d764d9a8d514d65f9078427cb4a0c1663ff88761bfbc1e955a1a990451439110497c2cb7af7f56b2c91f2e9db4389894
-DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
+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-13.0.1.ebuild b/sys-devel/llvm/llvm-13.0.1.ebuild
deleted file mode 100644
index d930be46e4d9..000000000000
--- a/sys-devel/llvm/llvm-13.0.1.ebuild
+++ /dev/null
@@ -1,501 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..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/_/-}-r1
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- python_has_version "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- python_has_version "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)
- ;;
- # 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
- )
-
- 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 [[ $(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.
- 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="${BROOT}/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.6-r2.ebuild b/sys-devel/llvm/llvm-14.0.6-r2.ebuild
deleted file mode 100644
index 4c18c1ba4aa7..000000000000
--- a/sys-devel/llvm/llvm-14.0.6-r2.ebuild
+++ /dev/null
@@ -1,518 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..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}-r2
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- python_has_version -b "dev-python/recommonmark[${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)
- ;;
- # 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
-
- # remove regressing test
- # https://github.com/llvm/llvm-project/issues/55761
- rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die
-}
-
-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 [[ $(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.
- 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="${BROOT}/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.7.ebuild b/sys-devel/llvm/llvm-15.0.7-r3.ebuild
index 1b490e20948d..6306ee2107c0 100644
--- a/sys-devel/llvm/llvm-15.0.7.ebuild
+++ b/sys-devel/llvm/llvm-15.0.7-r3.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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"
@@ -27,7 +27,6 @@ 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}] )
@@ -44,7 +43,6 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-${LLVM_VERSION}.9999
@@ -70,7 +68,7 @@ PDEPEND="
LLVM_COMPONENTS=( llvm cmake third-party )
LLVM_MANPAGES=1
-LLVM_PATCHSET=${PV/_/-}
+LLVM_PATCHSET=${PV/_/-}-r3
LLVM_USE_TARGETS=provide
llvm.org_set_globals
@@ -323,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)
@@ -357,7 +365,8 @@ multilib_src_configure() {
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
- -DLLVM_ENABLE_ZSTD=$(usex zstd)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -427,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"
diff --git a/sys-devel/llvm/llvm-16.0.0_rc1.ebuild b/sys-devel/llvm/llvm-16.0.6.ebuild
index d4655d4dc33f..aa171c1cd361 100644
--- a/sys-devel/llvm/llvm-16.0.0_rc1.ebuild
+++ b/sys-devel/llvm/llvm-16.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -18,7 +19,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
+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
@@ -27,7 +28,6 @@ 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}] )
@@ -44,11 +44,9 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-${LLVM_VERSION}.9999
- >=sys-devel/binutils-apple-5.1
)
doc? ( $(python_gen_any_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
@@ -71,6 +69,7 @@ PDEPEND="
LLVM_COMPONENTS=( llvm cmake )
LLVM_TEST_COMPONENTS=( third-party )
LLVM_MANPAGES=1
+LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=provide
llvm.org_set_globals
@@ -325,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)
@@ -358,8 +367,11 @@ multilib_src_configure() {
-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_ZSTD=$(usex zstd)
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -420,15 +432,12 @@ 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
+ # 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
diff --git a/sys-devel/llvm/llvm-17.0.0.9999.ebuild b/sys-devel/llvm/llvm-17.0.0.9999.ebuild
deleted file mode 100644
index d4655d4dc33f..000000000000
--- a/sys-devel/llvm/llvm-17.0.0.9999.ebuild
+++ /dev/null
@@ -1,514 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-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="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
-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}] )
- 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}
- 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-${LLVM_VERSION}.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 )
-"
-# 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 )
-LLVM_TEST_COMPONENTS=( third-party )
-LLVM_MANPAGES=1
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- python_has_version -b "dev-python/recommonmark[${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)
- ;;
- # 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
- )
-
- if multilib_is_native_abi; then
- out+=(
- # 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
- 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-reduce
- llvm-remark-size-diff
- llvm-remarkutil
- 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/${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=$(usex test)
- -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_Z3_SOLVER=$(usex z3)
- -DLLVM_ENABLE_ZSTD=$(usex zstd)
-
- -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
- )
-
- 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
-
- # 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(:.*)?=${LLVM_MAJOR}$" \
- CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MASTER_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-16.0.0.9999.ebuild b/sys-devel/llvm/llvm-17.0.6.ebuild
index d4655d4dc33f..c32eee3908c7 100644
--- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-17.0.6.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -18,16 +19,19 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
+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
+ +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}] )
@@ -44,11 +48,9 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-${LLVM_VERSION}.9999
- >=sys-devel/binutils-apple-5.1
)
doc? ( $(python_gen_any_dep '
dev-python/recommonmark[${PYTHON_USEDEP}]
@@ -68,9 +70,9 @@ PDEPEND="
binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
-LLVM_COMPONENTS=( llvm cmake )
-LLVM_TEST_COMPONENTS=( third-party )
+LLVM_COMPONENTS=( llvm cmake third-party )
LLVM_MANPAGES=1
+LLVM_PATCHSET=${PV}
LLVM_USE_TARGETS=provide
llvm.org_set_globals
@@ -128,6 +130,9 @@ check_distribution_components() {
# TableGen lib + deps
LLVMDemangle|LLVMSupport|LLVMTableGen)
;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
# static libs
LLVM*)
continue
@@ -204,6 +209,12 @@ get_distribution_components() {
LLVMDemangle
LLVMSupport
LLVMTableGen
+
+ # testing libraries
+ llvm_gtest
+ llvm_gtest_main
+ LLVMTestingAnnotations
+ LLVMTestingSupport
)
if multilib_is_native_abi; then
@@ -238,7 +249,6 @@ get_distribution_components() {
llvm-cxxfilt
llvm-cxxmap
llvm-debuginfo-analyzer
- llvm-debuginfod
llvm-debuginfod-find
llvm-diff
llvm-dis
@@ -319,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)
@@ -349,8 +372,9 @@ multilib_src_configure() {
-DLLVM_TARGETS_TO_BUILD=""
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
-DLLVM_INCLUDE_BENCHMARKS=OFF
- -DLLVM_INCLUDE_TESTS=$(usex test)
+ -DLLVM_INCLUDE_TESTS=ON
-DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
-DLLVM_ENABLE_FFI=$(usex libffi)
-DLLVM_ENABLE_LIBEDIT=$(usex libedit)
@@ -358,8 +382,13 @@ multilib_src_configure() {
-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_ZSTD=$(usex zstd)
+ -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}"
@@ -420,15 +449,14 @@ 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
+ 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
@@ -440,7 +468,7 @@ multilib_src_configure() {
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
}
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-16.0.0_pre20230107.ebuild b/sys-devel/llvm/llvm-19.0.0.9999.ebuild
index 21023c3bf7e4..8624219a7e20 100644
--- a/sys-devel/llvm/llvm-16.0.0_pre20230107.ebuild
+++ b/sys-devel/llvm/llvm-19.0.0.9999.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -18,21 +19,22 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="~loong"
IUSE="
- +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
- xml z3 zstd
+ +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}] )
@@ -44,16 +46,10 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-${LLVM_VERSION}.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 )
"
# There are no file collisions between these versions but having :0
@@ -68,16 +64,24 @@ PDEPEND="
binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
-LLVM_COMPONENTS=( llvm cmake )
-LLVM_TEST_COMPONENTS=( third-party )
+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() {
- use doc || return 0
+ llvm_are_manpages_built || return 0
- python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -128,6 +132,12 @@ check_distribution_components() {
# TableGen lib + deps
LLVMDemangle|LLVMSupport|LLVMTableGen)
;;
+ # used by lldb
+ LLVMDebuginfod)
+ ;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
# static libs
LLVM*)
continue
@@ -204,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
@@ -238,7 +257,6 @@ get_distribution_components() {
llvm-cxxfilt
llvm-cxxmap
llvm-debuginfo-analyzer
- llvm-debuginfod
llvm-debuginfod-find
llvm-diff
llvm-dis
@@ -276,8 +294,8 @@ get_distribution_components() {
llvm-rc
llvm-readelf
llvm-readobj
+ llvm-readtapi
llvm-reduce
- llvm-remark-size-diff
llvm-remarkutil
llvm-rtdyld
llvm-sim
@@ -287,7 +305,6 @@ get_distribution_components() {
llvm-strings
llvm-strip
llvm-symbolizer
- llvm-tapi-diff
llvm-tli-checker
llvm-undname
llvm-windres
@@ -319,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)
@@ -349,8 +379,9 @@ multilib_src_configure() {
-DLLVM_TARGETS_TO_BUILD=""
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
-DLLVM_INCLUDE_BENCHMARKS=OFF
- -DLLVM_INCLUDE_TESTS=$(usex test)
+ -DLLVM_INCLUDE_TESTS=ON
-DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
-DLLVM_ENABLE_FFI=$(usex libffi)
-DLLVM_ENABLE_LIBEDIT=$(usex libedit)
@@ -358,15 +389,18 @@ multilib_src_configure() {
-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_ZSTD=$(usex zstd)
+ -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}"
@@ -420,15 +454,14 @@ 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
+ 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
@@ -440,7 +473,7 @@ multilib_src_configure() {
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
}
diff --git a/sys-devel/llvm/llvm-16.0.0_pre20230127.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild
index d4655d4dc33f..8624219a7e20 100644
--- a/sys-devel/llvm/llvm-16.0.0_pre20230127.ebuild
+++ b/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-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/"
@@ -18,21 +19,22 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS=""
IUSE="
- +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
- xml z3 zstd
+ +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}] )
@@ -44,16 +46,10 @@ DEPEND="
BDEPEND="
${PYTHON_DEPS}
dev-lang/perl
- >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-${LLVM_VERSION}.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 )
"
# There are no file collisions between these versions but having :0
@@ -68,16 +64,24 @@ PDEPEND="
binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
-LLVM_COMPONENTS=( llvm cmake )
-LLVM_TEST_COMPONENTS=( third-party )
+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() {
- use doc || return 0
+ llvm_are_manpages_built || return 0
- python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -128,6 +132,12 @@ check_distribution_components() {
# TableGen lib + deps
LLVMDemangle|LLVMSupport|LLVMTableGen)
;;
+ # used by lldb
+ LLVMDebuginfod)
+ ;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
# static libs
LLVM*)
continue
@@ -204,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
@@ -238,7 +257,6 @@ get_distribution_components() {
llvm-cxxfilt
llvm-cxxmap
llvm-debuginfo-analyzer
- llvm-debuginfod
llvm-debuginfod-find
llvm-diff
llvm-dis
@@ -276,8 +294,8 @@ get_distribution_components() {
llvm-rc
llvm-readelf
llvm-readobj
+ llvm-readtapi
llvm-reduce
- llvm-remark-size-diff
llvm-remarkutil
llvm-rtdyld
llvm-sim
@@ -287,7 +305,6 @@ get_distribution_components() {
llvm-strings
llvm-strip
llvm-symbolizer
- llvm-tapi-diff
llvm-tli-checker
llvm-undname
llvm-windres
@@ -319,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)
@@ -349,8 +379,9 @@ multilib_src_configure() {
-DLLVM_TARGETS_TO_BUILD=""
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
-DLLVM_INCLUDE_BENCHMARKS=OFF
- -DLLVM_INCLUDE_TESTS=$(usex test)
+ -DLLVM_INCLUDE_TESTS=ON
-DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
-DLLVM_ENABLE_FFI=$(usex libffi)
-DLLVM_ENABLE_LIBEDIT=$(usex libedit)
@@ -358,15 +389,18 @@ multilib_src_configure() {
-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_ZSTD=$(usex zstd)
+ -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}"
@@ -420,15 +454,14 @@ 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
+ 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
@@ -440,7 +473,7 @@ multilib_src_configure() {
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
}
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 084e1821104b..1277d338a5de 100644
--- a/sys-devel/llvm/metadata.xml
+++ b/sys-devel/llvm/metadata.xml
@@ -11,6 +11,7 @@
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>
@@ -21,5 +22,6 @@
</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-16.ebuild b/sys-devel/llvmgold/llvmgold-16.ebuild
index 17566e8e5d16..5eca5d655d97 100644
--- a/sys-devel/llvmgold/llvmgold-16.ebuild
+++ b/sys-devel/llvmgold/llvmgold-16.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
@@ -9,7 +9,7 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="~loong"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv sparc x86 ~amd64-linux"
RDEPEND="
sys-devel/llvm:${PV}[binutils-plugin]
diff --git a/sys-devel/llvmgold/llvmgold-17.ebuild b/sys-devel/llvmgold/llvmgold-17.ebuild
index 0f6fedb082d3..ad52f2c99dcd 100644
--- a/sys-devel/llvmgold/llvmgold-17.ebuild
+++ b/sys-devel/llvmgold/llvmgold-17.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -9,8 +9,7 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS=""
-PROPERTIES="live"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv sparc x86 ~amd64-linux"
RDEPEND="
sys-devel/llvm:${PV}[binutils-plugin]
diff --git a/sys-devel/llvmgold/llvmgold-13-r2.ebuild b/sys-devel/llvmgold/llvmgold-18.ebuild
index c5b814adfa63..c169127837a0 100644
--- a/sys-devel/llvmgold/llvmgold-13-r2.ebuild
+++ b/sys-devel/llvmgold/llvmgold-18.ebuild
@@ -1,21 +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: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-14.ebuild b/sys-devel/llvmgold/llvmgold-19.ebuild
index 484ce44cf3f7..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/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-r1.ebuild b/sys-devel/m4/m4-1.4.19-r1.ebuild
deleted file mode 100644
index 83b5384aa9a8..000000000000
--- a/sys-devel/m4/m4-1.4.19-r1.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/m4.asc
-inherit verify-sig
-
-DESCRIPTION="GNU macro processor"
-HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
-if [[ ${PV} == *_beta* ]] ; then
- MY_P="${PN}-1.4.18d"
- SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz"
- SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz.sig )"
- S="${WORKDIR}/${MY_P}"
-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"
-fi
-
-LICENSE="GPL-3"
-SLOT="0"
-IUSE="examples nls"
-
-RDEPEND="
- virtual/libiconv
- nls? (
- sys-devel/gettext
- virtual/libintl
- )"
-DEPEND="${RDEPEND}"
-# Remember: cannot dep on autoconf since it needs us
-BDEPEND="app-arch/xz-utils
- nls? ( sys-devel/gettext )
- verify-sig? ( sec-keys/openpgp-keys-m4 )"
-
-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}"/${PN}-1.4.19-fortify-source.patch
-)
-
-src_unpack() {
- if use verify-sig ; then
- # Needed for downloaded patch (which is unsigned, which is fine)
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- # touch generated files after patching m4, to avoid activating maintainer
- # mode
- # remove when loong-fix-build.patch is no longer necessary
- touch ./aclocal.m4 ./lib/config.hin ./configure ./doc/stamp-vti || die
- find . -name Makefile.in -exec touch {} + || die
-}
-
-src_configure() {
- local -a myeconfargs=(
- --enable-changeword
-
- --with-packager="Gentoo Linux"
- --with-packager-version="${PVR}"
- --with-packager-bug-reports="https://bugs.gentoo.org/"
-
- $(usex nls '' '--disable-nls')
-
- # Disable automagic dependency over libsigsegv; see bug #278026
- ac_cv_libsigsegv=no
- )
-
- [[ ${USERLAND} != GNU ]] && myeconfargs+=( --program-prefix=g )
-
- econf "${myeconfargs[@]}"
-}
-
-src_test() {
- [[ -d /none ]] && die "m4 tests will fail with /none/" #244396
- emake check
-}
-
-src_install() {
- default
-
- # autoconf-2.60 for instance, first checks gm4, then m4. If we don't have
- # gm4, it might find gm4 from outside the prefix on for instance Darwin
- use prefix && dosym m4 /usr/bin/gm4
-
- if use examples ; then
- dodoc -r examples
- rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile*
- fi
-}
diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19-r2.ebuild
index fab597f0fcad..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"
@@ -41,6 +41,8 @@ PATCHES=(
"${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() {
@@ -76,8 +78,6 @@ src_configure() {
ac_cv_libsigsegv=no
)
- [[ ${USERLAND} != GNU ]] && myeconfargs+=( --program-prefix=g )
-
econf "${myeconfargs[@]}"
}
diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest
deleted file mode 100644
index cb6f278d5cb1..000000000000
--- a/sys-devel/make/Manifest
+++ /dev/null
@@ -1,6 +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
-DIST make-4.4.0.90.tar.gz 2328399 BLAKE2B fc260a3c942b00d57bc64fc037e4e4a510000ec281194122e3315f0ca7c6fe3507877c84bff62e197f5df45e1d5d95aae347085e225377788ebd466a1327cb25 SHA512 e693e6146871dcaf5b65b6c05b620047b6c2a3474b02ecc58cf4698f88107cc7a7b0d35551eb209c772b09ea7db2ffde13fe984d6227339974ca54a68b99839b
-DIST make-4.4.0.90.tar.gz.sig 833 BLAKE2B b0a2d98f5a99ee29523c6b25be4b29bfb193773ab5b70ce26adf75a066e30ca95d79b111eedc656e817246cfaf7f9345014626b12de5a381e44e4b6f8ddd5be1 SHA512 7a20c6058221b1003a26806f65d7b568575f88187562b89b7593c67dfc2b15569cd92c75c23056b2a3ff7577f96794835f1b6d5d9f5f5b92c59acb3af8efc944
-DIST make-4.4.tar.gz 2307891 BLAKE2B 5b8a2fcd7610c33347c2e552fdc4f2698c9a4c468de588c9687cd11d15f120a37768bcd521231adf32359e3b48b27ab7b142746fd18b1a8d15578d34344f487e SHA512 4be73f494295dcfa10034531b0d920cfdb5438bc20625f863f5c878549c140e1e67195162580c53060c3c11c67a2c739c09051f02cdd283e5aa9ebcd68975a1f
-DIST make-4.4.tar.gz.sig 566 BLAKE2B 879e85eccd748a9e6687e8beaaf1321ad84986990290c34d34285eab96fe9d493db1e6f20178aa5374796da9c8fb58f87065ea2de44a6daa55dd23dcc8b09c8f SHA512 76b7ecb3aa38b0a6867fd0379e42d2cae6632f102d902ac604e7ea3265ac1c1090da8e5676bd56b9946dc291e57c06bb05c953f76714fe8bd27b924bb39301e6
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 e924bf762998..000000000000
--- a/sys-devel/make/make-4.3.ebuild
+++ /dev/null
@@ -1,76 +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 [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git"
- inherit autotools git-r3
-elif [[ $(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_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
-
- cd "${S}" || die
- ./bootstrap || die
- else
- default
- fi
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == 9999 ]] ; then
- eautoreconf
- fi
-}
-
-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/make-4.4.0.90.ebuild b/sys-devel/make/make-4.4.0.90.ebuild
deleted file mode 100644
index abb820aa6eb6..000000000000
--- a/sys-devel/make/make-4.4.0.90.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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 [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git"
- inherit autotools git-r3
-elif [[ $(ver_cut 3) -ge 90 || $(ver_cut 4) -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_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
-
- cd "${S}" || die
- ./bootstrap || die
- else
- default
- fi
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == 9999 ]] ; then
- eautoreconf
- fi
-}
-
-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/make-4.4.ebuild b/sys-devel/make/make-4.4.ebuild
deleted file mode 100644
index 73a2aedb6375..000000000000
--- a/sys-devel/make/make-4.4.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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 [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git"
- inherit autotools git-r3
-elif [[ $(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_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
-
- cd "${S}" || die
- ./bootstrap || die
- else
- default
- fi
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == 9999 ]] ; then
- eautoreconf
- fi
-}
-
-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/make-9999.ebuild b/sys-devel/make/make-9999.ebuild
deleted file mode 100644
index abb820aa6eb6..000000000000
--- a/sys-devel/make/make-9999.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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 [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git"
- inherit autotools git-r3
-elif [[ $(ver_cut 3) -ge 90 || $(ver_cut 4) -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_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
-
- cd "${S}" || die
- ./bootstrap || die
- else
- default
- fi
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == 9999 ]] ; then
- eautoreconf
- fi
-}
-
-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/mold/Manifest b/sys-devel/mold/Manifest
index 9735bd00497b..c1d532776618 100644
--- a/sys-devel/mold/Manifest
+++ b/sys-devel/mold/Manifest
@@ -1,3 +1,4 @@
-DIST mold-1.10.1.tar.gz 8173701 BLAKE2B 142b4ec6297f1d4eb7576d16603a214244216592df7320639da3fce32890fc3d13e681dcb79ed23e4c0c7dba1f97eb10c622052c67787b6699925ae67ddb1d15 SHA512 b9df5ddc3a3a022523506638309373c3440128f3c702a7db69c44c180177148e92fbf73347be0c4e0e890395cfb2a5b12d2650ee267f9f58212ccfa981519bbf
-DIST mold-1.8.0.tar.gz 8155820 BLAKE2B cd4285953ec56fa437d32c74b928617a50508c0b947dd0c0a3fac6813d7b929d9499f24aa2641faab78d5e81fbced48d734389c61313d752f509d25d2e1f9c61 SHA512 923158563c7abd39c7111e3871a90c7f6f17e0b2412c5de0c9924f3fb55d7fe57db4a83d8a20c3d4966b7b117d1c95cf4a59f63d5076db422b9aa5c3485fd7f8
-DIST mold-1.9.0.tar.gz 8163212 BLAKE2B 09ce66e4214c184ea2f36720bc0f839f77ff2a708d56a5767d29758d62310eaf1193394d581c4352404958052c29c0cbc55a4826d10285beda50afb20bd51c80 SHA512 c1c45bced963d4f7c9b67905177157d6f76c518b234fe3eefa2a9ba6c35a08dd6659e64b7939744355ebcd72ae343ef0249ef6a0c80b4d77b1e69e327eb3ba19
+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-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.10.1.ebuild b/sys-devel/mold/mold-2.1.0.ebuild
index ea88934048d6..4140d61806dd 100644
--- a/sys-devel/mold/mold-1.10.1.ebuild
+++ b/sys-devel/mold/mold-2.1.0.ebuild
@@ -12,12 +12,12 @@ 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 ~ppc64 ~riscv ~x86"
+ KEYWORDS="amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
fi
-# mold (AGPL-3)
+# mold (MIT)
# - xxhash (BSD-2)
-LICENSE="AGPL-3 BSD-2"
+LICENSE="MIT BSD-2"
SLOT="0"
RDEPEND="
diff --git a/sys-devel/mold/mold-1.8.0-r1.ebuild b/sys-devel/mold/mold-2.30.0.ebuild
index 11b57176b2ba..ac067b811ef2 100644
--- a/sys-devel/mold/mold-1.8.0-r1.ebuild
+++ b/sys-devel/mold/mold-2.30.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,21 +12,21 @@ 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 ~riscv ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
fi
-# mold (AGPL-3)
+# mold (MIT)
# - xxhash (BSD-2)
-LICENSE="AGPL-3 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:=
- dev-libs/openssl:=
)
"
DEPEND="${RDEPEND}"
@@ -65,8 +65,10 @@ src_prepare() {
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
)
@@ -85,5 +87,13 @@ src_install() {
dosym ${PN} /usr/bin/ld.${PN}
dosym ${PN} /usr/bin/ld64.${PN}
- dosym ../../../usr/bin/${PN} /usr/libexec/${PN}/ld
+ 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-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.9.0.ebuild b/sys-devel/mold/mold-2.4.1.ebuild
index 8063ade34f39..ac067b811ef2 100644
--- a/sys-devel/mold/mold-1.9.0.ebuild
+++ b/sys-devel/mold/mold-2.4.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,21 +12,21 @@ 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 ~riscv ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
fi
-# mold (AGPL-3)
+# mold (MIT)
# - xxhash (BSD-2)
-LICENSE="AGPL-3 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:=
- dev-libs/openssl:=
)
"
DEPEND="${RDEPEND}"
@@ -65,8 +65,10 @@ src_prepare() {
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
)
@@ -85,5 +87,13 @@ src_install() {
dosym ${PN} /usr/bin/ld.${PN}
dosym ${PN} /usr/bin/ld64.${PN}
- dosym ../../../usr/bin/${PN} /usr/libexec/${PN}/ld
+ 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-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index ea88934048d6..ac067b811ef2 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,21 +12,21 @@ 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 ~ppc64 ~riscv ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
fi
-# mold (AGPL-3)
+# mold (MIT)
# - xxhash (BSD-2)
-LICENSE="AGPL-3 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:=
- dev-libs/openssl:=
)
"
DEPEND="${RDEPEND}"
@@ -65,8 +65,10 @@ src_prepare() {
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
)
@@ -85,5 +87,13 @@ src_install() {
dosym ${PN} /usr/bin/ld.${PN}
dosym ${PN} /usr/bin/ld64.${PN}
- dosym ../../../usr/bin/${PN} /usr/libexec/${PN}/ld
+ 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/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/make/metadata.xml b/sys-devel/nvptx-tools/metadata.xml
index fee78a624e6a..26ea6434862c 100644
--- a/sys-devel/make/metadata.xml
+++ b/sys-devel/nvptx-tools/metadata.xml
@@ -2,10 +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>
<upstream>
- <remote-id type="cpe">cpe:/a:gnu:make</remote-id>
+ <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
index e93ac48c3848..e1dfc88fa933 100644
--- a/sys-devel/patch/patch-2.7.6-r5.ebuild
+++ b/sys-devel/patch/patch-2.7.6-r5.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-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/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
index fd1f19c3fece..739ffea8e281 100644
--- a/sys-devel/qbe/Manifest
+++ b/sys-devel/qbe/Manifest
@@ -1 +1,5 @@
-DIST qbe-1.0.tar.xz 237756 BLAKE2B ca6e1ee81f7329a8aee1f4597de391dcc44595fb8371468360fbcf1a5fc9fa404c614d49e4668fba568fa8d11e753d10b4c46380884fa635a56331b059b69abd SHA512 7f53d4440fda36b21dbf390aa8b9c17ae7c137a6e034dd73ca1c2068d84dbe236a452d86cab8d8bce0b3d66c3f08e70f2bf54bc7cc2e93208cc1900014c18ad1
+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/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.0.ebuild b/sys-devel/qbe/qbe-1.2.ebuild
index d041b7d0b849..baaab97b66c1 100644
--- a/sys-devel/qbe/qbe-1.0.ebuild
+++ b/sys-devel/qbe/qbe-1.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -23,6 +23,12 @@ SLOT="0"
DOCS=( README doc )
+src_prepare() {
+ default
+
+ sed -i 's;^CC *=.*;CC ?= cc;' Makefile || die
+}
+
src_compile() {
tc-export CC
diff --git a/sys-devel/qbe/qbe-9999.ebuild b/sys-devel/qbe/qbe-9999.ebuild
index d041b7d0b849..baaab97b66c1 100644
--- a/sys-devel/qbe/qbe-9999.ebuild
+++ b/sys-devel/qbe/qbe-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -23,6 +23,12 @@ SLOT="0"
DOCS=( README doc )
+src_prepare() {
+ default
+
+ sed -i 's;^CC *=.*;CC ?= cc;' Makefile || die
+}
+
src_compile() {
tc-export CC
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/metadata.xml b/sys-devel/qconf/metadata.xml
deleted file mode 100644
index ad30d60d9ef0..000000000000
--- a/sys-devel/qconf/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="person" proxied="yes">
- <email>rion4ik@gmail.com</email>
- <name>Sergey Ilinykh</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/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
index d474ae993adc..62eca417a802 100644
--- a/sys-devel/reflex/Manifest
+++ b/sys-devel/reflex/Manifest
@@ -1,2 +1,2 @@
-DIST reflex-20221012.tgz 476024 BLAKE2B 63d9c0ea10d3d86651c88da4f901928d2f112d64b7e3462a6c2b4d6580a138372f2980e18d0b813579a9700084f05d77dfe2547171efa0992c24629ad31ff66e SHA512 9fcf3cd49f598af5ef0e561845c1e8b2fd50e811f5449279692820748b91e9a6a3922d3fe4224820f2c10a2f3aee3049c4f584ace4a058820db21539aa89accc
-DIST reflex-20221012.tgz.asc 729 BLAKE2B 1f35909edb7e9c8a2f7fe30f430c23580a6f192cad8efa65d2b7a282aa107523b90f300908b43f4beb623041988c164da1ff04642a09558c8c24bb77fc777919 SHA512 d98d2dc2b3163784a55f197b0b00157c1906dcbdf3fbc39022d867d786c47f32e5d858eafa3cb83e068454e7198ebdae6283b49b22c6b0ae5ee38ba2ea977a7b
+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/reflex-20221012.ebuild b/sys-devel/reflex/reflex-20230523.ebuild
index d845c63d9f4c..08eac7186712 100644
--- a/sys-devel/reflex/reflex-20221012.ebuild
+++ b/sys-devel/reflex/reflex-20230523.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc
+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"
@@ -13,15 +13,10 @@ SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${P}.tgz.as
LICENSE="FLEX"
SLOT="0"
-KEYWORDS="amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
-src_install() {
- default
-
- # Workaround assumption of gzip compressed manpage
- # Reported upstream via email
- rm "${ED}"/usr/share/man/man1/reflex++.1.gz || die
- dosym reflex.1 /usr/share/man/man1/reflex++.1 || die
+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 b4b30d8b7d04..000000000000
--- a/sys-devel/remake/remake-4.3.1.1.5.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2022 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 eeb0b3f1fe49..dec75d768962 100644
--- a/sys-devel/rust-std/rust-std-1.59.0.ebuild
+++ b/sys-devel/rust-std/rust-std-1.68.2.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..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 0dad3938bd69..000000000000
--- a/sys-devel/ucpp/ucpp-1.3.5.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
-
-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 ~loong 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
-}