summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/autoconf-archive/Manifest3
-rw-r--r--sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild21
-rw-r--r--sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild18
-rw-r--r--sys-devel/autoconf-archive/autoconf-archive-2022.09.03.ebuild (renamed from sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild)14
-rw-r--r--sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch36
-rw-r--r--sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch70
-rw-r--r--sys-devel/autoconf-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/Manifest1
-rw-r--r--sys-devel/autoconf-wrapper/autoconf-wrapper-20221118.ebuild34
-rw-r--r--sys-devel/autoconf-wrapper/autoconf-wrapper-99999999.ebuild35
-rw-r--r--sys-devel/autoconf-wrapper/metadata.xml11
-rw-r--r--sys-devel/autoconf/autoconf-2.13-r2.ebuild12
-rw-r--r--sys-devel/autoconf/autoconf-2.13-r7.ebuild58
-rw-r--r--sys-devel/autoconf/autoconf-2.69-r5.ebuild4
-rw-r--r--sys-devel/autoconf/autoconf-2.69-r8.ebuild (renamed from sys-devel/autoconf/autoconf-2.69-r6.ebuild)5
-rw-r--r--sys-devel/autoconf/autoconf-2.71-r1.ebuild4
-rw-r--r--sys-devel/autoconf/autoconf-2.71-r5.ebuild88
-rw-r--r--sys-devel/autoconf/autoconf-9999.ebuild6
-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.69-K-R-decls-clang.patch394
-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-make-4.4.patch25
-rw-r--r--sys-devel/autoconf/metadata.xml11
-rw-r--r--sys-devel/autogen/metadata.xml17
-rw-r--r--sys-devel/automake-wrapper/automake-wrapper-99999999.ebuild41
-rw-r--r--sys-devel/automake-wrapper/metadata.xml11
-rw-r--r--sys-devel/automake/automake-1.11.6-r3.ebuild4
-rw-r--r--sys-devel/automake/automake-1.13.4-r2.ebuild4
-rw-r--r--sys-devel/automake/automake-1.15.1-r2.ebuild4
-rw-r--r--sys-devel/automake/automake-1.16.5.ebuild2
-rw-r--r--sys-devel/automake/automake-9999.ebuild2
-rw-r--r--sys-devel/bc/bc-1.07.1-r4.ebuild2
-rw-r--r--sys-devel/bc/bc-1.07.1-r5.ebuild65
-rw-r--r--sys-devel/bc/bc-1.07.1-r6.ebuild84
-rw-r--r--sys-devel/binutils-hppa64/Manifest7
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild432
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild432
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild2
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild4
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild (renamed from sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild)140
-rw-r--r--sys-devel/binutils-hppa64/metadata.xml6
-rw-r--r--sys-devel/binutils/Manifest3
-rw-r--r--sys-devel/binutils/binutils-2.32-r2.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.33.1-r1.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.34-r2.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.35.2.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.36.1-r2.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.37_p1-r2.ebuild2
-rw-r--r--sys-devel/binutils/binutils-2.38-r1.ebuild460
-rw-r--r--sys-devel/binutils/binutils-2.38-r2.ebuild20
-rw-r--r--sys-devel/binutils/binutils-2.39-r4.ebuild (renamed from sys-devel/binutils/binutils-2.39.ebuild)52
-rw-r--r--sys-devel/binutils/binutils-9999.ebuild50
-rw-r--r--sys-devel/binutils/files/50binutils-gentoo.el3
-rw-r--r--sys-devel/binutils/metadata.xml1
-rw-r--r--sys-devel/bison/bison-3.8.2-r2.ebuild93
-rw-r--r--sys-devel/bison/metadata.xml1
-rw-r--r--sys-devel/bmake/Manifest6
-rw-r--r--sys-devel/bmake/bmake-20220901.ebuild (renamed from sys-devel/bmake/bmake-20220418.ebuild)0
-rw-r--r--sys-devel/bmake/bmake-20220924.ebuild (renamed from sys-devel/bmake/bmake-20220726.ebuild)2
-rw-r--r--sys-devel/bmake/bmake-20220928.ebuild (renamed from sys-devel/bmake/bmake-20220612.ebuild)3
-rw-r--r--sys-devel/clang-common/Manifest8
-rw-r--r--sys-devel/clang-common/clang-common-15.0.0.9999.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-15.0.0_rc2.ebuild24
-rw-r--r--sys-devel/clang-common/clang-common-15.0.5.ebuild126
-rw-r--r--sys-devel/clang-common/clang-common-15.0.6.9999.ebuild126
-rw-r--r--sys-devel/clang-common/clang-common-15.0.6.ebuild126
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0.9999.ebuild108
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_pre20221126.ebuild132
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_pre20221205.ebuild132
-rw-r--r--sys-devel/clang-common/metadata.xml6
-rw-r--r--sys-devel/clang-runtime/clang-runtime-15.0.5.ebuild (renamed from sys-devel/clang-runtime/clang-runtime-15.0.0_rc2.ebuild)3
-rw-r--r--sys-devel/clang-runtime/clang-runtime-15.0.6.9999.ebuild (renamed from sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild)0
-rw-r--r--sys-devel/clang-runtime/clang-runtime-15.0.6.ebuild26
-rw-r--r--sys-devel/clang-runtime/clang-runtime-16.0.0.9999.ebuild18
-rw-r--r--sys-devel/clang-runtime/clang-runtime-16.0.0_pre20221126.ebuild40
-rw-r--r--sys-devel/clang-runtime/clang-runtime-16.0.0_pre20221205.ebuild41
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-14-r2.ebuild60
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild60
-rw-r--r--sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild60
-rw-r--r--sys-devel/clang-toolchain-symlinks/metadata.xml26
-rw-r--r--sys-devel/clang/Manifest16
-rw-r--r--sys-devel/clang/clang-15.0.5.ebuild (renamed from sys-devel/clang/clang-15.0.0_rc2.ebuild)157
-rw-r--r--sys-devel/clang/clang-15.0.6.9999.ebuild (renamed from sys-devel/clang/clang-15.0.0.9999.ebuild)157
-rw-r--r--sys-devel/clang/clang-15.0.6.ebuild460
-rw-r--r--sys-devel/clang/clang-16.0.0.9999.ebuild171
-rw-r--r--sys-devel/clang/clang-16.0.0_pre20221126.ebuild455
-rw-r--r--sys-devel/clang/clang-16.0.0_pre20221205.ebuild454
-rw-r--r--sys-devel/clang/metadata.xml1
-rw-r--r--sys-devel/cproc/Manifest1
-rw-r--r--sys-devel/cproc/cproc-0_pre20220805.ebuild39
-rw-r--r--sys-devel/cproc/cproc-9999.ebuild39
-rw-r--r--sys-devel/cproc/metadata.xml16
-rw-r--r--sys-devel/crossdev/Manifest6
-rw-r--r--sys-devel/crossdev/crossdev-20211121.ebuild36
-rw-r--r--sys-devel/crossdev/crossdev-20220205.ebuild36
-rw-r--r--sys-devel/crossdev/crossdev-20220709.ebuild2
-rw-r--r--sys-devel/crossdev/crossdev-20220818.ebuild (renamed from sys-devel/crossdev/crossdev-20220617.ebuild)2
-rw-r--r--sys-devel/crossdev/crossdev-20220909.ebuild (renamed from sys-devel/crossdev/crossdev-20220424.ebuild)4
-rw-r--r--sys-devel/crossdev/crossdev-99999999.ebuild2
-rw-r--r--sys-devel/ct-ng/Manifest2
-rw-r--r--sys-devel/ct-ng/ct-ng-1.24.0-r1.ebuild (renamed from sys-devel/ct-ng/ct-ng-1.24.0.ebuild)4
-rw-r--r--sys-devel/ct-ng/metadata.xml2
-rw-r--r--sys-devel/distcc/distcc-3.4.ebuild4
-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/Manifest1
-rw-r--r--sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch219
-rw-r--r--sys-devel/flex/flex-2.6.4-r2.ebuild2
-rw-r--r--sys-devel/flex/flex-2.6.4-r4.ebuild (renamed from sys-devel/flex/flex-2.6.4-r1.ebuild)32
-rw-r--r--sys-devel/flex/flex-2.6.4-r5.ebuild100
-rw-r--r--sys-devel/gcc-config/Manifest2
-rw-r--r--sys-devel/gcc-config/gcc-config-2.6.ebuild60
-rw-r--r--sys-devel/gcc-config/gcc-config-2.8.ebuild60
-rw-r--r--sys-devel/gcc-config/gcc-config-9999.ebuild6
-rw-r--r--sys-devel/gcc/Manifest65
-rw-r--r--sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch26
-rw-r--r--sys-devel/gcc/gcc-10.3.0-r2.ebuild25
-rw-r--r--sys-devel/gcc/gcc-10.3.1_p20211126.ebuild27
-rw-r--r--sys-devel/gcc/gcc-10.4.0.ebuild6
-rw-r--r--sys-devel/gcc/gcc-10.4.1_p20221006.ebuild (renamed from sys-devel/gcc/gcc-10.4.1_p20220728.ebuild)12
-rw-r--r--sys-devel/gcc/gcc-10.4.1_p20221124.ebuild (renamed from sys-devel/gcc/gcc-10.4.1_p20220721.ebuild)6
-rw-r--r--sys-devel/gcc/gcc-10.4.1_p20221201.ebuild (renamed from sys-devel/gcc/gcc-10.4.1_p20220804.ebuild)6
-rw-r--r--sys-devel/gcc/gcc-10.5.9999.ebuild4
-rw-r--r--sys-devel/gcc/gcc-11.2.0.ebuild26
-rw-r--r--sys-devel/gcc/gcc-11.2.1_p20220115.ebuild27
-rw-r--r--sys-devel/gcc/gcc-11.3.0.ebuild9
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20221007.ebuild (renamed from sys-devel/gcc/gcc-11.3.1_p20220805.ebuild)8
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20221125.ebuild (renamed from sys-devel/gcc/gcc-11.3.1_p20220729.ebuild)4
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20221202.ebuild (renamed from sys-devel/gcc/gcc-11.3.1_p20220722.ebuild)8
-rw-r--r--sys-devel/gcc/gcc-12.1.0.ebuild31
-rw-r--r--sys-devel/gcc/gcc-12.1.1_p20220625.ebuild30
-rw-r--r--sys-devel/gcc/gcc-12.1.1_p20220723.ebuild31
-rw-r--r--sys-devel/gcc/gcc-12.1.1_p20220730.ebuild30
-rw-r--r--sys-devel/gcc/gcc-12.1.1_p20220806.ebuild30
-rw-r--r--sys-devel/gcc/gcc-12.2.0.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.2.1_p20221008.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.2.1_p20221126.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.2.1_p20221203.ebuild52
-rw-r--r--sys-devel/gcc/gcc-12.3.9999.ebuild (renamed from sys-devel/gcc/gcc-12.2.9999.ebuild)12
-rw-r--r--sys-devel/gcc/gcc-13.0.0_pre20220731.ebuild53
-rw-r--r--sys-devel/gcc/gcc-13.0.0_pre20221106.ebuild (renamed from sys-devel/gcc/gcc-13.0.0_pre20220807.ebuild)8
-rw-r--r--sys-devel/gcc/gcc-13.0.0_pre20221127.ebuild (renamed from sys-devel/gcc/gcc-13.0.0_pre20220710.ebuild)7
-rw-r--r--sys-devel/gcc/gcc-13.0.0_pre20221204.ebuild (renamed from sys-devel/gcc/gcc-13.0.0_pre20220724.ebuild)7
-rw-r--r--sys-devel/gcc/gcc-9.5.0.ebuild6
-rw-r--r--sys-devel/gcc/metadata.xml5
-rw-r--r--sys-devel/gdb/Manifest1
-rw-r--r--sys-devel/gdb/files/gdb-12.1-configure-clang16.patch112
-rw-r--r--sys-devel/gdb/gdb-11.2.ebuild3
-rw-r--r--sys-devel/gdb/gdb-12.1-r2.ebuild4
-rw-r--r--sys-devel/gdb/gdb-12.1-r3.ebuild (renamed from sys-devel/gdb/gdb-12.1-r1.ebuild)11
-rw-r--r--sys-devel/gdb/gdb-13.0.50_p20221206.ebuild (renamed from sys-devel/gdb/gdb-12.1.ebuild)33
-rw-r--r--sys-devel/gdb/gdb-9999.ebuild14
-rw-r--r--sys-devel/gettext/Manifest2
-rw-r--r--sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch37
-rw-r--r--sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch100
-rw-r--r--sys-devel/gettext/gettext-0.21-r4.ebuild164
-rw-r--r--sys-devel/gettext/gettext-0.21.1.ebuild173
-rw-r--r--sys-devel/gnuconfig/Manifest2
-rw-r--r--sys-devel/gnuconfig/gnuconfig-20221007.ebuild (renamed from sys-devel/gnuconfig/gnuconfig-20210107.ebuild)26
-rw-r--r--sys-devel/gnuconfig/gnuconfig-99999999.ebuild14
-rw-r--r--sys-devel/gnuconfig/metadata.xml3
-rw-r--r--sys-devel/icecream/Manifest1
-rw-r--r--sys-devel/icecream/icecream-1.3.1.ebuild79
-rw-r--r--sys-devel/kgcc64/Manifest12
-rw-r--r--sys-devel/kgcc64/kgcc64-10.3.0.ebuild43
-rw-r--r--sys-devel/kgcc64/kgcc64-10.4.0.ebuild (renamed from sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild)11
-rw-r--r--sys-devel/kgcc64/kgcc64-12.2.0.ebuild (renamed from sys-devel/kgcc64/kgcc64-9.4.0.ebuild)12
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r1.ebuild39
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r2.ebuild39
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r1.ebuild39
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild39
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r1.ebuild40
-rw-r--r--sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild40
-rw-r--r--sys-devel/lld-toolchain-symlinks/metadata.xml21
-rw-r--r--sys-devel/lld/Manifest8
-rw-r--r--sys-devel/lld/lld-13.0.1-r1.ebuild (renamed from sys-devel/lld/lld-13.0.1.ebuild)23
-rw-r--r--sys-devel/lld/lld-14.0.6-r1.ebuild (renamed from sys-devel/lld/lld-14.0.6.ebuild)10
-rw-r--r--sys-devel/lld/lld-15.0.5.ebuild (renamed from sys-devel/lld/lld-15.0.0_rc2.ebuild)16
-rw-r--r--sys-devel/lld/lld-15.0.6.9999.ebuild (renamed from sys-devel/lld/lld-15.0.0.9999.ebuild)14
-rw-r--r--sys-devel/lld/lld-15.0.6.ebuild84
-rw-r--r--sys-devel/lld/lld-16.0.0.9999.ebuild23
-rw-r--r--sys-devel/lld/lld-16.0.0_pre20221126.ebuild83
-rw-r--r--sys-devel/lld/lld-16.0.0_pre20221205.ebuild83
-rw-r--r--sys-devel/llvm-common/Manifest8
-rw-r--r--sys-devel/llvm-common/llvm-common-13.0.1.ebuild2
-rw-r--r--sys-devel/llvm-common/llvm-common-15.0.5.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-15.0.6.9999.ebuild (renamed from sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild)0
-rw-r--r--sys-devel/llvm-common/llvm-common-15.0.6.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.0_pre20221126.ebuild28
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.0_pre20221205.ebuild (renamed from sys-devel/llvm-common/llvm-common-15.0.0_rc2.ebuild)0
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14-r1.ebuild48
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild48
-rw-r--r--sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild48
-rw-r--r--sys-devel/llvm-toolchain-symlinks/metadata.xml22
-rw-r--r--sys-devel/llvm/Manifest13
-rw-r--r--sys-devel/llvm/llvm-13.0.1.ebuild20
-rw-r--r--sys-devel/llvm/llvm-14.0.6-r2.ebuild14
-rw-r--r--sys-devel/llvm/llvm-15.0.5.ebuild (renamed from sys-devel/llvm/llvm-15.0.0_rc2.ebuild)58
-rw-r--r--sys-devel/llvm/llvm-15.0.6.9999.ebuild (renamed from sys-devel/llvm/llvm-15.0.0.9999.ebuild)56
-rw-r--r--sys-devel/llvm/llvm-15.0.6.ebuild521
-rw-r--r--sys-devel/llvm/llvm-16.0.0.9999.ebuild85
-rw-r--r--sys-devel/llvm/llvm-16.0.0_pre20221126.ebuild524
-rw-r--r--sys-devel/llvm/llvm-16.0.0_pre20221205.ebuild524
-rw-r--r--sys-devel/llvmgold/llvmgold-15.ebuild3
-rw-r--r--sys-devel/llvmgold/llvmgold-16.ebuild3
-rw-r--r--sys-devel/m4/metadata.xml11
-rw-r--r--sys-devel/make/Manifest2
-rw-r--r--sys-devel/make/make-4.3.ebuild28
-rw-r--r--sys-devel/make/make-4.4.ebuild76
-rw-r--r--sys-devel/make/make-9999.ebuild76
-rw-r--r--sys-devel/make/metadata.xml14
-rw-r--r--sys-devel/mold/Manifest3
-rw-r--r--sys-devel/mold/files/mold-1.2.1-install-nopython.patch34
-rw-r--r--sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch28
-rw-r--r--sys-devel/mold/files/mold-1.3.1-fix-riscv-set32.patch25
-rw-r--r--sys-devel/mold/mold-1.3.1-r1.ebuild99
-rw-r--r--sys-devel/mold/mold-1.4.0.ebuild97
-rw-r--r--sys-devel/mold/mold-1.7.1.ebuild (renamed from sys-devel/mold/mold-1.3.1.ebuild)70
-rw-r--r--sys-devel/mold/mold-9999.ebuild70
-rw-r--r--sys-devel/patch/patch-2.7.6-r5.ebuild59
-rw-r--r--sys-devel/qbe/Manifest1
-rw-r--r--sys-devel/qbe/metadata.xml12
-rw-r--r--sys-devel/qbe/qbe-1.0.ebuild35
-rw-r--r--sys-devel/qbe/qbe-9999.ebuild35
-rw-r--r--sys-devel/reflex/Manifest2
-rw-r--r--sys-devel/reflex/metadata.xml12
-rw-r--r--sys-devel/reflex/reflex-20221012.ebuild27
-rw-r--r--sys-devel/remake/remake-4.3.1.1.5.ebuild4
-rw-r--r--sys-devel/ucpp/ucpp-1.3.5.ebuild4
236 files changed, 9423 insertions, 3258 deletions
diff --git a/sys-devel/autoconf-archive/Manifest b/sys-devel/autoconf-archive/Manifest
index 0b98e128913..61f502f3c83 100644
--- a/sys-devel/autoconf-archive/Manifest
+++ b/sys-devel/autoconf-archive/Manifest
@@ -1,2 +1 @@
-DIST autoconf-archive-2021.02.19.tar.xz 667304 BLAKE2B bc99cfd2b507a0c7fc37a001cc9e090fa037cc3626f5f5201c9a62ef06ee8ca4532ca8f21e1422f9dff9f67f64409ae560117c3161809f2d3bc3a39469910485 SHA512 a968c355c3cf66d74dc5b452141afbdf763e84a6c43b12c25da9a08482910d6d57ba3952aaf270d8cd5fd8b9d2dadf2d7d943ae2e1b067d68b71d2738d881aa0
-DIST autoconf-archive-2022.02.11.tar.xz 675264 BLAKE2B b9ff928186312969ffd09fd0523367857e7072e867f6b43689a4a5130db9f5fe19a8337875f5186409e7b0bd200491e3d1f612739499c89547a47862c59ba07f SHA512 243e06a356ea2c0fddc527febd4241da49fe4c11fb64b548873744a54e079860739d7a1da842833b99540acde3f6a2ebfddc41897306cc2e61e2c6037a7d22ff
+DIST autoconf-archive-2022.09.03.tar.xz 676144 BLAKE2B 9511b1bd2afee78209261d9757c3fc6bf079eb6ea82bc039530532cfaaea8a7d977f6310265c0af2fde377edc9bddfcabf1e81c426a9716d5bf4b4eb7bb64a4a SHA512 157b5b6a979d5ec5bfab6ddf34422da620fec1e95f4c901821abbb7361544af77747b4a449029b84750d75679d6130a591e98da8772de2c121ecdea163f0340b
diff --git a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild
deleted file mode 100644
index d9ba9d3bedf..00000000000
--- a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-DESCRIPTION="GNU Autoconf Macro Archive"
-HOMEPAGE="https://www.gnu.org/software/autoconf-archive/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-# File collisions. #540246
-RDEPEND="!=gnome-base/gnome-common-3.14.0-r0
- !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2021.02.19-python310.patch
- "${FILESDIR}"/${PN}-2021.02.19-revert-ax_pthreads.patch
-)
diff --git a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild
deleted file mode 100644
index 87b98f88cd1..00000000000
--- a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-DESCRIPTION="GNU Autoconf Macro Archive"
-HOMEPAGE="https://www.gnu.org/software/autoconf-archive/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE=""
-
-# File collisions. #540246
-RDEPEND="!=gnome-base/gnome-common-3.14.0-r0
- !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]"
-DEPEND=""
diff --git a/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2022.09.03.ebuild
index bce68764f86..03257458af5 100644
--- a/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild
+++ b/sys-devel/autoconf-archive/autoconf-archive-2022.09.03.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
DESCRIPTION="GNU Autoconf Macro Archive"
HOMEPAGE="https://www.gnu.org/software/autoconf-archive/"
@@ -11,10 +11,8 @@ LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-# File collisions. #540246
-RDEPEND="!=gnome-base/gnome-common-3.14.0-r0
- !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2021.02.19-python310.patch
-)
+# 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/files/autoconf-archive-2021.02.19-python310.patch b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch
deleted file mode 100644
index d76605eb5c1..00000000000
--- a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Ensure configure tests don't fail with Python 3.10, 3.11.
-
-https://github.com/autoconf-archive/autoconf-archive/pull/235
-
-From: Yaakov Selkowitz <yselkowi@redhat.com>
-Date: Thu, 5 Aug 2021 11:12:47 -0400
-Subject: [PATCH 1/2] AX_PYTHON_DEVEL: fix for Python 3.10+
-
---- a/m4/ax_python_devel.m4
-+++ b/m4/ax_python_devel.m4
-@@ -208,7 +208,7 @@ EOD`
- ac_python_version=$PYTHON_VERSION
- else
- ac_python_version=`$PYTHON -c "import sys; \
-- print (sys.version[[:3]])"`
-+ print ("%d.%d" % sys.version_info[[:2]])"`
- fi
- fi
-
-
-From: Yaakov Selkowitz <yselkowi@redhat.com>
-Date: Thu, 5 Aug 2021 11:27:24 -0400
-Subject: [PATCH 2/2] AX_PYTHON: Add 3.10 and 3.11
-
---- a/m4/ax_python.m4
-+++ b/m4/ax_python.m4
-@@ -55,7 +55,7 @@
- AC_DEFUN([AX_PYTHON],
- [AC_MSG_CHECKING(for python build information)
- AC_MSG_RESULT([])
--for python in python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
-+for python in python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
- AC_CHECK_PROGS(PYTHON_BIN, [$python])
- ax_python_bin=$PYTHON_BIN
- if test x$ax_python_bin != x; then
-
diff --git a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch
deleted file mode 100644
index 3800fd292a6..00000000000
--- a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-This is an upstream revert which hasn't yet landed in a release.
-
-https://github.com/autoconf-archive/autoconf-archive/commit/59008cc7f85e1982eb298e1c424c2e6ad5942c4a
-https://github.com/autoconf-archive/autoconf-archive/pull/233
-https://github.com/autoconf-archive/autoconf-archive/commit/2567e0ce0f3a11b535c6b527386197fb49ff172b
-
-From: David Seifert <soap@gentoo.org>
-Date: Sat, 12 Jun 2021 22:29:03 +0200
-Subject: [PATCH] Revert "AX_PTHREAD: target > host"
-
-This reverts commit 2567e0ce0f3a11b535c6b527386197fb49ff172b.
-
-* `AC_CANONICAL_HOST` is the system on which the actual binary will run,
- `AC_CANONICAL_TARGET` is the system for which code is generated. The
- Autoconf manual even mentions that
-
- --target=target-type
- the type of system for which any compiler tools in the package produce code (**rarely needed**).
---- a/m4/ax_pthread.m4
-+++ b/m4/ax_pthread.m4
-@@ -87,11 +87,11 @@
- # modified version of the Autoconf Macro, you may extend this special
- # exception to the GPL to apply to your modified version as well.
-
--#serial 30
-+#serial 31
-
- AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
- AC_DEFUN([AX_PTHREAD], [
--AC_REQUIRE([AC_CANONICAL_TARGET])
-+AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_PROG_SED])
- AC_LANG_PUSH([C])
-@@ -158,7 +158,7 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --
- # --thread-safe: KAI C++
- # pthread-config: use pthread-config program (for GNU Pth library)
-
--case $target_os in
-+case $host_os in
-
- freebsd*)
-
-@@ -248,7 +248,7 @@ AS_IF([test "x$ax_pthread_clang" = "xyes"],
- # definitions is, on some systems, a strong hint that pthreads support is
- # correctly enabled
-
--case $target_os in
-+case $host_os in
- darwin* | hpux* | linux* | osf* | solaris*)
- ax_pthread_check_macro="_REENTRANT"
- ;;
-@@ -450,7 +450,7 @@ if test "x$ax_pthread_ok" = "xyes"; then
- AC_CACHE_CHECK([whether more special flags are required for pthreads],
- [ax_cv_PTHREAD_SPECIAL_FLAGS],
- [ax_cv_PTHREAD_SPECIAL_FLAGS=no
-- case $target_os in
-+ case $host_os in
- solaris*)
- ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
- ;;
-@@ -480,7 +480,7 @@ if test "x$ax_pthread_ok" = "xyes"; then
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != "xyes"; then
-- case $target_os in
-+ case $host_os in
- aix*)
- AS_CASE(["x/$CC"],
- [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
diff --git a/sys-devel/autoconf-dickey/Manifest b/sys-devel/autoconf-dickey/Manifest
new file mode 100644
index 00000000000..db6ee2c323a
--- /dev/null
+++ b/sys-devel/autoconf-dickey/Manifest
@@ -0,0 +1,3 @@
+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
new file mode 100644
index 00000000000..e0389543c32
--- /dev/null
+++ b/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild
@@ -0,0 +1,46 @@
+# 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
new file mode 100644
index 00000000000..e1ebff9a61c
--- /dev/null
+++ b/sys-devel/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild
@@ -0,0 +1,53 @@
+# 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
new file mode 100644
index 00000000000..af5286fc415
--- /dev/null
+++ b/sys-devel/autoconf-dickey/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="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
index 72082a2b2d4..92ba4e2d8da 100644
--- a/sys-devel/autoconf-wrapper/Manifest
+++ b/sys-devel/autoconf-wrapper/Manifest
@@ -1 +1,2 @@
DIST autotools-wrappers-at-20220130.tar.gz 3625 BLAKE2B c587d778a0c3331d14498308ae720dabdbcf27349ef0a3a2d5db56bb0ef597a5b1ab43388f1456e7888b40f043d68b0d89b420ac7404008f9a813ef78ae7e96f SHA512 700204b6024636dc808339aac15fb19bb645b654d4777ba8bf0febded5eb6af98659d04ed23819a8a638b6ee905e62292995bf2f838c30dedacb1a6bc0d04f1a
+DIST autotools-wrappers-at-20221118.tar.gz 3625 BLAKE2B 713e4b581baf6b5c0756f8bd026566e113eb6e8f54a594f132aa952277f68c7a9da28c93a191b8ad4279952ebcfcf7a5d679d4bb7a831b14af208ff2172ee15c SHA512 1409c890fa3450195868536bb8c1bdcfb52c11f412ab0b99652e39b7ea4eeec1807611e4fa89c8289c162c7de8ff5c2864a86d6637ea24088b3125f8db895663
diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-20221118.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-20221118.ebuild
new file mode 100644
index 00000000000..936757448f5
--- /dev/null
+++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-20221118.ebuild
@@ -0,0 +1,34 @@
+# 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
+ 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
new file mode 100644
index 00000000000..00ae3761530
--- /dev/null
+++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-99999999.ebuild
@@ -0,0 +1,35 @@
+# 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
index 73dda144f9a..1f8aa323a0f 100644
--- a/sys-devel/autoconf-wrapper/metadata.xml
+++ b/sys-devel/autoconf-wrapper/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="gentoo">proj/autotools-wrappers</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/autoconf/autoconf-2.13-r2.ebuild b/sys-devel/autoconf/autoconf-2.13-r2.ebuild
index e84a401dd1b..f26c02ae862 100644
--- a/sys-devel/autoconf/autoconf-2.13-r2.ebuild
+++ b/sys-devel/autoconf/autoconf-2.13-r2.ebuild
@@ -12,13 +12,19 @@ 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
- dev-lang/perl"
-RDEPEND="${BDEPEND}
+ test? ( dev-util/dejagnu )
+"
+RDEPEND="
+ ${BDEPEND}
sys-apps/texinfo
- >=sys-devel/autoconf-wrapper-13"
+ >=sys-devel/autoconf-wrapper-13
+"
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
diff --git a/sys-devel/autoconf/autoconf-2.13-r7.ebuild b/sys-devel/autoconf/autoconf-2.13-r7.ebuild
new file mode 100644
index 00000000000..055d8286769
--- /dev/null
+++ b/sys-devel/autoconf/autoconf-2.13-r7.ebuild
@@ -0,0 +1,58 @@
+# 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
index c85719fd173..f51aa71c2d0 100644
--- a/sys-devel/autoconf/autoconf-2.69-r5.ebuild
+++ b/sys-devel/autoconf/autoconf-2.69-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -18,7 +18,7 @@ inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
-LICENSE="GPL-3"
+LICENSE="GPL-3+"
SLOT="${PV}"
IUSE="emacs"
diff --git a/sys-devel/autoconf/autoconf-2.69-r6.ebuild b/sys-devel/autoconf/autoconf-2.69-r8.ebuild
index 83a87598389..3730430ac8a 100644
--- a/sys-devel/autoconf/autoconf-2.69-r6.ebuild
+++ b/sys-devel/autoconf/autoconf-2.69-r8.ebuild
@@ -10,7 +10,7 @@ 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"
+ 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
@@ -18,7 +18,7 @@ inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
-LICENSE="GPL-3"
+LICENSE="GPL-3+"
SLOT="${PV}"
IUSE="emacs"
@@ -41,6 +41,7 @@ PATCHES=(
"${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
)
diff --git a/sys-devel/autoconf/autoconf-2.71-r1.ebuild b/sys-devel/autoconf/autoconf-2.71-r1.ebuild
index 21a979c791b..7ef4e0bcbeb 100644
--- a/sys-devel/autoconf/autoconf-2.71-r1.ebuild
+++ b/sys-devel/autoconf/autoconf-2.71-r1.ebuild
@@ -30,8 +30,10 @@ 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.6"
+ >=dev-lang/perl-5.8"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-15
sys-devel/gnuconfig
diff --git a/sys-devel/autoconf/autoconf-2.71-r5.ebuild b/sys-devel/autoconf/autoconf-2.71-r5.ebuild
new file mode 100644
index 00000000000..7749d47f435
--- /dev/null
+++ b/sys-devel/autoconf/autoconf-2.71-r5.ebuild
@@ -0,0 +1,88 @@
+# 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
index cb3d17704c6..61ddd6318e4 100644
--- a/sys-devel/autoconf/autoconf-9999.ebuild
+++ b/sys-devel/autoconf/autoconf-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -17,12 +17,12 @@ inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
-LICENSE="GPL-3"
+LICENSE="GPL-3+"
SLOT="${PV}"
IUSE="emacs"
BDEPEND=">=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.6"
+ >=dev-lang/perl-5.10"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-14
sys-devel/gnuconfig
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
new file mode 100644
index 00000000000..d158f7974e8
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch
@@ -0,0 +1,331 @@
+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
new file mode 100644
index 00000000000..42c3018aea8
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.13-K-R-decls-clang.patch
@@ -0,0 +1,346 @@
+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.69-K-R-decls-clang.patch b/sys-devel/autoconf/files/autoconf-2.69-K-R-decls-clang.patch
new file mode 100644
index 00000000000..77444ebc5be
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.69-K-R-decls-clang.patch
@@ -0,0 +1,394 @@
+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.71-AC_C_BIGENDIAN-lto.patch b/sys-devel/autoconf/files/autoconf-2.71-AC_C_BIGENDIAN-lto.patch
new file mode 100644
index 00000000000..48fbdc6f544
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.71-AC_C_BIGENDIAN-lto.patch
@@ -0,0 +1,50 @@
+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
new file mode 100644
index 00000000000..5b53d17135b
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch
@@ -0,0 +1,35 @@
+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
new file mode 100644
index 00000000000..6a3d6580a3f
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch
@@ -0,0 +1,94 @@
+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
new file mode 100644
index 00000000000..e2e451e8692
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.71-K-R-decls-clang.patch
@@ -0,0 +1,114 @@
+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-make-4.4.patch b/sys-devel/autoconf/files/autoconf-2.71-make-4.4.patch
new file mode 100644
index 00000000000..4dcf0599618
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.71-make-4.4.patch
@@ -0,0 +1,25 @@
+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/metadata.xml b/sys-devel/autoconf/metadata.xml
index 73dda144f9a..4ff4a48125b 100644
--- a/sys-devel/autoconf/metadata.xml
+++ b/sys-devel/autoconf/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="savannah">autoconf</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/autogen/metadata.xml b/sys-devel/autogen/metadata.xml
index ab5727db0a5..8f3ef98f5bc 100644
--- a/sys-devel/autogen/metadata.xml
+++ b/sys-devel/autogen/metadata.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
-</maintainer>
-<use>
- <flag name="libopts">install the libopts tarball (a few packages want this for developing)</flag>
-</use>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <use>
+ <flag name="libopts">install the libopts tarball (a few packages want this for developing)</flag>
+ </use>
+ <upstream>
+ <remote-id type="savannah">autogen</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/automake-wrapper/automake-wrapper-99999999.ebuild b/sys-devel/automake-wrapper/automake-wrapper-99999999.ebuild
new file mode 100644
index 00000000000..ecb9a1b0530
--- /dev/null
+++ b/sys-devel/automake-wrapper/automake-wrapper-99999999.ebuild
@@ -0,0 +1,41 @@
+# 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/metadata.xml b/sys-devel/automake-wrapper/metadata.xml
index 73dda144f9a..1f8aa323a0f 100644
--- a/sys-devel/automake-wrapper/metadata.xml
+++ b/sys-devel/automake-wrapper/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="gentoo">proj/autotools-wrappers</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/automake/automake-1.11.6-r3.ebuild b/sys-devel/automake/automake-1.11.6-r3.ebuild
index 8b96c4f8314..2aea15120d4 100644
--- a/sys-devel/automake/automake-1.11.6-r3.ebuild
+++ b/sys-devel/automake/automake-1.11.6-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
IUSE=""
RESTRICT="test"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sys-devel/automake/automake-1.13.4-r2.ebuild b/sys-devel/automake/automake-1.13.4-r2.ebuild
index 286477158c2..520ca9e3dae 100644
--- a/sys-devel/automake/automake-1.13.4-r2.ebuild
+++ b/sys-devel/automake/automake-1.13.4-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
IUSE=""
RESTRICT="test"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sys-devel/automake/automake-1.15.1-r2.ebuild b/sys-devel/automake/automake-1.15.1-r2.ebuild
index 61626303e82..fcc66ddf352 100644
--- a/sys-devel/automake/automake-1.15.1-r2.ebuild
+++ b/sys-devel/automake/automake-1.15.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -32,7 +32,7 @@ SLOT="${PV:0:4}"
IUSE=""
RESTRICT="test"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sys-devel/automake/automake-1.16.5.ebuild b/sys-devel/automake/automake-1.16.5.ebuild
index 6e1d35f712b..75cb2be5e49 100644
--- a/sys-devel/automake/automake-1.16.5.ebuild
+++ b/sys-devel/automake/automake-1.16.5.ebuild
@@ -36,7 +36,7 @@ SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sys-devel/automake/automake-9999.ebuild b/sys-devel/automake/automake-9999.ebuild
index a36fa3529b3..c5692937254 100644
--- a/sys-devel/automake/automake-9999.ebuild
+++ b/sys-devel/automake/automake-9999.ebuild
@@ -36,7 +36,7 @@ SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sys-devel/bc/bc-1.07.1-r4.ebuild b/sys-devel/bc/bc-1.07.1-r4.ebuild
index 82f798fc4f6..2ac2c73b3de 100644
--- a/sys-devel/bc/bc-1.07.1-r4.ebuild
+++ b/sys-devel/bc/bc-1.07.1-r4.ebuild
@@ -23,7 +23,7 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/flex
- virtual/yacc"
+ app-alternatives/yacc"
PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
diff --git a/sys-devel/bc/bc-1.07.1-r5.ebuild b/sys-devel/bc/bc-1.07.1-r5.ebuild
new file mode 100644
index 00000000000..78eefebc167
--- /dev/null
+++ b/sys-devel/bc/bc-1.07.1-r5.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Handy console-based calculator utility"
+HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
+SRC_URI="mirror://gnu/bc/${P}.tar.gz"
+
+LICENSE="GPL-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"
+IUSE="libedit readline static"
+
+RDEPEND="
+ !readline? ( libedit? ( dev-libs/libedit:= ) )
+ readline? (
+ sys-libs/readline:=
+ sys-libs/ncurses:=
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/flex
+ app-alternatives/yacc"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
+
+src_prepare() {
+ default
+
+ # Avoid bad build tool usage when cross-compiling. Bug #627126
+ tc-is-cross-compiler && eapply "${FILESDIR}"/${PN}-1.07.1-use-system-bc.patch
+}
+
+src_configure() {
+ local myconf=(
+ $(use_with readline)
+ )
+ if use readline ; then
+ myconf+=( --without-libedit )
+ else
+ myconf+=( $(use_with libedit) )
+ fi
+ use static && append-ldflags -static
+
+ # The libedit code isn't compatible currently. #830101
+ use libedit && append-flags -fcommon
+
+ # AC_SYS_LARGEFILE in configure.ac would handle this, but we don't patch
+ # autotools otherwise currently. This change has been sent upstream, but
+ # who knows when they'll make another release.
+ append-lfs-flags
+
+ econf "${myconf[@]}"
+
+ # Do not regen docs -- configure produces a small fragment that includes
+ # the version info which causes all pages to regen (newer file). Bug #554774
+ touch -r doc doc/* || die
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
diff --git a/sys-devel/bc/bc-1.07.1-r6.ebuild b/sys-devel/bc/bc-1.07.1-r6.ebuild
new file mode 100644
index 00000000000..175d05638d7
--- /dev/null
+++ b/sys-devel/bc/bc-1.07.1-r6.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Handy console-based calculator utility"
+HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
+SRC_URI="mirror://gnu/bc/${P}.tar.gz"
+
+LICENSE="GPL-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"
+IUSE="libedit readline static"
+
+RDEPEND="
+ !readline? ( libedit? ( dev-libs/libedit:= ) )
+ readline? (
+ sys-libs/readline:=
+ sys-libs/ncurses:=
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/flex
+ app-alternatives/yacc"
+PDEPEND="app-alternatives/bc"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
+
+src_prepare() {
+ default
+
+ # Avoid bad build tool usage when cross-compiling. Bug #627126
+ tc-is-cross-compiler && eapply "${FILESDIR}"/${PN}-1.07.1-use-system-bc.patch
+}
+
+src_configure() {
+ local myconf=(
+ $(use_with readline)
+ --program-suffix=-reference
+ )
+
+ if use readline ; then
+ myconf+=( --without-libedit )
+ else
+ myconf+=( $(use_with libedit) )
+ fi
+
+ use static && append-ldflags -static
+
+ # The libedit code isn't compatible currently. #830101
+ use libedit && append-flags -fcommon
+
+ # AC_SYS_LARGEFILE in configure.ac would handle this, but we don't patch
+ # autotools otherwise currently. This change has been sent upstream, but
+ # who knows when they'll make another release.
+ append-lfs-flags
+
+ # configure dies with other lexes:
+ # "configure: error: readline works only with flex."
+ export LEX=flex
+
+ econf "${myconf[@]}"
+
+ # Do not regen docs -- configure produces a small fragment that includes
+ # the version info which causes all pages to regen (newer file). Bug #554774
+ touch -r doc doc/* || die
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+pkg_postinst() {
+ # ensure to preserve the symlinks before app-alternatives/bc
+ # is installed
+ local x
+ for x in bc dc ; do
+ if [[ ! -h ${EROOT}/usr/bin/${x} ]] ; then
+ ln -s "${x}-reference" "${EROOT}/usr/bin/${x}" || die
+ fi
+ done
+}
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index e7d9c044043..55c5f7fef7f 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -1,9 +1,6 @@
-DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
-DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
-DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
-DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
-DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
+DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
deleted file mode 100644
index d9ffb17a0c1..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-case ${PV} in
- 9999)
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- SLOT=${PV}
- ;;
- *)
- SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
- SLOT=$(ver_cut 1-2)
- KEYWORDS="-* hppa"
- ;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
- >=sys-devel/binutils-config-3
- sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( sys-apps/texinfo )
- test? ( dev-util/dejagnu )
- nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
- case ${PV} in
- *9999)
- git-r3_src_unpack
- ;;
- *)
- ;;
- esac
- default
- mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Make sure our explicit libdir paths don't get clobbered. #562460
- sed -i \
- -e 's:@bfdlibdir@:@libdir@:g' \
- -e 's:@bfdincludedir@:@includedir@:g' \
- {bfd,opcodes}/Makefile.in || die
-
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
- # Apply things from PATCHES and user dirs
- default
-
- # Run misc portage update scripts
- gnuconfig_update
- elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
- printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
- printf "Gentoo ${PV}"
- [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
- # Setup some paths
- LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
- INCPATH=${LIBPATH}/include
- DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
- if is_cross ; then
- TOOLPATH=/usr/${CHOST}/${CTARGET}
- else
- TOOLPATH=/usr/${CTARGET}
- fi
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
- # Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
- strip-linguas -u */po
-
- # Keep things sane
- strip-flags
-
- local x
- echo
- for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
- einfo "$(printf '%10s' ${x}:) ${!x}"
- done
- echo
-
- cd "${MY_BUILDDIR}"
- local myconf=()
-
- if use plugins ; then
- myconf+=( --enable-plugins )
- fi
- # enable gold (installed as ld.gold) and ld's plugin architecture
- if use gold ; then
- myconf+=( --enable-gold )
- if use default-gold; then
- myconf+=( --enable-gold=default )
- fi
- fi
-
- if use nls ; then
- myconf+=( --without-included-gettext )
- else
- myconf+=( --disable-nls )
- fi
-
- myconf+=( --with-system-zlib )
-
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
- case $(tc-arch) in
- ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
- esac
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
- is_cross && myconf+=(
- --with-sysroot="${EPREFIX}"/usr/${CTARGET}
- --enable-poison-system-directories
- )
-
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- myconf+=(
- --prefix="${EPREFIX}"/usr
- --host=${CHOST}
- --target=${CTARGET}
- --datadir="${EPREFIX}"${DATAPATH}
- --datarootdir="${EPREFIX}"${DATAPATH}
- --infodir="${EPREFIX}"${DATAPATH}/info
- --mandir="${EPREFIX}"${DATAPATH}/man
- --bindir="${EPREFIX}"${BINPATH}
- --libdir="${EPREFIX}"${LIBPATH}
- --libexecdir="${EPREFIX}"${LIBPATH}
- --includedir="${EPREFIX}"${INCPATH}
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.27) offer a configure flag now.
- --enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="$(toolchain-binutils_bugurl)"
- --with-pkgversion="$(toolchain-binutils_pkgversion)"
- $(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
-
- # Prevent makeinfo from running if doc is unset.
- if ! use doc ; then
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
- fi
-}
-
-src_compile() {
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
-
- # only build info pages if the user wants them
- if use doc ; then
- emake info
- fi
-
- # we nuke the manpages when we're left with junk
- # (like when we bootstrap, no perl -> no manpages)
- find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
- cd "${MY_BUILDDIR}"
- # bug 637066
- filter-flags -Wall -Wreturn-type
- emake -k check
-}
-
-src_install() {
- local x d
-
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
- use static-libs || find "${ED}" -name '*.la' -delete
-
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
- for d in ../* ; do
- [[ ${d} == ../${PV} ]] && continue
- mv ${d}/* . || die
- rmdir ${d} || die
- done
-
- # Now we collect everything intp the proper SLOT-ed dirs
- # When something is built to cross-compile, it installs into
- # /usr/$CHOST/ by default ... we have to 'fix' that :)
- if is_cross ; then
- cd "${ED}"/${BINPATH}
- for x in * ; do
- mv ${x} ${x/${CTARGET}-}
- done
-
- if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
- mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
- mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/usr/${CHOST}/{include,lib}
- fi
- fi
- insinto ${INCPATH}
- local libiberty_headers=(
- # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
- demangle.h
- dyn-string.h
- fibheap.h
- hashtab.h
- libiberty.h
- objalloc.h
- splay-tree.h
- )
- doins "${libiberty_headers[@]/#/${S}/include/}"
- if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/${LIBPATH}/lib
- fi
-
- # Generate an env.d entry for this binutils
- insinto /etc/env.d/binutils
- cat <<-EOF > "${T}"/env.d
- TARGET="${CTARGET}"
- VER="${PV}"
- LIBPATH="${EPREFIX}${LIBPATH}"
- EOF
- newins "${T}"/env.d ${CTARGET}-${PV}
-
- # Handle documentation
- if ! is_cross ; then
- cd "${S}"
- dodoc README
- docinto bfd
- dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
- docinto binutils
- dodoc binutils/ChangeLog binutils/NEWS binutils/README
- docinto gas
- dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
- docinto gprof
- dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
- docinto ld
- dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
- docinto libiberty
- dodoc libiberty/ChangeLog* libiberty/README
- docinto opcodes
- dodoc opcodes/ChangeLog*
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
- # Trim all empty dirs
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
- # the hppa64 hack; this should go into 9999 as a PN-conditional
- # tweak the default fake list a little bit
- cd "${D}"/etc/env.d/binutils
- sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
- # Make sure this ${CTARGET} has a binutils version selected
- [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
- binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
- local current_profile=$(binutils-config -c ${CTARGET})
-
- # If no other versions exist, then uninstall for this
- # target ... otherwise, switch to the newest version
- # Note: only do this if this version is unmerged. We
- # rerun binutils-config if this is a remerge, as
- # we want the mtimes on the symlinks updated (if
- # it is the same as the current selected profile)
- if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
- local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
- choice=${choice//$'\n'/ }
- choice=${choice/* }
- if [[ -z ${choice} ]] ; then
- binutils-config -u ${CTARGET}
- else
- binutils-config ${choice}
- fi
- elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
- binutils-config ${CTARGET}-${PV}
- fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-# /usr/bin/${CTARGET}-<tool>
-# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-# /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
deleted file mode 100644
index 4350678795e..00000000000
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r2.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CTARGET=hppa64-${CHOST#*-}
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/"
-LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-case ${PV} in
- 9999)
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- SLOT=${PV}
- ;;
- *)
- SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
- SLOT=$(ver_cut 1-2)
- KEYWORDS="-* hppa"
- ;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-#
-# The cross-compile logic
-#
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-#
-# The dependencies
-#
-RDEPEND="
- >=sys-devel/binutils-config-3
- sys-libs/zlib
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( sys-apps/texinfo )
- test? ( dev-util/dejagnu )
- nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/yacc
-"
-
-RESTRICT="!test? ( test )"
-
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
-
-src_unpack() {
- case ${PV} in
- *9999)
- git-r3_src_unpack
- ;;
- *)
- ;;
- esac
- default
- mkdir -p "${MY_BUILDDIR}"
-}
-
-src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Make sure our explicit libdir paths don't get clobbered. #562460
- sed -i \
- -e 's:@bfdlibdir@:@libdir@:g' \
- -e 's:@bfdincludedir@:@includedir@:g' \
- {bfd,opcodes}/Makefile.in || die
-
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
- # Apply things from PATCHES and user dirs
- default
-
- # Run misc portage update scripts
- gnuconfig_update
- elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
- printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
- printf "Gentoo ${PV}"
- [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
- # Setup some paths
- LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
- INCPATH=${LIBPATH}/include
- DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
- if is_cross ; then
- TOOLPATH=/usr/${CHOST}/${CTARGET}
- else
- TOOLPATH=/usr/${CTARGET}
- fi
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
- # Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
- strip-linguas -u */po
-
- # Keep things sane
- strip-flags
-
- local x
- echo
- for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
- einfo "$(printf '%10s' ${x}:) ${!x}"
- done
- echo
-
- cd "${MY_BUILDDIR}"
- local myconf=()
-
- if use plugins ; then
- myconf+=( --enable-plugins )
- fi
- # enable gold (installed as ld.gold) and ld's plugin architecture
- if use gold ; then
- myconf+=( --enable-gold )
- if use default-gold; then
- myconf+=( --enable-gold=default )
- fi
- fi
-
- if use nls ; then
- myconf+=( --without-included-gettext )
- else
- myconf+=( --disable-nls )
- fi
-
- myconf+=( --with-system-zlib )
-
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
- case $(tc-arch) in
- ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
- esac
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
- is_cross && myconf+=(
- --with-sysroot="${EPREFIX}"/usr/${CTARGET}
- --enable-poison-system-directories
- )
-
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- myconf+=(
- --prefix="${EPREFIX}"/usr
- --host=${CHOST}
- --target=${CTARGET}
- --datadir="${EPREFIX}"${DATAPATH}
- --datarootdir="${EPREFIX}"${DATAPATH}
- --infodir="${EPREFIX}"${DATAPATH}/info
- --mandir="${EPREFIX}"${DATAPATH}/man
- --bindir="${EPREFIX}"${BINPATH}
- --libdir="${EPREFIX}"${LIBPATH}
- --libexecdir="${EPREFIX}"${LIBPATH}
- --includedir="${EPREFIX}"${INCPATH}
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.27) offer a configure flag now.
- --enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="$(toolchain-binutils_bugurl)"
- --with-pkgversion="$(toolchain-binutils_pkgversion)"
- $(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
-
- # Prevent makeinfo from running if doc is unset.
- if ! use doc ; then
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
- fi
-}
-
-src_compile() {
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
-
- # only build info pages if the user wants them
- if use doc ; then
- emake info
- fi
-
- # we nuke the manpages when we're left with junk
- # (like when we bootstrap, no perl -> no manpages)
- find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
- cd "${MY_BUILDDIR}"
- # bug 637066
- filter-flags -Wall -Wreturn-type
- emake -k check
-}
-
-src_install() {
- local x d
-
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
- use static-libs || find "${ED}" -name '*.la' -delete
-
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
- for d in ../* ; do
- [[ ${d} == ../${PV} ]] && continue
- mv ${d}/* . || die
- rmdir ${d} || die
- done
-
- # Now we collect everything intp the proper SLOT-ed dirs
- # When something is built to cross-compile, it installs into
- # /usr/$CHOST/ by default ... we have to 'fix' that :)
- if is_cross ; then
- cd "${ED}"/${BINPATH}
- for x in * ; do
- mv ${x} ${x/${CTARGET}-}
- done
-
- if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
- mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
- mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/usr/${CHOST}/{include,lib}
- fi
- fi
- insinto ${INCPATH}
- local libiberty_headers=(
- # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
- demangle.h
- dyn-string.h
- fibheap.h
- hashtab.h
- libiberty.h
- objalloc.h
- splay-tree.h
- )
- doins "${libiberty_headers[@]/#/${S}/include/}"
- if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/${LIBPATH}/lib
- fi
-
- # Generate an env.d entry for this binutils
- insinto /etc/env.d/binutils
- cat <<-EOF > "${T}"/env.d
- TARGET="${CTARGET}"
- VER="${PV}"
- LIBPATH="${EPREFIX}${LIBPATH}"
- EOF
- newins "${T}"/env.d ${CTARGET}-${PV}
-
- # Handle documentation
- if ! is_cross ; then
- cd "${S}"
- dodoc README
- docinto bfd
- dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
- docinto binutils
- dodoc binutils/ChangeLog binutils/NEWS binutils/README
- docinto gas
- dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
- docinto gprof
- dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
- docinto ld
- dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
- docinto libiberty
- dodoc libiberty/ChangeLog* libiberty/README
- docinto opcodes
- dodoc opcodes/ChangeLog*
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
- # Trim all empty dirs
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-
- # the hppa64 hack; this should go into 9999 as a PN-conditional
- # tweak the default fake list a little bit
- cd "${D}"/etc/env.d/binutils
- sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die
-}
-
-pkg_postinst() {
- # Make sure this ${CTARGET} has a binutils version selected
- [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
- binutils-config ${CTARGET}-${PV}
-}
-
-pkg_postrm() {
- local current_profile=$(binutils-config -c ${CTARGET})
-
- # If no other versions exist, then uninstall for this
- # target ... otherwise, switch to the newest version
- # Note: only do this if this version is unmerged. We
- # rerun binutils-config if this is a remerge, as
- # we want the mtimes on the symlinks updated (if
- # it is the same as the current selected profile)
- if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
- local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
- choice=${choice//$'\n'/ }
- choice=${choice/* }
- if [[ -z ${choice} ]] ; then
- binutils-config -u ${CTARGET}
- else
- binutils-config ${choice}
- fi
- elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
- binutils-config ${CTARGET}-${PV}
- fi
-}
-# Note [slotting support]
-# -----------------------
-# Gentoo's layout for binutils files is non-standard as Gentoo
-# supports slotted installation for binutils. Many tools
-# still expect binutils to reside in known locations.
-# binutils-config package restores symlinks into known locations,
-# like:
-# /usr/bin/${CTARGET}-<tool>
-# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
-# /usr/include/
-#
-# Note [tooldir hack for ldscripts]
-# ---------------------------------
-# Build system does not allow ./configure to tweak every location
-# we need for slotting binutils hence all the shuffling in
-# src_install(). This note is about SCRIPTDIR define handling.
-#
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
-# Thus we can't just move files around after compilation finished.
-#
-# Our goal is the following:
-# - at build-time set scriptdir to point to symlinked location:
-# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
-# - at install-time set scriptdir to point to slotted location:
-# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild
index d3f797079c9..b8973ce5f5a 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
@@ -64,7 +64,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
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 b6e72448d38..9bc8365ff2f 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild
@@ -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
#
@@ -65,7 +65,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
index 6d45ceecaca..cd5af5b432c 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r4.ebuild
@@ -5,12 +5,13 @@ EAPI=7
export CTARGET=hppa64-${CHOST#*-}
-inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -21,7 +22,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=3
+PATCH_VER=5
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -64,24 +65,24 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
-MY_BUILDDIR=${WORKDIR}/build
-S=${WORKDIR}/${P/-hppa64/}
+MY_BUILDDIR="${WORKDIR}"/build
+S="${WORKDIR}"/${P/-hppa64/}
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/patches-git
git-r3_src_unpack
mv patches-git/9999 patch || die
+ S="${WORKDIR}"/binutils
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
+ EGIT_CHECKOUT_DIR="${S}"
git-r3_src_unpack
else
unpack ${P/-hppa64/}.tar.xz
@@ -116,13 +117,13 @@ src_prepare() {
fi
fi
- # Make sure our explicit libdir paths don't get clobbered. #562460
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
+ # 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
@@ -133,11 +134,6 @@ src_prepare() {
done
fi
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
# Apply things from PATCHES and user dirs
default
@@ -155,6 +151,11 @@ toolchain-binutils_pkgversion() {
}
src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
@@ -167,7 +168,7 @@ src_configure() {
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
+ # actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
@@ -182,7 +183,7 @@ src_configure() {
done
echo
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
@@ -204,9 +205,10 @@ src_configure() {
myconf+=( --with-system-zlib )
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
@@ -220,10 +222,7 @@ src_configure() {
--enable-poison-system-directories
)
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+ myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
@@ -247,45 +246,70 @@ src_configure() {
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
- # Works better than vapier's patch... #808787
+
+ # These hardening options are available from 2.39+ but
+ # they unconditionally enable the behaviour even on arches
+ # where e.g. execstacks can't be avoided.
+ # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
+ #--enable-warn-execstack
+ #--enable-warn-rwx-segments
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
--enable-new-dtags
+
+ --disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
+ # {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
- # avoid automagic dependency on (currently prefix) systems
+ # Avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+ # Avoid automagic dev-libs/msgpack dep, bug #865875
+ --without-msgpack
+
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
- # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
- $(use_enable pgo pgo-build)
+ # We can enable this by default in future, but it's brand new
+ # in 2.39 with several bugs:
+ # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
+ # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
+ # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
+ # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
+ $(use_enable gprofng)
)
- if use pgo ; then
- export BUILD_CFLAGS="${CFLAGS}"
+ if ! is_cross ; then
+ # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support.
+ myconf+=( $(use_enable pgo pgo-build) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
fi
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -296,13 +320,14 @@ src_configure() {
}
src_compile() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
- emake info
+ emake V=1 info
fi
# we nuke the manpages when we're left with junk
@@ -311,25 +336,26 @@ src_compile() {
}
src_test() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
- # bug 637066
+ # bug #637066
filter-flags -Wall -Wreturn-type
- emake -k check
+ emake -k V=1 check
}
src_install() {
local x d
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
+ emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
@@ -340,17 +366,19 @@ src_install() {
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
- cd "${ED}"/${BINPATH}
+ cd "${ED}"/${BINPATH} || die
for x in * ; do
- mv ${x} ${x/${CTARGET}-}
+ mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ # No die for now, dies on hppa?
mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
+
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
@@ -364,6 +392,7 @@ src_install() {
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ # TODO: add || die here, fails on hppa?
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/${LIBPATH}/lib
fi
@@ -379,26 +408,33 @@ src_install() {
# Handle documentation
if ! is_cross ; then
- cd "${S}"
+ cd "${S}" || die
dodoc README
+
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
+
docinto opcodes
dodoc opcodes/ChangeLog*
fi
# Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die
# Trim all empty dirs
find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml
index a5e5c11c9e1..3b4c9e9ea2e 100644
--- a/sys-devel/binutils-hppa64/metadata.xml
+++ b/sys-devel/binutils-hppa64/metadata.xml
@@ -3,7 +3,7 @@
<pkgmetadata>
<maintainer type="project">
<email>hppa@gentoo.org</email>
- <name>Gentoo Linux HPPA Development</name>
+ <name>HPPA architecture team</name>
</maintainer>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
@@ -13,8 +13,12 @@
<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
<flag name="gold">Build ld.gold linker</flag>
+ <flag name="gprofng">Enable the next-generation gprofng profiler</flag>
<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
<flag name="plugins">Enable plugin support in tools</flag>
<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
</use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 63c7be532b4..0de4b0fbbc1 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -10,8 +10,7 @@ DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348a
DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
-DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
-DIST binutils-2.39-patches-3.tar.xz 57332 BLAKE2B 08bdcd35afb6310c5f61e8a93f60c624ff461a612d8b473b2cfc1d8eb94eedb311af0b39b5f8ac425f3676d8e1addd13a4b223983de2f6d579e50daec08d3881 SHA512 f8a1a908866637a39a3ad55d47304f3320ab663d299d8d231a873008a50bb2a09c89a2482394c017a2a73c2cfc48ed944e99b422fd5db19f829e45ff071bb659
+DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7 SHA512 4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild b/sys-devel/binutils/binutils-2.32-r2.ebuild
index 40db4705c2a..d19fc5bc163 100644
--- a/sys-devel/binutils/binutils-2.32-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.32-r2.ebuild
@@ -77,7 +77,7 @@ DEPEND="${RDEPEND}
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
index 785ea17b654..2fd7c51dacb 100644
--- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
@@ -69,7 +69,7 @@ DEPEND="${RDEPEND}
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.34-r2.ebuild b/sys-devel/binutils/binutils-2.34-r2.ebuild
index c6150313910..f135644d030 100644
--- a/sys-devel/binutils/binutils-2.34-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r2.ebuild
@@ -70,7 +70,7 @@ BDEPEND="
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild b/sys-devel/binutils/binutils-2.35.2.ebuild
index cdb4d4b87ec..88e1395e632 100644
--- a/sys-devel/binutils/binutils-2.35.2.ebuild
+++ b/sys-devel/binutils/binutils-2.35.2.ebuild
@@ -62,7 +62,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.36.1-r2.ebuild b/sys-devel/binutils/binutils-2.36.1-r2.ebuild
index faa27e272c6..2231530b7f3 100644
--- a/sys-devel/binutils/binutils-2.36.1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.36.1-r2.ebuild
@@ -62,7 +62,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
index 6ade635ea8f..712f1d46b7a 100644
--- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
@@ -62,7 +62,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/binutils/binutils-2.38-r1.ebuild b/sys-devel/binutils/binutils-2.38-r1.ebuild
deleted file mode 100644
index 0041aec7eb5..00000000000
--- a/sys-devel/binutils/binutils-2.38-r1.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2022 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 default-gold doc +gold 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=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://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 ~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
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? ( sys-apps/texinfo )
- test? (
- dev-util/dejagnu
- sys-devel/bc
- )
- nls? ( sys-devel/gettext )
- sys-devel/flex
- virtual/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."
- fi
- fi
-
- # Make sure our explicit libdir paths don't get clobbered. #562460
- sed -i \
- -e 's:@bfdlibdir@:@libdir@:g' \
- -e 's:@bfdincludedir@:@includedir@:g' \
- {bfd,opcodes}/Makefile.in || die
-
- # Fix locale issues if possible #122216
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
- einfo "Fixing misc issues in configure files"
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
- ebegin " Updating ${f/${S}\/}"
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
- || eerror "Please file a bug about this"
- eend $?
- done
- fi
-
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
- # Apply things from PATCHES and user dirs
- default
-
- # Run misc portage update scripts
- gnuconfig_update
- elibtoolize --portage --no-uclibc
-}
-
-toolchain-binutils_bugurl() {
- printf "https://bugs.gentoo.org/"
-}
-toolchain-binutils_pkgversion() {
- printf "Gentoo ${PV}"
- [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
-}
-
-src_configure() {
- # Setup some paths
- LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
- INCPATH=${LIBPATH}/include
- DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
- if is_cross ; then
- TOOLPATH=/usr/${CHOST}/${CTARGET}
- else
- TOOLPATH=/usr/${CTARGET}
- fi
- BINPATH=${TOOLPATH}/binutils-bin/${PV}
-
- # Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
- strip-linguas -u */po
-
- # Keep things sane
- strip-flags
-
- 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}"
- local myconf=()
-
- if use plugins ; then
- myconf+=( --enable-plugins )
- fi
- # enable gold (installed as ld.gold) and ld's plugin architecture
- if use gold ; then
- myconf+=( --enable-gold )
- if use default-gold; then
- myconf+=( --enable-gold=default )
- fi
- fi
-
- if use nls ; then
- myconf+=( --without-included-gettext )
- else
- myconf+=( --disable-nls )
- fi
-
- myconf+=( --with-system-zlib )
-
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
- case $(tc-arch) in
- ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
- esac
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
- is_cross && myconf+=(
- --with-sysroot="${EPREFIX}"/usr/${CTARGET}
- --enable-poison-system-directories
- )
-
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- myconf+=(
- --prefix="${EPREFIX}"/usr
- --host=${CHOST}
- --target=${CTARGET}
- --datadir="${EPREFIX}"${DATAPATH}
- --datarootdir="${EPREFIX}"${DATAPATH}
- --infodir="${EPREFIX}"${DATAPATH}/info
- --mandir="${EPREFIX}"${DATAPATH}/man
- --bindir="${EPREFIX}"${BINPATH}
- --libdir="${EPREFIX}"${LIBPATH}
- --libexecdir="${EPREFIX}"${LIBPATH}
- --includedir="${EPREFIX}"${INCPATH}
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.27) offer a configure flag now.
- --enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- # Available from 2.35 on
- --enable-textrel-check=warning
- # Works better than vapier's patch... #808787
- --enable-new-dtags
- --disable-werror
- --with-bugurl="$(toolchain-binutils_bugurl)"
- --with-pkgversion="$(toolchain-binutils_pkgversion)"
- $(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- if ! is_cross ; then
- myconf+=( $(use_enable pgo pgo-build lto) )
-
- if use pgo ; then
- export BUILD_CFLAGS="${CFLAGS}"
- fi
- fi
-
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
-
- # Prevent makeinfo from running if doc is unset.
- if ! use doc ; then
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
- fi
-}
-
-src_compile() {
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
-
- # only build info pages if the user wants them
- if use doc ; then
- emake info
- fi
-
- # we nuke the manpages when we're left with junk
- # (like when we bootstrap, no perl -> no manpages)
- find . -name '*.1' -a -size 0 -delete
-}
-
-src_test() {
- cd "${MY_BUILDDIR}"
-
- # bug 637066
- filter-flags -Wall -Wreturn-type
-
- emake -k check
-}
-
-src_install() {
- local x d
-
- cd "${MY_BUILDDIR}"
- # see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
- use static-libs || find "${ED}" -name '*.la' -delete
-
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
- for d in ../* ; do
- [[ ${d} == ../${PV} ]] && continue
- mv ${d}/* . || die
- rmdir ${d} || die
- done
-
- # Now we collect everything intp the proper SLOT-ed dirs
- # When something is built to cross-compile, it installs into
- # /usr/$CHOST/ by default ... we have to 'fix' that :)
- if is_cross ; then
- cd "${ED}"/${BINPATH}
- for x in * ; do
- mv ${x} ${x/${CTARGET}-}
- done
-
- if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
- mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
- mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/usr/${CHOST}/{include,lib}
- fi
- fi
- insinto ${INCPATH}
- local libiberty_headers=(
- # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
- demangle.h
- dyn-string.h
- fibheap.h
- hashtab.h
- libiberty.h
- objalloc.h
- splay-tree.h
- )
- doins "${libiberty_headers[@]/#/${S}/include/}"
- if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/${LIBPATH}/lib
- fi
-
- # Generate an env.d entry for this binutils
- insinto /etc/env.d/binutils
- cat <<-EOF > "${T}"/env.d
- TARGET="${CTARGET}"
- VER="${PV}"
- LIBPATH="${EPREFIX}${LIBPATH}"
- EOF
- newins "${T}"/env.d ${CTARGET}-${PV}
-
- # Handle documentation
- if ! is_cross ; then
- cd "${S}"
- dodoc README
- docinto bfd
- dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
- docinto binutils
- dodoc binutils/ChangeLog binutils/NEWS binutils/README
- docinto gas
- dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
- docinto gprof
- dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
- docinto ld
- dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
- docinto libiberty
- dodoc libiberty/ChangeLog* libiberty/README
- docinto opcodes
- dodoc opcodes/ChangeLog*
- fi
-
- # Remove shared info pages
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
-
- # Trim all empty dirs
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
-}
-
-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.38-r2.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild
index b4b21afc9d2..401310d2e92 100644
--- a/sys-devel/binutils/binutils-2.38-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.38-r2.ebuild
@@ -3,12 +3,12 @@
EAPI=7
-inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -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,7 +52,6 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
- emacs? ( >=app-editors/emacs-23.1:* )
"
DEPEND="${RDEPEND}"
BDEPEND="
@@ -63,7 +62,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -312,8 +311,6 @@ src_compile() {
emake V=1 info
fi
- ! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
-
# 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
@@ -406,11 +403,6 @@ src_install() {
dodoc opcodes/ChangeLog*
fi
- if ! is_cross && use emacs ; then
- elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
- elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
- fi
-
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
@@ -422,8 +414,6 @@ 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}
-
- ! is_cross && use emacs && elisp-site-regen
}
pkg_postrm() {
@@ -447,8 +437,6 @@ pkg_postrm() {
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
-
- ! is_cross && use emacs && elisp-site-regen
}
# Note [slotting support]
diff --git a/sys-devel/binutils/binutils-2.39.ebuild b/sys-devel/binutils/binutils-2.39-r4.ebuild
index 22183040ab3..8a51b198d22 100644
--- a/sys-devel/binutils/binutils-2.39.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r4.ebuild
@@ -3,12 +3,13 @@
EAPI=7
-inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc emacs gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -19,7 +20,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=3
+PATCH_VER=5
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -32,9 +33,7 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- # live ebuild
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- KEYWORDS="~loong"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
#
@@ -54,7 +53,6 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
- emacs? ( >=app-editors/emacs-23.1:* )
"
DEPEND="${RDEPEND}"
BDEPEND="
@@ -65,7 +63,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -250,13 +248,13 @@ src_configure() {
# Available from 2.35 on
--enable-textrel-check=warning
- # Available from 2.39 on
- --enable-warn-execstack
- --enable-warn-rwx-segments
- # TODO: Available from 2.39+ on but let's try the warning on for a bit
- # first... (--enable-warn-execstack)
- # Could put it under USE=hardened?
- #--disable-default-execstack
+ # 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
@@ -278,14 +276,25 @@ 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
+ # 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
@@ -317,8 +326,6 @@ src_compile() {
emake V=1 info
fi
- ! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
-
# 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
@@ -420,11 +427,6 @@ src_install() {
dodoc opcodes/ChangeLog*
fi
- if ! is_cross && use emacs ; then
- elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
- elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
- fi
-
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
@@ -436,8 +438,6 @@ 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}
-
- ! is_cross && use emacs && elisp-site-regen
}
pkg_postrm() {
@@ -461,8 +461,6 @@ pkg_postrm() {
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
-
- ! is_cross && use emacs && elisp-site-regen
}
# Note [slotting support]
diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
index c2ab796642a..7897167274e 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -3,12 +3,13 @@
EAPI=7
-inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
+
LICENSE="GPL-3+"
-IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -32,7 +33,6 @@ 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)
- # live ebuild
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
@@ -53,7 +53,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
- emacs? ( >=app-editors/emacs-23.1:* )
+ zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}"
BDEPEND="
@@ -64,7 +64,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
- virtual/yacc
+ app-alternatives/yacc
"
RESTRICT="!test? ( test )"
@@ -249,13 +249,13 @@ src_configure() {
# Available from 2.35 on
--enable-textrel-check=warning
- # Available from 2.39 on
- --enable-warn-execstack
- --enable-warn-rwx-segments
- # TODO: Available from 2.39+ on but let's try the warning on for a bit
- # first... (--enable-warn-execstack)
- # Could put it under USE=hardened?
- #--disable-default-execstack
+ # 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
@@ -268,6 +268,8 @@ src_configure() {
--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.
@@ -277,14 +279,25 @@ 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
+ # 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
@@ -316,8 +329,6 @@ src_compile() {
emake V=1 info
fi
- ! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
-
# 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
@@ -419,11 +430,6 @@ src_install() {
dodoc opcodes/ChangeLog*
fi
- if ! is_cross && use emacs ; then
- elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
- elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
- fi
-
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
@@ -435,8 +441,6 @@ 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}
-
- ! is_cross && use emacs && elisp-site-regen
}
pkg_postrm() {
@@ -460,8 +464,6 @@ pkg_postrm() {
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
-
- ! is_cross && use emacs && elisp-site-regen
}
# Note [slotting support]
diff --git a/sys-devel/binutils/files/50binutils-gentoo.el b/sys-devel/binutils/files/50binutils-gentoo.el
deleted file mode 100644
index 7caa9f19a37..00000000000
--- a/sys-devel/binutils/files/50binutils-gentoo.el
+++ /dev/null
@@ -1,3 +0,0 @@
-(add-to-list 'load-path "@SITELISP@")
-(autoload 'dwarf-browse "dwarf-mode"
- "Invoke `objdump' and put output into a `dwarf-mode' buffer." t)
diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
index e05bf0bdd55..9b80e61912f 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -9,6 +9,7 @@
<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
<flag name="gold">Build ld.gold linker</flag>
+ <flag name="gprofng">Enable the next-generation gprofng profiler</flag>
<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
<flag name="plugins">Enable plugin support in tools</flag>
<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
diff --git a/sys-devel/bison/bison-3.8.2-r2.ebuild b/sys-devel/bison/bison-3.8.2-r2.ebuild
new file mode 100644
index 00000000000..ab5bfac28f0
--- /dev/null
+++ b/sys-devel/bison/bison-3.8.2-r2.ebuild
@@ -0,0 +1,93 @@
+# 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/bison.asc
+inherit flag-o-matic verify-sig
+
+DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
+HOMEPAGE="https://www.gnu.org/software/bison/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
+
+LICENSE="GPL-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"
+IUSE="examples nls static test"
+RESTRICT="!test? ( test )"
+
+# gettext _IS_ required in RDEPEND because >=bison-3.7 links against
+# libtextstyle.so!!! (see bug #740754)
+DEPEND="
+ >=sys-devel/m4-1.4.16
+ >=sys-devel/gettext-0.21
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ sys-devel/flex
+ test? ( dev-lang/perl )
+ verify-sig? ( sec-keys/openpgp-keys-bison )
+"
+PDEPEND="app-alternatives/yacc"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release
+
+src_prepare() {
+ # Old logic when we needed to patch configure.ac
+ # Keeping in case it's useful for future
+
+ # Record date to avoid 'config.status --recheck' & regen of 'tests/package.m4'
+ #touch -r configure.ac old.configure.ac || die
+ #touch -r configure old.configure || die
+
+ #eapply "${WORKDIR}"/patches
+ #default
+
+ # Restore date after patching
+ #touch -r old.configure.ac configure.ac || die
+ #touch -r old.configure configure || die
+
+ # The makefiles make the man page depend on the configure script
+ # which we patched above. Touch it to prevent regeneration.
+ #touch doc/bison.1 || die #548778 #538300#9
+
+ default
+
+ # Avoid regenerating the info page when the timezone is diff. #574492
+ sed -i '2iexport TZ=UTC' build-aux/mdate-sh || die
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ local myeconfargs=(
+ $(use_enable nls)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ # These are owned by app-alternatives/yacc
+ mv "${ED}"/usr/bin/yacc{,.bison} || die
+ mv "${ED}"/usr/share/man/man1/yacc{,.bison}.1 || die
+
+ # We do not need liby.a
+ rm -r "${ED}"/usr/lib* || die
+
+ # Examples are about 200K, so let's make them optional still for now.
+ if ! use examples ; then
+ rm -r "${ED}"/usr/share/doc/${PF}/examples/ || die
+ fi
+}
+
+pkg_postinst() {
+ # ensure to preserve the symlinks before app-alternatives/yacc
+ # is installed
+ if [[ ! -h ${EROOT}/usr/bin/yacc ]]; then
+ ln -s yacc.bison "${EROOT}/usr/bin/yacc" || die
+ fi
+}
diff --git a/sys-devel/bison/metadata.xml b/sys-devel/bison/metadata.xml
index 5ed43596bb0..2e9f3654b40 100644
--- a/sys-devel/bison/metadata.xml
+++ b/sys-devel/bison/metadata.xml
@@ -6,6 +6,7 @@
<name>Gentoo Base System</name>
</maintainer>
<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:bison</remote-id>
<remote-id type="github">akimd/bison</remote-id>
</upstream>
</pkgmetadata>
diff --git a/sys-devel/bmake/Manifest b/sys-devel/bmake/Manifest
index 70be4886401..85371986c29 100644
--- a/sys-devel/bmake/Manifest
+++ b/sys-devel/bmake/Manifest
@@ -1,4 +1,4 @@
-DIST bmake-20220418.tar.gz 805986 BLAKE2B 6569956d81a9c67cc95756831ec086b392af69cb2b068f11d3beb237ca3f62059b9102695f28aa4093b589af52c512545bd86d91a410d681f3835a99b8270f6f SHA512 89fa5cb6e35ee1cd6a32acf291bda33b3a7272c4ef25d38412b8caa7e092210c8fa04a11d19d3c19b7e60dee2cf0a5049cf393be6e25b6e28bab2eea50e03204
-DIST bmake-20220612.tar.gz 810914 BLAKE2B afb7691bdffe799e629f856ba61226cd93217890ef10e2803d6dda28e16439f2a3583d98964700858dfabdf38d62a1ad06eefaa49570e45fccb9bcddac3fb68b SHA512 c7b352ca44c30c107bcae544125989dcea9cb32ea296f875ed84313bb72633366191b86f30c38fe733fb27bf91a040a063059070efefa774089af5694af2bc3f
-DIST bmake-20220726.tar.gz 812288 BLAKE2B 272964d54146c40fefbfa3f80b32c201a10d9bcf1e24fdb863b62c620208e680267eb7736e404c7521b1399bbbc5758f908179ca24543318975424e0f40914a2 SHA512 35480ae9580b3f356d7bc4c5f007dcf76090aad619b6432aad3d397b921993aa2b5943a2b3dee6617a75868197d5b28957012a8580d4103a6bf9d6195b80e141
+DIST bmake-20220901.tar.gz 816362 BLAKE2B f2faf7ee44a83ba340a9682756e8ba3371ce2c6b4712331b666e01b00a483ae79f68b34ae62325ef55eea0ea42d0c23e1e654100913b65ecd607a78cc2cfa1ae SHA512 af8ee6ef896b76c14f63d24eaadd01e87abf2b12db69f334d29c811d69d1479f899d5aa0aadf2e6e87659175d64066bb90f2056b649141fcad20eac7d6057019
+DIST bmake-20220924.tar.gz 820164 BLAKE2B 5f74403ec68d9512ed74972b74219aa647b4c0ea855bd80fbf251f40a785c02f807c5cac0c7704469d343e43c5b84c395d3c1aab8ea3c8695314f016f1fa57c7 SHA512 85fa9e05a6020e7b41ef6af4b5a8f87f1f98651e264ba8cedacacf3b7d1dfbed3f66bb9934c252f71299aea6ac1190b03a9de0c60a833e8ac91ec854cd819f7b
+DIST bmake-20220928.tar.gz 821224 BLAKE2B 9b377a9a8d329d229aae37fd852a68629edb78f7f0f16bf8aeb59df4da886fe89d8b7defd8294fa49fca397d4726e704eb9c95936561fe8a3a0a1fdfe4e5b861 SHA512 13fde6517d79080c5a548b1e47e4fbf00d54752f48b40d10542926b26a3be22da70877ca2b977b43366ec1b632a76a6974c78155c39895910e01e4142e7675a0
DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b
diff --git a/sys-devel/bmake/bmake-20220418.ebuild b/sys-devel/bmake/bmake-20220901.ebuild
index 7e0fdf7ced7..7e0fdf7ced7 100644
--- a/sys-devel/bmake/bmake-20220418.ebuild
+++ b/sys-devel/bmake/bmake-20220901.ebuild
diff --git a/sys-devel/bmake/bmake-20220726.ebuild b/sys-devel/bmake/bmake-20220924.ebuild
index 5505e007c65..2a19a8be21d 100644
--- a/sys-devel/bmake/bmake-20220726.ebuild
+++ b/sys-devel/bmake/bmake-20220924.ebuild
@@ -14,7 +14,7 @@ S="${WORKDIR}/${PN}"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
# Skip failing test (sandbox and csh)
PATCHES=(
diff --git a/sys-devel/bmake/bmake-20220612.ebuild b/sys-devel/bmake/bmake-20220928.ebuild
index 5505e007c65..2015f0528d5 100644
--- a/sys-devel/bmake/bmake-20220612.ebuild
+++ b/sys-devel/bmake/bmake-20220928.ebuild
@@ -14,12 +14,11 @@ S="${WORKDIR}/${PN}"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="~amd64 ~loong ~ppc ~ppc64 ~x86"
# Skip failing test (sandbox and csh)
PATCHES=(
"${FILESDIR}"/${PN}-20210206-tests.patch
- "${FILESDIR}"/${PN}-20220418-warnings.patch
)
src_prepare() {
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index 0baa75d11b4..37c1ced9405 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -1,5 +1,9 @@
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.0rc2.src.tar.xz 112110968 BLAKE2B 98c3769f17f1958fbec771409eef781f5ca845363656c70fe5cd20bca1b8471e7a8773a7d4e395700c297a5f3f208fe1303cf18e2a73b45388b782fb7484106b SHA512 eee1bee1f83cc468fb4bb6839acbd5c1618dc35f35e51cd078288b91bad95d52edaadd05c88f2d72d51c1c338ba08b3346c070a28693b1224639eb7a1ef4a4d9
-DIST llvm-project-15.0.0rc2.src.tar.xz.sig 438 BLAKE2B 09f260b30724b41b27ef621929c086fd6c13bde51c4adb880897b549b2d336682f617faf3dd636ceb795e329b664972cf50745ab49f84e7540658d53074510da SHA512 9f695a309fbb15026dc133eb17d33abd26831eb036fad79dd8df37d4f4d9eeae1ca463acd037d2a1882bc2cff763e4bda507d1d827d845613bfd62d0f9fbd4ca
+DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6cc574a31c4abe038331b86206348ac3ce93a243add2be3a0bbfc2ec5ec3f3562a5b5efea745cb1943c9c9153bc7b0fcf4de22e SHA512 cf2a89ebb6bc9d7e3f1fd09531c84ac9927cdbe5ee13a6fcb8ce4d08e5a9d6d480ad982f62126b9c757beafa283b34f2ba1fbc56223c641e70da2be4627f59a6
+DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
+DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
+DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-959c9cc7acf4d0aa433f2436e2a45b782e18022a.tar.gz 171575300 BLAKE2B 090d41a8913f8e061d297e66ca653d95e18b8da744464d7085d7a199c0a444753a82b6ff6503e142aec81be01b419323cdbe3709497738df74afa886d69fd63d SHA512 fc3b26e148ead7a07b4d1509909a42712a43b179da435b052c26a237b0d2ae88c3c8d76eaa93c415be1ed0f0b5fb55e0ad92f427a18d70bc9634a6e7d1b6a4d9
+DIST llvm-project-e99edb92356b5ba078b5bc4d5846770414586a1d.tar.gz 171822327 BLAKE2B cdaa704c9f238f34751b92df92f8a767b1204f868dfd8a6f1eb3eeacaaf9c4b63c55a7c0534af124fddb65cf80263f72b79190696c8077e2990984a84a040f2a SHA512 37f45a56d6086df60c9832b75da3b2d78b8ec0fe094f07d41695f0565e4de0c13e460b1fef495864f07300d41f5b32769f0862b0fa5d53c0db9a0ccec1a09072
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
diff --git a/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild
deleted file mode 100644
index 1285500128b..00000000000
--- a/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-
-PDEPEND="
- sys-devel/clang:*
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-15.0.0_rc2.ebuild b/sys-devel/clang-common/clang-common-15.0.0_rc2.ebuild
deleted file mode 100644
index 1285500128b..00000000000
--- a/sys-devel/clang-common/clang-common-15.0.0_rc2.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-
-PDEPEND="
- sys-devel/clang:*
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-}
diff --git a/sys-devel/clang-common/clang-common-15.0.5.ebuild b/sys-devel/clang-common/clang-common-15.0.5.ebuild
new file mode 100644
index 00000000000..2fdf615be81
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-15.0.5.ebuild
@@ -0,0 +1,126 @@
+# 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"
+IUSE="
+ default-compiler-rt default-libcxx default-lld llvm-libunwind
+ 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
+ EOF
+
+ if use stricter; then
+ newins - gentoo-stricter.cfg <<-EOF
+ # This file increases the strictness of older clang versions
+ # to match the newest upstream version.
+
+ # clang-16 defaults
+ -Werror=implicit-function-declaration
+ -Werror=implicit-int
+ -Werror=incompatible-function-pointer-types
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ @gentoo-stricter.cfg
+ EOF
+ fi
+
+ local tool
+ for tool in clang{,++,-cpp}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ EOF
+ done
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-15.0.6.9999.ebuild b/sys-devel/clang-common/clang-common-15.0.6.9999.ebuild
new file mode 100644
index 00000000000..3e43f51a0aa
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-15.0.6.9999.ebuild
@@ -0,0 +1,126 @@
+# 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=""
+IUSE="
+ default-compiler-rt default-libcxx default-lld llvm-libunwind
+ 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
+ EOF
+
+ if use stricter; then
+ newins - gentoo-stricter.cfg <<-EOF
+ # This file increases the strictness of older clang versions
+ # to match the newest upstream version.
+
+ # clang-16 defaults
+ -Werror=implicit-function-declaration
+ -Werror=implicit-int
+ -Werror=incompatible-function-pointer-types
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ @gentoo-stricter.cfg
+ EOF
+ fi
+
+ local tool
+ for tool in clang{,++,-cpp}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ EOF
+ done
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-15.0.6.ebuild b/sys-devel/clang-common/clang-common-15.0.6.ebuild
new file mode 100644
index 00000000000..f7293fd3cb2
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-15.0.6.ebuild
@@ -0,0 +1,126 @@
+# 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"
+IUSE="
+ default-compiler-rt default-libcxx default-lld llvm-libunwind
+ 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
+ EOF
+
+ if use stricter; then
+ newins - gentoo-stricter.cfg <<-EOF
+ # This file increases the strictness of older clang versions
+ # to match the newest upstream version.
+
+ # clang-16 defaults
+ -Werror=implicit-function-declaration
+ -Werror=implicit-int
+ -Werror=incompatible-function-pointer-types
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ @gentoo-stricter.cfg
+ EOF
+ fi
+
+ local tool
+ for tool in clang{,++,-cpp}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ EOF
+ done
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
index 1285500128b..e9669ee1adc 100644
--- a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
@@ -11,14 +11,122 @@ 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
+ 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
+ EOF
+
+ 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_pre20221126.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20221126.ebuild
new file mode 100644
index 00000000000..0df5a88a9a0
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221126.ebuild
@@ -0,0 +1,132 @@
+# 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="~loong"
+IUSE="
+ default-compiler-rt default-libcxx default-lld llvm-libunwind
+ 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
+ EOF
+
+ 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_pre20221205.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20221205.ebuild
new file mode 100644
index 00000000000..e9669ee1adc
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221205.ebuild
@@ -0,0 +1,132 @@
+# 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=""
+IUSE="
+ default-compiler-rt default-libcxx default-lld llvm-libunwind
+ 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
+ EOF
+
+ 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/metadata.xml b/sys-devel/clang-common/metadata.xml
index 072910296ca..7ea033c083c 100644
--- a/sys-devel/clang-common/metadata.xml
+++ b/sys-devel/clang-common/metadata.xml
@@ -7,4 +7,10 @@
<upstream>
<remote-id type="github">llvm/llvm-project</remote-id>
</upstream>
+ <use>
+ <flag name="default-compiler-rt">Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang</flag>
+ <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag>
+ <flag name="default-lld">Use lld as the default linker for clang</flag>
+ <flag name="stricter">Default to stricter behavior known from newer clang versions, turning more warnings into errors</flag>
+ </use>
</pkgmetadata>
diff --git a/sys-devel/clang-runtime/clang-runtime-15.0.0_rc2.ebuild b/sys-devel/clang-runtime/clang-runtime-15.0.5.ebuild
index e4ff9326ddc..98591e0cd33 100644
--- a/sys-devel/clang-runtime/clang-runtime-15.0.0_rc2.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-15.0.5.ebuild
@@ -10,10 +10,9 @@ HOMEPAGE="https://clang.llvm.org/"
LICENSE="metapackage"
SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
IUSE="+compiler-rt libcxx openmp +sanitize"
REQUIRED_USE="sanitize? ( compiler-rt )"
-PROPERTIES="live"
RDEPEND="
compiler-rt? (
diff --git a/sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-15.0.6.9999.ebuild
index e4ff9326ddc..e4ff9326ddc 100644
--- a/sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-15.0.6.9999.ebuild
diff --git a/sys-devel/clang-runtime/clang-runtime-15.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-15.0.6.ebuild
new file mode 100644
index 00000000000..f0ec9851054
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-15.0.6.ebuild
@@ -0,0 +1,26 @@
+# 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.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.0.9999.ebuild
index e4ff9326ddc..5eda72abae3 100644
--- a/sys-devel/clang-runtime/clang-runtime-16.0.0.9999.ebuild
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.0.9999.ebuild
@@ -3,13 +3,13 @@
EAPI=8
-inherit multilib-build
+inherit multilib-build toolchain-funcs
DESCRIPTION="Meta-ebuild for clang runtime libraries"
HOMEPAGE="https://clang.llvm.org/"
LICENSE="metapackage"
-SLOT="$(ver_cut 1-3)"
+SLOT="${PV%%.*}"
KEYWORDS=""
IUSE="+compiler-rt libcxx openmp +sanitize"
REQUIRED_USE="sanitize? ( compiler-rt )"
@@ -25,3 +25,17 @@ RDEPEND="
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_pre20221126.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20221126.ebuild
new file mode 100644
index 00000000000..b20d7b8fec8
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20221126.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 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="~loong"
+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_pre20221205.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20221205.ebuild
new file mode 100644
index 00000000000..5eda72abae3
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20221205.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2022 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-toolchain-symlinks/clang-toolchain-symlinks-14-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-14-r2.ebuild
new file mode 100644
index 00000000000..e8399381397
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-14-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2022 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"
+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
+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-15-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild
new file mode 100644
index 00000000000..f47d83a2cde
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2022 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"
+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
+RDEPEND="
+ !<sys-devel/gcc-config-2.6
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local tools=()
+
+ if use native-symlinks; then
+ tools+=(
+ cc:clang
+ cpp:clang-cpp
+ c++:clang++
+ )
+ fi
+ if use gcc-symlinks; then
+ tools+=(
+ gcc:clang
+ g++:clang++
+ )
+ fi
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${t%:*}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+ done
+ done
+}
diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
new file mode 100644
index 00000000000..574b2739f3a
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~loong"
+IUSE="gcc-symlinks multilib-symlinks +native-symlinks"
+
+# Blocker for bug #872416
+RDEPEND="
+ !<sys-devel/gcc-config-2.6
+ sys-devel/clang:${SLOT}
+"
+
+src_install() {
+ local tools=()
+
+ if use native-symlinks; then
+ tools+=(
+ cc:clang
+ cpp:clang-cpp
+ c++:clang++
+ )
+ fi
+ if use gcc-symlinks; then
+ tools+=(
+ gcc:clang
+ g++:clang++
+ )
+ fi
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${t%:*}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "${t#*:}" "${dest}/${chost}-${t%:*}"
+ done
+ done
+}
diff --git a/sys-devel/clang-toolchain-symlinks/metadata.xml b/sys-devel/clang-toolchain-symlinks/metadata.xml
new file mode 100644
index 00000000000..bf4e9fc6a6c
--- /dev/null
+++ b/sys-devel/clang-toolchain-symlinks/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="gcc-symlinks">
+ Install symlinks for 'gcc' and 'g++' for extra
+ compatibility.
+ </flag>
+ <flag name="multilib-symlinks">
+ Install symlinks for all ABI CHOSTs. Note that this can
+ result in gcc being overrode for native builds, as well
+ as conflict with crossdev if used for the same targets.
+ </flag>
+ <flag name="native-symlinks">
+ Install generic tool symlinks like 'cc' and 'c++',
+ as well as ${CTARGET}-*. These symlinks are installed
+ into slotted LLVM bindir, so they should not take precedence
+ over symlinks installed into /usr/bin
+ by <pkg>sys-devel/gcc-config</pkg> but they can be helpful
+ for GCC-free setups.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index f69812dabd8..c50bb6ffbbd 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -1,11 +1,19 @@
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.5-manpages.tar.bz2 225568 BLAKE2B d6257b7296b9be118e0729b384331af200cd00eec3228e053f5ae791ef08b632b40723cd30b0ddb229c9c7ca86c1c59f953862b87129f6cd79a9cf2df8f3be9c SHA512 e524b9c0f3c09e0d9b436ec201d0123534d03da55a97fd762ce772c58bdac796a0e70d92dba2e7462ee0a4afc7f4f7e0423f10e4cfd41c801655ec4a5f05b14b
+DIST llvm-15.0.6-manpages.tar.bz2 229125 BLAKE2B 926c31b02e295fb2a58056fd75cd04017edcb9b01d23316f002e7d3a00ef77e84d6f04bf8387f1fe9a1d159c7d271248766d3205e747c4e9542bf93f209300da SHA512 94225b46013fab113ecdbe7c150dbb989eae2007c4ed338014fbff7e6e1dd7340eec58c560f22ac1b04df8e14678b33b372c9afd06c10943f099b1a7bb63a048
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.0-rc2.tar.xz 5768 BLAKE2B 03822c4dfbe3157d9131a3524beeda22fbc6adc937af052fd0fbcc23fb6ea86e1a5e015c316b53019820de5b81b1b065bfcbc31608598307f03af39f215fb12e SHA512 b9d7adb9b738a565c2142360c5ff7a7aa8405ce78af8767867203dd003e5bdb2b8a7f14179fdb7dc0c5cdc696cfff55c4886cfcd0894672284b453943e4e7269
-DIST llvm-gentoo-patchset-9999-r3.tar.xz 4076 BLAKE2B 30bdf740606a1718ae45d850803385d425b656fbbe0250f587cad54f55272e3617d5ee0d04f534a58f87408b0a2dea322ebf1bb8cd653a2beba21d0bc5778c62 SHA512 2c7080ffd09d7dcf4c72a97044a5c63ab895250721d60270bc51c2095aef5f9039781892b4c0d14e942611686153f874a1f52a1c854bb8ca093383c08bdc005a
+DIST llvm-gentoo-patchset-15.0.2-r100.tar.xz 15916 BLAKE2B c48afb18c706292d55e028aae2be8f1bc7035ff527ca4f0b32c47d38cbf3022730cc21ca67f921c53d8535fc04c51fdaf63a4810a2c6b519fa33c08116259f30 SHA512 1051a0b2674d2b74c4ac75b734dbaba53507577ce6bd150b0f241b39c9a60b3bd4c420a90dddeee675005633714e5d634684eef22e43fc87e28c1d8c9229e5ee
+DIST llvm-gentoo-patchset-15.0.5.tar.xz 15912 BLAKE2B be6da35631073099cdce66746a318080999f7dace4b07470b0a5d0a9ce93f68e51b06d7ddc174b98a47677a0ec30fb17fd9cfcaffd4e6055d8b5f70084c2262b SHA512 708f49129a5ec48f2fa26d50573734e13888e3e10d09ed24f728b687294b31b5f30773ac1e74890e3b73539c057911611dc91791e2cb18cc0a11e8271ac4e990
+DIST llvm-gentoo-patchset-15.0.6.tar.xz 15888 BLAKE2B a3d02ad1b3e17b951252963accde21f9bdd430e0fc084a5c6cd6419d403a2712d06a02cb8402a098baae794d766faffa0da89cf2797957044c5145a2a6f2bab9 SHA512 e4252b5856885a2aa78c607cb3bd874eb9a8c9d3d03646091a71fbb6d2584bd29cf9d2fb7c381e52be0b665fbd258ae46137ff8b238b8b906d3950042fb73fe5
+DIST llvm-gentoo-patchset-9999-r4.tar.xz 4120 BLAKE2B 0d45763a36b711e336bf1e36c361c68df5d679837e0b1cb1f9cc26bb52bf769f3c6683f56a01a7ea2bddcbf044a883ea504360a2414ad8dab1f696b8bdd61bfa SHA512 a02b08faf2fa59302161e7ac8f129592fde2e6c6ad5b273c948fa0d68e6a76f14fecc2850cec43f9a9505d483066240eaa3787c77e6bf75bbaa2c4dcacda2d16
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.0rc2.src.tar.xz 112110968 BLAKE2B 98c3769f17f1958fbec771409eef781f5ca845363656c70fe5cd20bca1b8471e7a8773a7d4e395700c297a5f3f208fe1303cf18e2a73b45388b782fb7484106b SHA512 eee1bee1f83cc468fb4bb6839acbd5c1618dc35f35e51cd078288b91bad95d52edaadd05c88f2d72d51c1c338ba08b3346c070a28693b1224639eb7a1ef4a4d9
-DIST llvm-project-15.0.0rc2.src.tar.xz.sig 438 BLAKE2B 09f260b30724b41b27ef621929c086fd6c13bde51c4adb880897b549b2d336682f617faf3dd636ceb795e329b664972cf50745ab49f84e7540658d53074510da SHA512 9f695a309fbb15026dc133eb17d33abd26831eb036fad79dd8df37d4f4d9eeae1ca463acd037d2a1882bc2cff763e4bda507d1d827d845613bfd62d0f9fbd4ca
+DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6cc574a31c4abe038331b86206348ac3ce93a243add2be3a0bbfc2ec5ec3f3562a5b5efea745cb1943c9c9153bc7b0fcf4de22e SHA512 cf2a89ebb6bc9d7e3f1fd09531c84ac9927cdbe5ee13a6fcb8ce4d08e5a9d6d480ad982f62126b9c757beafa283b34f2ba1fbc56223c641e70da2be4627f59a6
+DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
+DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
+DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-959c9cc7acf4d0aa433f2436e2a45b782e18022a.tar.gz 171575300 BLAKE2B 090d41a8913f8e061d297e66ca653d95e18b8da744464d7085d7a199c0a444753a82b6ff6503e142aec81be01b419323cdbe3709497738df74afa886d69fd63d SHA512 fc3b26e148ead7a07b4d1509909a42712a43b179da435b052c26a237b0d2ae88c3c8d76eaa93c415be1ed0f0b5fb55e0ad92f427a18d70bc9634a6e7d1b6a4d9
+DIST llvm-project-e99edb92356b5ba078b5bc4d5846770414586a1d.tar.gz 171822327 BLAKE2B cdaa704c9f238f34751b92df92f8a767b1204f868dfd8a6f1eb3eeacaaf9c4b63c55a7c0534af124fddb65cf80263f72b79190696c8077e2990984a84a040f2a SHA512 37f45a56d6086df60c9832b75da3b2d78b8ec0fe094f07d41695f0565e4de0c13e460b1fef495864f07300d41f5b32769f0862b0fa5d53c0db9a0ccec1a09072
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
diff --git a/sys-devel/clang/clang-15.0.0_rc2.ebuild b/sys-devel/clang/clang-15.0.5.ebuild
index dd82d65a5ac..e90165ee18e 100644
--- a/sys-devel/clang/clang-15.0.0_rc2.ebuild
+++ b/sys-devel/clang/clang-15.0.5.ebuild
@@ -14,17 +14,14 @@ HOMEPAGE="https://llvm.org/"
# sorttable.js: MIT
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
-KEYWORDS=""
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos"
+IUSE="debug doc +extra +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
static-analyzer? ( dev-lang/perl:* )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
"
@@ -32,6 +29,7 @@ DEPEND="
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
+ >=sys-devel/clang-common-${PV}
"
BDEPEND="
${PYTHON_DEPS}
@@ -43,15 +41,8 @@ BDEPEND="
xml? ( virtual/pkgconfig )
"
PDEPEND="
- sys-devel/clang-common
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
"
LLVM_COMPONENTS=(
@@ -80,7 +71,7 @@ llvm.org_set_globals
# multilib clang* libraries (not runtime, not wrappers).
pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-single-r1_pkg_setup
}
@@ -203,42 +194,43 @@ get_distribution_components() {
clang-offload-bundler
clang-offload-packager
clang-offload-wrapper
- clang-pseudo
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
+ if use extra; then
out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
)
fi
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
use static-analyzer && out+=(
clang-check
@@ -253,15 +245,12 @@ get_distribution_components() {
}
multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
# relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_VERSION}"
-DBUILD_SHARED_LIBS=OFF
-DCLANG_LINK_CLANG_DYLIB=ON
@@ -282,12 +271,7 @@ multilib_src_configure() {
# disable using CUDA to autodetect GPU, just build for all
-DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
@@ -308,13 +292,21 @@ multilib_src_configure() {
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
fi
mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
)
else
@@ -362,9 +354,14 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
}
src_install() {
@@ -377,14 +374,12 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
# Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
local clang_tools=( clang clang++ clang-cl clang-cpp )
local abi i
@@ -398,19 +393,19 @@ src_install() {
# - clang, clang++, clang-cl, clang-cpp -> clang*-X
# also in CHOST variant
for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
done
# now create target symlinks for all supported ABIs
for abi in $(get_all_abis); do
local abi_chost=$(get_abi_CHOST "${abi}")
for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
done
done
}
@@ -421,9 +416,9 @@ multilib_src_install() {
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
# don't wrap clang-tidy headers, the list is too long
# (they're fine for non-native ABI but enabling the targets is problematic)
mv "${ED}"/usr/include/clang-tidy "${T}/" || die
@@ -433,15 +428,15 @@ multilib_src_install() {
multilib_src_install_all() {
python_fix_shebang "${ED}"
if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
fi
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
# match 'html' non-compression
use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
# +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
}
pkg_postinst() {
@@ -450,10 +445,12 @@ pkg_postinst() {
fi
elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
}
pkg_postrm() {
diff --git a/sys-devel/clang/clang-15.0.0.9999.ebuild b/sys-devel/clang/clang-15.0.6.9999.ebuild
index ce8bd9ade18..21dce8cc37d 100644
--- a/sys-devel/clang/clang-15.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-15.0.6.9999.ebuild
@@ -14,17 +14,14 @@ HOMEPAGE="https://llvm.org/"
# sorttable.js: MIT
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
+IUSE="debug doc +extra +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
static-analyzer? ( dev-lang/perl:* )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
"
@@ -32,6 +29,7 @@ DEPEND="
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
+ >=sys-devel/clang-common-${PV}
"
BDEPEND="
${PYTHON_DEPS}
@@ -43,15 +41,8 @@ BDEPEND="
xml? ( virtual/pkgconfig )
"
PDEPEND="
- sys-devel/clang-common
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
"
LLVM_COMPONENTS=(
@@ -64,7 +55,7 @@ LLVM_TEST_COMPONENTS=(
llvm/utils/{lit,llvm-lit,unittest}
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
)
-LLVM_PATCHSET=9999-r3
+LLVM_PATCHSET=15.0.2-r100
LLVM_USE_TARGETS=llvm
llvm.org_set_globals
@@ -80,7 +71,7 @@ llvm.org_set_globals
# multilib clang* libraries (not runtime, not wrappers).
pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-single-r1_pkg_setup
}
@@ -203,42 +194,43 @@ get_distribution_components() {
clang-offload-bundler
clang-offload-packager
clang-offload-wrapper
- clang-pseudo
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
+ if use extra; then
out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
)
fi
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
use static-analyzer && out+=(
clang-check
@@ -253,15 +245,12 @@ get_distribution_components() {
}
multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
# relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_VERSION}"
-DBUILD_SHARED_LIBS=OFF
-DCLANG_LINK_CLANG_DYLIB=ON
@@ -282,12 +271,7 @@ multilib_src_configure() {
# disable using CUDA to autodetect GPU, just build for all
-DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
@@ -308,13 +292,21 @@ multilib_src_configure() {
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
fi
mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
)
else
@@ -362,9 +354,14 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
}
src_install() {
@@ -377,14 +374,12 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
# Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
local clang_tools=( clang clang++ clang-cl clang-cpp )
local abi i
@@ -398,19 +393,19 @@ src_install() {
# - clang, clang++, clang-cl, clang-cpp -> clang*-X
# also in CHOST variant
for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
done
# now create target symlinks for all supported ABIs
for abi in $(get_all_abis); do
local abi_chost=$(get_abi_CHOST "${abi}")
for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
done
done
}
@@ -421,9 +416,9 @@ multilib_src_install() {
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
# don't wrap clang-tidy headers, the list is too long
# (they're fine for non-native ABI but enabling the targets is problematic)
mv "${ED}"/usr/include/clang-tidy "${T}/" || die
@@ -433,15 +428,15 @@ multilib_src_install() {
multilib_src_install_all() {
python_fix_shebang "${ED}"
if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
fi
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
# match 'html' non-compression
use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
# +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
}
pkg_postinst() {
@@ -450,10 +445,12 @@ pkg_postinst() {
fi
elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
}
pkg_postrm() {
diff --git a/sys-devel/clang/clang-15.0.6.ebuild b/sys-devel/clang/clang-15.0.6.ebuild
new file mode 100644
index 00000000000..45ec3a2786f
--- /dev/null
+++ b/sys-devel/clang/clang-15.0.6.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
+IUSE="debug doc +extra +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-toolchain-symlinks:${LLVM_MAJOR}
+ ~sys-devel/clang-runtime-${PV}
+"
+
+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/_/-}
+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
+}
+
+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-offload-wrapper
+ clang-refactor
+ clang-repl
+ clang-rename
+ clang-scan-deps
+ diagtool
+ hmaptool
+ )
+
+ if use extra; then
+ out+=(
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
+ )
+ fi
+
+ 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=(
+ -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_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
+
+ -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
+
+ -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"
+ -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
+ [[ -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
+ 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.9999.ebuild b/sys-devel/clang/clang-16.0.0.9999.ebuild
index ce8bd9ade18..93264b2ec92 100644
--- a/sys-devel/clang/clang-16.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-16.0.0.9999.ebuild
@@ -14,17 +14,14 @@ HOMEPAGE="https://llvm.org/"
# sorttable.js: MIT
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
-SLOT="$(ver_cut 1)"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
-IUSE="
- debug default-compiler-rt default-libcxx default-lld doc
- llvm-libunwind +pie +static-analyzer test xml
-"
+IUSE="debug doc +extra +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
static-analyzer? ( dev-lang/perl:* )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
"
@@ -32,6 +29,7 @@ DEPEND="
RDEPEND="
${PYTHON_DEPS}
${DEPEND}
+ >=sys-devel/clang-common-${PV}
"
BDEPEND="
${PYTHON_DEPS}
@@ -43,15 +41,8 @@ BDEPEND="
xml? ( virtual/pkgconfig )
"
PDEPEND="
- sys-devel/clang-common
~sys-devel/clang-runtime-${PV}
- default-compiler-rt? (
- =sys-libs/compiler-rt-${PV%_*}*
- llvm-libunwind? ( sys-libs/llvm-libunwind )
- !llvm-libunwind? ( sys-libs/libunwind )
- )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- default-lld? ( sys-devel/lld )
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
"
LLVM_COMPONENTS=(
@@ -61,10 +52,9 @@ LLVM_COMPONENTS=(
LLVM_MANPAGES=1
LLVM_TEST_COMPONENTS=(
llvm/lib/Testing/Support
- llvm/utils/{lit,llvm-lit,unittest}
- llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
+ llvm/utils
+ third-party
)
-LLVM_PATCHSET=9999-r3
LLVM_USE_TARGETS=llvm
llvm.org_set_globals
@@ -80,7 +70,7 @@ llvm.org_set_globals
# multilib clang* libraries (not runtime, not wrappers).
pkg_setup() {
- LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-single-r1_pkg_setup
}
@@ -202,43 +192,44 @@ get_distribution_components() {
clang-format
clang-offload-bundler
clang-offload-packager
- clang-offload-wrapper
- clang-pseudo
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
+ if use extra; then
out+=(
- # manpages
- docs-clang-man
- docs-clang-tools-man
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
)
fi
- use doc && out+=(
- docs-clang-html
- docs-clang-tools-html
- )
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
use static-analyzer && out+=(
clang-check
@@ -253,26 +244,19 @@ get_distribution_components() {
}
multilib_src_configure() {
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1-3 "${llvm_version}")
-
local mycmakeargs=(
- -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
# relative to bindir
- -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=OFF
-DCLANG_LINK_CLANG_DYLIB=ON
-DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- # these are not propagated reliably, so redefine them
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
# libgomp support fails to find headers without explicit -I
@@ -282,12 +266,7 @@ multilib_src_configure() {
# disable using CUDA to autodetect GPU, just build for all
-DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- # override default stdlib and rtlib
- -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
- -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
- -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "")
-DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
- -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "")
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
@@ -295,8 +274,7 @@ multilib_src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
+ -DLLVM_BUILD_TESTS=ON
-DLLVM_LIT_ARGS="$(get_lit_flags)"
)
@@ -308,13 +286,21 @@ multilib_src_configure() {
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
fi
mycmakeargs+=(
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
-DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
)
else
@@ -362,9 +348,14 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake_build check-clang
- multilib_is_native_abi &&
- cmake_build check-clang-tools check-clangd
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
}
src_install() {
@@ -377,14 +368,12 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
- mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
# Apply CHOST and version suffix to clang tools
- # note: we use two version components here (vs 3 in runtime path)
- local llvm_version=$(llvm-config --version) || die
- local clang_version=$(ver_cut 1 "${llvm_version}")
- local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
local clang_tools=( clang clang++ clang-cl clang-cpp )
local abi i
@@ -398,19 +387,19 @@ src_install() {
# - clang, clang++, clang-cl, clang-cpp -> clang*-X
# also in CHOST variant
for i in "${clang_tools[@]:1}"; do
- rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die
- dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
- dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
done
# now create target symlinks for all supported ABIs
for abi in $(get_all_abis); do
local abi_chost=$(get_abi_CHOST "${abi}")
for i in "${clang_tools[@]}"; do
- dosym "${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
- dosym "${abi_chost}-${i}-${clang_version}" \
- "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
done
done
}
@@ -421,9 +410,9 @@ multilib_src_install() {
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
- if multilib_is_native_abi; then
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
# don't wrap clang-tidy headers, the list is too long
# (they're fine for non-native ABI but enabling the targets is problematic)
mv "${ED}"/usr/include/clang-tidy "${T}/" || die
@@ -433,15 +422,15 @@ multilib_src_install() {
multilib_src_install_all() {
python_fix_shebang "${ED}"
if use static-analyzer; then
- python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
fi
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
# match 'html' non-compression
use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
# +x for some reason; TODO: investigate
- use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
}
pkg_postinst() {
@@ -450,10 +439,12 @@ pkg_postinst() {
fi
elog "You can find additional utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
- elog "Some of them are vim integration scripts (with instructions inside)."
- elog "The run-clang-tidy.py script requires the following additional package:"
- elog " dev-python/pyyaml"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
}
pkg_postrm() {
diff --git a/sys-devel/clang/clang-16.0.0_pre20221126.ebuild b/sys-devel/clang/clang-16.0.0_pre20221126.ebuild
new file mode 100644
index 00000000000..f1d4f03620a
--- /dev/null
+++ b/sys-devel/clang/clang-16.0.0_pre20221126.ebuild
@@ -0,0 +1,455 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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 +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_PATCHSET=9999-r4
+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
+}
+
+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
+ )
+
+ 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=(
+ -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}"
+ )
+ 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
+ [[ -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
+ 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_pre20221205.ebuild b/sys-devel/clang/clang-16.0.0_pre20221205.ebuild
new file mode 100644
index 00000000000..93264b2ec92
--- /dev/null
+++ b/sys-devel/clang/clang-16.0.0_pre20221205.ebuild
@@ -0,0 +1,454 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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=""
+IUSE="debug doc +extra +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
+}
+
+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
+ )
+
+ 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=(
+ -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}"
+ )
+ 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
+ [[ -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
+ 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/metadata.xml b/sys-devel/clang/metadata.xml
index 9eff0810e61..565650790b4 100644
--- a/sys-devel/clang/metadata.xml
+++ b/sys-devel/clang/metadata.xml
@@ -30,6 +30,7 @@ Conformance with C/C++/ObjC and their variants</longdescription>
<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="static-analyzer">Install the Clang static analyzer</flag>
</use>
<upstream>
diff --git a/sys-devel/cproc/Manifest b/sys-devel/cproc/Manifest
new file mode 100644
index 00000000000..3bb5cf1ed1d
--- /dev/null
+++ b/sys-devel/cproc/Manifest
@@ -0,0 +1 @@
+DIST cproc-6fabc79d81de56b6c1cdcc2242933fd792e2ddf9.tar.gz 80893 BLAKE2B f708649714f0fbc3e7b60dc87585603970eb350de4ce1f02fe9b5783714ef09fa38b4b4ec7a8b0553047e84edc0f752963c84df32dacd9585c435098e57be47c SHA512 355e3ca8fb481d9e32d0621787beee7b0e6f53f107bbb9512f89382c599daa581b89e7da3957c09b81a994ebce9f06df08df0833b010b055a8ff947c8cc8d02e
diff --git a/sys-devel/cproc/cproc-0_pre20220805.ebuild b/sys-devel/cproc/cproc-0_pre20220805.ebuild
new file mode 100644
index 00000000000..163ffe80afb
--- /dev/null
+++ b/sys-devel/cproc/cproc-0_pre20220805.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc"
+ inherit git-r3
+else
+ CPROC_COMMIT="6fabc79d81de56b6c1cdcc2242933fd792e2ddf9"
+ CPROC_P="${PN}-${CPROC_COMMIT}"
+ SRC_URI="https://git.sr.ht/~mcf/cproc/archive/${CPROC_COMMIT}.tar.gz -> ${CPROC_P}.tar.gz"
+ S="${WORKDIR}/${CPROC_P}"
+
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+DESCRIPTION="C11 compiler using QBE as backend"
+HOMEPAGE="https://sr.ht/~mcf/cproc/"
+
+LICENSE="ISC"
+SLOT="0"
+
+DEPEND="sys-devel/qbe"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+
+ rm -r "${S}/qbe" || die
+}
+
+src_configure() {
+ tc-export CC
+
+ edo ./configure --prefix=/usr
+}
diff --git a/sys-devel/cproc/cproc-9999.ebuild b/sys-devel/cproc/cproc-9999.ebuild
new file mode 100644
index 00000000000..163ffe80afb
--- /dev/null
+++ b/sys-devel/cproc/cproc-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc"
+ inherit git-r3
+else
+ CPROC_COMMIT="6fabc79d81de56b6c1cdcc2242933fd792e2ddf9"
+ CPROC_P="${PN}-${CPROC_COMMIT}"
+ SRC_URI="https://git.sr.ht/~mcf/cproc/archive/${CPROC_COMMIT}.tar.gz -> ${CPROC_P}.tar.gz"
+ S="${WORKDIR}/${CPROC_P}"
+
+ KEYWORDS="~amd64 ~arm64 ~riscv"
+fi
+
+DESCRIPTION="C11 compiler using QBE as backend"
+HOMEPAGE="https://sr.ht/~mcf/cproc/"
+
+LICENSE="ISC"
+SLOT="0"
+
+DEPEND="sys-devel/qbe"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+
+ rm -r "${S}/qbe" || die
+}
+
+src_configure() {
+ tc-export CC
+
+ edo ./configure --prefix=/usr
+}
diff --git a/sys-devel/cproc/metadata.xml b/sys-devel/cproc/metadata.xml
new file mode 100644
index 00000000000..507ef71566c
--- /dev/null
+++ b/sys-devel/cproc/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>contact@hacktivis.me</email>
+ <name>Haelwenn (lanodan) Monnier</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourcehut">~mcf/cproc</remote-id>
+ <remote-id type="github">michaelforney/cproc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest
index a09703da90c..b582198726c 100644
--- a/sys-devel/crossdev/Manifest
+++ b/sys-devel/crossdev/Manifest
@@ -1,5 +1,3 @@
-DIST crossdev-20211121.tar.xz 28700 BLAKE2B bfe637dcd3c5b6d45e289d6298de18cab4b70b5d21a817a9207b91360b489457b9ee10266a1c2641f8dfac09dffb166bf1565a7e519ba41f84c6d5c2000f5158 SHA512 5189fa7639b819dfffc8f994bb557d8d83f115b82cd61d938db77fdcf16a33cc9d0147f9708b3bed22fdc4ace27ac863436813ebad94876ae767172ac0cbb9ce
-DIST crossdev-20220205.tar.xz 29088 BLAKE2B 46e90557f0a6df49e4f6ab7be6495514a188c4366868290d3b6b879ad1e5741e1600bca237735290f7e9278d441534569853b582cd85b96581c6ae0517cb4c54 SHA512 72e7cf690d49a87b32f6fdad2462fd4156e4e35a3f0b5f30911012a2b7936bb999575f757547a7a805c0cfdd1fd0caa8b23bf61e72c4333096314043ed565f40
-DIST crossdev-20220424.tar.xz 29316 BLAKE2B 8b026c165b643262ef934fb2daec5484bc2a2e8c2cafbaca08ecb81c2870a6306dd834c9f72bca8cbe219d1b24274fef0b83a88e301e66d98a1eb0825bb2e161 SHA512 3c2ac2d9c79140c6e0aa7ac9fa7838499f003c6c9c1260abf4b0b7883d2179ef1ded5ab0ba14ca48d471edde5090e22a50fffbf25fd86a32d354a9541e4fd567
-DIST crossdev-20220617.tar.xz 29396 BLAKE2B e3b39edfb4cbd5808851b56d86646bc879ea875b5e320802d86073236474e3aa80c5dbefc42ef4799528334bfb5a2a0abb5c0b344ebdce39ec01aac59306eb84 SHA512 bdc5ea519e4cd6275e8171ff7cd35c8ae45b6240fefd278997e247c8b0758bff6563f7e2613072e179ec4735155f05236f32385fe13579c5e955f761e0859e43
DIST crossdev-20220709.tar.xz 29408 BLAKE2B dc96be5d86b343215564c2c15e91314c5ed88c765cec4f222b08a7e942ab5fb230915a0cdc3245719c0b12b4ce579066c6a88ae8e7ef4e44b80d8f0c5ddf7663 SHA512 f27929db8b4f7036408a0db18d46eb84312e1cef279336e13a07422ed3a154f3a21821d2d5ada66c0fca37bd70750413dab87b795c957a0a81cb9f27ebce2b90
+DIST crossdev-20220818.tar.xz 29452 BLAKE2B 2fdb9ef8e5ffc1eb7ca16b38a428726646b4283131e7de3cde2fd48f30c96091303d13b8f392ef6ffc0e09c6cf230f0ea6f031426f82cef3650933b1485742d2 SHA512 3c103ad84a5614c7783bb12ca8e5ce4b5d1bb25b89c429678600d62f9fd066a2a4f9617db61b6d583b7564181ea794bed577668e6fb5d7cfcfab25d9c5e94624
+DIST crossdev-20220909.tar.xz 29480 BLAKE2B 9c3ef9d9b8f13c81f9d2e21f8914158c04035a105ee1ac90ba30cb23a69744c9c6959bbcfd2e50d29144fc79937e5e585054d2eedfb2ced65a88467e509243be SHA512 86e8900a13095b7b12b00d739d28e2921f98818cd62daccfe6d750ce02113d0ef2d5e470b500bbfb80a9cf8f05b2a13882ac9963c3f1a4e1b7454bc1201df183
diff --git a/sys-devel/crossdev/crossdev-20211121.ebuild b/sys-devel/crossdev/crossdev-20211121.ebuild
deleted file mode 100644
index fe3c418c309..00000000000
--- a/sys-devel/crossdev/crossdev-20211121.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-if [[ ${PV} == "99999999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
-else
- SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="Gentoo Cross-toolchain generator"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-RDEPEND="
- >=sys-apps/portage-2.1
- >=app-portage/portage-utils-0.55
- app-shells/bash
- sys-apps/gentoo-functions
-"
-BDEPEND="app-arch/xz-utils"
-
-src_install() {
- default
-
- if [[ "${PV}" == "99999999" ]] ; then
- sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
- fi
-}
diff --git a/sys-devel/crossdev/crossdev-20220205.ebuild b/sys-devel/crossdev/crossdev-20220205.ebuild
deleted file mode 100644
index fe3c418c309..00000000000
--- a/sys-devel/crossdev/crossdev-20220205.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-if [[ ${PV} == "99999999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
-else
- SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
- https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="Gentoo Cross-toolchain generator"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-RDEPEND="
- >=sys-apps/portage-2.1
- >=app-portage/portage-utils-0.55
- app-shells/bash
- sys-apps/gentoo-functions
-"
-BDEPEND="app-arch/xz-utils"
-
-src_install() {
- default
-
- if [[ "${PV}" == "99999999" ]] ; then
- sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
- fi
-}
diff --git a/sys-devel/crossdev/crossdev-20220709.ebuild b/sys-devel/crossdev/crossdev-20220709.ebuild
index 1701b22179d..7859b332e9c 100644
--- a/sys-devel/crossdev/crossdev-20220709.ebuild
+++ b/sys-devel/crossdev/crossdev-20220709.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Gentoo Cross-toolchain generator"
diff --git a/sys-devel/crossdev/crossdev-20220617.ebuild b/sys-devel/crossdev/crossdev-20220818.ebuild
index 1701b22179d..62e271684dd 100644
--- a/sys-devel/crossdev/crossdev-20220617.ebuild
+++ b/sys-devel/crossdev/crossdev-20220818.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Gentoo Cross-toolchain generator"
diff --git a/sys-devel/crossdev/crossdev-20220424.ebuild b/sys-devel/crossdev/crossdev-20220909.ebuild
index 8c680c914ad..62e271684dd 100644
--- a/sys-devel/crossdev/crossdev-20220424.ebuild
+++ b/sys-devel/crossdev/crossdev-20220909.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Gentoo Cross-toolchain generator"
@@ -29,7 +29,7 @@ BDEPEND="app-arch/xz-utils"
src_install() {
default
- if [[ "${PV}" == "99999999" ]] ; then
+ if [[ ${PV} == "99999999" ]] ; then
sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
fi
}
diff --git a/sys-devel/crossdev/crossdev-99999999.ebuild b/sys-devel/crossdev/crossdev-99999999.ebuild
index 1701b22179d..7e1f57b0dc1 100644
--- a/sys-devel/crossdev/crossdev-99999999.ebuild
+++ b/sys-devel/crossdev/crossdev-99999999.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} == "99999999" ]] ; then
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
DESCRIPTION="Gentoo Cross-toolchain generator"
diff --git a/sys-devel/ct-ng/Manifest b/sys-devel/ct-ng/Manifest
index 169a86ae625..395b0a138b3 100644
--- a/sys-devel/ct-ng/Manifest
+++ b/sys-devel/ct-ng/Manifest
@@ -1 +1 @@
-DIST crosstool-ng-1.24.0.tar.bz2 2058069 BLAKE2B 4108e9546acd6c0660552595d41164ce9c4f07985851a911c260fcc9e2ec70e80136b6cb2090290ca2aa2ceeb4ebc61fca183340de88eafd800bc2bf18d0cfbb SHA512 379e668365628f0ab359ae119213bed44960870093f64f0fbb12e92bbe2a3b82bfed77f5ab33f2e2f17c1977e7a63f2151c46ad8d0e6208220fb7fa8726fae33
+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.ebuild b/sys-devel/ct-ng/ct-ng-1.24.0-r1.ebuild
index c43e112be44..f9859d8ffd5 100644
--- a/sys-devel/ct-ng/ct-ng-1.24.0.ebuild
+++ b/sys-devel/ct-ng/ct-ng-1.24.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -6,7 +6,7 @@ EAPI="7"
DESCRIPTION="crosstool-ng is a tool to build cross-compiling toolchains"
HOMEPAGE="https://crosstool-ng.github.io/"
MY_P=${P/ct/crosstool}
-SRC_URI="http://ymorin.is-a-geek.org/download/crosstool-ng/${MY_P}.tar.bz2"
+SRC_URI="http://ymorin.is-a-geek.org/download/crosstool-ng/${MY_P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
diff --git a/sys-devel/ct-ng/metadata.xml b/sys-devel/ct-ng/metadata.xml
index 7daea155e8e..7159da33f5b 100644
--- a/sys-devel/ct-ng/metadata.xml
+++ b/sys-devel/ct-ng/metadata.xml
@@ -10,7 +10,7 @@
It will only build the toolchain. It is up to use how you want to
use it after that.
- It is an alternative to sys-devel/crossdev.
+ It is an alternative to <pkg>sys-devel/crossdev</pkg>.
For more information, see http://ymorin.is-a-geek.org/projects/crosstool
</longdescription>
diff --git a/sys-devel/distcc/distcc-3.4.ebuild b/sys-devel/distcc/distcc-3.4.ebuild
index cb49de0fd3c..dc60b2b2ff1 100644
--- a/sys-devel/distcc/distcc-3.4.ebuild
+++ b/sys-devel/distcc/distcc-3.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
index 4eea87b1c58..849d80e9c0e 100644
--- a/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
+++ b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -22,7 +22,7 @@ BDEPEND="
dev-vcs/subversion
sys-apps/lsb-release
>=sys-devel/bmake-20210314-r1
- virtual/yacc"
+ 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 5c427a1e211..8d13d4a22fa 100644
--- a/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild
+++ b/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -26,7 +26,7 @@ BDEPEND="
dev-vcs/subversion
sys-apps/lsb-release
>=sys-devel/bmake-20210314-r1
- virtual/yacc"
+ app-alternatives/yacc"
src_prepare() {
default
diff --git a/sys-devel/flex/Manifest b/sys-devel/flex/Manifest
index 327f0405ede..34ccf066269 100644
--- a/sys-devel/flex/Manifest
+++ b/sys-devel/flex/Manifest
@@ -1 +1,2 @@
+DIST flex-2.6.4-autotools-regenerate.patch.xz 282588 BLAKE2B 3995b8b5e354a43b1a4ff72fae76027c904ddb24eb8e5d55fc6fbe81299f48fa70ac3c4a98b9ed39aca8a98190d6db5005cacb96ec1016d413860d84a434dcc0 SHA512 9efd3197fdf7f8435dfbf4dafbe6b99c1fafede0ec364dbeb9cca81711763d693bc5d30fc3b2af038a44f8848577d19dd737e3afe0cd3b08ab79daea64fcdefa
DIST flex-2.6.4.tar.gz 1419096 BLAKE2B c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e
diff --git a/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch
new file mode 100644
index 00000000000..9a9de8746b8
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch
@@ -0,0 +1,219 @@
+https://github.com/westes/flex/issues/436
+https://bugs.gentoo.org/705800
+https://developers.redhat.com/blog/2019/04/22/implicit-function-declarations-flexs-use-of-reallocarray
+https://github.com/westes/flex/commit/4b5111d9772b5c160340ca96f08d30d7f6db5cda
+https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380
+https://github.com/westes/flex/commit/0db9f8903a446e7026874be519b8dc55a471f014
+https://github.com/westes/flex/commit/a17d79e9c722a6735b6d2a8f152287404f27df32
+https://github.com/westes/flex/commit/4081efa0831b15d7e4e4255401c225ad8262426d
+https://github.com/westes/flex/commit/1985bb3c7abed940e91ad816504ef08a18c3b7c1
+
+From 4b5111d9772b5c160340ca96f08d30d7f6db5cda Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Mon, 4 Sep 2017 08:28:53 +0800
+Subject: [PATCH] scanner: Include flexdef.h at %top block of scan.l
+
+config.h may define macros that alter the API of the standard library
+funtions, and so it should be included before any other standard
+header, even before the skeleton's standard header inclusion.
+
+For example: config.h may #define _GNU_SOURCE that would expose the
+reallocarray() prototype from <stdlib.h> on glibc 2.26+ systems. If we
+include <stdlib.h> before config.h, reallocarray() would not be
+available for use in lex file since the second include doesn't help
+due to header guard.
+
+For now our config.h might `#define malloc rpl_malloc` -- this
+substitution must work before including stdlib.h, or else the compiler
+will complain about missing prototypes, and may result in incorrect
+code in scan.l (gcc warning: return makes pointer from integer without
+a cast [-Wint-conversion]).
+
+Fixes #247.
+--- a/src/scan.l
++++ b/src/scan.l
+@@ -1,5 +1,11 @@
+ /* scan.l - scanner for flex input -*-C-*- */
+
++%top{
++/* flexdef.h includes config.h, which may contain macros that alter the API */
++/* of libc functions. Must include first before any libc header. */
++#include "flexdef.h"
++}
++
+ %{
+ /* Copyright (c) 1990 The Regents of the University of California. */
+ /* All rights reserved. */
+@@ -32,7 +38,6 @@
+ /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+ /* PURPOSE. */
+
+-#include "flexdef.h"
+ #include "parse.h"
+ extern bool tablesverify, tablesext;
+ extern int trlcontxt; /* Set in parse.y for each rule. */
+
+From 24fd0551333e7eded87b64dd36062da3df2f6380 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Mon, 4 Sep 2017 10:47:33 +0800
+Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac.
+
+This would, e.g. define _GNU_SOURCE in config.h, enabling the
+reallocarray() prototype in glibc 2.26+ on Linux systems with that
+version of glibc.
+
+Fixes #241.
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,8 +25,10 @@
+ # autoconf requirements and initialization
+
+ AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])
++AC_PREREQ([2.60])
+ AC_CONFIG_SRCDIR([src/scan.l])
+ AC_CONFIG_AUX_DIR([build-aux])
++AC_USE_SYSTEM_EXTENSIONS
+ LT_INIT
+ AM_INIT_AUTOMAKE([1.15 -Wno-portability foreign std-options dist-lzip parallel-tests subdir-objects])
+ AC_CONFIG_HEADER([src/config.h])
+
+
+From 0db9f8903a446e7026874be519b8dc55a471f014 Mon Sep 17 00:00:00 2001
+From: Lukasz Baj <l.baj@radytek.com>
+Date: Fri, 22 Sep 2017 10:24:46 +0200
+Subject: [PATCH] build: Remove custom reallocarray() declaration.
+
+Use one from <stdlib.h> instead because that is more portable.
+--- a/src/flexdef.h
++++ b/src/flexdef.h
+@@ -631,10 +631,6 @@ extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
+ extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
+ extern int num_backing_up, bol_needed;
+
+-#ifndef HAVE_REALLOCARRAY
+-void *reallocarray(void *, size_t, size_t);
+-#endif
+-
+ void *allocate_array(int, size_t);
+ void *reallocate_array(void *, int, size_t);
+
+
+From a17d79e9c722a6735b6d2a8f152287404f27df32 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Sat, 14 Oct 2017 00:36:54 +0800
+Subject: [PATCH] scanner: Define _POSIX_C_SOURCE when needed in skeleton.
+
+The function fileno() is defined by POSIX. When flex would otherwise not provide that feature macro, we define it.
+
+Fixes #263
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -218,6 +218,14 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
+
+ /* begin standard C headers. */
+ %if-c-only
++m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]], ,
++[[m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]], ,
++[[#ifndef _POSIX_C_SOURCE
++#define _POSIX_C_SOURCE 1 /* for fileno() */
++#ifndef _POSIX_SOURCE
++#define _POSIX_SOURCE 1
++#endif
++#endif]])]])
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+
+From 4081efa0831b15d7e4e4255401c225ad8262426d Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Thu, 8 Mar 2018 10:04:36 +0800
+Subject: [PATCH] scanner: Fix glibc features.h dependency in skeleton.
+
+Commit a17d79e9c722a6735b6d2a8f152287404f27df32 defines _POSIX_C_SOURCE
+to the minimum of 1 if it's not defined in the user's scanner code or
+the compiling environment. However in glibc the macros are not yet set
+up until one of the libc headers is included. This unfortunately have
+made us overwrite the default _POSIX_C_SOURCE value that would be
+defined by glibc (200809L at the time of writing), causing regressions
+in user code.
+
+Now in this patch:
+1. Ensure feature test macros have been set up in glibc before checking
+or defining any of them in our skeleton code.
+2. Have a more conservative logic when determining the need to define
+_POSIX_C_SOURCE (required for fileno()).
+
+Fixes: #313
+
+Note:
+It could be tricky for application code to ensure feature test macros
+have been set up in glibc, since <features.h> is no portable header and
+not meant to be included directly by applications. The way to do it is
+to include a libc header which in turn includes <features.h>. However,
+many of the glibc headers check __USE_POSIX (a glibc internal macro
+defined if _POSIX_C_SOURCE is defined) and determine which interfaces
+to expose already, making the headers inappropriate for our goal.
+Those which don't depend on _POSIX_C_SOURCE, and are also available
+since ANSI C89, are only <assert.h>, <errno.h> and <math.h>.
+
+<assert.h> is finally favored due to other considerations:
+- <math.h> check for __USE_XOPEN in glibc, making a dependency on
+_XOPEN_SOURCE, besides it exposes much more interfaces than we need.
+- In djgpp, <errno.h> depends on _POSIX_SOURCE to hide definitions of
+some errno values when it's defined.
+- <assert.h> exposes the fewest interfaces among the 3 headers and, at
+the time of writing, checks for only C99 (for __func__), C11 (for
+_Static_assert), and _GNU_SOURCE when needed.
+
+Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -220,11 +220,21 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
+ %if-c-only
+ m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]], ,
+ [[m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]], ,
+-[[#ifndef _POSIX_C_SOURCE
+-#define _POSIX_C_SOURCE 1 /* for fileno() */
+-#ifndef _POSIX_SOURCE
+-#define _POSIX_SOURCE 1
++[[/* Feature test macros. Flex uses functions that require a minimum set of
++ * macros defined. As defining some macros may hide function declarations that
++ * user code might use, be conservative and respect user's definitions as much
++ * as possible. In glibc, feature test macros may not be all set up until one
++ * of the libc header (that includes <features.h>) is included. This creates
++ * a circular dependency when we check the macros. <assert.h> is the safest
++ * header we can include and does not declare too many functions we don't need.
++ */
++#if !defined(__GNU_LIBRARY__) && defined(__STDC__)
++#include <assert.h>
+ #endif
++#if !(defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
++ defined(_POSIX_SOURCE))
++# define _POSIX_C_SOURCE 1 /* Required for fileno() */
++# define _POSIX_SOURCE 1
+ #endif]])]])
+ #include <stdio.h>
+ #include <string.h>
+
+From 1985bb3c7abed940e91ad816504ef08a18c3b7c1 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Thu, 8 Mar 2018 09:53:24 +0800
+Subject: [PATCH] scanner: correct comments about __STDC_LIMIT_MACROS.
+
+No code changes.
+
+Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
+--- a/src/flexint.h
++++ b/src/flexint.h
+@@ -7,8 +7,8 @@
+
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+- * if you want the limit (max/min) macros for int types.
++/* C++ systems might need __STDC_LIMIT_MACROS defined before including
++ * <stdint.h>, if you want the limit (max/min) macros for int types.
+ */
+ #ifndef __STDC_LIMIT_MACROS
+ #define __STDC_LIMIT_MACROS 1
+
diff --git a/sys-devel/flex/flex-2.6.4-r2.ebuild b/sys-devel/flex/flex-2.6.4-r2.ebuild
index b1e13e873c6..81df61f3d33 100644
--- a/sys-devel/flex/flex-2.6.4-r2.ebuild
+++ b/sys-devel/flex/flex-2.6.4-r2.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
LICENSE="FLEX"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="nls static test"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/flex/flex-2.6.4-r1.ebuild b/sys-devel/flex/flex-2.6.4-r4.ebuild
index 309967cc2b3..d588701fdf4 100644
--- a/sys-devel/flex/flex-2.6.4-r1.ebuild
+++ b/sys-devel/flex/flex-2.6.4-r4.ebuild
@@ -1,13 +1,14 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit flag-o-matic libtool multilib-minimal toolchain-funcs
DESCRIPTION="The Fast Lexical Analyzer"
HOMEPAGE="https://github.com/westes/flex"
SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools-regenerate.patch.xz"
LICENSE="FLEX"
SLOT="0"
@@ -15,28 +16,37 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv
IUSE="nls static test"
RESTRICT="!test? ( test )"
-# We want bison explicitly and not yacc in general #381273
RDEPEND="sys-devel/m4"
-BDEPEND="${RDEPEND}
+# We want bison explicitly and not yacc in general, bug #381273
+BDEPEND="
+ ${RDEPEND}
nls? ( sys-devel/gettext )
- test? ( sys-devel/bison )"
+ test? ( sys-devel/bison )
+"
PATCHES=(
- "${FILESDIR}"/${PN}-2.6.4-libobjdir.patch
- "${FILESDIR}"/${PN}-2.6.4-fix-build-with-glibc2.6+.patch
+ "${FILESDIR}"/${P}-libobjdir.patch
+ "${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch
+
+ "${WORKDIR}"/${P}-autotools-regenerate.patch
)
src_prepare() {
default
+ # Drop on next release when we can remove ${P}-autotools-regenerate.patch
+ touch configure.ac aclocal.m4 Makefile.in configure src/config.h.in || die
+
# Disable running in the tests/ subdir as it has a bunch of built sources
- # that cannot be made conditional (automake limitation). #568842
+ # that cannot be made conditional (automake limitation). bug #568842
if ! use test ; then
sed -i \
-e '/^SUBDIRS =/,/^$/{/tests/d}' \
Makefile.in || die
fi
- elibtoolize # Prefix always needs this
+
+ # Prefix always needs this
+ elibtoolize
}
src_configure() {
@@ -46,9 +56,8 @@ src_configure() {
}
multilib_src_configure() {
- # Do not install shared libs #503522
- ECONF_SOURCE=${S} \
- econf \
+ # Do not install shared libs, #503522
+ ECONF_SOURCE="${S}" econf \
CC_FOR_BUILD="$(tc-getBUILD_CC)" \
--disable-shared \
$(use_enable nls)
@@ -79,5 +88,6 @@ multilib_src_install_all() {
dodoc ONEWS
find "${ED}" -name '*.la' -type f -delete || die
rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+
dosym flex /usr/bin/lex
}
diff --git a/sys-devel/flex/flex-2.6.4-r5.ebuild b/sys-devel/flex/flex-2.6.4-r5.ebuild
new file mode 100644
index 00000000000..e064eb4e45a
--- /dev/null
+++ b/sys-devel/flex/flex-2.6.4-r5.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic libtool multilib-minimal toolchain-funcs
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="https://github.com/westes/flex"
+SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools-regenerate.patch.xz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-devel/m4"
+# We want bison explicitly and not yacc in general, bug #381273
+BDEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bison )
+"
+PDEPEND="app-alternatives/lex"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libobjdir.patch
+ "${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch
+
+ "${WORKDIR}"/${P}-autotools-regenerate.patch
+)
+
+src_prepare() {
+ default
+
+ # Drop on next release when we can remove ${P}-autotools-regenerate.patch
+ touch configure.ac aclocal.m4 Makefile.in configure src/config.h.in || die
+
+ # Disable running in the tests/ subdir as it has a bunch of built sources
+ # that cannot be made conditional (automake limitation). bug #568842
+ if ! use test ; then
+ sed -i \
+ -e '/^SUBDIRS =/,/^$/{/tests/d}' \
+ Makefile.in || die
+ fi
+
+ # Prefix always needs this
+ elibtoolize
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Do not install shared libs, #503522
+ ECONF_SOURCE="${S}" econf \
+ CC_FOR_BUILD="$(tc-getBUILD_CC)" \
+ --disable-shared \
+ $(use_enable nls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -C src -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -C src DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc ONEWS
+ find "${ED}" -name '*.la' -type f -delete || die
+ rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+}
+
+pkg_postinst() {
+ # ensure to preserve the symlink before app-alternatives/lex
+ # is installed
+ if [[ ! -h ${EROOT}/usr/bin/lex ]]; then
+ ln -s flex "${EROOT}/usr/bin/lex" || die
+ fi
+}
diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest
index 96afcff2b4a..fd30a7bcc1c 100644
--- a/sys-devel/gcc-config/Manifest
+++ b/sys-devel/gcc-config/Manifest
@@ -1,2 +1,4 @@
DIST gcc-config-2.4.tar.xz 17552 BLAKE2B 631645a5cc9f3e7ab0ff089960ee3d0b2ecea29aa96f839a03a86985db512bf0d182b67a7b1bb73b95808c04523f32d6b8c122cdfbe8dbf94e7d319a1e49a23c SHA512 852b4aefaccfae1d91c551e226ac28110fa23f9668075c190a5fb9129c86d2f3e4994e96b7a5e8a2801883c5a5b16d9fbf3e9066e6b6a423055fdefa490793c7
DIST gcc-config-2.5.tar.xz 17664 BLAKE2B fa7133a54d3b49df20d3ae6036a65602c8a0d9e8668e2874a87d080add241a31322a3f4694bff8a5fe61957740603862539c0d9750e446d36beb2fb42ff0ba27 SHA512 20a8d62192faf54101352cfb6ca00503c9b2ab83aefecd94c4c887302a000d78334545a3424603a66a50e5f3ff07b67b16828813407893df5d94051776252b83
+DIST gcc-config-2.6.tar.xz 17772 BLAKE2B 5f06ac46c64fd241be9e7b95e277395623f015016c5abbe5e3275dce3fbf326d998a897a915b87387c878a1b57cdc847a6f95fa0b7ca00aa954c13d00a6e7d09 SHA512 27de726b266b2f58f28a4eab0a77141a8c0cfc9e939f4f0ee8dd382578a1cdececd30a4ae15bab858fec01a533c41248c9858f25d5d7314c36e8f2fcd57df429
+DIST gcc-config-2.8.tar.xz 17968 BLAKE2B aa34e681ef0c86bb846d89b816b46276f5c7c32974c785a9611a903a4fe165c997a34664abe17aa4d8720a96f194054e5d8c371a6c9270b1c235d7539094436c SHA512 5e91df44fb7782b9ad41ed06fbd53f74868c059f892c6c2b8195ebaa899905dd9f502562887f1a3765dd6b61698e956d01c6fa6f97a535cf16e26e70fcd902ba
diff --git a/sys-devel/gcc-config/gcc-config-2.6.ebuild b/sys-devel/gcc-config/gcc-config-2.6.ebuild
new file mode 100644
index 00000000000..7ff12f007e3
--- /dev/null
+++ b/sys-devel/gcc-config/gcc-config-2.6.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 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.8.ebuild
new file mode 100644
index 00000000000..e9660497da1
--- /dev/null
+++ b/sys-devel/gcc-config/gcc-config-2.8.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 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-9999.ebuild b/sys-devel/gcc-config/gcc-config-9999.ebuild
index 67c6a7ee631..7ff12f007e3 100644
--- a/sys-devel/gcc-config/gcc-config-9999.ebuild
+++ b/sys-devel/gcc-config/gcc-config-9999.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git"
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
DESCRIPTION="Utility to manage compilers"
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 59703071e4d..a753f8eb02b 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,44 +1,35 @@
-DIST gcc-10-20211126.tar.xz 71674848 BLAKE2B 81f4a572e973db7a3701601e66ea58c8e535a55d4d4ac164de00bdb06f7f265585f45d46171cf40d42ebcd3fb02ac81b643398c560912698eb6c008ac6e09518 SHA512 db887184c649ebeede5a1b9f13c00fe425012434cb93ec960c3ca50c0bcdeab04a1cc13b20de21b940e5d6a09c3b1c7fc415110a0e990ec1d938627bf97b9342
-DIST gcc-10-20220721.tar.xz 71754392 BLAKE2B 389d1510a2d4b95a93da0a1ce0ee8e90d0fcec31f49cc13423a4091467eee07939a45e5e23afc1025fdcd02e2f19c509fd610e5d80b91fa124ef54a3fd8baf8c SHA512 9edc37823b556b1fb4d8e205e118a661cf0fcd06d08b78590b5fd694daac9bf5678ed1279d013e544085682c5426b8e1353d95627389df7f00d7008e3075774b
-DIST gcc-10-20220728.tar.xz 71758948 BLAKE2B 520d5234bf896749e66f36e6aa7a953d179ce8b407503f22f7dbe12f260df2a447a005f33d9277a800cc731c0b3261e77efdc1322aa42d451613ff7be237282a SHA512 95951e9a2738568578e8c80a4d806652f8cc90570d2b394fed1b748186af9ac3b79a1911007734f16d879861eccc12a47d852b7ae7b10e6c5cf483eb86792004
-DIST gcc-10-20220804.tar.xz 71755240 BLAKE2B e8c4cecc2aa5e2770718222a01c0b99ce03640871719838507a04acaad438a5d1482fdcfb0ba694dd683fe6f1a03dce1024870db727c4d7a118ecba0f1c8c44f SHA512 51c97a3b7b71e565a2e248e348f5c995779053d65cfab2bb32fecc130a50a2aec077653c5cc5a5d966a9af9b4b741909a4649a9fc6d2f17f6bb9eabb23dd65c8
-DIST gcc-10.3.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384
-DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084
-DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
+DIST gcc-10-20221006.tar.xz 71755692 BLAKE2B 0099821e5fcd5e1a069369a72f105607cb7f20fbef3d627a598d8c7a6439491e050533d6577b4f7953aabb52daf926ffc8eb9cecd8853833a14c90bd878e1ad9 SHA512 3fc1dceff31ec8a84babe31d88a312d9d3d30450ff0c42730b9a9fe45c0fc9509216fb95cd84df7477faebe2b9b7d8f7e269c9e76cecc05417dc6192e3b96c67
+DIST gcc-10-20221124.tar.xz 71781080 BLAKE2B ec7f4f140102d25a7469f7931df7b87b4b91c1c94fc263ecd9cc9aca36d120e9f5e09776efefba1099abe5282eb1cc4ec8201bcdca3a13c7b1bbdd6b34ad994d SHA512 b7af71bb2dd594643393b3e4dea4e641dcfad6e5249b6ee05617f0648ef2609b707b18f12f3985b3d13cbee6af0f799d7377c28092420b251b34e93f910e686e
+DIST gcc-10-20221201.tar.xz 72102628 BLAKE2B cfd245eb7c364b1480987d259a2c7b569d08830a3af656e6e493864ceda1eb8b0a8a67c405566a826c0c1bb044dc07a6123e6c53c5eac15882cb02a003e95214 SHA512 87da77d035688e033bb1b0c4f95df411a111d87499b18f3ecfb67d0550860243a58fdd5e4cec2d20535d2e3cc5261267fe26f11d2d03e7eb12b3f306b17eb961
DIST gcc-10.4.0-musl-patches-1.tar.xz 3808 BLAKE2B 804d1fcc451dcd03be71240dd498ec2d179869571d44012967c48dccf5a478dd8c55000a964a80fdd5584d739a777dee1c83241cffce514ef002df2572854a67 SHA512 83e4a9c0f7062baf0c606a2bcc56a818494991403d7577dea65f04bbc25bdb786a5889b80d45d80e7f4be07c1aef786802cbfcfafd1a17ec255a2d4e93a77570
-DIST gcc-10.4.0-patches-0.tar.bz2 15231 BLAKE2B f64a2e7f317acf9416da69c129ea869116be2780828f9d3cda59f7ea8d39634df7f0347f745275bb167f95aae2a3b8e97ec7c78f775d9002718dd67cb9429f68 SHA512 d1497930ccf4d6ee8700faeb676945e65b3aa2ba3a580a3564575fad1590ad076741f2ecad778ab48d0c4e8ed7723b84b0a660cb67cc4530495691702159a43a
-DIST gcc-10.4.0-patches-2.tar.xz 15000 BLAKE2B 59a61f7de4b6d2338a8b4fbc88a8e55838d5fdce1bd906b798540839a7efca9b97024779b515df6a7673ee6908540834bc1f58188ed9ef311c51e1f351ed003e SHA512 e1c8f0bf9d64db3f84a6eab0f41ee848643a67ba6ab57df7a8267139928f6e292d95c5b4ed865ff8d9a80028bb07cec714d56438b97004cd2a27f111f1f336da
+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-20220115.tar.xz 75676672 BLAKE2B 12171fd97731dbca67f13cc2a3a3a3989c22d628b289cbd3d46080f77a8d951f15c1e54e83a2e62ab41b69221f9784e970799a11a9ed5b224a77ba4b1b081f07 SHA512 7455b3b29d3c64df9123afef82faf922d97e08a3ea30fbc2d9286d4f6ed2fafbfc0f9d94ae1b9eee45329e95a27bd642b3aa679d83a0c27a3e30967d49e0728c
-DIST gcc-11-20220722.tar.xz 75784756 BLAKE2B 1bb107418b7479626e659ff462f31fa1f16fba784d586a672370cddc8912563ca62c0ccdae357f13e2225419b3d6cf1d998b83094619fe7a5e31964bda7b8a62 SHA512 a131deee631de6cab70285263450f35bd32452a4bea0952d96dfd92df65a5c1c7654a06c10ef181fa97dc1ab28c528cb0827ba8948b6eaef41daeb4a7cd5eacb
-DIST gcc-11-20220729.tar.xz 75779788 BLAKE2B f907d56813d651a05d0e24ecfe91eb5c68c90e588765488a3add20d06cc2988619f2259a1503224fa8385dfd54dfd0a5cf665cc6205671eaafe17be615d647de SHA512 c2d72b56bf8e9329260f7500b78fb089f039476c60434e3962b2a0605284943bb105651bc8cbc3588a3c400f857be85d6baef9e86b6334eba72230360082fe55
-DIST gcc-11-20220805.tar.xz 75780952 BLAKE2B bfd58ed253cccd932a34513a1d8e13f5c6a357dec8a0aaa4e8a9384f358f228ce49ae4e92b96b72f4f427732c5168bbb087f49a27633c0948d0c713d74ffde87 SHA512 7dd738ed4d6e3691682f7225ea7e115d9a217bd87808c212c58886d646c47c531376f24f0dc2d036bc62f7ad562ad090cbdc53fdf8becd976fb392063b9d5a7e
-DIST gcc-11.2.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384
-DIST gcc-11.2.0-patches-1.tar.bz2 11537 BLAKE2B 9dd791ada244c9b70b8b99f9f305a688c248134715ed1b26d406e53b114983faae6873cdc521497164388d24d5f61c199e98df146bc02f5578e877295bcf5c82 SHA512 6539efc60c656d0798a5896dc1b944ed69914b815102c7a1c10bdba4ef935abd326b01309f38316e121f1ed90ceb2abcaf65df6af116892daad829ac2623cefc
-DIST gcc-11.2.0.tar.xz 80888824 BLAKE2B 69b61234ac436edfea2933df68c434a2ce7aa4454ef4da573e82587e1a42dc420189e949cfdadaf4cb37fc0de9674822210a95b77ff03aca0dbedfe67df19cc6 SHA512 d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf
-DIST gcc-11.3.0-musl-patches-1.tar.bz2 3997 BLAKE2B 5ca064cc78b067f4a7822fa0341c37ae03c8024f871d2e274e481a583afa96c36e291be93fbdd633f203260ae2ea9ac1d45f666d134bac75bc9a715a369d7374 SHA512 0ab239c66cf62a737266377c19b8dda6af6df56380f6731c2c17f3e82778e7e023a68d31728490eea3ad946f4b71d4cab363a75548f74b4b7f653972469d9e91
-DIST gcc-11.3.0-patches-4.tar.bz2 14030 BLAKE2B cdd555f329c7c0b993cd3527489681bfcc2162db0997611b66337e6b287356761c7deccd3b9f9bb8980a32df0574017a52c5e445e24db746757d87ffccb1ea89 SHA512 cb227599d01734ae9f9fc7ae2c8dd4cae1da80d6ab398ec6f112535239ac76ce8e91fbac88e19c2f75cb08ab75f966c1d1ad4af80ede67e953fbbafc7baefa58
-DIST gcc-11.3.0-patches-5.tar.bz2 14575 BLAKE2B 55ff9558f3ffe89d511663f12477e72ed1bc29d4fa8f1bc58b9c52d28838716ba9b8291ede7b86e28c3bee0633c34763f611779fe46531bd75d8aa7661b46118 SHA512 65bf4c0d1d43923298efd527a5f4da2a10d88a383d2eef72e6a25ce37964ddaf27c49545915228347e8320f905afcdfe1275d98e8458993a7229425f74ae41bd
+DIST gcc-10.5.0-musl-patches-1.tar.xz 3816 BLAKE2B 5995f934a40665d877342853fde8b414eed8770c72e6b11b295b7e7b3c9d38d7407dff63b5751f4449f6fa842c02e87f156cc868e7436a8313f7c8514242d255 SHA512 b93cc54cd7b78fdc487df7c449b03bbfd10094e45f3f8eef20cd69f27a68a14817fe662a2ec119b384eea2dad0491b70f838d010457e386700030b76457afad6
+DIST gcc-10.5.0-patches-0.tar.xz 16188 BLAKE2B 3fe3163c4960ff02eb792b2d00b9b20e1c2b44ad2d2e79661ffa0a5795b1bb631bce83c506f485765a7b971e6d391ebc1803c327f0d8d06e457610f5d6074c90 SHA512 fde1fec92df535416221827d48daf7d498f675da5697bc15bb4e17ccfedf6e6705dd28f57a3c9ebc8065b49328246fa5aa1fd90bd88bc27fe2b7b3e924f0df15
+DIST gcc-10.5.0-patches-1.tar.xz 17180 BLAKE2B d8ecc7cc15fa1ab420fa9eff11173a1d5544b369720e8c54fc59375e591ebd0a429b7e81a2a3df86bd2eaf19e4b8148bf2e1b0c8410de3944d4801ce412016b2 SHA512 5855aa23ee0b262c20a1b6fd2d4a947180c079dc00e0fa675043edceee0c822eec0dc752f5fcb281b70c04e50c6fcaf6c5d5160ab15d3f0c51fa030eb2d79d26
+DIST gcc-11-20221007.tar.xz 75790520 BLAKE2B de52f7fc5c7f5f82d9cbaeaa13b216e149a4aac8162188c628007c17ddb40aa838d19f2ca18216e8bfe5df2d21438f10c8e87298b53cbde4359f72c9cff87589 SHA512 b785236a00647041c9ea4552e5ea82a09e23a801b029773ba77bfc03675c530369ad0b5fc279330f3d8dd4b9b40aeaa9de84a39b6397f73984b7e2fdf8f0bad2
+DIST gcc-11-20221125.tar.xz 76248264 BLAKE2B c2fe15a14c77ce36f117d8d3bb78d38684e237db16db249134dd1e24d1455dfe7ca544fe22155b2c368dc6658b96d626af87d47478aaf94c216eb84b469e43e9 SHA512 3efbd7dc4cbf748d41369bff5bedb586a1c9397fa7fa56be7869e62bd567273b056aeec01a4191783bad737640e163489f1b368fcaac3155ae3ac8f7b33f478d
+DIST gcc-11-20221202.tar.xz 76241508 BLAKE2B 313a73cf579a1899996b35494484debbb3c5aa13cd90f54830e30e962d9df2eee059bb3afd429fb3a3e7cb6a889c8c7d03a22a64e57d8d3e046b0c8c431847e3 SHA512 6c8e4654041d84129d94a7317a125348d2d3db4f1029ad069bd271ae11e51f80adfabf970634f6faca52356891a6a87a503ba9421750d6e0a11527ec7fa7bd91
+DIST gcc-11.3.0-musl-patches-1.tar.xz 3856 BLAKE2B f511f8b4c0696771d906beee9645b5d009ea4b673602baa1ca562d6f23c5b0caf2012aae93578671624617c4286e3937d79a7383d6a03bb438c5b774a06fe8e6 SHA512 cd375ff2affb213475acaabf02989b1f05d719d972970ea0304d20a816986807390893d1401826f3b497787642f35d90a244195f8e466db41e8d768366057334
+DIST gcc-11.3.0-patches-7.tar.xz 15184 BLAKE2B 426f00feaa982a35d2c459e7a2c2e9d29b4b467ac3625ebd72bb31077c75bbf0c028137df03921c52ddc97a14d92c49777bd3f27b47a7b47d8a05e2d106b6bdb SHA512 bec8bf26b3e50633a5a2e0bb75ffeaba86becb704c14365ff3342e8d651ab75bb3ceec7808d88a25989b8c7182398184b95b6d1267aaef9aa828f687e4895e9d
DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7
DIST gcc-11.4.0-musl-patches-0.tar.xz 3844 BLAKE2B f3f1be6718e3cf08e553a1a2319a85e13368279849f6f3ab89ad7abe505316afacf5084846c0cb133bdcb5c918244644242c194e6ce55455a26e67b3983d73ef SHA512 a81db52d21de364137461dcff7e1af696df4a02fa26452f90439ae4af14ccbffe68eb4ee93ae56257490ab8aa36b4bff37c4e1f2cf4dd4624b3a6fb4cb50b7ac
-DIST gcc-11.4.0-patches-1.tar.xz 13956 BLAKE2B ff6ee1b81ad214e74a49c00b15767086c6b12b1566b42c4fb88778bfae3a8e319e42ffbcd8aa7f717b6f32bd966dc0da08be3a57a27992d9b90368622e7e2ff0 SHA512 3b9b641bb00b85fa88c87d8923ebcfb844125ff6149b998c565006173f4d68b0ccf8c1fec2c7bac0684584c61176346cee7373b165587a092bcd92ccb96c61db
-DIST gcc-12-20220625.tar.xz 79092788 BLAKE2B 491da523abc0a63bbceaa6c76b251a5b6c224e1684b5db4e6155fdcab4b0d8d505376d30a13e1b0331f37558aac311477bbb3179b63da850acae436b642c9ee1 SHA512 0527c6d69cd53e8aba3464746b7989e3128af74818864a2e5b4be66313203d32a84201440a254da8de72842b0ebbbccf1ec14c6a121cb09f9454358b0a37b8f9
-DIST gcc-12-20220723.tar.xz 79109408 BLAKE2B a15a800bcf664b7d113d4d6d56408458f288687f5441c808aa39ee96d3bb6cd09da24df985bfa9feb82afe32594dc0e072a32f04ea6fc8de6daf0a5ee1e7996c SHA512 314db1168c611cd978f41f292bd1a66892a7f1e07046746da764dc221c44100f4cd8e361325626539d8381b60b20b30f9eace193796cb169b6c1d7d108295233
-DIST gcc-12-20220730.tar.xz 79117832 BLAKE2B be7c1f579311ae56600ccd91f01fb878c2253d1edae455eee2ea39207cafdf3943d7f0aba8ac84e2458ffa2cfb763b46a9f1200b59874fcc518f633b26db2911 SHA512 8b33e49b1fe222738b9ddb715a4cd227ad11f854b104d85d5e9e500daef845d899c66281ed83c36886e7879e7662f199225f14291417d332fb6f144cb4a666cb
-DIST gcc-12-20220806.tar.xz 79120340 BLAKE2B bbc9e22b62a92231a9808267c51969da1014dda9a7afaf4077201570c115c0fae4d57d915f29b3f8888973b20736bb0977b9b5cae9e3f8718459e5102be5b024 SHA512 c36ed47a2c697b5d4f786a523091a64d4cf41e57acf337971640f536588811efbb2e23645b9c1e763f98e0c72923c8571ed151d12106326f41f0385732e5ff37
-DIST gcc-12.0.0-musl-patches-4.tar.xz 4456 BLAKE2B 80ae755b52c31d57eb737b3ec5e70d96e7e20f6720664cd94573b1c6cd079a0e29f73277c27b2f2570706da5239006dabd44f834824c515f6615ed5dc39c273f SHA512 cf917f40133d2b8090e98880e6c87d38129f44bcb454f4d707ef57967635a6fb571d7b85b7cb854421bc9aa88e48767a47aad99c767f9415899f97922d61c497
-DIST gcc-12.0.0-patches-5.tar.xz 9820 BLAKE2B cdebb6fa59e594f95cc4b028d329c0fed3ffa1731a4ca1a2954b7760f4a674e773cfe5888fb2c63a619d5d80ec464d98a94870bfe2e3ea34370afce7f67526bb SHA512 a9c27b0188fd842e88d6a831cdf1f9c6d0cada4ec260b5f7e67f3d8fe0f439fb0d2c82469de9fecebd657043babf3e63a24ee53776be2617bb90e1d3dd3f521e
-DIST gcc-12.1.0-musl-patches-5.tar.xz 4656 BLAKE2B b8dead8e796df2563cc7bfd4ad95f71f7cfbd51bc0d2bccb7479d2856cc3731b55f5e23b548c5f5f37790aae269815bbba6ee6596c5183847eed0bb1878bf340 SHA512 480e3e34e3f7e7ae27319fa9c51913125b2d4f41b0994c6df4c5c6f008d3ffdacbe059cd1ee643c2b9248a0c69db90867a076b0456c8d6649a1a7e9b62ff6800
-DIST gcc-12.1.0-musl-patches-6.tar.xz 3840 BLAKE2B 5d8ce4dcebd081fae485d3e1367c06c185e07c110b0cfe9598b71209c55adf96a26e198ab91fb3dfb33ddb2d8abd211a518dd74f5113cae1e3a4f90db32bb746 SHA512 b666ac0e9bef1b74dc5cc616ddb13dc40d9ecd1f5ae48b877cc1003356952a9afd800327d4210c732deb94554403d9b8730d2037bec380e413fc9a6cb59ecf23
-DIST gcc-12.1.0-patches-8.tar.xz 12020 BLAKE2B 6138ef4d76a682ecfd05ba7c80d8f5db791ea24420d944b7f55b8aa55e7a42d02c0d20d0c25ebba92cdf85fdeb3dad7c7e2676d4a39197862bb90cfc9151ce48 SHA512 d2784967ca580bdc9308bc4b2449eb23601aab46bfcca10f4e7db2267e04950e4d9ffe4d0091fb916149a4982786c80959a069e0da07638bfdcf9d5b8926627b
-DIST gcc-12.1.0-patches-9.tar.xz 12536 BLAKE2B ceb045b2a5c5a2a3047d73296fa1057421ef58c7f793d1f031f43dbd1a6faf49bdf1956e96a4f8e34c4d3fde2c26fcc9b146c223d8b1b3e1f944c2ec8574b786 SHA512 b899ec2d6da65df0f32838be3c89dbb1dc6b423133aa5121635547a1aa18b5d52b920e62522143682c0818baf185ebacb75ab84383ef0ad9768ba567807da5f4
-DIST gcc-12.1.0.tar.xz 82701928 BLAKE2B dca5df8fea680dbeda721742cce5c97de7eb4be490a32a158e06b88e2b9dd092150b7cfe490bb69e48e2f75d8bba231c8a54cd46b48ddcdc01bf9553ab57019d SHA512 2121d295292814a6761edf1fba08c5f633ebe16f52b80e7b73a91050e71e1d2ed98bf17eebad263e191879561c02b48906c53faa4c4670c486a26fc75df23900
-DIST gcc-13-20220710.tar.xz 79382072 BLAKE2B 783b7c70c4ad0df6cd429adcc77a070c099c0e825205397d730316a9ec1d5dd2662f49e31a2a5b68854de4b1e8ce22a12a4098e333cf733ede26e9621fca8dee SHA512 2ce33eb1c9f92f1fded3b38e4756a399956b29c45b49f792d03852aef506f06d923bcdd06a8e2a13329b950886d82914d218a578be623a8082175a28fb215b09
-DIST gcc-13-20220724.tar.xz 79427588 BLAKE2B 7b18d146241044becbf20fb621feb3f816371417818b156cfbfa430371fce8be23246f035305fb419a0261c86503700761fb7c70bc485f28fea47866a95b5b07 SHA512 c7f6881c2b1573689b754f046d9aa00d3436535d7dc46846b321705d20e47243e2eb26d578c6f26aae3afd3bc0d5514750f871c1ec6af095cc4315c1c484aa82
-DIST gcc-13-20220731.tar.xz 79440792 BLAKE2B c7b6e8113c5c858b0e348ce930ca71c3386b91d62f4a3355df38e899dff26f9e02d44673ad1d57a93a5edb3f8633b9f8fc74b779059b9fdb54ebc0f73c95ef36 SHA512 58e320f19cebe4d7364a64a2ded60ef6fb8f68d6abcd3a3c13b0a23ab016d4f40cd9e0e12f665b713314c34b46a65c263a4f04bfac01a7f476755987365aa4e0
-DIST gcc-13-20220807.tar.xz 79472584 BLAKE2B d23ad0d06414c0e7dfc11473641abb63585c95a07b1da50f3c9d6ae6ba3f365b7bd17297914670468e8b26e4146c8de2dc35c0b96ddc752a07c1dca3a0227dce SHA512 03aed1aa6a73b4aaa5318e456334132576036ee859a26eba3d49826a03da554cec22739cc4fae441f72eb5ea53449e75b73e8f3a41192e09a6e00d4fc227a4ee
-DIST gcc-13.0.0-patches-1.tar.xz 11064 BLAKE2B 82a7ad193dac00475931840bcee82ef7a51718a74af224b03a41f8349e34c2a64a3eb29985b4e2bffde958c58782242eccaedaa54d950e8d51d8bb6f45868e0e SHA512 e04b510f529dd3187a08ae9cb9a894a3d3d30af81f13c43cc082fda7d26c44a3bf19d36ec02024b2ade8b8c193e9730246abeadee603c41b5873c5b785709921
+DIST gcc-11.4.0-patches-2.tar.xz 14224 BLAKE2B d3030c19a7bd8bd082fd39b35c3e80883ae541ab28232513ba60095fe81f5fe1fbdc54829a1556b2d278328033f6eb8a81e9ee268a6020b554388a60842b02e6 SHA512 60aa19f00fb29b7c8a68c73de274e24559dc896f551d47153ea511b202941caa950c0aff62ad28d057a8ed16f2aec2c06e681e7286d65ab3610b6948d7bb840a
+DIST gcc-11.4.0-patches-3.tar.xz 15200 BLAKE2B a393df941a2a31164f477d6bc0032e28319e8f0bd87200eb453708f85aa8c0bf5d67e733ee7b75cf6d14743e18cc941cee1b77a8247f8c5683d17a98cbeb280f SHA512 6f6096d95c7c62780d1070097739882393a8df5172c3a5ae811a8d4d1c98a0cd14a34f3f7e95410c8f210aec434330ac3b8876c688faeb130d7bb8fa3333ece9
+DIST gcc-12-20221008.tar.xz 79145884 BLAKE2B ff3d684d887e282c79fe95952a449ed5770d4bd74077553baf31c34dbd77177e680b19ac741c04aab26ac2c9bb2b89924f51f63e2f22b440decf2c65274a7640 SHA512 a35a6207e7f4375abca3ae57376c98b082846a88e83522c322d713e759367ceb2b3ad68488bed6f1645e47a106b0bbb2efbca6cb14b077672289acb4373e616f
+DIST gcc-12-20221126.tar.xz 79631864 BLAKE2B 3bb97ef4a1a17ab8b92b431b1f792c11131085a1b523efa08c5b4f995b44bf628be371564813e5affb1f8e2320bb8a9b04532e57b2deeef26b33f517783daa5e SHA512 163e0aa39dc5c24980f84000bd6ccd4b7c24581831b7a4cdbd63e4726be5c2b1933d034ce12c65cf95e4c0ebe1175af7e32facace465bfd7c7c377401350a2df
+DIST gcc-12-20221203.tar.xz 79639180 BLAKE2B 5b237eca5934c6ea869d50396279b0bbb72c9377f71c7ad9b457d1e2422337f7ff6c9cd8021f3c9f94f62b1d31348d550ed3afe49f4231099bb889c27c2c23cb SHA512 87ebbf26544e0b4e20fc36dffcb343bc074603e409e204079f3559f4b336da98af7d1c702254a54ad243c230aca60027f80029f14d7c0ff7ee13e31ecf9b73d7
+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-patches-2.tar.xz 13952 BLAKE2B a9e798911acaf45c3f585f69721130cfbecec016727a50ac0f4767b37a2ab9df39e0828abb07f1e429619cc102808f81af8422fef0265415c287d303d9d97fc0 SHA512 1808a05e98094577099d115ff5f3e136e3fc8f39fbe35c5183fd7775383f94439212e5e4174ab8d0ae8c0874e227ff84a958ffdfa1c99c9a8306a9842d126ef9
+DIST gcc-12.2.0-patches-3.tar.xz 13972 BLAKE2B 46d61854059c190525f26e411273623cc8a89b33fb9387fcd08545e244b244fc7c895eb630bc96ccc63a084c3010801c7b9d0bdb69ea8a70e034daf2d57ca51c SHA512 7e240992c59fade5e35357ebd69c1439dbadcbc1f850dc3b5360765cf899a67c662d4fe8b8eb8cf60186e7009b16dee92bc44424b9d55164d62c3d62fec7ccf4
+DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
+DIST gcc-13-20221106.tar.xz 80001320 BLAKE2B 4a86b5aedf67725b577a69112ab241b22b3b0eed6c86e2d9ed06e5045a1de1c4bc6f2e7a281f1a034b9b227e5ef72954d17900369bed6015e064f303c89e6cf2 SHA512 bd3160d23bdebd0e423800736212e340eab0a71891d579145d85931fe8fa3c9e196a3422d70a98e17d1990759bf57b3e4eb08b25544db5e4fec8448d1a33ee20
+DIST gcc-13-20221127.tar.xz 80684196 BLAKE2B 6c5bdb5f5f7c624d60a37113c09a1a97a44839849623d860af06dcf2883f7fafde286245aac6e06938ba25a3fd05588c77f73311d246ec08a22260874fb45112 SHA512 aedf3817200ce8a08afa0bd979a660de42d86aabf6c0a9028f5f34ba7d5f5b45bc4abaf35ecd62d1f8d4fac05e8a003ab7358e8a7114b8d0d63d61c1695da4c6
+DIST gcc-13-20221204.tar.xz 80748844 BLAKE2B a5ea8a72b475991602ebff668e50f03e1c9343083e33d3f1a02499fed59cdd6214743567e79d866851ed4506cabc2ff52b6e1634eabfff9deca19d4402382d36 SHA512 b40b800d4369cb899f0a8224d15e7a78f6b182d8490de01ab1520647862263cc478f49f021172c91c2c6d39cbbc4ec92e18644cf3bab5a0df44dabbc3b7c6702
+DIST gcc-13.1.0-patches-2.tar.xz 9924 BLAKE2B 568f8b9e31974f4991bd922436373320118a6fe07b7e9fe0127952894bdebc5e8684f66e645a3a5684717c687e9bb6074508972b61a3eb692c6e5f23e46359cf SHA512 9fed795ce3aa423e223864b750e50419343bbb36f53e938a691f189e954acb3a4efec4aafe466bafb3556a04c78bf68d19e3e60ffd0a2be490ea821d98e92dc9
+DIST gcc-13.1.0-patches-3.tar.xz 10984 BLAKE2B b032049090732e39c94788f4014a463e82fe186ad9ca5ca7ec1d522dfc4499bd2c229bc3bed7ed1d4e1e5f196444037acdea8b865d62c164d6daf307f949e307 SHA512 940d5f1e7f8cb48e9e6d63b5cd31dc5e4bd1669c78b3adfa6b7c30d3f85d8de4f26c1db4e3727f3789b1d439d07d3eeb9a8120f45693da6c2e6d9ca27e264941
DIST gcc-8.5.0-patches-2.tar.bz2 16921 BLAKE2B 619a47f74edf05fa01c9de59d0ff7abb027a01cf0bdec91ac41046166192f4eae561684136c4a6a5e077f64754bb5b0710905129f31b0def21d88f92e6bba7fb SHA512 b6095d4570895e2c4dd58fed5756194aea27391b813e5e2de42b2749cb318c4bea2087eb0ff92c70e7f98ae4482c49d476db57be83d7beb19fd462aa61714ab2
DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8
-DIST gcc-9.4.0-patches-1.tar.bz2 14012 BLAKE2B d5fbfd73d9c3a5b66be5b124d981fe5a7468363c83784989a50731f87931435f4b6302e4c20a64b20680581ed40005eff7bdd5855526a093f73a04c3c1ddab31 SHA512 b84884c7d2197cb14229d3321b98cd66c783cf9ebf7e5d1b1186e6cf32ee9e47d004ebad26118f9c848f9bc0a3783ceb23d9b65101d98c3bfa99874e66ee7cbc
+DIST gcc-9.5.0-patches-1.tar.xz 13772 BLAKE2B 2e2e84a28a729cd271a23716ff3fe08b7209b72254af279f04dd15dbd39482fb7d905dc9293dc326536e14bca9a53397bd7e1c4b617ed8cbe42bcf617fcce3fb SHA512 50e292e665bfae18bf71c0714074025b4f7cb87042862071815874f7c5b241acac3b8f60d85b8970b11978103c2e7616c02d789f6c3b091d7b736b65c535b743
DIST gcc-9.5.0.tar.xz 72462752 BLAKE2B 69e39314ee6bb46e3be491ba9c3cbc4914cb716f732c6d3f2b14d9382750b40c4f14b5d3051225b81f936ef8297b0ba8cb5439512e961dae5815d3bee2b0bfdb SHA512 cdd144ce4f747e051480410afc8506c90a57cb45da89071ddae377b1453bca3014422455ade9fe4563ebe51f4b6348cbc0c61905a9b8801cd597d51ad0ec62b3
diff --git a/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch b/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch
deleted file mode 100644
index d06410650bb..00000000000
--- a/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://bugs.gentoo.org/803371
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80196
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
---- a/configure
-+++ b/configure
-@@ -17044,7 +17044,7 @@ else
- fi
-
-
--RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
-+RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5
- $as_echo_n "checking where to find the target ar... " >&6; }
---- a/configure.ac
-+++ b/configure.ac
-@@ -3529,7 +3529,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
- ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
- ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc)
-
--RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
-+RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
-
- GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar])
- GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new])
-
diff --git a/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
deleted file mode 100644
index d62162f1a68..00000000000
--- a/sys-devel/gcc/gcc-10.3.0-r2.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-TOOLCHAIN_PATCH_DEV="slyfox"
-PATCH_VER="3"
-MUSL_VER="1"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- if has_version '>=sys-libs/glibc-2.32-r1'; then
- rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
- fi
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild b/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild
deleted file mode 100644
index e07e3b74876..00000000000
--- a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="0"
-PATCH_GCC_VER="10.4.0"
-MUSL_VER="1"
-MUSL_GCC_VER="10.3.0"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- if has_version '>=sys-libs/glibc-2.32-r1'; then
- rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
- fi
-
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-10.4.0.ebuild b/sys-devel/gcc/gcc-10.4.0.ebuild
index 81fd79a887f..a4652e86257 100644
--- a/sys-devel/gcc/gcc-10.4.0.ebuild
+++ b/sys-devel/gcc/gcc-10.4.0.ebuild
@@ -3,11 +3,11 @@
EAPI=8
-TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_PATCH_SUFFIX="xz"
#TOOLCHAIN_GCC_RC=1
PATCH_GCC_VER="10.4.0"
-PATCH_VER="2"
+PATCH_VER="5"
MUSL_VER="1"
MUSL_GCC_VER="10.4.0"
@@ -36,7 +36,7 @@ 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"
+ 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.4.1_p20220728.ebuild b/sys-devel/gcc/gcc-10.4.1_p20221006.ebuild
index b2fac30d2ff..147a87b6131 100644
--- a/sys-devel/gcc/gcc-10.4.1_p20220728.ebuild
+++ b/sys-devel/gcc/gcc-10.4.1_p20221006.ebuild
@@ -6,10 +6,10 @@ EAPI=8
TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="2"
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="0"
MUSL_VER="1"
-MUSL_GCC_VER="10.4.0"
+MUSL_GCC_VER="10.5.0"
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
@@ -35,9 +35,9 @@ inherit toolchain
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
+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"
diff --git a/sys-devel/gcc/gcc-10.4.1_p20220721.ebuild b/sys-devel/gcc/gcc-10.4.1_p20221124.ebuild
index b2fac30d2ff..1fa3a360153 100644
--- a/sys-devel/gcc/gcc-10.4.1_p20220721.ebuild
+++ b/sys-devel/gcc/gcc-10.4.1_p20221124.ebuild
@@ -6,10 +6,10 @@ EAPI=8
TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="2"
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="1"
MUSL_VER="1"
-MUSL_GCC_VER="10.4.0"
+MUSL_GCC_VER="10.5.0"
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
diff --git a/sys-devel/gcc/gcc-10.4.1_p20220804.ebuild b/sys-devel/gcc/gcc-10.4.1_p20221201.ebuild
index b2fac30d2ff..1fa3a360153 100644
--- a/sys-devel/gcc/gcc-10.4.1_p20220804.ebuild
+++ b/sys-devel/gcc/gcc-10.4.1_p20221201.ebuild
@@ -6,10 +6,10 @@ EAPI=8
TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
#TOOLCHAIN_GCC_RC=1
-PATCH_GCC_VER="10.4.0"
-PATCH_VER="2"
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="1"
MUSL_VER="1"
-MUSL_GCC_VER="10.4.0"
+MUSL_GCC_VER="10.5.0"
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
diff --git a/sys-devel/gcc/gcc-10.5.9999.ebuild b/sys-devel/gcc/gcc-10.5.9999.ebuild
index d43d8bf4fbb..6cba90ba4ee 100644
--- a/sys-devel/gcc/gcc-10.5.9999.ebuild
+++ b/sys-devel/gcc/gcc-10.5.9999.ebuild
@@ -5,8 +5,8 @@ EAPI=8
TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
-PATCH_GCC_VER="10.4.0"
-MUSL_GCC_VER="10.4.0"
+PATCH_GCC_VER="10.5.0"
+MUSL_GCC_VER="10.5.0"
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
diff --git a/sys-devel/gcc/gcc-11.2.0.ebuild b/sys-devel/gcc/gcc-11.2.0.ebuild
deleted file mode 100644
index 9dc5d227629..00000000000
--- a/sys-devel/gcc/gcc-11.2.0.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-TOOLCHAIN_PATCH_DEV="slyfox"
-PATCH_VER="1"
-MUSL_VER="1"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND=""
-BDEPEND="${CATEGORY}/binutils"
-
-src_prepare() {
- toolchain_src_prepare
-
- if tc-is-cross-compiler ; then
- # bug #803371
- eapply "${FILESDIR}"/gcc-11.2.0-cross-compile-include.patch
- fi
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild b/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild
deleted file mode 100644
index 4e44bafeab2..00000000000
--- a/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="4"
-PATCH_GCC_VER="11.3.0"
-MUSL_VER="1"
-MUSL_GCC_VER="11.3.0"
-
-inherit toolchain
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~riscv ~s390 sparc x86"
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.3.0.ebuild b/sys-devel/gcc/gcc-11.3.0.ebuild
index a90a5c1bc45..f5993968500 100644
--- a/sys-devel/gcc/gcc-11.3.0.ebuild
+++ b/sys-devel/gcc/gcc-11.3.0.ebuild
@@ -4,7 +4,8 @@
EAPI=7
TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="5"
+TOOLCHAIN_PATCH_SUFFIX="xz"
+PATCH_VER="7"
PATCH_GCC_VER="11.3.0"
MUSL_VER="1"
MUSL_GCC_VER="11.3.0"
@@ -19,9 +20,3 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
DEPEND="${RDEPEND}"
BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-11.3.1_p20220805.ebuild b/sys-devel/gcc/gcc-11.3.1_p20221007.ebuild
index fec8a9f9652..e821929d61b 100644
--- a/sys-devel/gcc/gcc-11.3.1_p20220805.ebuild
+++ b/sys-devel/gcc/gcc-11.3.1_p20221007.ebuild
@@ -5,7 +5,7 @@ EAPI=8
TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="1"
+PATCH_VER="2"
PATCH_GCC_VER="11.4.0"
MUSL_VER="0"
MUSL_GCC_VER="11.4.0"
@@ -27,9 +27,9 @@ inherit toolchain
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
+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.
diff --git a/sys-devel/gcc/gcc-11.3.1_p20220729.ebuild b/sys-devel/gcc/gcc-11.3.1_p20221125.ebuild
index fec8a9f9652..d6ead8b3a52 100644
--- a/sys-devel/gcc/gcc-11.3.1_p20220729.ebuild
+++ b/sys-devel/gcc/gcc-11.3.1_p20221125.ebuild
@@ -5,7 +5,7 @@ EAPI=8
TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="1"
+PATCH_VER="3"
PATCH_GCC_VER="11.4.0"
MUSL_VER="0"
MUSL_GCC_VER="11.4.0"
@@ -28,7 +28,7 @@ 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"
+# 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.
diff --git a/sys-devel/gcc/gcc-11.3.1_p20220722.ebuild b/sys-devel/gcc/gcc-11.3.1_p20221202.ebuild
index fec8a9f9652..f9fe9db4f22 100644
--- a/sys-devel/gcc/gcc-11.3.1_p20220722.ebuild
+++ b/sys-devel/gcc/gcc-11.3.1_p20221202.ebuild
@@ -5,7 +5,7 @@ EAPI=8
TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="1"
+PATCH_VER="3"
PATCH_GCC_VER="11.4.0"
MUSL_VER="0"
MUSL_GCC_VER="11.4.0"
@@ -27,9 +27,9 @@ inherit toolchain
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
+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.
diff --git a/sys-devel/gcc/gcc-12.1.0.ebuild b/sys-devel/gcc/gcc-12.1.0.ebuild
deleted file mode 100644
index d2fce9d3282..00000000000
--- a/sys-devel/gcc/gcc-12.1.0.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="5"
-PATCH_GCC_VER="12.0.0"
-MUSL_VER="4"
-MUSL_GCC_VER="12.0.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- KEYWORDS="~loong"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild
deleted file mode 100644
index 51819ad5271..00000000000
--- a/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="8"
-PATCH_GCC_VER="12.1.0"
-MUSL_VER="5"
-MUSL_GCC_VER="12.1.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.1.1_p20220723.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220723.ebuild
deleted file mode 100644
index 4ce888a6319..00000000000
--- a/sys-devel/gcc/gcc-12.1.1_p20220723.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="9"
-PATCH_GCC_VER="12.1.0"
-MUSL_VER="6"
-MUSL_GCC_VER="12.1.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- KEYWORDS="~loong"
-fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.1.1_p20220730.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220730.ebuild
deleted file mode 100644
index e6861078d44..00000000000
--- a/sys-devel/gcc/gcc-12.1.1_p20220730.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="9"
-PATCH_GCC_VER="12.1.0"
-MUSL_VER="6"
-MUSL_GCC_VER="12.1.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-#fi
-
-# Technically only if USE=hardened *too* right now, but no point in complicating it further.
-# If GCC is enabling CET by default, we need glibc to be built with support for it.
-# bug #830454
-RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
-DEPEND="${RDEPEND}"
-BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
-
-src_prepare() {
- toolchain_src_prepare
-
- eapply_user
-}
diff --git a/sys-devel/gcc/gcc-12.1.1_p20220806.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220806.ebuild
deleted file mode 100644
index e6861078d44..00000000000
--- a/sys-devel/gcc/gcc-12.1.1_p20220806.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TOOLCHAIN_PATCH_DEV="sam"
-PATCH_VER="9"
-PATCH_GCC_VER="12.1.0"
-MUSL_VER="6"
-MUSL_GCC_VER="12.1.0"
-
-inherit toolchain
-
-# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-#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.0.ebuild b/sys-devel/gcc/gcc-12.2.0.ebuild
new file mode 100644
index 00000000000..aa3dfbf98f2
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.2.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 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="1"
+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_p20221008.ebuild b/sys-devel/gcc/gcc-12.2.1_p20221008.ebuild
new file mode 100644
index 00000000000..aa3dfbf98f2
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.2.1_p20221008.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 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="1"
+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
new file mode 100644
index 00000000000..28a10fb471f
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.2.1_p20221126.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 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="1"
+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_p20221203.ebuild b/sys-devel/gcc/gcc-12.2.1_p20221203.ebuild
new file mode 100644
index 00000000000..47a0ea215e7
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.2.1_p20221203.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="3"
+PATCH_GCC_VER="12.2.0"
+MUSL_VER="1"
+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.9999.ebuild b/sys-devel/gcc/gcc-12.3.9999.ebuild
index d1a72887e79..914addefed5 100644
--- a/sys-devel/gcc/gcc-12.2.9999.ebuild
+++ b/sys-devel/gcc/gcc-12.3.9999.ebuild
@@ -4,8 +4,8 @@
EAPI=8
TOOLCHAIN_PATCH_DEV="sam"
-PATCH_GCC_VER="12.1.0"
-MUSL_GCC_VER="12.1.0"
+PATCH_GCC_VER="12.2.0"
+MUSL_GCC_VER="12.2.0"
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
@@ -17,9 +17,17 @@ if [[ $(ver_cut 3) == 9999 ]] ; then
# 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)
diff --git a/sys-devel/gcc/gcc-13.0.0_pre20220731.ebuild b/sys-devel/gcc/gcc-13.0.0_pre20220731.ebuild
deleted file mode 100644
index eaaa94a0463..00000000000
--- a/sys-devel/gcc/gcc-13.0.0_pre20220731.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
-
-TOOLCHAIN_PATCH_DEV="xen0n"
-PATCH_VER="1"
-PATCH_GCC_VER="13.0.0"
-MUSL_GCC_VER="13.0.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=""
-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.0_pre20220807.ebuild b/sys-devel/gcc/gcc-13.0.0_pre20221106.ebuild
index 641ab05e815..5cdc65a07df 100644
--- a/sys-devel/gcc/gcc-13.0.0_pre20220807.ebuild
+++ b/sys-devel/gcc/gcc-13.0.0_pre20221106.ebuild
@@ -3,10 +3,10 @@
EAPI=8
-TOOLCHAIN_PATCH_DEV="xen0n"
-PATCH_VER="1"
-PATCH_GCC_VER="13.0.0"
-MUSL_GCC_VER="13.0.0"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="2"
+PATCH_GCC_VER="13.1.0"
+MUSL_GCC_VER="13.1.0"
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
diff --git a/sys-devel/gcc/gcc-13.0.0_pre20220710.ebuild b/sys-devel/gcc/gcc-13.0.0_pre20221127.ebuild
index 0c062546388..9d34def24fa 100644
--- a/sys-devel/gcc/gcc-13.0.0_pre20220710.ebuild
+++ b/sys-devel/gcc/gcc-13.0.0_pre20221127.ebuild
@@ -3,10 +3,10 @@
EAPI=8
-TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_PATCH_DEV="soap"
+PATCH_VER="3"
PATCH_GCC_VER="13.1.0"
MUSL_GCC_VER="13.1.0"
-TOOLCHAIN_USE_GIT_PATCHES=yes
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
@@ -28,7 +28,8 @@ 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="~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.
diff --git a/sys-devel/gcc/gcc-13.0.0_pre20220724.ebuild b/sys-devel/gcc/gcc-13.0.0_pre20221204.ebuild
index 0c062546388..9d34def24fa 100644
--- a/sys-devel/gcc/gcc-13.0.0_pre20220724.ebuild
+++ b/sys-devel/gcc/gcc-13.0.0_pre20221204.ebuild
@@ -3,10 +3,10 @@
EAPI=8
-TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_PATCH_DEV="soap"
+PATCH_VER="3"
PATCH_GCC_VER="13.1.0"
MUSL_GCC_VER="13.1.0"
-TOOLCHAIN_USE_GIT_PATCHES=yes
if [[ $(ver_cut 3) == 9999 ]] ; then
MY_PV_2=$(ver_cut 2)
@@ -28,7 +28,8 @@ 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="~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.
diff --git a/sys-devel/gcc/gcc-9.5.0.ebuild b/sys-devel/gcc/gcc-9.5.0.ebuild
index 4a953b324d6..133de200677 100644
--- a/sys-devel/gcc/gcc-9.5.0.ebuild
+++ b/sys-devel/gcc/gcc-9.5.0.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
-TOOLCHAIN_PATCH_DEV="slyfox"
-PATCH_GCC_VER="9.4.0"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="9.5.0"
PATCH_VER="1"
if [[ $(ver_cut 3) == 9999 ]] ; then
diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
index b6eef667b03..8c2257393b7 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -9,10 +9,13 @@
<flag name="ada">Build the ADA language (GNAT) frontend</flag>
<flag name="cet" restrict="&gt;=sys-devel/gcc-10">Enable support for Intel Control Flow Enforcement Technology (CET)</flag>
<flag name="d">Enable support for the D programming language</flag>
+ <flag name="default-stack-clash-protection">Build packages with stack clash protection on by default</flag>
+ <flag name="default-znow">Request full relocation on start from ld.so by default</flag>
<flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets in gcc (Warning: significantly increases compile time!)</flag>
<flag name="go">Build the GCC Go language frontend.</flag>
<flag name="graphite">Add support for the framework for loop optimizations based on a polyhedral intermediate representation</flag>
- <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. This will slow down the compiler a bit as it forces all of the toolchain to be shared libs.</flag>
+ <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag>
+ <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation.</flag>
<flag name="libssp">Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag>
<flag name="lto">Build using Link Time Optimizations (LTO)</flag>
<flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag>
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
index dbb57cec059..7b9b5990c53 100644
--- a/sys-devel/gdb/Manifest
+++ b/sys-devel/gdb/Manifest
@@ -1,2 +1,3 @@
DIST gdb-11.2.tar.xz 22039420 BLAKE2B 66ce7e12c99c33c8b4e6ababa673204aab525e72c90ba54cc34a5fd69948a09dc2a9ef2050764b2464544231b1d1a6431279c2877388551ca6fbf384a3f9b464 SHA512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127
DIST gdb-12.1.tar.xz 22470332 BLAKE2B 7f6f853d1640908cf2c79932cdc1ba02549a07721c005d9c7ce2946a715761719cc164a4e68235a18664ec8a029afe3a2a0cfb57e1635f280076d6bed91317fd SHA512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d
+DIST gdb-weekly-13.0.50.20221206.tar.xz 24810920 BLAKE2B 3345a905f0350ebd6a63a5976f12e23bd4fcfa9c9025c96f3f74f9d1ed9d46f216daabf8a78171fc3bee004c6e1eb5102b7d60ea97a54a39e0002aca1a052539 SHA512 b8fc8b834856a1a137b5b680e3dca6200d292480c200e883ea1268aa1c7f75daf8b0336c22bbd37b8936f13636e276de7e27c031c32708d1ea347dcce82a0025
diff --git a/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch b/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch
new file mode 100644
index 00000000000..3b2c15de489
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch
@@ -0,0 +1,112 @@
+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/gdb-11.2.ebuild b/sys-devel/gdb/gdb-11.2.ebuild
index a7deb851755..4cf33173d0b 100644
--- a/sys-devel/gdb/gdb-11.2.ebuild
+++ b/sys-devel/gdb/gdb-11.2.ebuild
@@ -87,7 +87,7 @@ DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils
sys-apps/texinfo
- virtual/yacc
+ app-alternatives/yacc
nls? ( sys-devel/gettext )
source-highlight? ( virtual/pkgconfig )
test? ( dev-util/dejagnu )
@@ -96,6 +96,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
"${FILESDIR}"/${P}-glibc-2.35-fsqrt.patch
+ "${FILESDIR}"/${PN}-12.1-readline-8.2-build.patch
)
pkg_setup() {
diff --git a/sys-devel/gdb/gdb-12.1-r2.ebuild b/sys-devel/gdb/gdb-12.1-r2.ebuild
index 9da927c79e7..b4bf3d0ae2c 100644
--- a/sys-devel/gdb/gdb-12.1-r2.ebuild
+++ b/sys-devel/gdb/gdb-12.1-r2.ebuild
@@ -47,7 +47,7 @@ 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"
+ 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"
@@ -88,7 +88,7 @@ DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils
sys-apps/texinfo
- virtual/yacc
+ app-alternatives/yacc
nls? ( sys-devel/gettext )
source-highlight? ( virtual/pkgconfig )
test? ( dev-util/dejagnu )
diff --git a/sys-devel/gdb/gdb-12.1-r1.ebuild b/sys-devel/gdb/gdb-12.1-r3.ebuild
index f75e337dc42..d488fd670d9 100644
--- a/sys-devel/gdb/gdb-12.1-r1.ebuild
+++ b/sys-devel/gdb/gdb-12.1-r3.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
@@ -34,14 +34,11 @@ case ${PV} in
;;
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}
-"
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
LICENSE="GPL-3+ LGPL-2.1+"
SLOT="0"
@@ -88,7 +85,7 @@ DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils
sys-apps/texinfo
- virtual/yacc
+ app-alternatives/yacc
nls? ( sys-devel/gettext )
source-highlight? ( virtual/pkgconfig )
test? ( dev-util/dejagnu )
@@ -97,6 +94,8 @@ BDEPEND="
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() {
diff --git a/sys-devel/gdb/gdb-12.1.ebuild b/sys-devel/gdb/gdb-13.0.50_p20221206.ebuild
index 0accf1af301..31bf1d13784 100644
--- a/sys-devel/gdb/gdb-12.1.ebuild
+++ b/sys-devel/gdb/gdb-13.0.50_p20221206.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8,9,10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
export CTARGET=${CTARGET:-${CHOST}}
@@ -23,9 +23,11 @@ case ${PV} in
inherit git-r3
SRC_URI=""
;;
- *.*.50.2???????)
+ *.*.50_p2???????)
# weekly snapshots
- SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
+ MY_PV="${PV/_p/.}"
+ SRC_URI="https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz"
+ S="${WORKDIR}/${PN}-${MY_PV}"
;;
*)
# Normal upstream release
@@ -34,20 +36,19 @@ case ${PV} in
;;
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}
-"
+ ${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"
+ # 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 source-highlight test vanilla xml xxhash"
@@ -88,7 +89,7 @@ DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils
sys-apps/texinfo
- virtual/yacc
+ app-alternatives/yacc
nls? ( sys-devel/gettext )
source-highlight? ( virtual/pkgconfig )
test? ( dev-util/dejagnu )
@@ -96,7 +97,6 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
- "${FILESDIR}"/${P}-readline-8.2-build.patch
)
pkg_setup() {
@@ -149,10 +149,21 @@ src_configure() {
# 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}"
diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
index 9a3b277f652..940f57beb14 100644
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ b/sys-devel/gdb/gdb-9999.ebuild
@@ -50,7 +50,7 @@ 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"
+IUSE="cet guile lzma multitarget nls +python +server 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.
@@ -77,18 +77,15 @@ RDEPEND="
python? ( ${PYTHON_DEPS} )
guile? ( >=dev-scheme/guile-2.0 )
xml? ( dev-libs/expat )
- source-highlight? (
- dev-util/source-highlight
- )
- xxhash? (
- dev-libs/xxhash
- )
+ source-highlight? ( dev-util/source-highlight )
+ xxhash? ( dev-libs/xxhash )
+ zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils
sys-apps/texinfo
- virtual/yacc
+ app-alternatives/yacc
nls? ( sys-devel/gettext )
source-highlight? ( virtual/pkgconfig )
test? ( dev-util/dejagnu )
@@ -204,6 +201,7 @@ src_configure() {
$(use_with python python "${EPYTHON}")
$(use_with xxhash)
$(use_with guile)
+ $(use_with zstd)
)
if use sparc-solaris || use x86-solaris ; then
diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest
index 653a9cf0788..b0e7dcae84f 100644
--- a/sys-devel/gettext/Manifest
+++ b/sys-devel/gettext/Manifest
@@ -1,2 +1,4 @@
+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.21.tar.xz 9714352 BLAKE2B e36418323c79f582d13777083b455ae76ccb29e41a8259a2f4d6d9f5d8e2ac7c8ecc4df1b1fa2e9838c819cb27345fe254772398bdb88b3315410866048f755a SHA512 f7e2968651879f8444d43a176a149db9f9411f4a03132a7f3b37c2ed97e3978ae6888169c995c1953cb78943b6e3573811abcbb8661b6631edbbe067b2699ddf
DIST gettext-0.21.tar.xz.sig 819 BLAKE2B 22a6e5f6e8a6322e24db9c1f575754bccbf6c7cff7cd14cb51ae8f5cf17cd7b677d8ecfc6b876e1b6f8d62077d568cbf57930e1d8accc5306e6869d3c6560bf4 SHA512 67c9515ad5e11773a28599d517dd84131e4afd878d67e97f505cd024e290518ca9cffff7446c62f88b56aea2c7234d11811738e8e2a076b2159f24c2f6809703
diff --git a/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch b/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch
new file mode 100644
index 00000000000..e063785376d
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch
@@ -0,0 +1,37 @@
+OMIT_SETLOCALE_LOCK should be true when gl_get_setlocale_null_lock is provided by a dependency library, like GNU libintl.
+On Gentoo musl we use musl's libintl and gl_get_setlocale_null_lock is not provided by it, therefore we set OMIT_SETLOCALE_LOCK to 0.
+
+To properly fix this we should do AC_SEARCH_LIBS([gl_get_setlocale_null_lock], [intl], ...) in automake, but instead we do this
+hack to not get complacent. This should be fixed upstream.
+
+https://savannah.gnu.org/bugs/index.php?62659#comment7
+https://bugs.gentoo.org/830590
+diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am
+index 59b016e..d92978d 100644
+--- a/gettext-tools/libgettextpo/Makefile.am
++++ b/gettext-tools/libgettextpo/Makefile.am
+@@ -40,7 +40,7 @@ AM_CPPFLAGS = \
+ -I../src -I$(top_srcdir)/src \
+ -I../intl -I$(top_srcdir)/../gettext-runtime/intl
+
+-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@
++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@
+
+ # libgettextpo contains the public API for PO files.
+ libgettextpo_la_SOURCES = \
+diff --git a/gettext-tools/libgettextpo/Makefile.in b/gettext-tools/libgettextpo/Makefile.in
+index f76efa5..aca3a81 100644
+--- a/gettext-tools/libgettextpo/Makefile.in
++++ b/gettext-tools/libgettextpo/Makefile.in
+@@ -804,7 +804,7 @@ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+ CXX_CHOICE = @CXX_CHOICE@
+ CYGPATH_W = @CYGPATH_W@
+-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@
++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@
+ DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+ DSYMUTIL = @DSYMUTIL@
+--
+2.35.1
+
diff --git a/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch b/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch
new file mode 100644
index 00000000000..a7471ac724c
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch
@@ -0,0 +1,100 @@
+From b8fc039e4266570f5af5ee1c2cd201369a766f1e Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Tue, 11 Oct 2022 01:54:44 +0200
+Subject: [PATCH] Avoid warnings during configure execution with
+ --disable-java.
+
+Reported by Sam James <sam@cmpct.info>
+in <https://savannah.gnu.org/bugs/?63193>.
+
+* gettext-runtime/configure.ac: Expand gt_JAVACOMP_DISABLED inline.
+* gettext-tools/configure.ac: Expand gt_JAVAEXEC_DISABLED and
+gt_JAVACOMP_DISABLED inline.
+--- a/gettext-runtime/configure.ac
++++ b/gettext-runtime/configure.ac
+@@ -42,7 +42,16 @@ AS_IF([test "$JAVA_CHOICE" != no], [
+ BUILDJAVA=no
+ fi
+ ], [
+- gt_JAVACOMP_DISABLED
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
++ AC_SUBST([CONF_JAVAC])
++ AC_SUBST([HAVE_JAVAC_ENVVAR])
++ AC_SUBST([HAVE_GCJ_C])
++ AC_SUBST([HAVE_JAVAC])
++ AC_SUBST([HAVE_JIKES])
+ JAR=
+ BUILDJAVA=no
+ ])
+--- a/gettext-tools/configure.ac
++++ b/gettext-tools/configure.ac
+@@ -43,8 +43,28 @@ AS_IF([test "$JAVA_CHOICE" != no], [
+ BUILDJAVA=no
+ fi
+ ], [
+- gt_JAVAEXEC_DISABLED
+- gt_JAVACOMP_DISABLED
++ CONF_JAVA=
++ HAVE_JAVA_ENVVAR=
++ HAVE_GIJ=
++ HAVE_JAVA=
++ HAVE_JRE=
++ HAVE_JVIEW=
++ AC_SUBST([CONF_JAVA])
++ AC_SUBST([HAVE_JAVA_ENVVAR])
++ AC_SUBST([HAVE_GIJ])
++ AC_SUBST([HAVE_JAVA])
++ AC_SUBST([HAVE_JRE])
++ AC_SUBST([HAVE_JVIEW])
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
++ AC_SUBST([CONF_JAVAC])
++ AC_SUBST([HAVE_JAVAC_ENVVAR])
++ AC_SUBST([HAVE_GCJ_C])
++ AC_SUBST([HAVE_JAVAC])
++ AC_SUBST([HAVE_JIKES])
+ JAR=
+ BUILDJAVA=no
+ ])
+diff --git a/gettext-runtime/configure b/gettext-runtime/configure
+index 5e2d593..cf579ff 100755
+--- a/gettext-runtime/configure
++++ b/gettext-runtime/configure
+@@ -7070,7 +7070,11 @@ fi
+
+ else $as_nop
+
+- gt_JAVACOMP_DISABLED
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
+ JAR=
+ BUILDJAVA=no
+
+diff --git a/gettext-tools/configure b/gettext-tools/configure
+index f897bc3..3af54cd 100755
+--- a/gettext-tools/configure
++++ b/gettext-tools/configure
+@@ -8718,8 +8718,11 @@ fi
+
+ else $as_nop
+
+- gt_JAVAEXEC_DISABLED
+- gt_JAVACOMP_DISABLED
++ CONF_JAVAC=
++ HAVE_JAVAC_ENVVAR=
++ HAVE_GCJ_C=
++ HAVE_JAVAC=
++ HAVE_JIKES=
+ JAR=
+ BUILDJAVA=no
+
diff --git a/sys-devel/gettext/gettext-0.21-r4.ebuild b/sys-devel/gettext/gettext-0.21-r4.ebuild
new file mode 100644
index 00000000000..18627670fa9
--- /dev/null
+++ b/sys-devel/gettext/gettext-0.21-r4.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: Keep version bumps in sync with dev-libs/libintl.
+
+EAPI=7
+
+if [[ ${PV} != 0.21 ]] ; then
+ die "Please check if https://savannah.gnu.org/bugs/?63193 is fixed before bumping!"
+fi
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gettext.asc
+inherit mono-env libtool java-pkg-opt-2 multilib-minimal verify-sig
+
+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"
+ SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig )"
+ S="${WORKDIR}/${P/_/-}"
+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"
+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"
+
+# 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: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 )"
+
+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.19.7-disable-libintl.patch #564168
+ "${FILESDIR}"/${PN}-0.20-parallel_install.patch #685530
+ "${FILESDIR}"/${PN}-0.21_rc1-avoid_eautomake.patch
+ "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch
+)
+
+QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ default
+ elibtoolize
+ use elibc_musl && eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+}
+
+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
+
+ $(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)
+ $(use_enable openmp)
+ $(use_enable static-libs static)
+ )
+
+ 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 #43435
+ dobin gettext-tools/misc/gettextize
+ fi
+}
+
+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.21.1.ebuild b/sys-devel/gettext/gettext-0.21.1.ebuild
new file mode 100644
index 00000000000..654d28fe3fb
--- /dev/null
+++ b/sys-devel/gettext/gettext-0.21.1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2022 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
+
+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"
+ SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig )"
+ S="${WORKDIR}/${P/_/-}"
+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"
+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"
+
+# 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: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 )"
+
+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.19.7-disable-libintl.patch #564168
+ "${FILESDIR}"/${PN}-0.20-parallel_install.patch #685530
+ "${FILESDIR}"/${PN}-0.21_rc1-avoid_eautomake.patch
+ "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch
+ "${FILESDIR}"/${P}-java-autoconf.patch
+)
+
+QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
+
+pkg_setup() {
+ 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
+
+ use elibc_musl && eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch
+}
+
+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
+
+ $(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)
+ $(use_enable openmp)
+ $(use_enable static-libs static)
+ )
+
+ 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 #43435
+ dobin gettext-tools/misc/gettextize
+ fi
+}
+
+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/gnuconfig/Manifest b/sys-devel/gnuconfig/Manifest
index 0625142aef2..b677905256c 100644
--- a/sys-devel/gnuconfig/Manifest
+++ b/sys-devel/gnuconfig/Manifest
@@ -1,2 +1,2 @@
-DIST gnuconfig-20210107.tar.xz 65944 BLAKE2B 209952ca349c9859b695df5a4f8b49df689cba47b439e715108cb66ccef7ec3742162113a2ee4948a85a96b44c45d4d553f9e41c15823403f451fea6ea61bd36 SHA512 e1485b7b719994441f49b18a88f922405f74aff2ba1df16050802a311fb5438e598d989fdb7fa008734e5ec0e567e7e90486f8bc6655787bc053ad8a89650213
DIST gnuconfig-20220508.tar.xz 87616 BLAKE2B 80b981cc85153af1cdf5ba8ca3f4e22843443ee062dacf0fa104749cebb4d25e28c83a1ba82ae326457b4cd58fe17e0f28423e9b1d0cbd3ff53b72dbc3e414b3 SHA512 c77363d30733b509d9e2a795189d0a7a556f87c6d2333ad5b376175bd8df34c48777d27e85b766c7b557f151ee2d877c6cf94940dedb4d85793427daeed5c7cd
+DIST gnuconfig-20221007.tar.xz 71208 BLAKE2B 9112bd82af083043d5eae3a5ffde8174df842f3a817b1b42c17e3202a9189cff8e9f422e956e1cdd82e326949a23e27a353f72f98a6f63818e5a67096f650fed SHA512 91ca2faca02d5d78f937da70a4af026b1ba585519b9eaa2463cacd79f0f6a85ef6e1f7e0bed4243474b6e880c0b6387ca09f00eb2d40a27c3a26b6817b1bb70a
diff --git a/sys-devel/gnuconfig/gnuconfig-20210107.ebuild b/sys-devel/gnuconfig/gnuconfig-20221007.ebuild
index f0894f34d09..135754812a3 100644
--- a/sys-devel/gnuconfig/gnuconfig-20210107.ebuild
+++ b/sys-devel/gnuconfig/gnuconfig-20221007.ebuild
@@ -1,14 +1,14 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=7
-if [[ ${PV} == "99999999" ]] ; then
+if [[ ${PV} == 99999999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git"
inherit git-r3
else
- SRC_URI="https://dev.gentoo.org/~polynomial-c/dist/${PN}/${P}.tar.xz"
+ 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"
S="${WORKDIR}"
fi
@@ -18,17 +18,14 @@ HOMEPAGE="https://savannah.gnu.org/projects/config"
LICENSE="GPL-3+-with-autoconf-exception"
SLOT="0"
-IUSE=""
maint_pkg_create() {
- cd "${S}"
+ cd "${S}" || die
- make ChangeLog || die
+ emake ChangeLog
local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
[[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
- cp "${FILESDIR}"/${PV}/*.patch . || die
-
local tar="${T}/gnuconfig-${ver}.tar.xz"
tar -Jcf "${tar}" ./* || die "creating tar failed"
einfo "Packaged tar now available:"
@@ -36,7 +33,7 @@ maint_pkg_create() {
}
src_unpack() {
- if [[ ${PV} == "99999999" ]] ; then
+ if [[ ${PV} == 99999999 ]] ; then
git-r3_src_unpack
maint_pkg_create
else
@@ -44,17 +41,6 @@ src_unpack() {
fi
}
-src_prepare() {
- default
- eapply "${S}"/*.patch
-}
-
-src_compile() { :;}
-
-src_test() {
- emake check
-}
-
src_install() {
insinto /usr/share/${PN}
doins config.{sub,guess}
diff --git a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
index 3c5c54ade82..712d8c0126e 100644
--- a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
+++ b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=7
if [[ ${PV} == 99999999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git"
@@ -26,8 +26,6 @@ maint_pkg_create() {
local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
[[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
- cp "${FILESDIR}"/${PV}/*.patch . || die
-
local tar="${T}/gnuconfig-${ver}.tar.xz"
tar -Jcf "${tar}" ./* || die "creating tar failed"
einfo "Packaged tar now available:"
@@ -43,16 +41,6 @@ src_unpack() {
fi
}
-src_prepare() {
- default
-
- eapply "${S}"/*.patch
-}
-
-src_test() {
- emake check
-}
-
src_install() {
insinto /usr/share/${PN}
doins config.{sub,guess}
diff --git a/sys-devel/gnuconfig/metadata.xml b/sys-devel/gnuconfig/metadata.xml
index 44a4bf40a0e..fa5be8d4e32 100644
--- a/sys-devel/gnuconfig/metadata.xml
+++ b/sys-devel/gnuconfig/metadata.xml
@@ -6,4 +6,7 @@
<name>Gentoo Base System</name>
</maintainer>
<stabilize-allarches/>
+<upstream>
+ <remote-id type="savannah">config</remote-id>
+</upstream>
</pkgmetadata>
diff --git a/sys-devel/icecream/Manifest b/sys-devel/icecream/Manifest
index 7641b4101f3..715a372facd 100644
--- a/sys-devel/icecream/Manifest
+++ b/sys-devel/icecream/Manifest
@@ -1,2 +1 @@
-DIST icecream-1.3.1.tar.gz 224068 BLAKE2B d7d66dadf27b0b88ab706bf217ce2b0d33b5db2ed95e48c4e9dcbd000931688ad6809ecbd4e14f0f3889bcebddc8543bd364c9dda09ba71e5dc04d0a5a2122d5 SHA512 d850394b4093defcf2c50bb3f9306348a45bf17d21f4730baeee7125998c2a548b7b3a7597785855d7e388e84830769bf0ec1c4136330a4c8e359cbdd111f5da
DIST icecream-1.4.tar.gz 232707 BLAKE2B 5fdebea4d0eba4a99e8c7c01acab46ec323a887d3fe9944da23ae7089403a9ebf7bf9870ca61af49578af6adf49679341f7070f9e3da3e8c7c2f50d9d4e7c3fe SHA512 b77dd630c51b7b6b4d7fa06cd14a580891b974fe2d50074f7a3b129adc558fc7ce19b3a3716a6798c2fd0f7d0d3a1bc295bbedee3ed6dafa015f309c7c2590f5
diff --git a/sys-devel/icecream/icecream-1.3.1.ebuild b/sys-devel/icecream/icecream-1.3.1.ebuild
deleted file mode 100644
index 72ab4fad07b..00000000000
--- a/sys-devel/icecream/icecream-1.3.1.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-AT_NOELIBTOOLIZE="yes"
-inherit autotools systemd tmpfiles
-
-DESCRIPTION="Distributed compiler with a central scheduler to share build load"
-HOMEPAGE="https://github.com/icecc/icecream"
-SRC_URI="https://github.com/icecc/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
-
-DEPEND="app-arch/libarchive:=
- app-arch/zstd:=
- acct-user/icecream
- acct-group/icecream
- dev-libs/lzo:2
- sys-libs/libcap-ng"
-RDEPEND="${DEPEND}
- dev-util/shadowman"
-BDEPEND="app-text/docbook2X"
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-src_configure() {
- econf \
- --enable-clang-rewrite-includes \
- --enable-clang-wrappers
-}
-
-src_install() {
- default
-
- find "${ED}" -name '*.la' -delete || die
-
- systemd_dounit "${FILESDIR}"/iceccd.service
- systemd_dounit "${FILESDIR}"/icecc-scheduler.service
-
- newconfd suse/sysconfig.icecream icecream
- newinitd "${FILESDIR}"/icecream.openrc icecream
-
- keepdir /var/log/icecream
- fowners icecream:icecream /var/log/icecream
- fperms 0750 /var/log/icecream
-
- newtmpfiles "${FILESDIR}"/icecream-tmpfiles.conf icecream.conf
-
- insinto /etc/logrotate.d
- newins suse/logrotate icecream
-
- insinto /etc/firewalld/services
- doins suse/iceccd.xml
- doins suse/icecc-scheduler.xml
-
- insinto /usr/share/shadowman/tools
- newins - icecc <<<"${EPREFIX}"/usr/libexec/icecc/bin
-}
-
-pkg_prerm() {
- if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then
- eselect compiler-shadow remove icecc
- fi
-}
-
-pkg_postinst() {
- tmpfiles_process icecream.conf
-
- if [[ -z ${ROOT} ]]; then
- eselect compiler-shadow update icecc
- fi
-}
diff --git a/sys-devel/kgcc64/Manifest b/sys-devel/kgcc64/Manifest
index 437bf5747f2..dcbdd672a59 100644
--- a/sys-devel/kgcc64/Manifest
+++ b/sys-devel/kgcc64/Manifest
@@ -1,8 +1,8 @@
-DIST gcc-10.3.0-patches-1.tar.bz2 15282 BLAKE2B ef283e8b108af9bfd3324fabb95c835374113c6ff2cf1430a5568b3d1b27183e6de6751367c1e5720c85ac4c45132848888d5510c63f95e88a1f623b6bcf4000 SHA512 6dc435c8619a1532000fae843b9964d0d1e28d3cc9cc1962ab7391570a0cf1135424ea5c0b0d3d5ec5ea863f02e963be2ec4c94822f217fc692a1d808325404e
-DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
+DIST gcc-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-9.3.0-patches-3.tar.bz2 14193 BLAKE2B 4863fec1af41a8cdb2c24479b28812df36c1f71ab71d267ff0efc467cfb8ce99ed77714ceaedfb08b0d1eb0eb9316758cc7cbc5a8ad0bb582050690935e64b46 SHA512 8b90a5826df64e6f74e4f6c0e5acead695b38f671e26485b110d5b341daaad4ac21aabb04baae9ad457408eed274888b7f785bbc782611acfc7261e6a315d110
-DIST gcc-9.3.0.tar.xz 70533868 BLAKE2B 21efb1432aefad5ed9b9b395e88ef2adfda3a8ea6e3e808cd151da6e66df9fed1bafdc8b8ff055d4b2272ac786d8b7ddc4293bb6b51c55c40a261a0eda0e7cb4 SHA512 4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de
-DIST gcc-9.4.0-patches-1.tar.bz2 14012 BLAKE2B d5fbfd73d9c3a5b66be5b124d981fe5a7468363c83784989a50731f87931435f4b6302e4c20a64b20680581ed40005eff7bdd5855526a093f73a04c3c1ddab31 SHA512 b84884c7d2197cb14229d3321b98cd66c783cf9ebf7e5d1b1186e6cf32ee9e47d004ebad26118f9c848f9bc0a3783ceb23d9b65101d98c3bfa99874e66ee7cbc
-DIST gcc-9.4.0.tar.xz 72411232 BLAKE2B 4bb000d33d6bd2d6cc91c040713f27f79dcf726ef8ab1542c711e0c25651507628510b1373bc73aef71ffb660afddb2eb8d8c8540f5f1498ee243cfff6c0be67 SHA512 dfd3500bf21784b8351a522d53463cf362ede66b0bc302edf350bb44e94418497a8b4b797b6af8ca9b2eeb746b3b115d9c3698381b989546e9151b4496415624
+DIST gcc-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
diff --git a/sys-devel/kgcc64/kgcc64-10.3.0.ebuild b/sys-devel/kgcc64/kgcc64-10.3.0.ebuild
deleted file mode 100644
index 3eb8d3aeded..00000000000
--- a/sys-devel/kgcc64/kgcc64-10.3.0.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
-
-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="slyfox"
-GCC_TARGET_NO_MULTILIB=true
-
-PATCH_VER="1"
-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
-DEPEND="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-9.3.0-r2.ebuild b/sys-devel/kgcc64/kgcc64-10.4.0.ebuild
index 1c81c1c0fb3..c78e173424f 100644
--- a/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild
+++ b/sys-devel/kgcc64/kgcc64-10.4.0.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
@@ -13,10 +13,15 @@ case ${CHOST} in
esac
export CTARGET
TOOLCHAIN_ALLOWED_LANGS="c"
-TOOLCHAIN_PATCH_DEV="slyfox"
+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"
GCC_TARGET_NO_MULTILIB=true
-PATCH_VER="3"
inherit toolchain
DESCRIPTION="64bit kernel compiler"
diff --git a/sys-devel/kgcc64/kgcc64-9.4.0.ebuild b/sys-devel/kgcc64/kgcc64-12.2.0.ebuild
index 25de4c73834..69d06d239f4 100644
--- a/sys-devel/kgcc64/kgcc64-9.4.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-12.2.0.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
@@ -13,10 +13,12 @@ case ${CHOST} in
esac
export CTARGET
TOOLCHAIN_ALLOWED_LANGS="c"
-TOOLCHAIN_PATCH_DEV="slyfox"
-GCC_TARGET_NO_MULTILIB=true
-
+TOOLCHAIN_PATCH_DEV="sam"
PATCH_VER="1"
+PATCH_GCC_VER="12.2.0"
+MUSL_VER="1"
+MUSL_GCC_VER="12.2.0"
+GCC_TARGET_NO_MULTILIB=true
inherit toolchain
DESCRIPTION="64bit kernel compiler"
@@ -26,7 +28,7 @@ KEYWORDS="~hppa"
# unlike every other target, hppa has not unified the 32/64 bit
# ports in binutils yet
-DEPEND="hppa? ( sys-devel/binutils-hppa64 )"
+BDEPEND="hppa? ( sys-devel/binutils-hppa64 )"
pkg_postinst() {
toolchain_pkg_postinst
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r1.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r1.ebuild
new file mode 100644
index 00000000000..c1a6e31f926
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld
+"
+
+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 ../../../../bin/ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ../../../../bin/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-14-r2.ebuild
new file mode 100644
index 00000000000..ee8671571c7
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-14-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r1.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r1.ebuild
new file mode 100644
index 00000000000..c1a6e31f926
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld
+"
+
+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 ../../../../bin/ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ../../../../bin/ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild
new file mode 100644
index 00000000000..2252eb1bae7
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r1.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r1.ebuild
new file mode 100644
index 00000000000..0fc37704b2b
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS=""
+PROPERTIES="live"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld
+"
+
+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 ../../../../bin/ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ../../../../bin/ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
new file mode 100644
index 00000000000..75dc4a1de3c
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS=""
+PROPERTIES="live"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/lld:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ dosym ld.lld "${dest}/ld"
+ for chost in "${chosts[@]}"; do
+ dosym ld.lld "${dest}/${chost}-ld"
+ done
+}
diff --git a/sys-devel/lld-toolchain-symlinks/metadata.xml b/sys-devel/lld-toolchain-symlinks/metadata.xml
new file mode 100644
index 00000000000..69ca87c0178
--- /dev/null
+++ b/sys-devel/lld-toolchain-symlinks/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="multilib-symlinks">
+ Install symlinks for all ABI CHOSTs. Note that this can
+ result in gcc being overrode for native builds, as well
+ as conflict with crossdev if used for the same targets.
+ </flag>
+ <flag name="native-symlinks">
+ Install generic 'ld' symlink, as well as ${CTARGET}-ld.
+ These symlinks are installed into slotted LLVM bindir,
+ so they should not take precedence over symlinks installed
+ into /usr/bin by <pkg>sys-devel/binutils-config</pkg>
+ but they can be helpful for binutils-free setups.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index 0baa75d11b4..37c1ced9405 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -1,5 +1,9 @@
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.0rc2.src.tar.xz 112110968 BLAKE2B 98c3769f17f1958fbec771409eef781f5ca845363656c70fe5cd20bca1b8471e7a8773a7d4e395700c297a5f3f208fe1303cf18e2a73b45388b782fb7484106b SHA512 eee1bee1f83cc468fb4bb6839acbd5c1618dc35f35e51cd078288b91bad95d52edaadd05c88f2d72d51c1c338ba08b3346c070a28693b1224639eb7a1ef4a4d9
-DIST llvm-project-15.0.0rc2.src.tar.xz.sig 438 BLAKE2B 09f260b30724b41b27ef621929c086fd6c13bde51c4adb880897b549b2d336682f617faf3dd636ceb795e329b664972cf50745ab49f84e7540658d53074510da SHA512 9f695a309fbb15026dc133eb17d33abd26831eb036fad79dd8df37d4f4d9eeae1ca463acd037d2a1882bc2cff763e4bda507d1d827d845613bfd62d0f9fbd4ca
+DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6cc574a31c4abe038331b86206348ac3ce93a243add2be3a0bbfc2ec5ec3f3562a5b5efea745cb1943c9c9153bc7b0fcf4de22e SHA512 cf2a89ebb6bc9d7e3f1fd09531c84ac9927cdbe5ee13a6fcb8ce4d08e5a9d6d480ad982f62126b9c757beafa283b34f2ba1fbc56223c641e70da2be4627f59a6
+DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
+DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
+DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-959c9cc7acf4d0aa433f2436e2a45b782e18022a.tar.gz 171575300 BLAKE2B 090d41a8913f8e061d297e66ca653d95e18b8da744464d7085d7a199c0a444753a82b6ff6503e142aec81be01b419323cdbe3709497738df74afa886d69fd63d SHA512 fc3b26e148ead7a07b4d1509909a42712a43b179da435b052c26a237b0d2ae88c3c8d76eaa93c415be1ed0f0b5fb55e0ad92f427a18d70bc9634a6e7d1b6a4d9
+DIST llvm-project-e99edb92356b5ba078b5bc4d5846770414586a1d.tar.gz 171822327 BLAKE2B cdaa704c9f238f34751b92df92f8a767b1204f868dfd8a6f1eb3eeacaaf9c4b63c55a7c0534af124fddb65cf80263f72b79190696c8077e2990984a84a040f2a SHA512 37f45a56d6086df60c9832b75da3b2d78b8ec0fe094f07d41695f0565e4de0c13e460b1fef495864f07300d41f5b32769f0862b0fa5d53c0db9a0ccec1a09072
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
diff --git a/sys-devel/lld/lld-13.0.1.ebuild b/sys-devel/lld/lld-13.0.1-r1.ebuild
index 261c2c5ddab..202cb56a22b 100644
--- a/sys-devel/lld/lld-13.0.1.ebuild
+++ b/sys-devel/lld/lld-13.0.1-r1.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
inherit cmake flag-o-matic llvm llvm.org python-any-r1
@@ -10,29 +10,35 @@ DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
IUSE="debug test"
RESTRICT="!test? ( test )"
-RDEPEND="~sys-devel/llvm-${PV}"
-DEPEND="${RDEPEND}"
+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}]")
- )"
+ $(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}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -54,6 +60,7 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
diff --git a/sys-devel/lld/lld-14.0.6.ebuild b/sys-devel/lld/lld-14.0.6-r1.ebuild
index cc28bfce559..39dce69bcda 100644
--- a/sys-devel/lld/lld-14.0.6.ebuild
+++ b/sys-devel/lld/lld-14.0.6-r1.ebuild
@@ -10,7 +10,7 @@ DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
IUSE="debug test"
RESTRICT="!test? ( test )"
@@ -20,11 +20,12 @@ DEPEND="
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
test? (
>=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
@@ -33,11 +34,11 @@ LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
llvm.org_set_globals
python_check_deps() {
- python_has_version "~dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -59,6 +60,7 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
diff --git a/sys-devel/lld/lld-15.0.0_rc2.ebuild b/sys-devel/lld/lld-15.0.5.ebuild
index 76bdcb369c4..65ca265fda9 100644
--- a/sys-devel/lld/lld-15.0.0_rc2.ebuild
+++ b/sys-devel/lld/lld-15.0.5.ebuild
@@ -10,34 +10,39 @@ DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86"
IUSE="debug test"
RESTRICT="!test? ( test )"
DEPEND="
~sys-devel/llvm-${PV}
+ sys-libs/zlib:=
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
test? (
>=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-15-r2:${LLVM_MAJOR}
+"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
llvm.org_set_globals
python_check_deps() {
- python_has_version "~dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -59,6 +64,7 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
diff --git a/sys-devel/lld/lld-15.0.0.9999.ebuild b/sys-devel/lld/lld-15.0.6.9999.ebuild
index 76bdcb369c4..366775e1368 100644
--- a/sys-devel/lld/lld-15.0.0.9999.ebuild
+++ b/sys-devel/lld/lld-15.0.6.9999.ebuild
@@ -10,34 +10,39 @@ DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
IUSE="debug test"
RESTRICT="!test? ( test )"
DEPEND="
~sys-devel/llvm-${PV}
+ sys-libs/zlib:=
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
test? (
>=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-15-r2:${LLVM_MAJOR}
+"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
llvm.org_set_globals
python_check_deps() {
- python_has_version "~dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -59,6 +64,7 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
diff --git a/sys-devel/lld/lld-15.0.6.ebuild b/sys-devel/lld/lld-15.0.6.ebuild
new file mode 100644
index 00000000000..b9d830d792d
--- /dev/null
+++ b/sys-devel/lld/lld-15.0.6.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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}
+ sys-libs/zlib:=
+"
+RDEPEND="
+ ${DEPEND}
+ !sys-devel/lld:0
+"
+BDEPEND="
+ test? (
+ >=dev-util/cmake-3.16
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ )
+"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-15-r2:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
+LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
+llvm.org_set_globals
+
+python_check_deps() {
+ 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-16.0.0.9999.ebuild b/sys-devel/lld/lld-16.0.0.9999.ebuild
index 76bdcb369c4..8113bdadff2 100644
--- a/sys-devel/lld/lld-16.0.0.9999.ebuild
+++ b/sys-devel/lld/lld-16.0.0.9999.ebuild
@@ -10,34 +10,40 @@ DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
-IUSE="debug test"
+IUSE="debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}
+ ~sys-devel/llvm-${PV}[zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
"
RDEPEND="
${DEPEND}
+ !sys-devel/lld:0
"
BDEPEND="
test? (
>=dev-util/cmake-3.16
- $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
)
"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
-LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
+LLVM_TEST_COMPONENTS=( llvm/utils third-party )
llvm.org_set_globals
python_check_deps() {
- python_has_version "~dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
}
pkg_setup() {
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
@@ -59,12 +65,11 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
)
use test && mycmakeargs+=(
- -DLLVM_BUILD_TESTS=ON
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
-DPython3_EXECUTABLE="${PYTHON}"
diff --git a/sys-devel/lld/lld-16.0.0_pre20221126.ebuild b/sys-devel/lld/lld-16.0.0_pre20221126.ebuild
new file mode 100644
index 00000000000..8113bdadff2
--- /dev/null
+++ b/sys-devel/lld/lld-16.0.0_pre20221126.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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=""
+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="
+ 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}"
+ )
+ 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_pre20221205.ebuild b/sys-devel/lld/lld-16.0.0_pre20221205.ebuild
new file mode 100644
index 00000000000..8113bdadff2
--- /dev/null
+++ b/sys-devel/lld/lld-16.0.0_pre20221205.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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=""
+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="
+ 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}"
+ )
+ 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 0baa75d11b4..37c1ced9405 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -1,5 +1,9 @@
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.0rc2.src.tar.xz 112110968 BLAKE2B 98c3769f17f1958fbec771409eef781f5ca845363656c70fe5cd20bca1b8471e7a8773a7d4e395700c297a5f3f208fe1303cf18e2a73b45388b782fb7484106b SHA512 eee1bee1f83cc468fb4bb6839acbd5c1618dc35f35e51cd078288b91bad95d52edaadd05c88f2d72d51c1c338ba08b3346c070a28693b1224639eb7a1ef4a4d9
-DIST llvm-project-15.0.0rc2.src.tar.xz.sig 438 BLAKE2B 09f260b30724b41b27ef621929c086fd6c13bde51c4adb880897b549b2d336682f617faf3dd636ceb795e329b664972cf50745ab49f84e7540658d53074510da SHA512 9f695a309fbb15026dc133eb17d33abd26831eb036fad79dd8df37d4f4d9eeae1ca463acd037d2a1882bc2cff763e4bda507d1d827d845613bfd62d0f9fbd4ca
+DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6cc574a31c4abe038331b86206348ac3ce93a243add2be3a0bbfc2ec5ec3f3562a5b5efea745cb1943c9c9153bc7b0fcf4de22e SHA512 cf2a89ebb6bc9d7e3f1fd09531c84ac9927cdbe5ee13a6fcb8ce4d08e5a9d6d480ad982f62126b9c757beafa283b34f2ba1fbc56223c641e70da2be4627f59a6
+DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
+DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
+DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-959c9cc7acf4d0aa433f2436e2a45b782e18022a.tar.gz 171575300 BLAKE2B 090d41a8913f8e061d297e66ca653d95e18b8da744464d7085d7a199c0a444753a82b6ff6503e142aec81be01b419323cdbe3709497738df74afa886d69fd63d SHA512 fc3b26e148ead7a07b4d1509909a42712a43b179da435b052c26a237b0d2ae88c3c8d76eaa93c415be1ed0f0b5fb55e0ad92f427a18d70bc9634a6e7d1b6a4d9
+DIST llvm-project-e99edb92356b5ba078b5bc4d5846770414586a1d.tar.gz 171822327 BLAKE2B cdaa704c9f238f34751b92df92f8a767b1204f868dfd8a6f1eb3eeacaaf9c4b63c55a7c0534af124fddb65cf80263f72b79190696c8077e2990984a84a040f2a SHA512 37f45a56d6086df60c9832b75da3b2d78b8ec0fe094f07d41695f0565e4de0c13e460b1fef495864f07300d41f5b32769f0862b0fa5d53c0db9a0ccec1a09072
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
diff --git a/sys-devel/llvm-common/llvm-common-13.0.1.ebuild b/sys-devel/llvm-common/llvm-common-13.0.1.ebuild
index e77208540cb..c8abb7bab80 100644
--- a/sys-devel/llvm-common/llvm-common-13.0.1.ebuild
+++ b/sys-devel/llvm-common/llvm-common-13.0.1.ebuild
@@ -10,7 +10,7 @@ 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"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
IUSE=""
RDEPEND="!sys-devel/llvm:0"
diff --git a/sys-devel/llvm-common/llvm-common-15.0.5.ebuild b/sys-devel/llvm-common/llvm-common-15.0.5.ebuild
new file mode 100644
index 00000000000..a7f475d5e06
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-15.0.5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+
+LLVM_COMPONENTS=( llvm/utils/vim )
+llvm.org_set_globals
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r */
+ # some users may find it useful
+ newdoc README README.vim
+ dodoc vimrc
+}
diff --git a/sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-15.0.6.9999.ebuild
index df37476f6fb..df37476f6fb 100644
--- a/sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild
+++ b/sys-devel/llvm-common/llvm-common-15.0.6.9999.ebuild
diff --git a/sys-devel/llvm-common/llvm-common-15.0.6.ebuild b/sys-devel/llvm-common/llvm-common-15.0.6.ebuild
new file mode 100644
index 00000000000..104c8747bbe
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-15.0.6.ebuild
@@ -0,0 +1,28 @@
+# 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-16.0.0_pre20221126.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0_pre20221126.ebuild
new file mode 100644
index 00000000000..80430a85b69
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-16.0.0_pre20221126.ebuild
@@ -0,0 +1,28 @@
+# 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="~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-15.0.0_rc2.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0_pre20221205.ebuild
index df37476f6fb..df37476f6fb 100644
--- a/sys-devel/llvm-common/llvm-common-15.0.0_rc2.ebuild
+++ b/sys-devel/llvm-common/llvm-common-16.0.0_pre20221205.ebuild
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14-r1.ebuild
new file mode 100644
index 00000000000..8d59c568c62
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2022 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"
+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="
+ 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-15-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild
new file mode 100644
index 00000000000..c5ec5834758
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2022 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"
+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="
+ sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local tools=(
+ addr2line ar dlltool nm objcopy objdump ranlib readelf size
+ strings strip windres
+ )
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${t}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${chost}-${t}"
+ done
+ done
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
new file mode 100644
index 00000000000..c24f550dfe7
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2022 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"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~loong"
+IUSE="multilib-symlinks +native-symlinks"
+
+RDEPEND="
+ sys-devel/llvm:${SLOT}
+"
+
+src_install() {
+ use native-symlinks || return
+
+ local tools=(
+ addr2line ar dlltool nm objcopy objdump ranlib readelf size
+ strings strip windres
+ )
+ local chosts=( "${CHOST}" )
+ if use multilib-symlinks; then
+ local abi
+ for abi in $(get_all_abis); do
+ chosts+=( "$(get_abi_CHOST "${abi}")" )
+ done
+ fi
+
+ local chost t
+ local dest=/usr/lib/llvm/${SLOT}/bin
+ dodir "${dest}"
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${t}"
+ done
+ for chost in "${chosts[@]}"; do
+ for t in "${tools[@]}"; do
+ dosym "llvm-${t}" "${dest}/${chost}-${t}"
+ done
+ done
+}
diff --git a/sys-devel/llvm-toolchain-symlinks/metadata.xml b/sys-devel/llvm-toolchain-symlinks/metadata.xml
new file mode 100644
index 00000000000..d62775dfc3a
--- /dev/null
+++ b/sys-devel/llvm-toolchain-symlinks/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="multilib-symlinks">
+ Install symlinks for all ABI CHOSTs. Note that this can
+ result in gcc being overrode for native builds, as well
+ as conflict with crossdev if used for the same targets.
+ </flag>
+ <flag name="native-symlinks">
+ Install generic tool symlinks like 'objdump' and 'ranlib',
+ as well as ${CTARGET}-*. These symlinks are installed
+ into slotted LLVM bindir, so they should not take precedence
+ over symlinks installed into /usr/bin
+ by <pkg>sys-devel/binutils-config</pkg> but they can be
+ helpful for binutils-free setups.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index f69812dabd8..75e826b1c16 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -1,11 +1,18 @@
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.5-manpages.tar.bz2 225568 BLAKE2B d6257b7296b9be118e0729b384331af200cd00eec3228e053f5ae791ef08b632b40723cd30b0ddb229c9c7ca86c1c59f953862b87129f6cd79a9cf2df8f3be9c SHA512 e524b9c0f3c09e0d9b436ec201d0123534d03da55a97fd762ce772c58bdac796a0e70d92dba2e7462ee0a4afc7f4f7e0423f10e4cfd41c801655ec4a5f05b14b
+DIST llvm-15.0.6-manpages.tar.bz2 229125 BLAKE2B 926c31b02e295fb2a58056fd75cd04017edcb9b01d23316f002e7d3a00ef77e84d6f04bf8387f1fe9a1d159c7d271248766d3205e747c4e9542bf93f209300da SHA512 94225b46013fab113ecdbe7c150dbb989eae2007c4ed338014fbff7e6e1dd7340eec58c560f22ac1b04df8e14678b33b372c9afd06c10943f099b1a7bb63a048
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.0-rc2.tar.xz 5768 BLAKE2B 03822c4dfbe3157d9131a3524beeda22fbc6adc937af052fd0fbcc23fb6ea86e1a5e015c316b53019820de5b81b1b065bfcbc31608598307f03af39f215fb12e SHA512 b9d7adb9b738a565c2142360c5ff7a7aa8405ce78af8767867203dd003e5bdb2b8a7f14179fdb7dc0c5cdc696cfff55c4886cfcd0894672284b453943e4e7269
+DIST llvm-gentoo-patchset-15.0.5.tar.xz 15912 BLAKE2B be6da35631073099cdce66746a318080999f7dace4b07470b0a5d0a9ce93f68e51b06d7ddc174b98a47677a0ec30fb17fd9cfcaffd4e6055d8b5f70084c2262b SHA512 708f49129a5ec48f2fa26d50573734e13888e3e10d09ed24f728b687294b31b5f30773ac1e74890e3b73539c057911611dc91791e2cb18cc0a11e8271ac4e990
+DIST llvm-gentoo-patchset-15.0.6.tar.xz 15888 BLAKE2B a3d02ad1b3e17b951252963accde21f9bdd430e0fc084a5c6cd6419d403a2712d06a02cb8402a098baae794d766faffa0da89cf2797957044c5145a2a6f2bab9 SHA512 e4252b5856885a2aa78c607cb3bd874eb9a8c9d3d03646091a71fbb6d2584bd29cf9d2fb7c381e52be0b665fbd258ae46137ff8b238b8b906d3950042fb73fe5
DIST llvm-gentoo-patchset-9999-r3.tar.xz 4076 BLAKE2B 30bdf740606a1718ae45d850803385d425b656fbbe0250f587cad54f55272e3617d5ee0d04f534a58f87408b0a2dea322ebf1bb8cd653a2beba21d0bc5778c62 SHA512 2c7080ffd09d7dcf4c72a97044a5c63ab895250721d60270bc51c2095aef5f9039781892b4c0d14e942611686153f874a1f52a1c854bb8ca093383c08bdc005a
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.0rc2.src.tar.xz 112110968 BLAKE2B 98c3769f17f1958fbec771409eef781f5ca845363656c70fe5cd20bca1b8471e7a8773a7d4e395700c297a5f3f208fe1303cf18e2a73b45388b782fb7484106b SHA512 eee1bee1f83cc468fb4bb6839acbd5c1618dc35f35e51cd078288b91bad95d52edaadd05c88f2d72d51c1c338ba08b3346c070a28693b1224639eb7a1ef4a4d9
-DIST llvm-project-15.0.0rc2.src.tar.xz.sig 438 BLAKE2B 09f260b30724b41b27ef621929c086fd6c13bde51c4adb880897b549b2d336682f617faf3dd636ceb795e329b664972cf50745ab49f84e7540658d53074510da SHA512 9f695a309fbb15026dc133eb17d33abd26831eb036fad79dd8df37d4f4d9eeae1ca463acd037d2a1882bc2cff763e4bda507d1d827d845613bfd62d0f9fbd4ca
+DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6cc574a31c4abe038331b86206348ac3ce93a243add2be3a0bbfc2ec5ec3f3562a5b5efea745cb1943c9c9153bc7b0fcf4de22e SHA512 cf2a89ebb6bc9d7e3f1fd09531c84ac9927cdbe5ee13a6fcb8ce4d08e5a9d6d480ad982f62126b9c757beafa283b34f2ba1fbc56223c641e70da2be4627f59a6
+DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
+DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
+DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-959c9cc7acf4d0aa433f2436e2a45b782e18022a.tar.gz 171575300 BLAKE2B 090d41a8913f8e061d297e66ca653d95e18b8da744464d7085d7a199c0a444753a82b6ff6503e142aec81be01b419323cdbe3709497738df74afa886d69fd63d SHA512 fc3b26e148ead7a07b4d1509909a42712a43b179da435b052c26a237b0d2ae88c3c8d76eaa93c415be1ed0f0b5fb55e0ad92f427a18d70bc9634a6e7d1b6a4d9
+DIST llvm-project-e99edb92356b5ba078b5bc4d5846770414586a1d.tar.gz 171822327 BLAKE2B cdaa704c9f238f34751b92df92f8a767b1204f868dfd8a6f1eb3eeacaaf9c4b63c55a7c0534af124fddb65cf80263f72b79190696c8077e2990984a84a040f2a SHA512 37f45a56d6086df60c9832b75da3b2d78b8ec0fe094f07d41695f0565e4de0c13e460b1fef495864f07300d41f5b32769f0862b0fa5d53c0db9a0ccec1a09072
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
diff --git a/sys-devel/llvm/llvm-13.0.1.ebuild b/sys-devel/llvm/llvm-13.0.1.ebuild
index 9bec4f84d3a..cf405c12164 100644
--- a/sys-devel/llvm/llvm-13.0.1.ebuild
+++ b/sys-devel/llvm/llvm-13.0.1.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://llvm.org/"
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"
+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 )"
@@ -67,8 +67,8 @@ llvm.org_set_globals
python_check_deps() {
use doc || return 0
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+ python_has_version "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
}
check_uptodate() {
@@ -174,18 +174,6 @@ src_prepare() {
llvm.org_src_prepare
}
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
get_distribution_components() {
local sep=${1-;}
@@ -367,7 +355,7 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
diff --git a/sys-devel/llvm/llvm-14.0.6-r2.ebuild b/sys-devel/llvm/llvm-14.0.6-r2.ebuild
index 01b9bbfd4b9..0f53397cf7a 100644
--- a/sys-devel/llvm/llvm-14.0.6-r2.ebuild
+++ b/sys-devel/llvm/llvm-14.0.6-r2.ebuild
@@ -186,18 +186,6 @@ src_prepare() {
rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die
}
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
get_distribution_components() {
local sep=${1-;}
@@ -381,7 +369,7 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
diff --git a/sys-devel/llvm/llvm-15.0.0_rc2.ebuild b/sys-devel/llvm/llvm-15.0.5.ebuild
index f6bca5b0ce6..86b72d9c66b 100644
--- a/sys-devel/llvm/llvm-15.0.0_rc2.ebuild
+++ b/sys-devel/llvm/llvm-15.0.5.ebuild
@@ -17,9 +17,12 @@ HOMEPAGE="https://llvm.org/"
# 4. ConvertUTF.h: TODO.
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS=""
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="
+ +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,6 +35,7 @@ RDEPEND="
xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
@@ -43,7 +47,7 @@ BDEPEND="
>=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
>=sys-devel/binutils-apple-5.1
)
doc? ( $(python_gen_any_dep '
@@ -60,7 +64,8 @@ RDEPEND="
"
PDEPEND="
sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
LLVM_COMPONENTS=( llvm cmake third-party )
@@ -179,18 +184,6 @@ src_prepare() {
llvm.org_src_prepare
}
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
get_distribution_components() {
local sep=${1-;}
@@ -341,7 +334,7 @@ multilib_src_configure() {
# disable appending VCS revision to the version to improve
# direct cache hit ratio
-DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DBUILD_SHARED_LIBS=OFF
@@ -364,6 +357,7 @@ multilib_src_configure() {
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZSTD=$(usex zstd)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -378,7 +372,7 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
@@ -405,7 +399,7 @@ multilib_src_configure() {
if llvm_are_manpages_built; then
build_docs=ON
mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
@@ -424,7 +418,7 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
+ local tblgen="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
[[ -x "${tblgen}" ]] \
|| die "${tblgen} not found or usable"
mycmakeargs+=(
@@ -451,7 +445,7 @@ multilib_src_configure() {
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
multilib_is_native_abi && check_distribution_components
@@ -479,7 +473,7 @@ multilib_src_test() {
src_install() {
local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
)
local MULTILIB_WRAPPED_HEADERS=(
@@ -490,7 +484,7 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
}
multilib_src_install() {
@@ -498,28 +492,28 @@ multilib_src_install() {
# move headers to /usr/include for wrapping
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
}
multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
# we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
diff --git a/sys-devel/llvm/llvm-15.0.0.9999.ebuild b/sys-devel/llvm/llvm-15.0.6.9999.ebuild
index a28eef0e488..ab36cada7cf 100644
--- a/sys-devel/llvm/llvm-15.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-15.0.6.9999.ebuild
@@ -17,9 +17,12 @@ HOMEPAGE="https://llvm.org/"
# 4. ConvertUTF.h: TODO.
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
+IUSE="
+ +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,6 +35,7 @@ RDEPEND="
xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
@@ -43,7 +47,7 @@ BDEPEND="
>=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
>=sys-devel/binutils-apple-5.1
)
doc? ( $(python_gen_any_dep '
@@ -60,7 +64,8 @@ RDEPEND="
"
PDEPEND="
sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
LLVM_COMPONENTS=( llvm cmake third-party )
@@ -179,18 +184,6 @@ src_prepare() {
llvm.org_src_prepare
}
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
get_distribution_components() {
local sep=${1-;}
@@ -341,7 +334,7 @@ multilib_src_configure() {
# disable appending VCS revision to the version to improve
# direct cache hit ratio
-DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DBUILD_SHARED_LIBS=OFF
@@ -364,6 +357,7 @@ multilib_src_configure() {
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZSTD=$(usex zstd)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -378,7 +372,7 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
@@ -405,7 +399,7 @@ multilib_src_configure() {
if llvm_are_manpages_built; then
build_docs=ON
mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
@@ -424,7 +418,7 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
+ local tblgen="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
[[ -x "${tblgen}" ]] \
|| die "${tblgen} not found or usable"
mycmakeargs+=(
@@ -451,7 +445,7 @@ multilib_src_configure() {
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
multilib_is_native_abi && check_distribution_components
@@ -479,7 +473,7 @@ multilib_src_test() {
src_install() {
local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
)
local MULTILIB_WRAPPED_HEADERS=(
@@ -490,7 +484,7 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
}
multilib_src_install() {
@@ -498,28 +492,28 @@ multilib_src_install() {
# move headers to /usr/include for wrapping
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
}
multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
# we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
diff --git a/sys-devel/llvm/llvm-15.0.6.ebuild b/sys-devel/llvm/llvm-15.0.6.ebuild
new file mode 100644
index 00000000000..7e1b4d4609a
--- /dev/null
+++ b/sys-devel/llvm/llvm-15.0.6.ebuild
@@ -0,0 +1,521 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="
+ +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
+ exegesis? ( dev-libs/libpfm:= )
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
+ libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
+ 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 third-party )
+LLVM_MANPAGES=1
+LLVM_PATCHSET=${PV/_/-}
+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-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-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_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_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
+ )
+
+ 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/${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
+
+ if tc-is-cross-compiler; then
+ local tblgen="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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(:.*)?=${LLVM_MAJOR}$" \
+ CMakeCache.txt ||
+ die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+
+ 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-16.0.0.9999.ebuild
index a28eef0e488..ce7bb47d644 100644
--- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-16.0.0.9999.ebuild
@@ -17,9 +17,12 @@ HOMEPAGE="https://llvm.org/"
# 4. ConvertUTF.h: TODO.
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
-IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3"
+IUSE="
+ +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,6 +35,7 @@ RDEPEND="
xar? ( app-arch/xar )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
@@ -43,7 +47,7 @@ BDEPEND="
>=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
>=sys-devel/binutils-apple-5.1
)
doc? ( $(python_gen_any_dep '
@@ -60,12 +64,13 @@ RDEPEND="
"
PDEPEND="
sys-devel/llvm-common
- binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
"
-LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_COMPONENTS=( llvm cmake )
+LLVM_TEST_COMPONENTS=( third-party )
LLVM_MANPAGES=1
-LLVM_PATCHSET=9999-r3
LLVM_USE_TARGETS=provide
llvm.org_set_globals
@@ -179,18 +184,6 @@ src_prepare() {
llvm.org_src_prepare
}
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
get_distribution_components() {
local sep=${1-;}
@@ -244,6 +237,7 @@ get_distribution_components() {
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
+ llvm-debuginfo-analyzer
llvm-debuginfod
llvm-debuginfod-find
llvm-diff
@@ -284,6 +278,7 @@ get_distribution_components() {
llvm-readobj
llvm-reduce
llvm-remark-size-diff
+ llvm-remarkutil
llvm-rtdyld
llvm-sim
llvm-size
@@ -341,7 +336,7 @@ multilib_src_configure() {
# disable appending VCS revision to the version to improve
# direct cache hit ratio
-DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DBUILD_SHARED_LIBS=OFF
@@ -353,6 +348,8 @@ multilib_src_configure() {
# is that the former list is explicitly verified at cmake time
-DLLVM_TARGETS_TO_BUILD=""
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_BUILD_TESTS=$(usex test)
-DLLVM_ENABLE_FFI=$(usex libffi)
@@ -361,9 +358,8 @@ 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_HOST_TRIPLE="${CHOST}"
@@ -378,23 +374,24 @@ multilib_src_configure() {
-DOCAMLFIND=NO
)
- if is_libcxx_linked; then
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
# Smart hack: alter version suffix -> SOVERSION when linking
# against libc++. This way we won't end up mixing LLVM libc++
# libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
-DLLVM_ENABLE_LIBCXX=ON
)
fi
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
use test && mycmakeargs+=(
-DLLVM_LIT_ARGS="$(get_lit_flags)"
@@ -405,7 +402,7 @@ multilib_src_configure() {
if llvm_are_manpages_built; then
build_docs=ON
mycmakeargs+=(
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
)
@@ -424,7 +421,7 @@ multilib_src_configure() {
fi
if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
+ local tblgen="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
[[ -x "${tblgen}" ]] \
|| die "${tblgen} not found or usable"
mycmakeargs+=(
@@ -451,7 +448,7 @@ multilib_src_configure() {
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake_src_configure
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
multilib_is_native_abi && check_distribution_components
@@ -479,7 +476,7 @@ multilib_src_test() {
src_install() {
local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
)
local MULTILIB_WRAPPED_HEADERS=(
@@ -490,7 +487,7 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
}
multilib_src_install() {
@@ -498,28 +495,28 @@ multilib_src_install() {
# move headers to /usr/include for wrapping
rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
}
multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
# we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- docompress "/usr/lib/llvm/${SLOT}/share/man"
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
llvm_install_manpages
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
diff --git a/sys-devel/llvm/llvm-16.0.0_pre20221126.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221126.ebuild
new file mode 100644
index 00000000000..5102c71fb73
--- /dev/null
+++ b/sys-devel/llvm/llvm-16.0.0_pre20221126.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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="~loong"
+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
+
+ if tc-is-cross-compiler; then
+ local tblgen="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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(:.*)?=${LLVM_MAJOR}$" \
+ CMakeCache.txt ||
+ die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+
+ 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_pre20221205.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221205.ebuild
new file mode 100644
index 00000000000..ce7bb47d644
--- /dev/null
+++ b/sys-devel/llvm/llvm-16.0.0_pre20221205.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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
+
+ if tc-is-cross-compiler; then
+ local tblgen="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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(:.*)?=${LLVM_MAJOR}$" \
+ CMakeCache.txt ||
+ die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+
+ 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/llvmgold/llvmgold-15.ebuild b/sys-devel/llvmgold/llvmgold-15.ebuild
index 5dcc3164a55..484ce44cf3f 100644
--- a/sys-devel/llvmgold/llvmgold-15.ebuild
+++ b/sys-devel/llvmgold/llvmgold-15.ebuild
@@ -9,8 +9,7 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS=""
-PROPERTIES="live"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv sparc x86 ~amd64-linux"
RDEPEND="
sys-devel/llvm:${PV}[binutils-plugin]
diff --git a/sys-devel/llvmgold/llvmgold-16.ebuild b/sys-devel/llvmgold/llvmgold-16.ebuild
index 5dcc3164a55..17566e8e5d1 100644
--- a/sys-devel/llvmgold/llvmgold-16.ebuild
+++ b/sys-devel/llvmgold/llvmgold-16.ebuild
@@ -9,8 +9,7 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS=""
-PROPERTIES="live"
+KEYWORDS="~loong"
RDEPEND="
sys-devel/llvm:${PV}[binutils-plugin]
diff --git a/sys-devel/m4/metadata.xml b/sys-devel/m4/metadata.xml
index 73dda144f9a..dce0ffc83fe 100644
--- a/sys-devel/m4/metadata.xml
+++ b/sys-devel/m4/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="savannah">m4</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest
index f9cbb5a172f..ef67fd9db61 100644
--- a/sys-devel/make/Manifest
+++ b/sys-devel/make/Manifest
@@ -1,2 +1,4 @@
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.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/make-4.3.ebuild b/sys-devel/make/make-4.3.ebuild
index 50caf0365bb..e924bf76299 100644
--- a/sys-devel/make/make-4.3.ebuild
+++ b/sys-devel/make/make-4.3.ebuild
@@ -8,9 +8,12 @@ inherit flag-o-matic verify-sig
DESCRIPTION="Standard tool to compile source trees"
HOMEPAGE="https://www.gnu.org/software/make/make.html"
-if [[ "$(ver_cut 3)" -ge 90 ]] ; then
- SRC_URI="https://alpha.gnu.org/gnu//make/${P}.tar.gz"
- SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu//make/${P}.tar.gz.sig )"
+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 )"
@@ -32,6 +35,25 @@ PATCHES=(
"${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=(
diff --git a/sys-devel/make/make-4.4.ebuild b/sys-devel/make/make-4.4.ebuild
new file mode 100644
index 00000000000..73a2aedb637
--- /dev/null
+++ b/sys-devel/make/make-4.4.ebuild
@@ -0,0 +1,76 @@
+# 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
new file mode 100644
index 00000000000..73a2aedb637
--- /dev/null
+++ b/sys-devel/make/make-9999.ebuild
@@ -0,0 +1,76 @@
+# 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/metadata.xml b/sys-devel/make/metadata.xml
index 1e62dd91029..fee78a624e6 100644
--- a/sys-devel/make/metadata.xml
+++ b/sys-devel/make/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:make</remote-id>
-</upstream>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:make</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-devel/mold/Manifest b/sys-devel/mold/Manifest
index 180c8cf5349..d00b1f11c93 100644
--- a/sys-devel/mold/Manifest
+++ b/sys-devel/mold/Manifest
@@ -1,2 +1 @@
-DIST mold-1.3.1.tar.gz 4692379 BLAKE2B e34e9416cfc65d2097c4659ddc205a0c4492e50a1c6e4560006757e5c371d27410e38131f353cd0ee60b124e5fe42b0a1c50cdc3a7bed9f666596e608340e4fd SHA512 f576d2fcfee5cb3bade5ba24dcdd3020a16131ce7d4c3a00c3f92b94785ed86f3f040a6f5814b9c975c4c3d90a2b8c36a8101d5fbf1bc0a4be316f4a4a6dcefa
-DIST mold-1.4.0.tar.gz 4722082 BLAKE2B 65ac52724018f5df82ca40b287a5f3b2c3e4b6b313ef2573bfd0ed6d03054d92b9e1e52cbdad1930406cff232c4b952c33a16979968502c439b860bd782726a9 SHA512 7b7c4a7bac6bbc6e22372d93d94a6cb804c7017eba16b90e9bbc42b9608108c724ef55337aabdd9ce2f5244b94c8fd64311e70e18b5f8cf5f68533c2639e550d
+DIST mold-1.7.1.tar.gz 8381932 BLAKE2B 3355304cfe4de7aa96608e68183868debe6d7749940c507e717c5f6def3344bf1bfba8605275506bec6bab018f921c1da87515c4a8fc4f4488d37d874e70c452 SHA512 2e1b6203591718976a3b6c22cb9cdc4037efd101ecb520b809aaa242ee758ee24ed98d0b53012fa8423725fd9b89da94e67603af57b9de1dfb3189a096e1ae5b
diff --git a/sys-devel/mold/files/mold-1.2.1-install-nopython.patch b/sys-devel/mold/files/mold-1.2.1-install-nopython.patch
deleted file mode 100644
index 661d3dcf392..00000000000
--- a/sys-devel/mold/files/mold-1.2.1-install-nopython.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4fb6d4208cfb20bad4a3491a18e78409b5a8183f Mon Sep 17 00:00:00 2001
-From: Matthew Smith <matt@offtopica.uk>
-Date: Sat, 30 Apr 2022 07:42:50 +0100
-Subject: [PATCH] Don't invoke Python to create libexec/mold/ld symlink
-
-Reverts commits 8073a92614fb59f59570031badab5dd4bc3b4f7f and
-5803c3c200f301adc3abdb66df16d3d669712d70.
-
-Bug #841575
----
- Makefile | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index d1abc850..10e053a9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -204,12 +204,7 @@ install: all
- $(STRIP) $D$(LIBDIR)/mold/mold-wrapper.so
-
- $(INSTALL) -d $D$(LIBEXECDIR)/mold
--
--# We want to make a symblink with a relative path, so that users can
--# move the entire directory to other place without breaking the reference.
--# GNU ln supports `--relative` to do that, but that's not supported by
--# non-GNU systems. So we use Python to compute a relative path.
-- ln -sf `python3 -c "import os.path; print(os.path.relpath('$(BINDIR)/mold', '$(LIBEXECDIR)/mold'))"` $D$(LIBEXECDIR)/mold/ld
-+ ln -sf $(BINDIR)/mold $D$(LIBEXECDIR)/mold/ld
-
- $(INSTALL) -d $D$(MANDIR)/man1
- $(INSTALL_DATA) docs/mold.1 $D$(MANDIR)/man1
---
-2.35.3
-
diff --git a/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch b/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch
deleted file mode 100644
index d2ed0af47b4..00000000000
--- a/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From a4fde946f49cddf4f7c1eceb3b86ca38375cec1d Mon Sep 17 00:00:00 2001
-From: Matthew Smith <matt@offtopica.uk>
-Date: Sun, 26 Jun 2022 13:44:36 +0100
-Subject: [PATCH] Revert "Do not use pkg-config"
-
-This reverts commit 4ef90d4316bbba3a4b8902e38bf5f68171cc6ab7.
---- a/Makefile
-+++ b/Makefile
-@@ -18,6 +18,9 @@ ifeq ($(origin CXX), default)
- CXX = c++
- endif
-
-+# Allow overriding pkg-config binary
-+PKG_CONFIG = pkg-config
-+
- # If you want to keep symbols in the installed binary, run make with
- # `STRIP=true` to run /bin/true instead of the strip command.
- STRIP = strip
-@@ -100,7 +103,8 @@ ifeq ($(OS), Darwin)
- endif
-
- ifeq ($(NEEDS_LIBCRYPTO), 1)
-- MOLD_LDFLAGS += -lcrypto
-+ MOLD_CXXFLAGS += $(shell $(PKG_CONFIG) --cflags-only-I openssl)
-+ MOLD_LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L openssl) -lcrypto
- endif
-
- # '-latomic' flag is needed building on riscv64 system.
diff --git a/sys-devel/mold/files/mold-1.3.1-fix-riscv-set32.patch b/sys-devel/mold/files/mold-1.3.1-fix-riscv-set32.patch
deleted file mode 100644
index 5613d8ddc00..00000000000
--- a/sys-devel/mold/files/mold-1.3.1-fix-riscv-set32.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From https://github.com/rui314/mold/pull/590
-From 68bd00caa7c7946f380f72a5dd263e7c1d436e9f Mon Sep 17 00:00:00 2001
-From: Alex Fan <alex.fan.q@gmail.com>
-Date: Thu, 28 Jul 2022 14:04:21 +1000
-Subject: [PATCH] [ELF][RISCV] add missing R_RISCV_SET32 in EhFrameSection
-
-Signed-off-by: Alex Fan <alex.fan.q@gmail.com>
----
- elf/arch-riscv64.cc | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/elf/arch-riscv64.cc b/elf/arch-riscv64.cc
-index 8761c6ac..0c589118 100644
---- a/elf/arch-riscv64.cc
-+++ b/elf/arch-riscv64.cc
-@@ -183,6 +183,9 @@ void EhFrameSection<E>::apply_reloc(Context<E> &ctx, const ElfRel<E> &rel,
- case R_RISCV_SET16:
- *(ul16 *)loc = val;
- return;
-+ case R_RISCV_SET32:
-+ *(ul32 *)loc = val;
-+ return;
- case R_RISCV_32_PCREL:
- *(ul32 *)loc = val - this->shdr.sh_addr - offset;
- return;
diff --git a/sys-devel/mold/mold-1.3.1-r1.ebuild b/sys-devel/mold/mold-1.3.1-r1.ebuild
deleted file mode 100644
index b4a955bb2de..00000000000
--- a/sys-devel/mold/mold-1.3.1-r1.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 2021-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit 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 ~riscv"
-fi
-
-LICENSE="AGPL-3"
-SLOT="0"
-
-RDEPEND=">=dev-cpp/tbb-2021.4.0:=
- sys-libs/zlib
- !kernel_Darwin? (
- >=dev-libs/mimalloc-2:=
- dev-libs/openssl:=
- )"
-# As of 1.1, xxhash is now a header-only dep, but it's now bundled :(
-# TODO: restore SYSTEM_XXHASH upstream?
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- # Bug #841575
- "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch
- "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch
- # Bug #861488
- "${FILESDIR}"/${PN}-1.3.1-fix-riscv-set32.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() {
- default
-
- # Needs unpackaged dwarfdump
- rm test/elf/{{dead,compress}-debug-sections,compress