From f140f02d34f26d49cdc6aa8eef824856e49d00b9 Mon Sep 17 00:00:00 2001 From: Jason Manley Date: Sun, 16 May 2021 14:29:35 -0500 Subject: [PATCH 001/355] New package: yacy-1.924 --- srcpkgs/yacy/INSTALL | 6 ++++++ srcpkgs/yacy/files/yacy/run | 2 ++ srcpkgs/yacy/template | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 srcpkgs/yacy/INSTALL create mode 100644 srcpkgs/yacy/files/yacy/run create mode 100644 srcpkgs/yacy/template diff --git a/srcpkgs/yacy/INSTALL b/srcpkgs/yacy/INSTALL new file mode 100644 index 00000000000000..e451fab90ce062 --- /dev/null +++ b/srcpkgs/yacy/INSTALL @@ -0,0 +1,6 @@ +# INSTALL +case "$ACTION" in +post) + chown -R yacy:yacy /var/lib/yacy + ;; +esac diff --git a/srcpkgs/yacy/files/yacy/run b/srcpkgs/yacy/files/yacy/run new file mode 100644 index 00000000000000..c5544513c35df6 --- /dev/null +++ b/srcpkgs/yacy/files/yacy/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u yacy:yacy /var/lib/yacy/startYACY.sh -f diff --git a/srcpkgs/yacy/template b/srcpkgs/yacy/template new file mode 100644 index 00000000000000..72cfaa8fcc3e44 --- /dev/null +++ b/srcpkgs/yacy/template @@ -0,0 +1,32 @@ +# Template file for 'yacy' +pkgname=yacy +version=1.924 +revision=1 +wrksrc=${pkgname} +hostmakedepends="openjdk apache-ant" +depends="openjdk-jre bash" +short_desc="YaCy p2p decentralized search engine" +maintainer="Jason Manley " +license="GPL-3.0-or-later" +homepage="https://yacy.net" +distfiles="https://download.yacy.net/yacy_v${version}_20210209_10069.tar.gz" +checksum=@3b484c4db858a51dd191aa1ce30f892f49beadd8cb6434b65837d79a76325526 + +system_accounts="yacy" +yacy_homedir="/var/lib/yacy" +yacy_shell="/bin/bash" +make_dirs="/var/lib/yacy 0755 yacy yacy" + +do_build() { + export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk + ant clean all +} + +do_install() { + vmkdir var/lib/ + vcopy ${wrksrc} var/lib/ +} + +post_install() { + vsv yacy +} From 7e0ae116da5c27e8afa20d01b1274e21243e0056 Mon Sep 17 00:00:00 2001 From: Jason Manley Date: Sun, 16 May 2021 14:29:35 -0500 Subject: [PATCH 002/355] New package: yacy-1.924 --- srcpkgs/q5go/template | 22 ++++++++++++++++++++++ srcpkgs/yacy/INSTALL | 6 ++++++ srcpkgs/yacy/files/yacy/run | 2 ++ srcpkgs/yacy/template | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 srcpkgs/q5go/template create mode 100644 srcpkgs/yacy/INSTALL create mode 100644 srcpkgs/yacy/files/yacy/run create mode 100644 srcpkgs/yacy/template diff --git a/srcpkgs/q5go/template b/srcpkgs/q5go/template new file mode 100644 index 00000000000000..0d70b791013ddc --- /dev/null +++ b/srcpkgs/q5go/template @@ -0,0 +1,22 @@ +# Template file for 'q5go' +pkgname=q5go +version=2.1.1 +revision=1 +#archs="i686 x86_64" +#wrksrc= +#create_wrksrc=yes +build_style=gnu-configure +#configure_args="" +#make_build_args="" +#make_install_args="" +#conf_files="" +#make_dirs="/var/log/dir 0755 root root" +hostmakedepends="" +makedepends="qt5-multimedia-devel qt5-svg-devel" +depends="" +short_desc="Qt5 Go/Weiqi/Baduk client that supports IGS, GTP, and SGF, based on qGo and modernized" +maintainer="Jason Manley " +license="GPL-3.0-or-later" +homepage="https://github.com/bernds/q5Go" +distfiles="https://github.com/bernds/q5Go/archive/refs/tags/${pkgname}-${version}.tar.gz" +checksum=85a3a31a2de96c81a07afa59ea68f6420cfafbcefcd7d7ffd4e8eb8d6b24eeda diff --git a/srcpkgs/yacy/INSTALL b/srcpkgs/yacy/INSTALL new file mode 100644 index 00000000000000..e451fab90ce062 --- /dev/null +++ b/srcpkgs/yacy/INSTALL @@ -0,0 +1,6 @@ +# INSTALL +case "$ACTION" in +post) + chown -R yacy:yacy /var/lib/yacy + ;; +esac diff --git a/srcpkgs/yacy/files/yacy/run b/srcpkgs/yacy/files/yacy/run new file mode 100644 index 00000000000000..c5544513c35df6 --- /dev/null +++ b/srcpkgs/yacy/files/yacy/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u yacy:yacy /var/lib/yacy/startYACY.sh -f diff --git a/srcpkgs/yacy/template b/srcpkgs/yacy/template new file mode 100644 index 00000000000000..ef389b4e1740cb --- /dev/null +++ b/srcpkgs/yacy/template @@ -0,0 +1,32 @@ +# Template file for 'yacy' +pkgname=yacy +version=1.924 +revision=1 +wrksrc=${pkgname} +hostmakedepends="openjdk apache-ant" +depends="openjdk-jre bash" +short_desc="YaCy p2p decentralized search engine" +maintainer="Jason Manley " +license="GPL-3.0-or-later" +homepage="https://yacy.net" +distfiles="https://download.yacy.net/yacy_v${version}_20210209_10069.tar.gz" +checksum=@3b484c4db858a51dd191aa1ce30f892f49beadd8cb6434b65837d79a76325526 + +system_accounts="_yacy" +yacy_homedir="/var/lib/yacy" +yacy_shell="/bin/bash" +make_dirs="/var/lib/yacy 0755 yacy yacy" + +do_build() { + export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk + ant clean all +} + +do_install() { + vmkdir var/lib/ + vcopy ${wrksrc} var/lib/ +} + +post_install() { + vsv yacy +} From 64efdf10d316a51e1e8f24d3c06abe79f34b7ad9 Mon Sep 17 00:00:00 2001 From: Jason Manley Date: Mon, 24 May 2021 15:57:46 -0500 Subject: [PATCH 003/355] New package: yacy-1.924 --- srcpkgs/yacy/INSTALL | 6 ++++++ srcpkgs/yacy/files/yacy/run | 2 ++ srcpkgs/yacy/template | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 srcpkgs/yacy/INSTALL create mode 100644 srcpkgs/yacy/files/yacy/run create mode 100644 srcpkgs/yacy/template diff --git a/srcpkgs/yacy/INSTALL b/srcpkgs/yacy/INSTALL new file mode 100644 index 00000000000000..e451fab90ce062 --- /dev/null +++ b/srcpkgs/yacy/INSTALL @@ -0,0 +1,6 @@ +# INSTALL +case "$ACTION" in +post) + chown -R yacy:yacy /var/lib/yacy + ;; +esac diff --git a/srcpkgs/yacy/files/yacy/run b/srcpkgs/yacy/files/yacy/run new file mode 100644 index 00000000000000..c5544513c35df6 --- /dev/null +++ b/srcpkgs/yacy/files/yacy/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u yacy:yacy /var/lib/yacy/startYACY.sh -f diff --git a/srcpkgs/yacy/template b/srcpkgs/yacy/template new file mode 100644 index 00000000000000..d43db1194e458a --- /dev/null +++ b/srcpkgs/yacy/template @@ -0,0 +1,32 @@ +# Template file for 'yacy' +pkgname=yacy +version=1.924 +revision=1 +wrksrc=${pkgname} +hostmakedepends="openjdk apache-ant" +depends="openjdk-jre bash" +short_desc="YaCy p2p decentralized search engine" +maintainer="Jason Manley " +license="GPL-3.0-or-later" +homepage="https://yacy.net" +distfiles="https://download.yacy.net/yacy_v${version}_20210209_10069.tar.gz" +checksum=@3b484c4db858a51dd191aa1ce30f892f49beadd8cb6434b65837d79a76325526 + +system_accounts="_yacy" +yacy_homedir="/var/lib/yacy" +yacy_shell="/bin/bash" +make_dirs="/var/lib/yacy 0755 _yacy _yacy" + +do_build() { + export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk + ant clean all +} + +do_install() { + vmkdir var/lib/ + vcopy ${wrksrc} var/lib/ +} + +post_install() { + vsv yacy +} From a594ddabe29f07148d5170729513183e9f38fc31 Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Sun, 16 May 2021 07:49:44 +0300 Subject: [PATCH 004/355] liberation-fonts-ttf: update to 2.1.4 --- srcpkgs/liberation-fonts-ttf/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/liberation-fonts-ttf/template b/srcpkgs/liberation-fonts-ttf/template index 80aef5151c47ad..34312aaa9622ca 100644 --- a/srcpkgs/liberation-fonts-ttf/template +++ b/srcpkgs/liberation-fonts-ttf/template @@ -1,6 +1,6 @@ # Template file for 'liberation-fonts-ttf' pkgname=liberation-fonts-ttf -version=2.1.3 +version=2.1.4 revision=1 wrksrc=${pkgname%-*}-${version} build_style=gnu-makefile @@ -12,7 +12,7 @@ license="OFL-1.1" homepage="https://github.com/liberationfonts/liberation-fonts" changelog="https://raw.githubusercontent.com/liberationfonts/liberation-fonts/devel/ChangeLog" distfiles="https://github.com/liberationfonts/liberation-fonts/archive/${version}.tar.gz" -checksum=53ec96f3bb0f54f5524c0bc18be76408ebb3a78134cfcb7c25d9d2c8fb5b78c6 +checksum=e76de918e7c98f4a992d2ab397196bde217d9aebc2ec305bf4d1d5bc765dbabc font_dirs="/usr/share/fonts/TTF" do_install() { From a55ef9dab18154d6c7706207e7bf5099f3598597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Sat, 15 May 2021 00:48:50 -0300 Subject: [PATCH 005/355] zstd: update to 1.5.0. Since this releases enables multithreading the shared library, enable it for the static library as well. --- srcpkgs/zstd/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/zstd/template b/srcpkgs/zstd/template index dfb4eecb549cd0..6d094c7b3f3847 100644 --- a/srcpkgs/zstd/template +++ b/srcpkgs/zstd/template @@ -1,6 +1,6 @@ # Template file for 'zstd' pkgname=zstd -version=1.4.9 +version=1.5.0 revision=1 bootstrap=yes makedepends="zlib-devel liblzma-devel liblz4-devel" @@ -10,10 +10,10 @@ maintainer="Orphaned " license="BSD-3-Clause, GPL-2.0-or-later" homepage="http://www.zstd.net" distfiles="https://github.com/facebook/zstd/releases/download/v${version}/zstd-${version}.tar.gz" -checksum=29ac74e19ea28659017361976240c4b5c5c24db3b89338731a6feb97c038d293 +checksum=5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94 do_build() { - make ${makejobs} + make ${makejobs} lib-mt make ${makejobs} -C contrib/pzstd } From 194a038e76bc37f9737e1ab781266860ccb3df2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Sun, 16 May 2021 22:13:53 -0300 Subject: [PATCH 006/355] file: move libmagic.pc to file-devel. Was mistakenly included in the main 'file' package. --- srcpkgs/file/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/file/template b/srcpkgs/file/template index 0818250c798cd1..0154e0bc138dd0 100644 --- a/srcpkgs/file/template +++ b/srcpkgs/file/template @@ -1,7 +1,7 @@ # Template file for 'file' pkgname=file version=5.40 -revision=1 +revision=2 bootstrap=yes build_style=gnu-configure configure_args="--enable-static" @@ -47,6 +47,7 @@ file-devel_package() { vmove usr/include vmove "usr/lib/*.a" vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig vmove usr/share/man/man3 } } From 27eff03cf293d78888053bc6ef76d8392ed4b2a9 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Sun, 16 May 2021 21:36:46 -0500 Subject: [PATCH 007/355] libxlsxwriter: update to 1.0.5. --- srcpkgs/libxlsxwriter/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libxlsxwriter/template b/srcpkgs/libxlsxwriter/template index 26fea5ff378711..d66783dc2f2fb9 100644 --- a/srcpkgs/libxlsxwriter/template +++ b/srcpkgs/libxlsxwriter/template @@ -1,6 +1,6 @@ # Template file for 'libxlsxwriter' pkgname=libxlsxwriter -version=1.0.4 +version=1.0.5 revision=1 wrksrc="${pkgname}-RELEASE_${version}" build_style=cmake @@ -11,7 +11,7 @@ maintainer="Andrew Benson " license="BSD-2-Clause" homepage="https://libxlsxwriter.github.io/" distfiles="https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_${version}.tar.gz" -checksum=d1c8179ecebd3f216aa4bb4fab8618dea0ac74fe8bd7272e67abf51c12becebb +checksum=953e4cc6d5b7a76e913575c743d186416e739b73cf5a035235c93fb6cdd15641 pre_configure() { sed -i "/^add_library/a set_target_properties(\${PROJECT_NAME} \ From 89fa9cfb8dd83cc27ceac91c4fab94d32b67cb19 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Sun, 16 May 2021 21:40:28 -0500 Subject: [PATCH 008/355] python3-pysigset: update to 0.4.0. --- srcpkgs/python3-pysigset/template | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/srcpkgs/python3-pysigset/template b/srcpkgs/python3-pysigset/template index 16b3a53e140ade..c86e96a9728b61 100644 --- a/srcpkgs/python3-pysigset/template +++ b/srcpkgs/python3-pysigset/template @@ -1,10 +1,9 @@ # Template file for 'python3-pysigset' pkgname=python3-pysigset -version=0.3.2 -revision=3 +version=0.4.0 +revision=1 wrksrc="pysigset-${version}" build_style=python3-module -pycompile_module="pysigset.py" hostmakedepends="python3-setuptools" depends="python3" short_desc="Block/suspend signals" @@ -12,4 +11,4 @@ maintainer="Andrew Benson " license="GPL-3.0-or-later" homepage="https://github.com/ossobv/pysigset" distfiles="${homepage}/archive/v${version}.tar.gz" -checksum=13723bc17a8364f6bb8075ef6c1c2032005ec3ee32ed457e43da265a8ed9d09a +checksum=a3c0db9b6f63b97d62a792ad926efb8097eb0e557f5a7dd1ca2b7109e8726c01 From f4e64f136c77f06170e8fd9beacca4c1b6eb2a02 Mon Sep 17 00:00:00 2001 From: Zach Dykstra Date: Fri, 14 May 2021 22:10:35 -0500 Subject: [PATCH 009/355] rsyslog: enable omelasticsearch.so --- srcpkgs/rsyslog-elasticsearch | 1 + srcpkgs/rsyslog/template | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 120000 srcpkgs/rsyslog-elasticsearch diff --git a/srcpkgs/rsyslog-elasticsearch b/srcpkgs/rsyslog-elasticsearch new file mode 120000 index 00000000000000..4ade98bc4c2ac5 --- /dev/null +++ b/srcpkgs/rsyslog-elasticsearch @@ -0,0 +1 @@ +rsyslog \ No newline at end of file diff --git a/srcpkgs/rsyslog/template b/srcpkgs/rsyslog/template index b18fd1da3527d8..33c55076e9be49 100644 --- a/srcpkgs/rsyslog/template +++ b/srcpkgs/rsyslog/template @@ -1,14 +1,14 @@ # Template file for 'rsyslog' pkgname=rsyslog version=8.2010.0 -revision=3 +revision=4 build_style=gnu-configure configure_args="--sbindir=/usr/bin --enable-gnutls --enable-mysql --enable-pgsql --enable-imdiag --enable-imfile --enable-mail --enable-imptcp --enable-gssapi-krb5 --enable-mmsnmptrapd --enable-impstats --enable-omprog --enable-omstdout --enable-pmlastmsg --enable-pmcisconames --enable-pmsnare --enable-pmaixforwardedfrom --enable-omuxsock --disable-generate-man-pages - --enable-testbench" + --enable-elasticsearch --enable-testbench" hostmakedepends="pkg-config postgresql-libs-devel" makedepends="gnutls-devel libcurl-devel libestr-devel libfastjson-devel liblogging-devel libmariadbclient-devel mit-krb5-devel postgresql-libs-devel" @@ -75,3 +75,12 @@ rsyslog-postgresql_package() { vmove usr/lib/rsyslog/ompgsql.so } } + +rsyslog-elasticsearch_package() { + lib32disabled=yes + depends="rsyslog" + short_desc+=" - Elasticsearch add-on" + pkg_install() { + vmove usr/lib/rsyslog/omelasticsearch.so + } +} From 343cad6f6c8f944a0f9d20e238ca5623d68cfba1 Mon Sep 17 00:00:00 2001 From: Gabriel Sanches Date: Sun, 16 May 2021 17:37:18 -0300 Subject: [PATCH 010/355] circleci-cli: update to 0.1.15224. --- srcpkgs/circleci-cli/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/circleci-cli/template b/srcpkgs/circleci-cli/template index 1932703e601bf4..61978ffded01ce 100644 --- a/srcpkgs/circleci-cli/template +++ b/srcpkgs/circleci-cli/template @@ -1,6 +1,6 @@ # Template file for 'circleci-cli' pkgname=circleci-cli -version=0.1.15195 +version=0.1.15224 revision=1 build_style=go build_helper=qemu @@ -14,7 +14,7 @@ maintainer="Gabriel Sanches " license="MIT" homepage="https://circleci-public.github.io/circleci-cli/" distfiles="https://github.com/CircleCI-Public/${pkgname}/archive/v${version}.tar.gz" -checksum=c9f7bb5a81a173b4c87c9343c7bf12412f9e45ffa742478ffde74a9b10e879da +checksum=dc758206e92dc7663de049c5fa780ab9d21e4482fd771d87a858057112df4584 _completions="bash zsh" pre_build() { From e328b85a775d4f225c39525b324ac8bd8d614e55 Mon Sep 17 00:00:00 2001 From: Roberto Ricci Date: Sun, 16 May 2021 21:50:46 +0200 Subject: [PATCH 011/355] fluidsynth: update to 2.2.1. --- srcpkgs/fluidsynth/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/fluidsynth/template b/srcpkgs/fluidsynth/template index 91a6b55a33ce43..0cbf3ac6be7825 100644 --- a/srcpkgs/fluidsynth/template +++ b/srcpkgs/fluidsynth/template @@ -1,6 +1,6 @@ # Template file for 'fluidsynth' pkgname=fluidsynth -version=2.2.0 +version=2.2.1 revision=1 build_style=cmake make_check_target=check @@ -13,7 +13,7 @@ maintainer="Orphaned " license="LGPL-2.1-or-later" homepage="http://www.fluidsynth.org/" distfiles="https://github.com/FluidSynth/fluidsynth/archive/v${version}.tar.gz" -checksum=928fb16f307507485bd1d9b010dafba8c747bce5de2ba47ab1705944c87013b6 +checksum=1c56660f23f6c406b36646cc619fc2d2a5265d1d3290e79bcef4505bcd985fdd libfluidsynth_package() { short_desc+=" - runtime library" From 558b0f3bd5b77f8f4b5261a07402d6abedb269f0 Mon Sep 17 00:00:00 2001 From: Jason Manley Date: Sun, 16 May 2021 12:55:23 -0500 Subject: [PATCH 012/355] google-earth-pro: update to 7.3.3.7786. --- srcpkgs/google-earth-pro/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/google-earth-pro/template b/srcpkgs/google-earth-pro/template index 5e9a9249a37927..d26b5a9b33d209 100644 --- a/srcpkgs/google-earth-pro/template +++ b/srcpkgs/google-earth-pro/template @@ -1,6 +1,6 @@ # Template file for 'google-earth-pro' pkgname=google-earth-pro -version=7.3.3.7721 +version=7.3.3.7786 revision=1 archs="x86_64" depends="alsa-lib desktop-file-utils fontconfig glu gst-plugins-base1 @@ -10,7 +10,7 @@ maintainer="Jason Manley " license="custom:Google" homepage="https://www.google.com/earth/index.html" distfiles="https://dl.google.com/linux/earth/deb/pool/main/g/${pkgname}-stable/${pkgname}-stable_${version}-r0_amd64.deb" -checksum=db3f4b224426789ffb8d76a5f64126f8a2822bc42d30da162ac05d039047a152 +checksum=63ad2fdae55cefa7674e68a2f7383274a1768ad118c13cc613e0b897f9546ce8 repository=nonfree restricted=yes From a3639f83e3c6f7bb6e617c602efaf37a7a7aea67 Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Sat, 15 May 2021 11:38:31 +0200 Subject: [PATCH 013/355] papirus-icon-theme: update to 20210501 --- srcpkgs/papirus-icon-theme/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/papirus-icon-theme/template b/srcpkgs/papirus-icon-theme/template index 783f0c6cc73877..ab717180a4e5e6 100644 --- a/srcpkgs/papirus-icon-theme/template +++ b/srcpkgs/papirus-icon-theme/template @@ -1,13 +1,13 @@ # Template file for 'papirus-icon-theme' pkgname=papirus-icon-theme -version=20210401 +version=20210501 revision=1 short_desc="SVG icon theme for Linux, based on Paper Icon Set" maintainer="Giuseppe Fierro " license="GPL-3.0-or-later" homepage="https://github.com/PapirusDevelopmentTeam/papirus-icon-theme" distfiles="https://github.com/PapirusDevelopmentTeam/${pkgname}/archive/${version}.tar.gz" -checksum=6cd3874ce3781a4ace210076e8bf64f32cd54f1972c44dbb44100f19e99b2c26 +checksum=e8a62a21833cea45c7520bfe9799ecdb6bc86ec3d40bc38fccb2725e8999ef63 do_install() { vmkdir usr/share/icons From 341b073d63fc96ba00c52388311c474568f8ab99 Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Sat, 15 May 2021 11:48:55 +0200 Subject: [PATCH 014/355] percona-toolkit: update to 3.3.1. --- srcpkgs/percona-toolkit/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/percona-toolkit/template b/srcpkgs/percona-toolkit/template index 25f7da21986c4a..02aaafe6575533 100644 --- a/srcpkgs/percona-toolkit/template +++ b/srcpkgs/percona-toolkit/template @@ -1,7 +1,7 @@ # Template file for 'percona-toolkit' pkgname=percona-toolkit -version=3.0.13 -revision=2 +version=3.3.1 +revision=1 build_style=perl-module hostmakedepends="perl-DBD-mysql" depends="perl-DBD-mysql perl-Term-ReadKey" @@ -10,4 +10,4 @@ maintainer="Diogo Leal " license="GPL-2.0-or-later" homepage="https://www.percona.com/software/database-tools/percona-toolkit" distfiles="https://www.percona.com/downloads/${pkgname}/${version}/source/tarball/${pkgname}-${version}.tar.gz" -checksum=21f68d1c5204a9cad7be716fd1e53f0fe6ff7d995292b56dbc7c55e3979432b1 +checksum=60fc106b195b6716f1ebb3ca16b401692228c1a2a885da72111a93391fd12090 From fc2ceef300dd794f72636c04aa9562c87d80bfe2 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Sat, 15 May 2021 17:03:16 -0400 Subject: [PATCH 015/355] network-manager-applet: update to 1.22.0 --- .../patches/fix-crash.patch | 52 ------------------- srcpkgs/network-manager-applet/template | 6 +-- 2 files changed, 3 insertions(+), 55 deletions(-) delete mode 100644 srcpkgs/network-manager-applet/patches/fix-crash.patch diff --git a/srcpkgs/network-manager-applet/patches/fix-crash.patch b/srcpkgs/network-manager-applet/patches/fix-crash.patch deleted file mode 100644 index 3c0fd7d63ed3c1..00000000000000 --- a/srcpkgs/network-manager-applet/patches/fix-crash.patch +++ /dev/null @@ -1,52 +0,0 @@ -From da6b2bb94250d8ffb218caf921c9df8c394372d4 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Mon, 15 Feb 2021 14:15:20 +0100 -Subject: [PATCH] editor: fix crash when evaluating secondaries - -The compound literal goes out of scope when the enclosing block -ends. Replace it with an array on the stack. - - 0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65 - 1 0x00007ffff73eba44 in g_strdup (str=0x6c15375cc4e4b600 ) - 2 0x00007ffff73ed42d in g_strdupv (str_array=0x7fffffffc520) at ../../../glib/gstrfuncs.c:2552 - 3 0x00007ffff74b9b70 in boxed_proxy_collect_value (value=0x7fffffffc350, n_collect_values=, collect_values=, collect_flags=) - 4 0x00007ffff74c49fc in g_object_set_valist (object=0x555555a02780 [NMSettingConnection], first_property_name=, var_args=0x7fffffffc400) - 5 0x00007ffff74c52fc in g_object_set (_object=0x555555a02780, first_property_name=first_property_name@entry=0x5555555a3471 "secondaries") - 6 0x0000555555580ff8 in ui_to_setting (self=) at ../src/connection-editor/page-general.c:421 - 7 ce_page_validate_v (page=, connection=, error=0x7fffffffc5c0) at ../src/connection-editor/page-general.c:450 - 8 0x0000555555569313 in ce_page_validate (self=0x555555898f20 [CEPageGeneral], connection=connection@entry=0x5555557fe840, error=error@entry=0x7fffffffc5c0) at ../src/connection-editor/ce-page.c:161 - 9 0x000055555557343b in connection_editor_validate (editor=0x555555a2a840 [NMConnectionEditor]) at ../src/connection-editor/nm-connection-editor.c:357 - [...] - -Fixes: 768eb7dfa974 ("c-e: fix initializing drop-down list for connection.secondaries") - -https://gitlab.gnome.org/GNOME/network-manager-applet/-/issues/125 ---- - src/connection-editor/page-general.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/connection-editor/page-general.c b/src/connection-editor/page-general.c -index 358582ff..794407d6 100644 ---- a/src/connection-editor/page-general.c -+++ b/src/connection-editor/page-general.c -@@ -392,7 +392,7 @@ static void - ui_to_setting (CEPageGeneral *self) - { - CEPageGeneralPrivate *priv = CE_PAGE_GENERAL_GET_PRIVATE (self); -- const char *const*secondaries = NULL; -+ const char *secondaries[2] = { NULL, NULL }; - gs_free char *secondaries_uuid = NULL; - GtkTreeIter iter; - gboolean autoconnect = FALSE, everyone = FALSE; -@@ -415,7 +415,7 @@ ui_to_setting (CEPageGeneral *self) - && gtk_combo_box_get_active_iter (priv->dependent_vpn, &iter)) { - gtk_tree_model_get (GTK_TREE_MODEL (priv->dependent_vpn_store), &iter, - COL_UUID, &secondaries_uuid, -1); -- secondaries = (const char *[]) { secondaries_uuid, NULL }; -+ secondaries[0] = secondaries_uuid; - } - - g_object_set (G_OBJECT (priv->setting), NM_SETTING_CONNECTION_SECONDARIES, secondaries, NULL); --- -GitLab - diff --git a/srcpkgs/network-manager-applet/template b/srcpkgs/network-manager-applet/template index 6c5a37d1429fae..0f041aa80b27c9 100644 --- a/srcpkgs/network-manager-applet/template +++ b/srcpkgs/network-manager-applet/template @@ -1,7 +1,7 @@ # Template file for 'network-manager-applet' pkgname=network-manager-applet -version=1.20.0 -revision=2 +version=1.22.0 +revision=1 build_style=meson configure_args="-Dselinux=false" hostmakedepends="dbus-glib-devel glib-devel intltool pkg-config" @@ -16,6 +16,6 @@ license="GPL-2.0-or-later" homepage="https://wiki.gnome.org/Projects/NetworkManager" changelog="https://raw.githubusercontent.com/NetworkManager/network-manager-applet/master/NEWS" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=8ab205385d8380e3b7e4994b46f6ff009c453e3430bd2b2853c74263f69a5253 +checksum=c70d80b48d40a9cb99ec967cc4389f67e7f0301528a69d481572041331a646be patch_args=-Np1 lib32disabled=yes From ef3b6e974580bde45c61330bd1b5eebbf4edf82f Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Sun, 16 May 2021 06:40:56 +0300 Subject: [PATCH 016/355] pueue: update to 0.12.2 --- srcpkgs/pueue/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/pueue/template b/srcpkgs/pueue/template index 7ddbff9e72ce19..b850b24ff5b2ce 100644 --- a/srcpkgs/pueue/template +++ b/srcpkgs/pueue/template @@ -1,6 +1,6 @@ # Template file for 'pueue' pkgname=pueue -version=0.12.0 +version=0.12.2 revision=1 build_style=cargo build_helper="qemu" @@ -9,7 +9,7 @@ maintainer="crater2150 " license="MIT" homepage="https://github.com/Nukesor/pueue" distfiles="https://github.com/Nukesor/pueue/archive/v${version}.tar.gz" -checksum=9c3930380120bf8479caa55236fb9fdbbad5bfe3d41c0729a667c777cbc856e2 +checksum=3acd923759d5731b69a9a4a16c83c16a1f33589767da2ab7eb0cbe49ea06eabd case "$XBPS_TARGET_MACHINE" in x86_64*|i686*|arm*|aarch64*) ;; From d0a5a3da65ba854ef35403725af884878ce9f3e3 Mon Sep 17 00:00:00 2001 From: Daniel Lewan Date: Sun, 16 May 2021 16:59:13 +0200 Subject: [PATCH 017/355] sequeler: update to 0.8.1. --- srcpkgs/sequeler/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sequeler/template b/srcpkgs/sequeler/template index fbb01b9bbbba0b..6005911c87e437 100644 --- a/srcpkgs/sequeler/template +++ b/srcpkgs/sequeler/template @@ -1,6 +1,6 @@ # Template file for 'sequeler' pkgname=sequeler -version=0.8.0 +version=0.8.1 revision=1 build_style=meson hostmakedepends="gettext pkg-config glib-devel vala" @@ -11,4 +11,4 @@ maintainer="Daniel Lewan " license="GPL-3.0-or-later" homepage="https://github.com/Alecaddd/sequeler" distfiles="https://github.com/Alecaddd/sequeler/archive/v${version}.tar.gz" -checksum=471fdf63fda568d4caddf6182897518e4b7abc1b4f5dfb466bd1dfc86d380f0c +checksum=52adc7669e4729a114cdf8de4dc9d2575ea484bbc112a4b8bc80e694ebc45842 From 275a6d89e0ee2d3ecfa076967b01d2c1de8f628c Mon Sep 17 00:00:00 2001 From: Frank Steinborn Date: Sun, 16 May 2021 18:43:53 +0200 Subject: [PATCH 018/355] yq-go: update to 4.9.1. --- srcpkgs/yq-go/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/yq-go/template b/srcpkgs/yq-go/template index b212620e734355..748d4514a7a41b 100644 --- a/srcpkgs/yq-go/template +++ b/srcpkgs/yq-go/template @@ -1,6 +1,6 @@ # Template file for 'yq-go' pkgname=yq-go -version=4.7.1 +version=4.9.1 revision=1 wrksrc="yq-${version}" build_style=go @@ -10,7 +10,7 @@ maintainer="Frank Steinborn " license="MIT" homepage="https://github.com/mikefarah/yq" distfiles="https://github.com/mikefarah/yq/archive/v${version}.tar.gz" -checksum=19a7c43aaac678065f436ddfdf8b0a75dd3883984f4b9548cabdf53eb09932f9 +checksum=7a15a78b9b6248f7207db54073fd685ca2966cdd9a4fd6601a9db446900b068e do_check() { go test -v From 0bf84cb36dbfef57fc4431e137e266c01250b47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjam=C3=ADn=20Albi=C3=B1ana?= Date: Sun, 16 May 2021 15:48:13 +0200 Subject: [PATCH 019/355] cod: update to 0.1.0. --- srcpkgs/cod/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/cod/template b/srcpkgs/cod/template index 864dce421d26fb..1fa4e08eb599a6 100644 --- a/srcpkgs/cod/template +++ b/srcpkgs/cod/template @@ -1,12 +1,12 @@ # Template file for 'cod' pkgname=cod -version=0.0.0 +version=0.1.0 revision=1 build_style=go -go_import_path="cod" +go_import_path=github.com/dim-an/cod short_desc="Completion daemon for bash/zsh " maintainer="Benjamín Albiñana " license="Apache-2.0" homepage="https://github.com/dim-an/cod" distfiles="https://github.com/dim-an/${pkgname}/archive/v${version}.tar.gz" -checksum=6f773358f363141dcd1bbdffaaa5dea0a40ae7a84d5fc55fd453302de8493c20 +checksum=3d8ed6f284afcf4c86a2164e234ab7ff40c50aa6ab0bd892e59f8dc8aef02541 From 1c1e6b9fbd6edc2774b750550a003717a63efa97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjam=C3=ADn=20Albi=C3=B1ana?= Date: Sat, 15 May 2021 09:16:24 +0200 Subject: [PATCH 020/355] croc: update to 9.1.4. --- srcpkgs/croc/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/croc/template b/srcpkgs/croc/template index fb97c032234ae0..a6ff66f296d6d1 100644 --- a/srcpkgs/croc/template +++ b/srcpkgs/croc/template @@ -1,6 +1,6 @@ # Template file for 'croc' pkgname=croc -version=9.1.2 +version=9.1.4 revision=1 build_style=go go_import_path=github.com/schollz/croc/v${version%%.*} @@ -10,7 +10,7 @@ maintainer="Benjamín Albiñana " license="MIT" homepage="https://github.com/schollz/croc" distfiles="https://github.com/schollz/croc/archive/v${version}.tar.gz" -checksum=f5dc5aa37cf179f86982080a067218d0fccf8fead9b5b25bc3f1f9181e82ab26 +checksum=6a7d304f06c6824c9648a588a5c6b9f7366d87a442dc536e810a078a4441c9dd post_install() { vlicense LICENSE From f954cd30180ca91fc6ea5673cd31973f9a44a566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjam=C3=ADn=20Albi=C3=B1ana?= Date: Sat, 15 May 2021 09:25:44 +0200 Subject: [PATCH 021/355] doctl: update to 1.61.0. --- srcpkgs/doctl/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template index 8492609bc04b97..ac8ba54475d699 100644 --- a/srcpkgs/doctl/template +++ b/srcpkgs/doctl/template @@ -1,6 +1,6 @@ # Template file for 'doctl' pkgname=doctl -version=1.60.0 +version=1.61.0 revision=1 build_style=go go_import_path="github.com/digitalocean/doctl/cmd/doctl" @@ -10,4 +10,4 @@ maintainer="Benjamín Albiñana " license="Apache-2.0" homepage="https://github.com/digitalocean/doctl" distfiles="https://github.com/digitalocean/doctl/archive/v${version}.tar.gz" -checksum=3bc9cf89d530e3a665334403f4329a011da1eb216343d4ee95c4a66075eabba5 +checksum=5334fb1d2c169064d2a7584186bc4b3c48952e8af0a139447e890e204531356e From 760c3228913ae31dad0e2cd5d25a0c1bf9fca21d Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Sat, 15 May 2021 11:09:18 +0200 Subject: [PATCH 022/355] oil: update to 0.8.11. --- srcpkgs/oil/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/oil/template b/srcpkgs/oil/template index ee8ea04975661e..e285926321a746 100644 --- a/srcpkgs/oil/template +++ b/srcpkgs/oil/template @@ -1,6 +1,6 @@ # Template file for 'oil' pkgname=oil -version=0.8.10 +version=0.8.11 revision=1 build_style=configure configure_args="--prefix=/usr $(vopt_with readline)" @@ -11,7 +11,7 @@ maintainer="Orphaned " license="Apache-2.0" homepage="https://www.oilshell.org" distfiles="${homepage}/download/${pkgname}-${version}.tar.xz" -checksum=11307c062ae512aae8f0251d44cf80b19fee8056bf7e3e76c0257da489ef301d +checksum=19557ee77d9d3eb5e44375f6fb06b8bba6823c1bd00088b2a5ea2acc9aaf93d6 register_shell="/usr/bin/osh" nocross="Build systems gets confused with host and cross toolchains/headers" nostrip=yes From ae3ac8ec61c02b65bd1eeaea5d0b97e0d811721a Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Sat, 15 May 2021 11:15:38 +0200 Subject: [PATCH 023/355] rmapi: update to 0.0.14. --- srcpkgs/rmapi/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/rmapi/template b/srcpkgs/rmapi/template index 6fa65a895be132..3b85c50e9eaead 100644 --- a/srcpkgs/rmapi/template +++ b/srcpkgs/rmapi/template @@ -1,6 +1,6 @@ # Template file for 'rmapi' pkgname=rmapi -version=0.0.13 +version=0.0.14 revision=1 build_style=go go_import_path=github.com/juruen/rmapi @@ -9,4 +9,4 @@ maintainer="Patrick Pichler " license="GPL-3.0-or-later" homepage="https://github.com/juruen/rmapi" distfiles="https://github.com/juruen/rmapi/archive/v${version}${_status}.tar.gz" -checksum=afaf438f0408af6fcadf73eb06b4c548ab678036eaf32bb825255e19f74a7157 +checksum=5ddc49703f19336a02f6c1caf2714e2646331b66a141c51335594a9a16e91454 From efb6a797ce44fb49af646523c4ea227d6985fd19 Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Sat, 15 May 2021 11:30:39 +0200 Subject: [PATCH 024/355] packr2: update to 2.8.1. --- srcpkgs/packr2/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/packr2/template b/srcpkgs/packr2/template index 15b01438d58af9..89971cc93f0805 100644 --- a/srcpkgs/packr2/template +++ b/srcpkgs/packr2/template @@ -1,7 +1,7 @@ # Template file for 'packr2' pkgname=packr2 _pkgname=packr -version=2.8.0 +version=2.8.1 revision=1 wrksrc=${_pkgname}-${version} build_style=go @@ -11,7 +11,7 @@ maintainer="Gabriel Sanches " license="MIT" homepage="https://github.com/gobuffalo/packr" distfiles="https://github.com/gobuffalo/${_pkgname}/archive/v${version}.tar.gz" -checksum=2cab1e8d60734af05d594346f8e4bffcef0ac2aea4895b08bd9f3c40fc24c639 +checksum=648f8690e0349039300d3603708bd383f3568193ebaeb0760a87da8760dc7fa7 post_install() { vlicense v2/LICENSE.txt From 710f59154a72510070f8375551a98b6bf0283757 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 14:33:18 -0700 Subject: [PATCH 025/355] sam2p: fix license --- srcpkgs/sam2p/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sam2p/template b/srcpkgs/sam2p/template index 24ac394b0d324a..34eaa610b98e83 100644 --- a/srcpkgs/sam2p/template +++ b/srcpkgs/sam2p/template @@ -1,14 +1,14 @@ # Template file for 'sam2p' pkgname=sam2p version=0.49.4 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-gif --enable-lzw" hostmakedepends="perl" depends="perl tif22pnm" short_desc="Raster image converter with smart PDF and PostScript output" maintainer="Leah Neukirchen " -license="GPL-2" +license="GPL-2.0-only" homepage="https://github.com/pts/sam2p" distfiles="https://github.com/pts/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.gz" checksum=5bc5b5a526bc798315da23b02564d6a1bfea51b364b8b03f76695a833f6d2bed From ed29fe1d85cfe17dfde0e39dc28dc83627479541 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 14:34:54 -0700 Subject: [PATCH 026/355] sample: fix license --- srcpkgs/sample/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sample/template b/srcpkgs/sample/template index ab0b7df9a8022e..9361ce32165e8a 100644 --- a/srcpkgs/sample/template +++ b/srcpkgs/sample/template @@ -1,11 +1,11 @@ # Template file for 'sample' pkgname=sample version=0.1.0 -revision=3 +revision=4 build_style=gnu-makefile short_desc="Filter for random sampling of input" maintainer="Leah Neukirchen " -license="custom" +license="ISC" homepage="https://github.com/silentbicycle/sample/" distfiles="https://github.com/silentbicycle/sample/archive/v${version}.tar.gz" checksum=2ca15f1d293e80915abb98c311ddeeb2b99243df07aea554053ce296181a949d From 71b1464be6740d7923659810370c6ba079392627 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 14:40:09 -0700 Subject: [PATCH 027/355] samsung-unified-driver: fix license --- srcpkgs/samsung-unified-driver/template | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srcpkgs/samsung-unified-driver/template b/srcpkgs/samsung-unified-driver/template index 3ddf426e2ff3bb..fc49392fb6df72 100644 --- a/srcpkgs/samsung-unified-driver/template +++ b/srcpkgs/samsung-unified-driver/template @@ -1,17 +1,17 @@ # Template file for 'samsung-unified-driver' pkgname=samsung-unified-driver version=1.00.37 -revision=3 -create_wrksrc=yes +revision=4 archs="i686 x86_64" -repository=nonfree +create_wrksrc=yes depends="cups ghostscript libusb-compat sane" short_desc="Unified Linux Driver for Samsung printers and scanners" maintainer="Thomas Bernard " -license="Propietary" -homepage="http://www.samsung.com" -distfiles="http://downloadcenter.samsung.com/content/DR/201512/20151210091120064/uld_v${version}_00.99.tar.gz" +license="custom:Propietary" +homepage="https://www.samsung.com" +distfiles="https://downloadcenter.samsung.com/content/DR/201512/20151210091120064/uld_v${version}_00.99.tar.gz" checksum="6b85253ea0bb51d241f6fd665ff0d39464cdad87084802a77a385c707fa2c664" +repository=nonfree nostrip=true post_extract() { From f4bbe7b0cae8986021fce3d06e83627c080b63e4 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 16:50:53 -0700 Subject: [PATCH 028/355] screen-message: fix license --- srcpkgs/screen-message/template | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/srcpkgs/screen-message/template b/srcpkgs/screen-message/template index 903d693fb86f36..277033966654df 100644 --- a/srcpkgs/screen-message/template +++ b/srcpkgs/screen-message/template @@ -1,7 +1,7 @@ # Template file for 'screen-message' pkgname=screen-message version=0.26 -revision=1 +revision=2 build_style=gnu-configure make_build_args='execgamesdir=$(prefix)/bin' make_install_args=${make_build_args} @@ -9,8 +9,7 @@ hostmakedepends="pkg-config" makedepends="gtk+3-devel" short_desc="Displays a short text fullscreen " maintainer="lemmi " -license="GPL-2" +license="GPL-2.0-or-later" homepage="https://www.joachim-breitner.de/projects#screen-message" distfiles="https://www.joachim-breitner.de/archive/screen-message/screen-message-${version}.tar.gz" checksum=bc12a7b973844190c00a694d3fdc2327735b21d8b1231ec8ef66ba363ea98f37 - From 633cff6dff0391b5661a9b4214126efae92850af Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 16:55:19 -0700 Subject: [PATCH 029/355] seq2gif: fix license, other lint --- srcpkgs/seq2gif/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/seq2gif/template b/srcpkgs/seq2gif/template index b7d00b730a4b57..8146d539a284c6 100644 --- a/srcpkgs/seq2gif/template +++ b/srcpkgs/seq2gif/template @@ -1,11 +1,11 @@ # Template file for 'seq2gif' pkgname=seq2gif version=0.10.4 -revision=2 +revision=3 build_style=gnu-configure -homepage="http://saitoha.github.io/seq2gif/" -distfiles="https://github.com/saitoha/seq2gif/archive/v${version}.tar.gz" short_desc="Convert ttyrec recordings into high quality gifs" maintainer="Andrew Benson " -license="GPL-3" +license="GPL-3.0-or-later" +homepage="http://saitoha.github.io/seq2gif/" +distfiles="https://github.com/saitoha/seq2gif/archive/v${version}.tar.gz" checksum=738805bf8eb7ee5171ded7f43326cca7caecb77031283720f97253c234261f29 From 0403ee9770457f3dffe887ecfa3e101eef25b5e1 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 16:56:51 -0700 Subject: [PATCH 030/355] sgfutils: fix license, http->https, other lint --- srcpkgs/sgfutils/template | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srcpkgs/sgfutils/template b/srcpkgs/sgfutils/template index 95e84d22279b70..67980c8d32fb56 100644 --- a/srcpkgs/sgfutils/template +++ b/srcpkgs/sgfutils/template @@ -1,13 +1,13 @@ # Template file for 'sgfutils' pkgname=sgfutils version=0.25 -revision=7 +revision=8 build_style=gnu-makefile +makedepends="openssl-devel" +depends="ImageMagick" short_desc="Collection of utilities to handle SGF files" maintainer='Brandon Wilson ' -license="GPL-2" -homepage="http://www.cwi.nl/~aeb/go/sgfutils/html/" -distfiles="http://homepages.cwi.nl/~aeb/go/${pkgname}/${pkgname}.tgz" +license="GPL-2.0-or-later" +homepage="https://www.cwi.nl/~aeb/go/sgfutils/html/" +distfiles="https://homepages.cwi.nl/~aeb/go/${pkgname}/${pkgname}.tgz" checksum=4b26b321fbe255722f1d7e57233614da89a4da5bab031ae4ef7118ae3c7436a2 -makedepends="openssl-devel" -depends="ImageMagick" From cb9ea25dee5e5b986716c708ef7cc04eca0df87a Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 17:01:24 -0700 Subject: [PATCH 031/355] shake: fix license --- srcpkgs/shake/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/shake/template b/srcpkgs/shake/template index a5793b17e3744c..08790572f3c426 100644 --- a/srcpkgs/shake/template +++ b/srcpkgs/shake/template @@ -1,13 +1,13 @@ # Template file for 'shake' pkgname=shake version=1.0 -revision=1 +revision=2 build_style=cmake hostmakedepends="help2man" makedepends="attr-devel" short_desc="Defragmenter that runs in userspace while the system is used" maintainer="Casper Ti. Vector " -license="GPL-3" +license="GPL-3.0-or-later" homepage="http://vleu.net/shake/" distfiles="https://github.com/unbrice/$pkgname/archive/v$version.tar.gz" checksum=ac5a57bd8d55e197734852bf66318ecf39b4c5c298e43a259ba1d8a4b7a2ced3 From c7e3918da095165a726a5a34a1216f95a3ea906f Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 18:05:29 -0700 Subject: [PATCH 032/355] shmux: fix license --- srcpkgs/shmux/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/shmux/template b/srcpkgs/shmux/template index a055469be8c757..3f353a0df33b40 100644 --- a/srcpkgs/shmux/template +++ b/srcpkgs/shmux/template @@ -1,12 +1,12 @@ # Template file for 'shmux' pkgname=shmux version=1.0.3 -revision=1 +revision=2 build_style=gnu-configure makedepends="ncurses-devel pcre-devel" short_desc="Shell multiplexer (parallel SSH)" maintainer="Leah Neukirchen " -license="3-clause-BSD" +license="BSD-3-Clause" homepage="https://github.com/shmux/shmux" distfiles="https://github.com/shmux/shmux/archive/v${version}.tar.gz" checksum=c9f8863e2550e23e633cf5fc7a9c4c52d287059f424ef78aba6ecd98390fb9ab From 53d08b425ceffee3bc32319500eb1bf20f086ade Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 18:08:15 -0700 Subject: [PATCH 033/355] shntool: fix license, homepage --- srcpkgs/shntool/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/shntool/template b/srcpkgs/shntool/template index 325295ef99afd2..385f5b746efda0 100644 --- a/srcpkgs/shntool/template +++ b/srcpkgs/shntool/template @@ -1,11 +1,11 @@ # Template file for 'shntool' pkgname=shntool version=3.0.10 -revision=2 +revision=3 build_style=gnu-configure -short_desc="A multi-purpose WAVE data processing and reporting utility" +short_desc="Multi-purpose WAVE data processing and reporting utility" maintainer="Georg S. " -license="GPL-2" -homepage="http://www.etree.org/shnutils/shntool/" +license="GPL-2.0-or-later" +homepage="http://shnutils.freeshell.org/shntool/" distfiles="${DEBIAN_SITE}/main/s/shntool/shntool_${version}.orig.tar.gz" checksum=74302eac477ca08fb2b42b9f154cc870593aec8beab308676e4373a5e4ca2102 From 2fe37d4ff02320dfec5912451389d818b2ad7307 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 18:10:56 -0700 Subject: [PATCH 034/355] sift: fix license, correct description --- srcpkgs/sift/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/sift/template b/srcpkgs/sift/template index 22a9698bf44db5..703a7765511c32 100644 --- a/srcpkgs/sift/template +++ b/srcpkgs/sift/template @@ -1,13 +1,13 @@ # Template file for 'sift' pkgname=sift version=0.9.0 -revision=12 +revision=13 build_style=go +go_import_path="github.com/svent/sift" hostmakedepends="git" -short_desc="A fast and powerful open source alternative to grep" +short_desc="Fast and powerful alternative to grep" maintainer="Andrea Brancaleoni " -license="GPL-3" -go_import_path="github.com/svent/sift" +license="GPL-3.0-only" homepage="https://github.com/svent/sift" distfiles="$homepage/archive/v$version.tar.gz" checksum=bbbd5c472c36b78896cd7ae673749d3943621a6d5523d47973ed2fc6800ae4c8 From 611e84e46f04a3fce19025e6b393e56b6c41018e Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 18:12:32 -0700 Subject: [PATCH 035/355] sigrok-cli: fix license --- srcpkgs/sigrok-cli/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sigrok-cli/template b/srcpkgs/sigrok-cli/template index c3e8d07d39b5d4..3206dd45815c5d 100644 --- a/srcpkgs/sigrok-cli/template +++ b/srcpkgs/sigrok-cli/template @@ -1,14 +1,14 @@ # Template file for 'sigrok-cli' pkgname=sigrok-cli version=0.7.2 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="glib-devel libzip-devel libsigrok-devel libsigrokdecode-devel" depends="sigrok-firmware-fx2lafw" short_desc="Provide the basic sigrok functionality from the command-line" maintainer="lemmi " -license="GPL-3" +license="GPL-3.0-or-later" homepage="https://sigrok.org/" distfiles="https://sigrok.org/download/source/${pkgname}/${pkgname}-${version}.tar.gz" checksum=71d0443f36897bf565732dec206830dbea0f2789b6601cf10536b286d1140ab8 From 3029c117420e9b575cc825fddef68ef7668ac404 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 18:20:30 -0700 Subject: [PATCH 036/355] silc-toolkit: fix license, correct vlicense statements --- srcpkgs/silc-toolkit/template | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/srcpkgs/silc-toolkit/template b/srcpkgs/silc-toolkit/template index fc67ac84df150f..1c7a03b3ad541d 100644 --- a/srcpkgs/silc-toolkit/template +++ b/srcpkgs/silc-toolkit/template @@ -1,7 +1,7 @@ # Template file for 'silc-toolkit' pkgname=silc-toolkit version=1.1.12 -revision=2 +revision=3 build_style=gnu-configure configure_args="--with-perl=yes --with-simdir=/usr/lib/silc/modules --enable-debug --enable-ipv6 --disable-optimizations @@ -10,7 +10,7 @@ hostmakedepends="nasm perl" makedepends="gmp-devel libidn-devel" short_desc="Secure Internet Live Conferencing protocol toolkit" maintainer="Orphaned " -license="GPL-2,BSD" +license="GPL-2.0-or-later, BSD-3-Clause" homepage="http://www.silcnet.org/" distfiles="${SOURCEFORGE_SITE}/silc/silc/client/sources/$pkgname-$version.tar.bz2" checksum=be170288f79fbe34971fc26fe762a8329621e11a117f20c218857f2bbad24d6e @@ -18,7 +18,6 @@ checksum=be170288f79fbe34971fc26fe762a8329621e11a117f20c218857f2bbad24d6e post_install() { #Remove large (useless) documentation. rm -rf usr/share/doc/silc-toolkit/toolkit - vlicense COPYING vlicense BSD } From e442332ecf08631aa626517688730acc9cb0d3f1 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 18:22:02 -0700 Subject: [PATCH 037/355] sipcalc: fix license --- srcpkgs/sipcalc/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sipcalc/template b/srcpkgs/sipcalc/template index 22f05270a39090..ae62cd504775d4 100644 --- a/srcpkgs/sipcalc/template +++ b/srcpkgs/sipcalc/template @@ -1,11 +1,11 @@ # Template file for 'sipcalc' pkgname=sipcalc version=1.1.6 -revision=1 +revision=2 build_style=gnu-configure short_desc="Console based ip subnet calculator" maintainer="allan " -license="BSD" +license="BSD-3-Clause" homepage="http://www.routemeister.net/projects/sipcalc/" distfiles="http://www.routemeister.net/projects/sipcalc/files/${pkgname}-${version}.tar.gz" checksum=cfd476c667f7a119e49eb5fe8adcfb9d2339bc2e0d4d01a1d64b7c229be56357 From d19fd6a21ee893de2fdb57595b3406d37bbde12b Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 22:55:13 -0700 Subject: [PATCH 038/355] skippy-xd: fix license, description --- srcpkgs/skippy-xd/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/skippy-xd/template b/srcpkgs/skippy-xd/template index d7b89eecd81f2d..c782f7aeba8b4f 100644 --- a/srcpkgs/skippy-xd/template +++ b/srcpkgs/skippy-xd/template @@ -1,16 +1,16 @@ # Template file for 'skippy-xd' pkgname=skippy-xd version=2016.10.20 -revision=1 +revision=2 build_style=gnu-makefile hostmakedepends="pkg-config" makedepends="libX11-devel libXext-devel libXft-devel libXcomposite-devel libXdamage-devel libXfixes-devel libXinerama-devel libXmu-devel libXrender-devel freetype-devel imlib2-devel fontconfig-devel giflib-devel libjpeg-turbo-devel libpng-devel zlib-devel" conf_files="/etc/xdg/*.rc" -short_desc="An Expose-like full-screen task-switcher for X11" +short_desc="Expose-like full-screen task-switcher for X11" maintainer="Antonio Malcolm " -license="GPL-2" +license="GPL-2.0-or-later" homepage="https://github.com/antonio-malcolm/skippy-xd" distfiles="${homepage}/archive/v${version}.tar.gz" checksum=221a27e96b3ff759a2fb0f9909063c60e0c206c87d024f49b77484f92a37e4c2 From 4d59607264684f5c445a74681fa6843a92613032 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 23:06:19 -0700 Subject: [PATCH 039/355] sl: fix license --- srcpkgs/sl/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sl/template b/srcpkgs/sl/template index f4669dafd7e979..ba929eb628f6b9 100644 --- a/srcpkgs/sl/template +++ b/srcpkgs/sl/template @@ -1,12 +1,12 @@ # Template file for 'sl' pkgname=sl version=5.02 -revision=2 +revision=3 build_style=gnu-makefile makedepends="ncurses-devel" short_desc="Correct you if you type (sl) by mistake" maintainer="Diogo Leal " -license="custom" +license="custom:0BSD-like" homepage="https://github.com/mtoyoda/sl" distfiles="https://github.com/mtoyoda/sl/archive/${version}.tar.gz" checksum=1e5996757f879c81f202a18ad8e982195cf51c41727d3fea4af01fdcbbb5563a From 6a05afe34b04c2c0bb19f53987933da68e0a7c2f Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 23:10:22 -0700 Subject: [PATCH 040/355] slrn: fix license --- srcpkgs/slrn/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/slrn/template b/srcpkgs/slrn/template index 95d3988598365d..85765f5e8378d0 100644 --- a/srcpkgs/slrn/template +++ b/srcpkgs/slrn/template @@ -1,7 +1,7 @@ # Template file for 'slrn' pkgname=slrn version=1.0.3a -revision=8 +revision=9 wrksrc="${pkgname}-${version%a}" build_style=gnu-configure configure_args="--with-slrnpull --with-ssl @@ -11,7 +11,7 @@ configure_args="--with-slrnpull --with-ssl makedepends="openssl-devel slang-devel" short_desc="Text mode Usenet news reader" maintainer="Leah Neukirchen " -license="GPL-2" +license="GPL-2.0-or-later" homepage="http://www.slrn.org/" # distfiles="http://jedsoft.org/releases/slrn/${pkgname}-${version}.tar.bz2" distfiles="https://ftp.icm.edu.pl/packages/slrn/slrn-${version}.tar.bz2" From e57c55f87f5862f089480c61cb6601b2c6dc2cba Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 23:23:14 -0700 Subject: [PATCH 041/355] sloccount: fix license, http->https, fix distfile link --- srcpkgs/sloccount/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/sloccount/template b/srcpkgs/sloccount/template index 4abe5ab8074a5f..f33b58e0aea4fb 100644 --- a/srcpkgs/sloccount/template +++ b/srcpkgs/sloccount/template @@ -1,16 +1,16 @@ -# Template build file for 'sloccount' +# Template file for 'sloccount' pkgname=sloccount version=2.26 -revision=4 +revision=5 build_style=gnu-makefile hostmakedepends="flex" makedepends="perl" depends="perl" short_desc="Tool to count physical source lines of code in many languages" maintainer="Orphaned " -license="GPL-2" -homepage="http://www.dwheeler.com/sloccount/" -distfiles="$homepage/$pkgname-$version.tar.gz" +license="GPL-2.0-or-later" +homepage="https://dwheeler.com/sloccount/" +distfiles="https://dwheeler.com/sloccount/sloccount-${version}.tar.gz" checksum=fa7fa2bbf2f627dd2d0fdb958bd8ec4527231254c120a8b4322405d8a4e3d12b do_install() { From b0de26b5ebceeb9f36cd296ee61c828c9eec013a Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 12 May 2021 23:49:04 -0700 Subject: [PATCH 042/355] slurm: fix license, vsed updates --- srcpkgs/slurm/template | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srcpkgs/slurm/template b/srcpkgs/slurm/template index e07f77c486bc4c..64ade843fce4a6 100644 --- a/srcpkgs/slurm/template +++ b/srcpkgs/slurm/template @@ -1,21 +1,21 @@ # Template file for 'slurm' pkgname=slurm version=0.4.3 -revision=4 +revision=5 wrksrc="${pkgname}-upstream-${version}" build_style="cmake" makedepends="ncurses-devel" short_desc="Yet another network load monitor" maintainer="Leah Neukirchen " -license="GPL-2" +license="GPL-2.0-or-later" homepage="https://github.com/mattthias/slurm" distfiles="https://github.com/mattthias/slurm/archive/upstream/${version}.tar.gz" checksum=b960c0d215927be1d02c176e1b189321856030226c91f840284886b727d3a3ac -post_extract() { - sed -i '//d' os.h - sed -i 's,,,g' os.h - sed -i 's,,,g' os.h +post_patch() { + vsed -i '//d' os.h + vsed -i 's,,,g' os.h + vsed -i 's,,,g' os.h } post_install() { vman slurm.1 From a395d0c7fe103e2220b9d26488b9df09fd3b4af5 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 00:24:38 -0700 Subject: [PATCH 043/355] smpeg: fix license, other lint --- srcpkgs/smpeg/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/smpeg/template b/srcpkgs/smpeg/template index adb368002d41ae..9a958bd1bbaea1 100644 --- a/srcpkgs/smpeg/template +++ b/srcpkgs/smpeg/template @@ -1,15 +1,15 @@ # Template file for 'smpeg' pkgname=smpeg version=0.4.5 -revision=4 +revision=5 build_style=gnu-configure configure_args="--with-sdl-prefix=${XBPS_CROSS_BASE}/usr --disable-gtk-player --disable-opengl-player" make_build_args="LDFLAGS+=-lstdc++" makedepends="SDL-devel" short_desc="SDL MPEG Player Library" -homepage="https://icculus.org/smpeg/" -license="LGPL-2.1" maintainer="Orphaned " +license="LGPL-2.1-only" +homepage="https://icculus.org/smpeg/" distfiles="ftp://slackware.oregonstate.edu/.1/vectorlinux/VL64-7.0/source/sourceVL/smpeg/${version}/src/smpeg-${version}.tar.gz" checksum=1839c12e88d5dbbc767a7b94eeab2aa3efe4f0eebb7eb7c7240270ba93689a2b From 7f68eee3d6c2e6597b1cb20992dcc2343fea4e1f Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 00:41:09 -0700 Subject: [PATCH 044/355] smpeg2: fix license, other lint --- srcpkgs/smpeg2/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/smpeg2/template b/srcpkgs/smpeg2/template index 5bc6ccf5f7c389..5c87e4416daeab 100644 --- a/srcpkgs/smpeg2/template +++ b/srcpkgs/smpeg2/template @@ -1,13 +1,13 @@ # Template file for 'smpeg2' pkgname=smpeg2 version=2.0.0 -revision=4 +revision=5 build_style=gnu-configure makedepends="SDL2-devel" short_desc="SDL2 MPEG Player Library" -homepage="https://icculus.org/smpeg/" -license="LGPL-2.1" maintainer="rogi " +license="LGPL-2.1-or-later" +homepage="https://icculus.org/smpeg/" distfiles="https://www.libsdl.org/projects/smpeg/release/smpeg2-${version}.tar.gz" checksum=979a65b211744a44fa641a9b6e4d64e64a12ff703ae776bafe3c4c4cd85494b3 From 710b28a6e91e2af17622db8ce10e22057b7ee03f Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 00:43:09 -0700 Subject: [PATCH 045/355] snappy-player: fix license --- srcpkgs/snappy-player/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/snappy-player/template b/srcpkgs/snappy-player/template index 2fc04cbedc6819..da6f9e4986344a 100644 --- a/srcpkgs/snappy-player/template +++ b/srcpkgs/snappy-player/template @@ -1,14 +1,14 @@ -# Template file for 'snappy-player +# Template file for 'snappy-player' pkgname=snappy-player version=1.0 -revision=3 +revision=4 wrksrc="snappy-${version}" build_style=gnu-configure hostmakedepends="pkg-config" makedepends="clutter-gtk-devel clutter-gst-devel gst-plugins-base1-devel" short_desc="Powerful media player with a minimalistic interface" maintainer="Orphaned " -license="GPL-2" +license="GPL-2.0-or-later" homepage="https://wiki.gnome.org/Apps/Snappy" distfiles="${GNOME_SITE}/snappy/${version}/snappy-${version}.tar.xz" checksum=0d33a05c1ad3cc075b8b9bf38d45634ea5204159454597b0882dd6a8d9763f58 From a1619321398dae8f4f9fa0477529aa5eab649356 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 21:41:23 -0700 Subject: [PATCH 046/355] sound-icons: fix license --- srcpkgs/sound-icons/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/sound-icons/template b/srcpkgs/sound-icons/template index adfaa77766bc89..649f97ae856fd1 100644 --- a/srcpkgs/sound-icons/template +++ b/srcpkgs/sound-icons/template @@ -1,12 +1,12 @@ # Template file for 'sound-icons' pkgname=sound-icons version=0.1 -revision=2 +revision=3 short_desc="Sounds for speech enabled applications" maintainer="Alain Kalker " -license="GPL-2" -homepage="http://www.freebsoft.org/pub/projects/sound-icons/" -distfiles="http://www.freebsoft.org/pub/projects/sound-icons/${pkgname}-${version}.tar.gz" +license="GPL-2.0-only" +homepage="https://www.freebsoft.org/pub/projects/sound-icons/" +distfiles="https://www.freebsoft.org/pub/projects/sound-icons/${pkgname}-${version}.tar.gz" checksum=382dda1d14a07b3125a8b5084695aa9ba5cb0fff02e5aab69fd6c7e23cbcf4d7 do_install() { From 60707872da0b1aaa8bb4441f3773cc54bd67bd46 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 21:45:25 -0700 Subject: [PATCH 047/355] soundmodem: fix license --- srcpkgs/soundmodem/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/soundmodem/template b/srcpkgs/soundmodem/template index 6c9e01fd3003a5..91ae349d3c1a29 100644 --- a/srcpkgs/soundmodem/template +++ b/srcpkgs/soundmodem/template @@ -1,13 +1,13 @@ # Template file for 'soundmodem' pkgname=soundmodem version=0.18 -revision=2 +revision=3 build_style=gnu-configure hostmakedepends="automake libtool pkg-config gettext-devel alsa-lib-devel" makedepends="alsa-lib-devel audiofile-devel gtk+-devel libxml2-devel" short_desc="Multiplatform Soundcard Packet Radio Modem" maintainer="Michael Aldridge " -license="GPL-2" +license="GPL-2.0-or-later" homepage="http://soundmodem.vk4msl.yi.org/" distfiles="http://soundmodem.vk4msl.yi.org/soundmodem-${version}.tar.gz" checksum=f033c1716df1378cda646dbb1c48ea9fb9a068772c6686f2ca411bfa64245c1c From 0515bd80ae672cc20625ceb2de8a56b0f1af61f0 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 21:46:51 -0700 Subject: [PATCH 048/355] spawn-fcgi: fix license, http->https --- srcpkgs/spawn-fcgi/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/spawn-fcgi/template b/srcpkgs/spawn-fcgi/template index 2702256ef50ddd..7a8a24d0d4682d 100644 --- a/srcpkgs/spawn-fcgi/template +++ b/srcpkgs/spawn-fcgi/template @@ -1,13 +1,13 @@ # Template file for 'spawn-fcgi' pkgname=spawn-fcgi version=1.6.4 -revision=3 +revision=4 build_style=gnu-configure short_desc="Spawn FastCGI applications" maintainer="Orphaned " -license="BSD" -homepage="http://redmine.lighttpd.net/projects/spawn-fcgi/" -distfiles="http://www.lighttpd.net/download/${pkgname}-${version}.tar.bz2" +license="BSD-3-Clause" +homepage="https://redmine.lighttpd.net/projects/spawn-fcgi/" +distfiles="https://www.lighttpd.net/download/${pkgname}-${version}.tar.bz2" checksum=a3cfc7c9581b6ddc31084b379c9160323fa345d357ace6cd2d3d3af3593e2873 post_install() { From e7cb1fc7c607e0d03516d44c91d5d4ad41b79c12 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 21:55:44 -0700 Subject: [PATCH 049/355] speedcrunch: fix license, http->https, other lint --- srcpkgs/speedcrunch/template | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/srcpkgs/speedcrunch/template b/srcpkgs/speedcrunch/template index 01588a08d53818..5347c6184c10b4 100644 --- a/srcpkgs/speedcrunch/template +++ b/srcpkgs/speedcrunch/template @@ -1,7 +1,7 @@ # Template file for 'speedcrunch' pkgname=speedcrunch version=0.12.0 -revision=1 +revision=2 _hash=ea93b21f9498 wrksrc="heldercorreia-${pkgname}-${_hash}" build_wrksrc="src" @@ -10,12 +10,11 @@ makedepends="qt5-tools-devel qt5-plugin-mysql qt5-plugin-pgsql qt5-plugin-tds qt5-plugin-odbc qt5-plugin-sqlite" short_desc="High-precision scientific calculator" maintainer="newbluemoon " -license="GPL-2" -homepage="http://speedcrunch.org/" +license="GPL-2.0-or-later" +homepage="https://speedcrunch.org/" distfiles="https://bitbucket.org/heldercorreia/${pkgname}/get/release-${version}.tar.bz2" checksum=59bfc6747060dd15c43c1e9afffdb708c15e3c2a7c36855b83952f33ba451d85 if [ -n "$CROSS_BUILD" ]; then hostmakedepends="qt5-tools-devel" fi - From 0400f4853296a9653e0059c3bdad2af86d85a908 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 21:59:08 -0700 Subject: [PATCH 050/355] speex: fix license, http->https, other lint --- srcpkgs/speex/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/speex/template b/srcpkgs/speex/template index a0d9c2191077f5..a380f999427f3c 100644 --- a/srcpkgs/speex/template +++ b/srcpkgs/speex/template @@ -1,14 +1,14 @@ -# Template file for 'speex'. +# Template file for 'speex' pkgname=speex version=1.2.0 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="fftw-devel libogg-devel speexdsp-devel" -short_desc="A free codec for free speech" -homepage="http://www.speex.org" -license="BSD" +short_desc="Free codec for free speech" maintainer="Orphaned " +license="BSD-3-Clause" +homepage="https://www.speex.org" distfiles="http://downloads.xiph.org/releases/speex/speex-$version.tar.gz" checksum=eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094 From c2a934b807d72f1db833b7cd48fd86b1c04d387e Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 22:32:15 -0700 Subject: [PATCH 051/355] spim: fix license, other lint --- srcpkgs/spim/template | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/srcpkgs/spim/template b/srcpkgs/spim/template index ea3a76f626c4ff..347ff447611bd0 100644 --- a/srcpkgs/spim/template +++ b/srcpkgs/spim/template @@ -1,22 +1,22 @@ -# Template file for spim +# Template file for 'spim' pkgname=spim version=8.0 -revision=2 +revision=3 build_wrksrc=spim build_style=configure configure_script="./Configure" make_install_target="install install-man" +hostmakedepends="flex" +short_desc="Self-contained simulator/debugger that runs MIPS32 programs" +maintainer="Toyam Cox " +license="BSD-3-Clause" homepage="http://spimsimulator.sourceforge.net/" -license="BSD" distfiles="http://pages.cs.wisc.edu/~larus/SPIM/spim-${version}.tar.gz" checksum="6f205776cb9fa112729507008843b289012190ed3131cbd426c610a58387ee4b" -maintainer="Toyam Cox " -hostmakedepends="flex" -short_desc="Self-contained simulator/debugger that runs MIPS32 programs" pre_configure() { sed '/Copyright (c) 1990-2010, James R. Larus./,+26!d' README > LICENSE - sed -i Makefile \ + vsed -i Makefile \ -e 's:CFLAGS =:CFLAGS +=:' \ -e 's:LDFLAGS =:LDFLAGS +=:' \ -e 's:CC = gcc:CC ?= gcc:' \ From d2efd5be2a2927de3d57a33d78315f36b57c1a3b Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 22:34:47 -0700 Subject: [PATCH 052/355] splint: fix license --- srcpkgs/splint/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/splint/template b/srcpkgs/splint/template index 4e3a93eaf29e81..860444148eada8 100644 --- a/srcpkgs/splint/template +++ b/srcpkgs/splint/template @@ -1,15 +1,15 @@ # Template file for 'splint' pkgname=splint version=3.1.2 -revision=4 +revision=5 wrksrc="${pkgname}-${version}.orig" build_style=gnu-configure hostmakedepends="flex" makedepends="libfl-devel" short_desc="Secure Programming Lint" maintainer="Orphaned " +license="GPL-2.0-or-later" homepage="http://www.splint.org" -license="GPL-2" distfiles="${DEBIAN_SITE}/main/s/splint/${pkgname}_${version}+dfsg.orig.tar.xz" checksum=51cd7ba978a366ae1ededac2b927058fd5f45d5455e5a9d640b75ab4e45b748a disable_parallel_build=yes From 39294c2d603166f8d6e49e4d102d147f7afb1b8f Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 22:44:00 -0700 Subject: [PATCH 053/355] spreed-webrtc: fix license --- srcpkgs/spreed-webrtc/template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/spreed-webrtc/template b/srcpkgs/spreed-webrtc/template index a80a3e1f674344..7baa339cc7e5b9 100644 --- a/srcpkgs/spreed-webrtc/template +++ b/srcpkgs/spreed-webrtc/template @@ -1,7 +1,7 @@ # Template file for 'spreed-webrtc' pkgname=spreed-webrtc version=0.29.7 -revision=8 +revision=9 build_style=go go_import_path="github.com/strukturag/spreed-webrtc" go_package="${go_import_path}/src/app/spreed-webrtc-server" @@ -9,7 +9,7 @@ hostmakedepends="automake nodejs git which" conf_files="/etc/spreed/webrtc.conf" short_desc="WebRTC audio/video call and conferencing server and web client" maintainer="Toyam Cox " -license="AGPL-3" +license="AGPL-3.0-or-later" homepage="https://github.com/strukturag/spreed-webrtc" distfiles="https://github.com/strukturag/spreed-webrtc/archive/v${version}.tar.gz" checksum=d05b820fe3883840eadf8b96bda663397991849d9bda4750fc7c4e642c9c3268 @@ -26,6 +26,7 @@ post_install() { vsconf server.conf.in vmkdir etc/spreed 755 vinstall server.conf.in 644 etc/spreed webrtc.conf # Match Ubuntu packaging and thus online docs + vlicense LICENSE export SHARE=/usr/share/spreed-webrtc-server make DESTDIR="${DESTDIR}" install-assets From d1dde6085e16e9665247be4ab9edc0881a6d928b Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 22:46:57 -0700 Subject: [PATCH 054/355] stalonetray: fix license, other lint --- srcpkgs/stalonetray/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/stalonetray/template b/srcpkgs/stalonetray/template index 5fa83c506ecc0d..9e2f06365c46ef 100644 --- a/srcpkgs/stalonetray/template +++ b/srcpkgs/stalonetray/template @@ -1,12 +1,12 @@ # Template file for 'stalonetray' pkgname=stalonetray version=0.8.3 -revision=2 -makedepends="libSM-devel libXpm-devel" +revision=3 build_style=gnu-configure +makedepends="libSM-devel libXpm-devel" short_desc="Standalone system tray (notification area)" maintainer="Thomas Adam " -license="GPL-2" +license="GPL-2.0-only" homepage="http://stalonetray.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/stalonetray/${version}/stalonetray-${version}.tar.gz" checksum=f47468a4ecabf93d22774e3fb5e1aba76e8e8d2d76e878975c7c43b65a8353e3 From d746b9eef0b584b0d355c02c5602de01f7481320 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 22:53:02 -0700 Subject: [PATCH 055/355] startup-notification: fix license, homepage --- srcpkgs/startup-notification/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/startup-notification/template b/srcpkgs/startup-notification/template index 2f5a6b75ff17ee..da164f378b18fe 100644 --- a/srcpkgs/startup-notification/template +++ b/srcpkgs/startup-notification/template @@ -1,15 +1,15 @@ # Template file for 'startup-notification' pkgname=startup-notification version=0.12 -revision=10 +revision=11 build_style=gnu-configure configure_args="--disable-static lf_cv_sane_realloc=yes lf_cv_sane_malloc=yes" hostmakedepends="pkg-config" makedepends="libX11-devel libSM-devel xcb-util-devel" short_desc="Library for tracking application startup" maintainer="Orphaned " -license="LGPL-2.1" -homepage="http://www.freedesktop.org" +license="LGPL-2.1-only" +homepage="https://www.freedesktop.org/wiki/Software/startup-notification/" distfiles="${FREEDESKTOP_SITE}/$pkgname/releases/$pkgname-$version.tar.gz" checksum=3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a From a565cf6bacf1bac01426a19933323469130aebbd Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 22:55:44 -0700 Subject: [PATCH 056/355] stfl: fix license --- srcpkgs/stfl/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/stfl/template b/srcpkgs/stfl/template index a66f54dad904d7..0d970c9d2c26ab 100644 --- a/srcpkgs/stfl/template +++ b/srcpkgs/stfl/template @@ -1,13 +1,13 @@ # Template file for 'stfl' pkgname=stfl version=0.24 -revision=3 +revision=4 build_style=gnu-makefile hostmakedepends="swig" makedepends="ncurses-devel" short_desc="Curses-based widget set for text terminals" maintainer="Logen K " -license="GPL-3" +license="GPL-3.0-or-later" homepage="http://www.clifford.at/stfl/" distfiles="http://www.clifford.at/${pkgname}/${pkgname}-${version}.tar.gz" checksum=d4a7aa181a475aaf8a8914a8ccb2a7ff28919d4c8c0f8a061e17a0c36869c090 From a815c727fdd4b65a1fcf20efd931e4bcddaaae72 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 22:58:34 -0700 Subject: [PATCH 057/355] streamripper: fix license --- srcpkgs/streamripper/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/streamripper/template b/srcpkgs/streamripper/template index 92f93db2fc2b85..8530d816be1232 100644 --- a/srcpkgs/streamripper/template +++ b/srcpkgs/streamripper/template @@ -1,13 +1,13 @@ # Template file for 'streamripper' pkgname=streamripper version=1.64.6 -revision=2 +revision=3 build_style=gnu-configure hostmakedepends="pkg-config" makedepends="glib-devel libvorbis-devel libmad-devel faad2-devel" short_desc="Mp3 recorder for shoutcast-compatible streams / internet radio" maintainer="Piraty " -license="GPL-2" +license="GPL-2.0-or-later" homepage="http://streamripper.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz" checksum=c1d75f2e9c7b38fd4695be66eff4533395248132f3cc61f375196403c4d8de42 From 975bcde17b35b9a437f7808c282892b969bdcd9b Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 23:13:33 -0700 Subject: [PATCH 058/355] sunwait: fix license, other lint --- srcpkgs/sunwait/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/sunwait/template b/srcpkgs/sunwait/template index 5c470494b43081..0d6b08a25982ef 100644 --- a/srcpkgs/sunwait/template +++ b/srcpkgs/sunwait/template @@ -1,12 +1,12 @@ # Template file for 'sunwait' pkgname=sunwait version=0.20041208 -revision=1 +revision=2 wrksrc="${pkgname}-${version##*.}" build_style=gnu-makefile -short_desc="A small C program calculating sunrise and sunset" +short_desc="Small C program calculating sunrise and sunset" maintainer="Michael Aldridge " -license="GPL-2" +license="GPL-2.0-only" homepage="http://www.risacher.org/sunwait/" distfiles="${homepage}${pkgname}-${version##*.}.tar.gz" checksum=46ecd64142e0c7c2decac8df241b78ccae0d1b323929fb4d61aa1acc16a9ff96 From bb32fe0ccc08487358bb880a6b12b2d9847e1693 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Thu, 13 May 2021 23:40:24 -0700 Subject: [PATCH 059/355] swh-lv2: fix license, other lint, use vsed --- srcpkgs/swh-lv2/template | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srcpkgs/swh-lv2/template b/srcpkgs/swh-lv2/template index ed1c9bfa82e256..abf1c8a34019a3 100644 --- a/srcpkgs/swh-lv2/template +++ b/srcpkgs/swh-lv2/template @@ -1,19 +1,19 @@ # Template file for 'swh-lv2' pkgname=swh-lv2 version=1.0.16 -revision=1 -build_style=gnu-makefile +revision=2 wrksrc="lv2-${version}" +build_style=gnu-makefile make_install_target="install-system" -homepage="http://plugin.org.uk/" -distfiles="https://github.com/swh/lv2/archive/v${version}.tar.gz" hostmakedepends="pkg-config libxslt" makedepends="fftw-devel" short_desc="Collection of GPL (free software) LV2 audio plugins" maintainer="Orphaned " -license="GPL-3" +license="GPL-3.0-or-later" +homepage="http://plugin.org.uk/" +distfiles="https://github.com/swh/lv2/archive/v${version}.tar.gz" checksum=bc24512de6e2fb7a493226e2e01a80ba8462a318b15c3b0fd0cd914b018c3548 post_extract() { - sed -i -e 's|$(INSTALL_DIR_REALLY)|$(DESTDIR)/$(INSTALL_DIR)|' Makefile + vsed -i -e 's|$(INSTALL_DIR_REALLY)|$(DESTDIR)/$(INSTALL_DIR)|' Makefile } From bd169b452cd88b8b797d9e53db4d7a004fd91aa9 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Fri, 14 May 2021 00:01:58 -0700 Subject: [PATCH 060/355] systemsettings: fix license --- srcpkgs/systemsettings/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/systemsettings/template b/srcpkgs/systemsettings/template index 04b62fea2561d3..3ceba15094d80e 100644 --- a/srcpkgs/systemsettings/template +++ b/srcpkgs/systemsettings/template @@ -1,7 +1,7 @@ # Template file for 'systemsettings' pkgname=systemsettings version=5.21.5 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_TESTING=OFF" hostmakedepends="python3 qt5-qmake qt5-host-tools kconfig @@ -11,7 +11,7 @@ makedepends="kcmutils-devel kdoctools khtml-devel kactivities5-stats-devel depends="kirigami2 setxkbmap xrdb" short_desc="KDE System settings" maintainer="John " -license="GPL-2.0-or-later, GFDL-1.2" +license="GPL-2.0-or-later, GFDL-1.2-only" homepage="https://invent.kde.org/plasma/systemsettings" distfiles="${KDE_SITE}/plasma/${version}/${pkgname}-${version}.tar.xz" checksum=95784e6f0dc89778ebbd0bc4536f690cd8454001c7665eb853c0c6eace987acd From cdd250b10072ac0d2db3f571329a00fee500c13f Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sun, 16 May 2021 14:36:53 +0300 Subject: [PATCH 061/355] otter-browser: update to 1.0.02. --- .../otter-browser/patches/qt5-5.15.0.patch | 20 ------------------- srcpkgs/otter-browser/template | 6 +++--- 2 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 srcpkgs/otter-browser/patches/qt5-5.15.0.patch diff --git a/srcpkgs/otter-browser/patches/qt5-5.15.0.patch b/srcpkgs/otter-browser/patches/qt5-5.15.0.patch deleted file mode 100644 index 48ef12b81cbdc6..00000000000000 --- a/srcpkgs/otter-browser/patches/qt5-5.15.0.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- src/modules/windows/web/StartPageWidget.cpp 2019-01-01 17:59:01.000000000 +0100 -+++ src/modules/windows/web/StartPageWidget.cpp 2020-08-22 13:15:00.552021858 +0200 -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - #include - #include - #include ---- src/modules/backends/web/qtwebkit/QtWebKitPluginWidget.cpp 2019-01-01 17:59:01.000000000 +0100 -+++ src/modules/backends/web/qtwebkit/QtWebKitPluginWidget.cpp 2020-08-22 13:15:12.320021389 +0200 -@@ -22,6 +22,7 @@ - - #include - #include -+#include - - namespace Otter - { diff --git a/srcpkgs/otter-browser/template b/srcpkgs/otter-browser/template index cd9aae1935511c..ed4f5b18453c87 100644 --- a/srcpkgs/otter-browser/template +++ b/srcpkgs/otter-browser/template @@ -1,7 +1,7 @@ # Template file for 'otter-browser' pkgname=otter-browser -version=1.0.01 -revision=3 +version=1.0.02 +revision=1 build_style=cmake makedepends="hunspell-devel libgcrypt-devel qt5-declarative-devel qt5-multimedia-devel qt5-svg-devel qt5-webkit-devel qt5-xmlpatterns-devel @@ -12,7 +12,7 @@ maintainer="GangstaCat " license="GPL-3.0-or-later" homepage="http://otter-browser.org" distfiles="https://github.com/OtterBrowser/${pkgname}/archive/v${version}.tar.gz" -checksum=85aef7c74277cf94de237e516c3c2d507b3d19b9ad16853de938540b8bf2f16b +checksum=d1e090a80fa736cd128f594184817078a08cac31614e85e7838ff1b64511d62d build_options="webengine" desc_option_webengine="Build Qt5 WebEngine support" From b432c13e61b75b930ee6b1634eb1e96b41b79670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 17 May 2021 00:40:18 -0300 Subject: [PATCH 062/355] libsidplayfp: update to 2.1.2. --- srcpkgs/libsidplayfp/template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/libsidplayfp/template b/srcpkgs/libsidplayfp/template index 945d635780ad52..0ba0fa0876c252 100644 --- a/srcpkgs/libsidplayfp/template +++ b/srcpkgs/libsidplayfp/template @@ -1,6 +1,7 @@ # Template file for 'libsidplayfp' +# the version is usually in sync with libsidplayfp, keep in sync! pkgname=libsidplayfp -version=2.1.1 +version=2.1.2 revision=1 build_style=gnu-configure hostmakedepends="autoconf" @@ -9,7 +10,7 @@ maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://sourceforge.net/p/sidplay-residfp/wiki/Home/" distfiles="${SOURCEFORGE_SITE}/sidplay-residfp/${pkgname}/${version%.*}/${pkgname}-${version}.tar.gz" -checksum=3793b61eeaf95a4a43334548b3b29292e83c53664d937e50a8877c35098b9d39 +checksum=1bbc43cb7035ac8bf0d0a4ea4c9aa8c6b7ab74bb67ec440e2e4c0a1867b12fcb libsidplayfp-devel_package() { short_desc+=" - development files" From db7daf91f6cf7b1255f7f12b32bc19dec28b6dea Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Sat, 1 May 2021 13:10:38 +0000 Subject: [PATCH 063/355] sidplayfp: update to 2.1.2. Closes: #30606 [via git-merge-pr] --- srcpkgs/sidplayfp/template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sidplayfp/template b/srcpkgs/sidplayfp/template index d5d46726ca9cee..c98648586c910b 100644 --- a/srcpkgs/sidplayfp/template +++ b/srcpkgs/sidplayfp/template @@ -1,6 +1,7 @@ # Template file for 'sidplayfp' +# the version is usually in sync with libsidplayfp, keep in sync! pkgname=sidplayfp -version=2.1.1 +version=2.1.2 revision=1 build_style=gnu-configure hostmakedepends="pkg-config" @@ -10,4 +11,4 @@ maintainer="Zeinok " license="GPL-2.0-or-later" homepage="https://sourceforge.net/projects/sidplay-residfp/" distfiles="${SOURCEFORGE_SITE}/sidplay-residfp/${pkgname}/${version%.*}/${pkgname}-${version}.tar.gz" -checksum=98f9d1d2701321c1cf4a7aa16ff90a2e0579013afa8087f1d550c7d43a355807 +checksum=1c9dd519c39f7c811c33a7b8f516f33c36b36d29af6075316a7ec7320f9d9155 From 2b829fb82f344dfc376c3f39e27d9cef6a12c854 Mon Sep 17 00:00:00 2001 From: Anthony Iliopoulos Date: Mon, 3 May 2021 20:29:47 +0200 Subject: [PATCH 064/355] sfeed: update to 0.9.23. --- srcpkgs/sfeed/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/sfeed/template b/srcpkgs/sfeed/template index f42aef231c9e62..1a15bf2c3a5871 100644 --- a/srcpkgs/sfeed/template +++ b/srcpkgs/sfeed/template @@ -1,6 +1,6 @@ # Template file for 'sfeed' pkgname=sfeed -version=0.9.22 +version=0.9.23 revision=1 build_style=gnu-makefile make_install_args="MANPREFIX=/usr/share/man" @@ -10,7 +10,7 @@ maintainer="Rubén Santos " license="ISC" homepage="https://git.codemadness.org/sfeed" distfiles="https://codemadness.org/releases/sfeed/sfeed-${version}.tar.gz" -checksum=1941851adb7296dcd3e983575855fc8a4926fbd4e9d31220698f33ddca7f19ef +checksum=0d7c48f8eee3949222a5d45f69bd2ac04ac03d93fe7678fcd4d2115a0aa3607d post_install() { vlicense LICENSE From ccb5f945033516d5d049c2d76050717c7b9d883c Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 28 Apr 2021 22:24:53 -0700 Subject: [PATCH 065/355] jbigkit: fix license --- srcpkgs/jbigkit/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/jbigkit/template b/srcpkgs/jbigkit/template index 1b0514bea947a9..05358207e07d71 100644 --- a/srcpkgs/jbigkit/template +++ b/srcpkgs/jbigkit/template @@ -1,14 +1,14 @@ # Template file for 'jbigkit' pkgname=jbigkit version=2.2 -revision=1 +revision=2 wrksrc="${pkgname}-shared-${version}" build_style=gnu-configure hostmakedepends="automake libtool pkg-config" checkdepends="check-devel" short_desc="Data compression library/utilities for bi-level high-resolution images" maintainer="Andrea Brancaleoni " -license="GPL-3" +license="GPL-2.0-only" homepage="http://www.cl.cam.ac.uk/~mgk25/jbigkit" distfiles="https://github.com/void-linux/jbigkit-shared/archive/v${version}.tar.gz" checksum=5cccbfb3bd7daf224a244ce0578dbcf706e4f39962426ceede873262b29b9931 From 8e4b4ef48d25e20734113da199b29b0bf67f0459 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 28 Apr 2021 22:28:38 -0700 Subject: [PATCH 066/355] jeti-filemanager: fix license --- srcpkgs/jeti-filemanager/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/jeti-filemanager/template b/srcpkgs/jeti-filemanager/template index 95e2a6167e82e4..1416863a8a6552 100644 --- a/srcpkgs/jeti-filemanager/template +++ b/srcpkgs/jeti-filemanager/template @@ -1,12 +1,12 @@ # Template file for 'jeti-filemanager' pkgname=jeti-filemanager version=2.0.1 -revision=2 +revision=3 build_style=gnu-makefile makedepends="ncurses-devel" short_desc="Total Commander filemanager ncurses clone" maintainer="Harri Leino " -license="GPL-3" +license="GPL-3.0-only" homepage="https://github.com/mrshampoo/jeti-filemanager/" distfiles="https://github.com/mrshampoo/jeti-filemanager/archive/${version}.tar.gz" checksum=4da4ddee8fe6774b91ea473810d6c6898777c9bbcb8816996d72095dc0e18691 From b377f662f034d1b4fe766f8651e2713a677dec38 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 28 Apr 2021 22:37:43 -0700 Subject: [PATCH 067/355] jnettop: fix license --- srcpkgs/jnettop/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/jnettop/template b/srcpkgs/jnettop/template index 1ac2fb80593786..1bfc21eda36d8d 100644 --- a/srcpkgs/jnettop/template +++ b/srcpkgs/jnettop/template @@ -1,7 +1,7 @@ # Template file for 'jnettop' pkgname=jnettop version=0.13.0 -revision=1 +revision=2 create_wrksrc=yes build_wrksrc="${pkgname}-${version}" build_style=gnu-configure @@ -9,7 +9,7 @@ hostmakedepends="pkg-config" makedepends="glib-devel libpcap-devel ncurses-devel" short_desc="View hosts/ports taking up the most network traffic" maintainer="Leah Neukirchen " -license="GPL-2" +license="GPL-2.0-or-later" homepage="https://packages.debian.org/sid/net/jnettop" distfiles="${DEBIAN_SITE}/main/j/${pkgname}/${pkgname}_${version}.orig.tar.gz ${DEBIAN_SITE}/main/j/${pkgname}/${pkgname}_${version}-1.debian.tar.gz" From 25302605f24d5e68ab8d386b92bb466c0611b74f Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Wed, 28 Apr 2021 22:42:31 -0700 Subject: [PATCH 068/355] joe: fix license, other lint JOE is technically GPL 1.0-or-later but the COPYING file is the GPL 2 one, so I'm sticking with that. --- srcpkgs/joe/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/joe/template b/srcpkgs/joe/template index b68d886982a8f0..b31fa139153eb4 100644 --- a/srcpkgs/joe/template +++ b/srcpkgs/joe/template @@ -1,7 +1,7 @@ # Template file for 'joe' pkgname=joe version=4.6 -revision=1 +revision=2 build_style=gnu-configure conf_files=" /etc/joe/ftyperc @@ -13,10 +13,10 @@ conf_files=" /etc/joe/rjoerc /etc/joe/shell.csh /etc/joe/shell.sh" -short_desc="The world-famous Wordstar like text editor" +short_desc="World-famous Wordstar like text editor" maintainer="Diogo Leal " -license="GPL-2" -conflicts="jupp>=0" +license="GPL-2.0-or-later" homepage="http://joe-editor.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/joe-editor/JOE%20sources/joe-${version}/joe-${version}.tar.gz" checksum=495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de +conflicts="jupp>=0" From 17684071561c10ccfbbdcfb05a899c55fc2a3d8d Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Mon, 3 May 2021 23:01:17 -0700 Subject: [PATCH 069/355] john: fix license, verify and adjust python version --- srcpkgs/john/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/john/template b/srcpkgs/john/template index fc807f4e7c8486..8b288e0ce2e34b 100644 --- a/srcpkgs/john/template +++ b/srcpkgs/john/template @@ -1,7 +1,7 @@ # Template file for 'john' pkgname=john version=1.9.0 -revision=4 +revision=5 _jumbover=1 wrksrc="${pkgname}-${version}-jumbo-${_jumbover}" build_wrksrc="src" @@ -10,11 +10,11 @@ configure_args="--with-systemwide $(vopt_enable simd)" makedepends="openssl-devel gmp-devel libgomp-devel libpcap-devel bzip2-devel zlib-devel" short_desc="John the Ripper password cracker (jumbo-${_jumbover} patch included)" maintainer="Piraty " -license="GPL-2.0-or-later with OpenSSL-exception" +license="custom:GPL-2.0-or-later with OpenSSL-exception" homepage="https://www.openwall.com/john/" distfiles="$homepage/k/$pkgname-${version}-jumbo-${_jumbover}.tar.xz" checksum=f5d123f82983c53d8cc598e174394b074be7a77756f5fb5ed8515918c81e7f3b -python_version=2 #unverified +python_version=3 build_options="simd" From 0686a58ef676c5759c0726e6cb9ce51637e4df81 Mon Sep 17 00:00:00 2001 From: DirectorX Date: Fri, 30 Apr 2021 15:30:08 +0300 Subject: [PATCH 070/355] hopper: update to 4.7.5. --- srcpkgs/hopper/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/hopper/template b/srcpkgs/hopper/template index 66e3722fec34d8..ab16766677cbdc 100644 --- a/srcpkgs/hopper/template +++ b/srcpkgs/hopper/template @@ -1,6 +1,6 @@ # Template file for 'hopper' pkgname=hopper -version=4.7.4 +version=4.7.5 revision=1 _build=1 create_wrksrc=yes @@ -9,7 +9,7 @@ maintainer="Andrea Brancaleoni " license="custom:EULA" homepage="https://www.hopperapp.com" distfiles="https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-v4-${version}-Linux.pkg.tar.xz" -checksum=8f44fd525b24a8e722974afdd51f9c976ce3078361907358c5c74cebca965c08 +checksum=1ffd9272b8cfb615803dfa1e5347d3605c67b93466426cf5aa70b1bd52f0ba02 archs="x86_64" restricted=yes From b9bdae733369219097cd4541bc9bf9d69132deff Mon Sep 17 00:00:00 2001 From: BlueChrystal <84290062+BlueChrystal@users.noreply.github.com> Date: Mon, 17 May 2021 04:41:25 +0300 Subject: [PATCH 071/355] nushell: update to 0.31.0. --- srcpkgs/nushell/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/nushell/template b/srcpkgs/nushell/template index a3bca1ba4452d3..cfa5439d7d3911 100644 --- a/srcpkgs/nushell/template +++ b/srcpkgs/nushell/template @@ -1,6 +1,6 @@ # Template file for 'nushell' pkgname=nushell -version=0.30.0 +version=0.31.0 revision=1 build_style=cargo configure_args="--features=extra" @@ -12,7 +12,7 @@ license="MIT" homepage="https://www.nushell.sh/" changelog="https://www.nushell.sh/blog/" distfiles="https://github.com/nushell/nushell/archive/${version}.tar.gz" -checksum=a36cd3d93c69aab83c874fe0c8b653ce9fe188da9f527d3bb28492ba213e579a +checksum=4dcbe38b35902a98df3f213fef5f69dcd9870975a18e2a7feb002534e68d848b register_shell="/usr/bin/nu" # all tests fail with argument --target make_check=no From 593b5679359e646f3935fe58c5485eee085ed442 Mon Sep 17 00:00:00 2001 From: Tim Sandquist Date: Fri, 14 May 2021 20:53:39 -0500 Subject: [PATCH 072/355] containerd: update to 1.5.1. --- srcpkgs/containerd/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/containerd/template b/srcpkgs/containerd/template index 948e57aa6019f9..1a8de6bf77c43c 100644 --- a/srcpkgs/containerd/template +++ b/srcpkgs/containerd/template @@ -1,6 +1,6 @@ # Template file for 'containerd' pkgname=containerd -version=1.4.4 +version=1.5.1 revision=1 build_style=go go_import_path=github.com/containerd/containerd @@ -20,7 +20,7 @@ maintainer="Paul Knopf " license="Apache-2.0" homepage="https://github.com/containerd/containerd" distfiles="https://github.com/containerd/containerd/archive/v${version}.tar.gz" -checksum=ac62c64664bf62fd44df0891c896eecdb6d93def3438271d7892dca75bc069d1 +checksum=@5df4f8bd6266af55fd006d5fd388420d4369683df01bb976b75429f7a37dcc74 make_dirs="/var/lib/containerd 0755 root root" post_build() { From 0688e9770f479138b2612b88968dc4fe5b746aa8 Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Sat, 15 May 2021 10:46:46 +0200 Subject: [PATCH 073/355] atlantis: update to 0.17.0 --- srcpkgs/atlantis/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/atlantis/template b/srcpkgs/atlantis/template index 9b2052c1e39d2d..23d3c70a50913a 100644 --- a/srcpkgs/atlantis/template +++ b/srcpkgs/atlantis/template @@ -1,6 +1,6 @@ # Template file for 'atlantis' pkgname=atlantis -version=0.16.1 +version=0.17.0 revision=1 build_style=go go_import_path=github.com/runatlantis/atlantis @@ -10,4 +10,4 @@ maintainer="Michael Aldridge " license="Apache-2.0" homepage="https://runatlantis.io" distfiles="https://github.com/runatlantis/atlantis/archive/v${version}.tar.gz" -checksum=23828bba56e6ae372b35668ab7a1055ecdd37076391760801f4436f4c9a33680 +checksum=39d10c691b784bfb2ad5d74539b5b65e80417bf882b234778990235d8a615229 From 6dcc2a7c5f3a042d9f44545a8347ababa1e6ab22 Mon Sep 17 00:00:00 2001 From: KawaiiAmber Date: Fri, 23 Apr 2021 04:02:55 -0600 Subject: [PATCH 074/355] kmod: fix license --- srcpkgs/kmod/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/kmod/template b/srcpkgs/kmod/template index 4b96012b993d6c..e9b8c26161e8c0 100644 --- a/srcpkgs/kmod/template +++ b/srcpkgs/kmod/template @@ -1,7 +1,7 @@ # Template file for 'kmod' pkgname=kmod version=27 -revision=2 +revision=3 build_style=gnu-configure configure_args="--with-zlib --with-xz" hostmakedepends="pkg-config" @@ -13,7 +13,7 @@ make_dirs=" /usr/lib/modprobe.d 0755 root root" short_desc="Linux kernel module handling" maintainer="Enno Boland " -license="GPL-2.0-only" +license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git" distfiles="${KERNEL_SITE}/utils/kernel/kmod/kmod-${version}.tar.xz" checksum=c1d3fbf16ca24b95f334c1de1b46f17bbe5a10b0e81e72668bdc922ebffbbc0c From be0dc8a5e7437e9669f06f5331422796339032fc Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Tue, 20 Apr 2021 17:06:00 +0300 Subject: [PATCH 075/355] synapse: update to 1.33.2 --- srcpkgs/synapse/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template index f4452df2997de6..24dd39948aa59a 100644 --- a/srcpkgs/synapse/template +++ b/srcpkgs/synapse/template @@ -1,6 +1,6 @@ # Template file for 'synapse' pkgname=synapse -version=1.30.1 +version=1.33.2 revision=1 build_style=python3-module hostmakedepends="python3-setuptools" @@ -19,7 +19,7 @@ license="Apache-2.0" homepage="https://github.com/matrix-org/synapse" changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md" distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz" -checksum=8c93abb1ed84c1f383d6179fdd74f7afec56b15401073e12f4a7a5a4ef75849a +checksum=5e0a934dba5994ec102e94ba323e88746b9aec6ccaae03ba2c94780a6dbfeb97 system_accounts="synapse" synapse_homedir="/var/lib/synapse" From b7b578ff1dd325c39f701a655b873889da036762 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 20 Apr 2021 09:38:38 +0200 Subject: [PATCH 076/355] NetworkManager: update to 1.30.4. --- srcpkgs/NetworkManager/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template index 0afa1ccae360a9..213f7a7a420712 100644 --- a/srcpkgs/NetworkManager/template +++ b/srcpkgs/NetworkManager/template @@ -1,6 +1,6 @@ # Template file for 'NetworkManager' pkgname=NetworkManager -version=1.30.2 +version=1.30.4 revision=1 build_style=meson build_helper="gir qemu" @@ -33,7 +33,7 @@ maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="https://wiki.gnome.org/Projects/NetworkManager" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=0c8e80e77877860e4a4e6ab4a0f7cdc1186e356b65b042a751897188b88944d2 +checksum=6050b724212ea3ce7386113359bea9afa1f679a54f60d999a5999892e672c190 # TODO: Some tests require network namespaces to run. make_check=extended lib32disabled=yes From 37f0380b0a4e0da34b14305a4cb7b635b84f1de2 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 20 Apr 2021 09:22:25 +0200 Subject: [PATCH 077/355] EmulationStation: update to 2.9.4. --- srcpkgs/EmulationStation/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/EmulationStation/template b/srcpkgs/EmulationStation/template index bb3c8317bae69f..e117d9b470dcd8 100644 --- a/srcpkgs/EmulationStation/template +++ b/srcpkgs/EmulationStation/template @@ -1,6 +1,6 @@ # Template file for 'EmulationStation' pkgname=EmulationStation -version=2.9.3 +version=2.9.4 revision=1 _pugixml_version=1.10 build_style=cmake @@ -14,7 +14,7 @@ license="MIT" homepage="https://github.com/RetroPie/EmulationStation" distfiles="https://github.com/RetroPie/EmulationStation/archive/v${version}.tar.gz https://github.com/zeux/pugixml/releases/download/v1.10/pugixml-${_pugixml_version}.tar.gz" -checksum="ed5125611afd7f79453b8d634a2d3495ec775c4914eb90571a20b74ead54335c +checksum="79452f6c1e8aaebe98c19708b3587a0a45330bf20b3301d556285d5cd756fa4a 55f399fbb470942410d348584dc953bcaec926415d3462f471ef350f29b5870a" pre_configure() { From e2d50da9bad37bfd37f423155784d2cf6cc7b31c Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 20 Apr 2021 13:04:17 +0200 Subject: [PATCH 078/355] flatpak-builder: update to 1.0.12. --- srcpkgs/flatpak-builder/template | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template index 056d33ce5caeb9..208481c58b25e6 100644 --- a/srcpkgs/flatpak-builder/template +++ b/srcpkgs/flatpak-builder/template @@ -1,6 +1,6 @@ # Template file for 'flatpak-builder' pkgname=flatpak-builder -version=1.0.9 +version=1.0.12 revision=1 build_style=gnu-configure hostmakedepends="pkg-config xmlto" @@ -11,7 +11,9 @@ maintainer="Enno Boland " license="LGPL-2.1-or-later" homepage="https://github.com/flatpak/flatpak-builder" distfiles="${homepage}/releases/download/${version}/${pkgname}-${version}.tar.xz" -checksum=d6ef390a1cd927db1cfb12b6d2e340227a69de3fd64308316a3e6a89c1390d03 +checksum=4780c1b8e0838ffb64e9639bd7801417964fd818c7c6d5e9afca4d5511ded2c8 +# Tests expects a Debian derivate hosts to build a flatpak container from. +make_check=no if [ "$CROSS_BUILD" ]; then hostmakedepends+=" flatpak-devel" From af4cf4b2ace8087640282b1be4790afcbd797b25 Mon Sep 17 00:00:00 2001 From: Anthony Iliopoulos Date: Tue, 20 Apr 2021 12:53:23 +0200 Subject: [PATCH 079/355] lttng-tools: update to 2.12.3. Closes: #30362 [via git-merge-pr] --- srcpkgs/lttng-tools/template | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srcpkgs/lttng-tools/template b/srcpkgs/lttng-tools/template index abf22531aa5399..d1e20dc9c0bdf6 100644 --- a/srcpkgs/lttng-tools/template +++ b/srcpkgs/lttng-tools/template @@ -1,6 +1,6 @@ # Template file for 'lttng-tools' pkgname=lttng-tools -version=2.12.2 +version=2.12.3 revision=1 build_style=gnu-configure hostmakedepends="pkg-config" @@ -11,7 +11,9 @@ maintainer="Alexander Egorenkov " license="LGPL-2.1-only, GPL-2.0-only" homepage="https://lttng.org" distfiles="${homepage}/files/${pkgname}/${pkgname}-${version}.tar.bz2" -checksum=9ed9161795ff023b076f9f95afaa4f1f822ec42495c0fa04c586ab8fa74e84f1 +checksum=2890da230edd523fcf497e9eb28133b7606d64fa01bcbffadbfcba42104db153 +# tests timeout +make_check=no system_groups="tracing" lttng-tools-devel_package() { From ec9344217a64c390751a0342af6ded5b63dc65e0 Mon Sep 17 00:00:00 2001 From: Anthony Iliopoulos Date: Tue, 20 Apr 2021 12:53:51 +0200 Subject: [PATCH 080/355] lttng-modules-dkms: update to 2.12.6. Closes: #30363 [via git-merge-pr] --- srcpkgs/lttng-modules-dkms/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/lttng-modules-dkms/template b/srcpkgs/lttng-modules-dkms/template index 97355e1bc7ff00..f1d75660bff231 100644 --- a/srcpkgs/lttng-modules-dkms/template +++ b/srcpkgs/lttng-modules-dkms/template @@ -1,6 +1,6 @@ # Template file for 'lttng-modules-dkms' pkgname=lttng-modules-dkms -version=2.12.4 +version=2.12.6 revision=1 wrksrc="lttng-modules-${version}" depends="dkms" @@ -9,7 +9,7 @@ maintainer="Alexander Egorenkov " license="LGPL-2.1-only, GPL-2.0-only, MIT" homepage="https://lttng.org" distfiles="${homepage}/files/lttng-modules/lttng-modules-${version}.tar.bz2" -checksum=fe66400fa1b85bff1b9ae24419c74e3bb7d358d643eade0594d81b48bd190688 +checksum=95ac2a2cf92d85d23ffbdaca6a1ec0d7c167211d1e0fb850ab90004a3f475eaa dkms_modules="lttng-modules ${version}" From e33129f8325309f05fbe30a08390ae982d4692b5 Mon Sep 17 00:00:00 2001 From: Anthony Iliopoulos Date: Tue, 20 Apr 2021 12:48:53 +0200 Subject: [PATCH 081/355] libmicrodns: update to 0.2.0. --- common/shlibs | 2 +- srcpkgs/libmicrodns/template | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/shlibs b/common/shlibs index 0d53e2be7dfad5..a584fb460e21e4 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1329,7 +1329,7 @@ libunwind-ppc32.so.8 libunwind-1.5.0_3 libunwind-ppc64.so.8 libunwind-1.5.0_3 libunwind-setjmp.so.0 libunwind-1.5.0_3 libmicrohttpd.so.12 libmicrohttpd-0.9.48_1 -libmicrodns.so.0 libmicrodns-0.1.0_1 +libmicrodns.so.1 libmicrodns-0.2.0_1 libgit2.so.1.0 libgit2-1.0.1_3 libgit2-glib-1.0.so.0 libgit2-glib-0.23.4_1 libagg.so.2 agg-2.5_1 diff --git a/srcpkgs/libmicrodns/template b/srcpkgs/libmicrodns/template index ad8f569455a7cb..3b113940bd56f3 100644 --- a/srcpkgs/libmicrodns/template +++ b/srcpkgs/libmicrodns/template @@ -1,6 +1,6 @@ # Template file for 'libmicrodns' pkgname=libmicrodns -version=0.1.2 +version=0.2.0 revision=1 build_style=meson hostmakedepends="pkg-config" @@ -9,7 +9,7 @@ maintainer="Kyle Nusbaum " license="LGPL-2.1-only" homepage="https://github.com/videolabs/libmicrodns" distfiles="https://github.com/videolabs/libmicrodns/archive/${version}.tar.gz" -checksum=2b4d733f9472e11b71d66208c025de2e1f4a1087814bdc1e12e1aa78aca670e5 +checksum=9864a088ffef4d4255d5abf63c6f603d1dc343dfec2809ff0c3f1624045b80fa libmicrodns-devel_package() { short_desc+=" - development files" From 58f2caaac675fdf194364e8ff81e99d309062bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 17 May 2021 01:17:49 -0300 Subject: [PATCH 082/355] vlc: revbump for libmicrodns update Also fix tests. Closes: #30356 [via git-merge-pr] --- srcpkgs/vlc/template | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/srcpkgs/vlc/template b/srcpkgs/vlc/template index e2076d5218bce9..37000e84dfc24a 100644 --- a/srcpkgs/vlc/template +++ b/srcpkgs/vlc/template @@ -1,7 +1,7 @@ # Template file for 'vlc' pkgname=vlc version=3.0.14 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-gme --disable-libtar --enable-jack --enable-live555 --disable-fluidsynth --enable-dvdread @@ -89,6 +89,11 @@ pre_configure() { sed 's|pl_shader_alloc(tc->pl_ctx, NULL, 0, 0);|pl_shader_alloc(tc->pl_ctx, NULL, 0);|' -i modules/video_output/opengl/vout_helper.c } + +pre_check() { + export QT_QPA_PLATFORM=offscreen +} + pre_install() { if [ "$CROSS_BUILD" ]; then # install .lua files instead of precompiled .luac ones @@ -97,6 +102,7 @@ pre_install() { sed -i -e "s/\(@list='\$(nobase_vlclib_DATA\)/\1:.luac=.lua/" share/Makefile fi } + post_install() { # Remove unused stuff rm -f ${DESTDIR}/usr/lib/vlc/plugins/plugins.dat @@ -119,6 +125,7 @@ libvlc_package() { done } } + vlc-devel_package() { short_desc+=" - development files" depends+=" lib${sourcepkg}>=${version}_${revision}" From 54c10d9dff93763beb2dc5263c53272bb56f372c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 17 May 2021 01:41:39 -0300 Subject: [PATCH 083/355] aspell: aspell-devel doesn't require ncurses-devel ncurses-devel isn't necessary in order to build applications using libaspell, and we can avoid pulling it in. Also use vsed. --- srcpkgs/aspell/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/aspell/template b/srcpkgs/aspell/template index 58b8208a11979f..e1ec2d2cc00c2b 100644 --- a/srcpkgs/aspell/template +++ b/srcpkgs/aspell/template @@ -1,7 +1,7 @@ # Template file for 'aspell' pkgname=aspell version=0.60.8 -revision=4 +revision=5 build_style=gnu-configure # we need to force aspell to use /usr/lib for data for two reasons: # - in multilib systems, it should use the native dicts instead of requiring @@ -25,7 +25,7 @@ checksum=f9b77e515334a751b2e60daab5db23499e26c9209f5e7b7443b05235ad0226f2 pre_configure() { # XXX workaround ctor/dtor ordering with musl export CXXFLAGS="${CXXFLAGS/-O?/-O0}" - sed -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' -i configure.ac + vsed -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' -i configure.ac autoreconf -fi } @@ -38,7 +38,7 @@ libaspell_package() { } aspell-devel_package() { - depends="ncurses-devel aspell>=${version}_${revision}" + depends="aspell>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include From 2c943c2f10ba6f34d61ef4cd024f6f89e979fb8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 17 May 2021 01:44:33 -0300 Subject: [PATCH 084/355] neomutt: add missing makedepends. ncurses is a explicit dependency of neomutt and should be made clear. It used to be brough in by aspell-devel, at least, but that isn't the case anymore. --- srcpkgs/neomutt/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/neomutt/template b/srcpkgs/neomutt/template index 77f9065023c454..b405c1bae137c6 100644 --- a/srcpkgs/neomutt/template +++ b/srcpkgs/neomutt/template @@ -13,7 +13,7 @@ conf_files="/etc/neomuttrc" # neomutt needs either w3m/lynx/elinks to build manual.html hostmakedepends="docbook-xsl gettext libxslt perl tcl w3m" makedepends="aspell-devel gdbm-devel gettext-devel gpgme-devel libidn-devel - rocksdb-devel tdb-devel + rocksdb-devel tdb-devel ncurses-devel libnotmuch-devel openssl-devel libsasl-devel lua54-devel zlib-devel" depends="mime-types" short_desc="Mutt with misc fixes and feature patches" From 3289014cb7a916ac8081d03b9f961ca67f3a9b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 17 May 2021 01:45:41 -0300 Subject: [PATCH 085/355] mcabber: add missing makedepends. mcabber depends explicitly on ncurses and that should be shown in makedepends. It was brought in at least by aspell-devel, but that isn't the case anymore. --- srcpkgs/mcabber/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/mcabber/template b/srcpkgs/mcabber/template index 0403e9c27825df..877495e565afd3 100644 --- a/srcpkgs/mcabber/template +++ b/srcpkgs/mcabber/template @@ -6,7 +6,7 @@ build_style=gnu-configure configure_args="--enable-hgcset --enable-aspell --enable-otr" hostmakedepends="pkg-config" makedepends="aspell-devel gpgme-devel libgcrypt-devel libotr-devel - loudmouth-devel" + loudmouth-devel ncurses-devel" short_desc="Small XMPP (Jabber) console client" maintainer="Orphaned " license="GPL-2.0-or-later" From 9bd5e4812e5cd42d4de7948d7b09fc9dca0b5ea5 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Mon, 17 May 2021 11:17:21 +0200 Subject: [PATCH 086/355] rxvt-unicode: hack cross. --- srcpkgs/rxvt-unicode/template | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/srcpkgs/rxvt-unicode/template b/srcpkgs/rxvt-unicode/template index 9db4173cc9bbd5..c89633c12deb61 100644 --- a/srcpkgs/rxvt-unicode/template +++ b/srcpkgs/rxvt-unicode/template @@ -1,7 +1,7 @@ # Template file for 'rxvt-unicode' pkgname=rxvt-unicode version=9.26 -revision=11 +revision=12 build_style=gnu-configure configure_args=" --with-terminfo=/usr/share/terminfo --enable-256-color @@ -57,6 +57,13 @@ do_configure() { fi } +pre_configure() { + if [ "$build_option_perl" ]; then + sed -i 's/rxvt_perl_link=no/rxvt_perl_link=yes/' configure + sed -i '/PERLFLAGS=/d' configure + fi +} + pre_install() { export TERMINFO="${DESTDIR}/usr/share/terminfo" mkdir -p $TERMINFO From 5b439145d73c749414fdb187bc01c21baef49308 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 17 May 2021 13:35:46 +0200 Subject: [PATCH 087/355] nginx: add auto_config.h file for aarch64 closes #30945 --- srcpkgs/nginx/files/ngx_auto_config.h.aarch64 | 569 ++++++++++++++++++ srcpkgs/nginx/template | 5 +- 2 files changed, 572 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/nginx/files/ngx_auto_config.h.aarch64 diff --git a/srcpkgs/nginx/files/ngx_auto_config.h.aarch64 b/srcpkgs/nginx/files/ngx_auto_config.h.aarch64 new file mode 100644 index 00000000000000..19056b8b07893e --- /dev/null +++ b/srcpkgs/nginx/files/ngx_auto_config.h.aarch64 @@ -0,0 +1,569 @@ +#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/tmp/nginx/client-body --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --with-mail --with-mail_ssl_module --with-pcre-jit --with-file-aio --with-http_gunzip_module --with-http_v2_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_geoip_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_geoip_module --with-http_slice_module" + +#ifndef NGX_HAVE_GCC_ATOMIC +#define NGX_HAVE_GCC_ATOMIC 1 +#endif + + +#ifndef NGX_HAVE_C99_VARIADIC_MACROS +#define NGX_HAVE_C99_VARIADIC_MACROS 1 +#endif + + +#ifndef NGX_HAVE_GCC_VARIADIC_MACROS +#define NGX_HAVE_GCC_VARIADIC_MACROS 1 +#endif + + +#ifndef NGX_HAVE_GCC_BSWAP64 +#define NGX_HAVE_GCC_BSWAP64 1 +#endif + + +#ifndef NGX_HAVE_EPOLL +#define NGX_HAVE_EPOLL 1 +#endif + + +#ifndef NGX_HAVE_CLEAR_EVENT +#define NGX_HAVE_CLEAR_EVENT 1 +#endif + + +#ifndef NGX_HAVE_EPOLLRDHUP +#define NGX_HAVE_EPOLLRDHUP 1 +#endif + + +#ifndef NGX_HAVE_EPOLLEXCLUSIVE +#define NGX_HAVE_EPOLLEXCLUSIVE 1 +#endif + + +#ifndef NGX_HAVE_O_PATH +#define NGX_HAVE_O_PATH 1 +#endif + + +#ifndef NGX_HAVE_SENDFILE +#define NGX_HAVE_SENDFILE 1 +#endif + + +#ifndef NGX_HAVE_SENDFILE64 +#define NGX_HAVE_SENDFILE64 1 +#endif + + +#ifndef NGX_HAVE_PR_SET_DUMPABLE +#define NGX_HAVE_PR_SET_DUMPABLE 1 +#endif + + +#ifndef NGX_HAVE_PR_SET_KEEPCAPS +#define NGX_HAVE_PR_SET_KEEPCAPS 1 +#endif + + +#ifndef NGX_HAVE_CAPABILITIES +#define NGX_HAVE_CAPABILITIES 1 +#endif + + +#ifndef NGX_HAVE_GNU_CRYPT_R +#define NGX_HAVE_GNU_CRYPT_R 1 +#endif + + +#ifndef NGX_ALIGNMENT +#define NGX_ALIGNMENT 16 +#endif + + +#ifndef NGX_CPU_CACHE_LINE +#define NGX_CPU_CACHE_LINE 64 +#endif + + +#define NGX_KQUEUE_UDATA_T (void *) + + +#ifndef NGX_HAVE_POSIX_FADVISE +#define NGX_HAVE_POSIX_FADVISE 1 +#endif + + +#ifndef NGX_HAVE_O_DIRECT +#define NGX_HAVE_O_DIRECT 1 +#endif + + +#ifndef NGX_HAVE_ALIGNED_DIRECTIO +#define NGX_HAVE_ALIGNED_DIRECTIO 1 +#endif + + +#ifndef NGX_HAVE_STATFS +#define NGX_HAVE_STATFS 1 +#endif + + +#ifndef NGX_HAVE_STATVFS +#define NGX_HAVE_STATVFS 1 +#endif + + +#ifndef NGX_HAVE_DLOPEN +#define NGX_HAVE_DLOPEN 1 +#endif + + +#ifndef NGX_HAVE_SCHED_YIELD +#define NGX_HAVE_SCHED_YIELD 1 +#endif + + +#ifndef NGX_HAVE_SCHED_SETAFFINITY +#define NGX_HAVE_SCHED_SETAFFINITY 1 +#endif + + +#ifndef NGX_HAVE_REUSEPORT +#define NGX_HAVE_REUSEPORT 1 +#endif + + +#ifndef NGX_HAVE_TRANSPARENT_PROXY +#define NGX_HAVE_TRANSPARENT_PROXY 1 +#endif + + +#ifndef NGX_HAVE_IP_BIND_ADDRESS_NO_PORT +#define NGX_HAVE_IP_BIND_ADDRESS_NO_PORT 1 +#endif + + +#ifndef NGX_HAVE_IP_PKTINFO +#define NGX_HAVE_IP_PKTINFO 1 +#endif + + +#ifndef NGX_HAVE_IPV6_RECVPKTINFO +#define NGX_HAVE_IPV6_RECVPKTINFO 1 +#endif + + +#ifndef NGX_HAVE_DEFERRED_ACCEPT +#define NGX_HAVE_DEFERRED_ACCEPT 1 +#endif + + +#ifndef NGX_HAVE_KEEPALIVE_TUNABLE +#define NGX_HAVE_KEEPALIVE_TUNABLE 1 +#endif + + +#ifndef NGX_HAVE_TCP_FASTOPEN +#define NGX_HAVE_TCP_FASTOPEN 1 +#endif + + +#ifndef NGX_HAVE_TCP_INFO +#define NGX_HAVE_TCP_INFO 1 +#endif + + +#ifndef NGX_HAVE_ACCEPT4 +#define NGX_HAVE_ACCEPT4 1 +#endif + + +#ifndef NGX_HAVE_FILE_AIO +#define NGX_HAVE_FILE_AIO 1 +#endif + + +#ifndef NGX_HAVE_EVENTFD +#define NGX_HAVE_EVENTFD 1 +#endif + + +#ifndef NGX_HAVE_SYS_EVENTFD_H +#define NGX_HAVE_SYS_EVENTFD_H 1 +#endif + + +#ifndef NGX_HAVE_UNIX_DOMAIN +#define NGX_HAVE_UNIX_DOMAIN 1 +#endif + + +#ifndef NGX_PTR_SIZE +#define NGX_PTR_SIZE 8 +#endif + + +#ifndef NGX_SIG_ATOMIC_T_SIZE +#define NGX_SIG_ATOMIC_T_SIZE 4 +#endif + + +#ifndef NGX_HAVE_LITTLE_ENDIAN +#define NGX_HAVE_LITTLE_ENDIAN 1 +#endif + + +#ifndef NGX_MAX_SIZE_T_VALUE +#define NGX_MAX_SIZE_T_VALUE 9223372036854775807LL +#endif + + +#ifndef NGX_SIZE_T_LEN +#define NGX_SIZE_T_LEN (sizeof("-9223372036854775808") - 1) +#endif + + +#ifndef NGX_MAX_OFF_T_VALUE +#define NGX_MAX_OFF_T_VALUE 9223372036854775807LL +#endif + + +#ifndef NGX_OFF_T_LEN +#define NGX_OFF_T_LEN (sizeof("-9223372036854775808") - 1) +#endif + + +#ifndef NGX_TIME_T_SIZE +#define NGX_TIME_T_SIZE 8 +#endif + + +#ifndef NGX_TIME_T_LEN +#define NGX_TIME_T_LEN (sizeof("-9223372036854775808") - 1) +#endif + + +#ifndef NGX_MAX_TIME_T_VALUE +#define NGX_MAX_TIME_T_VALUE 9223372036854775807LL +#endif + + +#ifndef NGX_HAVE_INET6 +#define NGX_HAVE_INET6 1 +#endif + + +#ifndef NGX_HAVE_PREAD +#define NGX_HAVE_PREAD 1 +#endif + + +#ifndef NGX_HAVE_PWRITE +#define NGX_HAVE_PWRITE 1 +#endif + + +#ifndef NGX_HAVE_PWRITEV +#define NGX_HAVE_PWRITEV 1 +#endif + + +#ifndef NGX_SYS_NERR +#define NGX_SYS_NERR 1000 +#endif + + +#ifndef NGX_HAVE_LOCALTIME_R +#define NGX_HAVE_LOCALTIME_R 1 +#endif + + +#ifndef NGX_HAVE_CLOCK_MONOTONIC +#define NGX_HAVE_CLOCK_MONOTONIC 1 +#endif + + +#ifndef NGX_HAVE_POSIX_MEMALIGN +#define NGX_HAVE_POSIX_MEMALIGN 1 +#endif + + +#ifndef NGX_HAVE_MEMALIGN +#define NGX_HAVE_MEMALIGN 1 +#endif + + +#ifndef NGX_HAVE_MAP_ANON +#define NGX_HAVE_MAP_ANON 1 +#endif + + +#ifndef NGX_HAVE_MAP_DEVZERO +#define NGX_HAVE_MAP_DEVZERO 1 +#endif + + +#ifndef NGX_HAVE_SYSVSHM +#define NGX_HAVE_SYSVSHM 1 +#endif + + +#ifndef NGX_HAVE_POSIX_SEM +#define NGX_HAVE_POSIX_SEM 1 +#endif + + +#ifndef NGX_HAVE_MSGHDR_MSG_CONTROL +#define NGX_HAVE_MSGHDR_MSG_CONTROL 1 +#endif + + +#ifndef NGX_HAVE_FIONBIO +#define NGX_HAVE_FIONBIO 1 +#endif + + +#ifndef NGX_HAVE_FIONREAD +#define NGX_HAVE_FIONREAD 1 +#endif + + +#ifndef NGX_HAVE_GMTOFF +#define NGX_HAVE_GMTOFF 1 +#endif + + +#ifndef NGX_HAVE_D_TYPE +#define NGX_HAVE_D_TYPE 1 +#endif + + +#ifndef NGX_HAVE_SC_NPROCESSORS_ONLN +#define NGX_HAVE_SC_NPROCESSORS_ONLN 1 +#endif + + +#ifndef NGX_HAVE_OPENAT +#define NGX_HAVE_OPENAT 1 +#endif + + +#ifndef NGX_HAVE_GETADDRINFO +#define NGX_HAVE_GETADDRINFO 1 +#endif + + +#ifndef NGX_HTTP_CACHE +#define NGX_HTTP_CACHE 1 +#endif + + +#ifndef NGX_HTTP_GZIP +#define NGX_HTTP_GZIP 1 +#endif + + +#ifndef NGX_HTTP_SSI +#define NGX_HTTP_SSI 1 +#endif + + +#ifndef NGX_HTTP_GZIP +#define NGX_HTTP_GZIP 1 +#endif + + +#ifndef NGX_HTTP_V2 +#define NGX_HTTP_V2 1 +#endif + + +#ifndef NGX_HTTP_HEADERS +#define NGX_HTTP_HEADERS 1 +#endif + + +#ifndef NGX_HTTP_GZIP +#define NGX_HTTP_GZIP 1 +#endif + + +#ifndef NGX_HTTP_DAV +#define NGX_HTTP_DAV 1 +#endif + + +#ifndef NGX_CRYPT +#define NGX_CRYPT 1 +#endif + + +#ifndef NGX_HTTP_REALIP +#define NGX_HTTP_REALIP 1 +#endif + + +#ifndef NGX_HTTP_X_FORWARDED_FOR +#define NGX_HTTP_X_FORWARDED_FOR 1 +#endif + + +#ifndef NGX_HTTP_X_FORWARDED_FOR +#define NGX_HTTP_X_FORWARDED_FOR 1 +#endif + + +#ifndef NGX_HTTP_X_FORWARDED_FOR +#define NGX_HTTP_X_FORWARDED_FOR 1 +#endif + + +#ifndef NGX_HTTP_SSL +#define NGX_HTTP_SSL 1 +#endif + + +#ifndef NGX_HTTP_X_FORWARDED_FOR +#define NGX_HTTP_X_FORWARDED_FOR 1 +#endif + + +#ifndef NGX_HTTP_UPSTREAM_ZONE +#define NGX_HTTP_UPSTREAM_ZONE 1 +#endif + + +#ifndef NGX_STAT_STUB +#define NGX_STAT_STUB 1 +#endif + + +#ifndef NGX_MAIL_SSL +#define NGX_MAIL_SSL 1 +#endif + + +#ifndef NGX_STREAM_SSL +#define NGX_STREAM_SSL 1 +#endif + + +#ifndef NGX_STREAM_UPSTREAM_ZONE +#define NGX_STREAM_UPSTREAM_ZONE 1 +#endif + + +#ifndef NGX_PCRE +#define NGX_PCRE 1 +#endif + + +#ifndef NGX_HAVE_PCRE_JIT +#define NGX_HAVE_PCRE_JIT 1 +#endif + + +#ifndef NGX_OPENSSL +#define NGX_OPENSSL 1 +#endif + + +#ifndef NGX_SSL +#define NGX_SSL 1 +#endif + + +#ifndef NGX_ZLIB +#define NGX_ZLIB 1 +#endif + + +#ifndef NGX_HAVE_GEOIP_V6 +#define NGX_HAVE_GEOIP_V6 1 +#endif + + +#ifndef NGX_PREFIX +#define NGX_PREFIX "/etc/nginx/" +#endif + + +#ifndef NGX_CONF_PREFIX +#define NGX_CONF_PREFIX "/etc/nginx/" +#endif + + +#ifndef NGX_SBIN_PATH +#define NGX_SBIN_PATH "/usr/bin/nginx" +#endif + + +#ifndef NGX_CONF_PATH +#define NGX_CONF_PATH "/etc/nginx/nginx.conf" +#endif + + +#ifndef NGX_PID_PATH +#define NGX_PID_PATH "/run/nginx.pid" +#endif + + +#ifndef NGX_LOCK_PATH +#define NGX_LOCK_PATH "/var/lock/nginx.lock" +#endif + + +#ifndef NGX_ERROR_LOG_PATH +#define NGX_ERROR_LOG_PATH "/var/log/nginx/error.log" +#endif + + +#ifndef NGX_HTTP_LOG_PATH +#define NGX_HTTP_LOG_PATH "/var/log/nginx/access.log" +#endif + + +#ifndef NGX_HTTP_CLIENT_TEMP_PATH +#define NGX_HTTP_CLIENT_TEMP_PATH "/var/tmp/nginx/client-body" +#endif + + +#ifndef NGX_HTTP_PROXY_TEMP_PATH +#define NGX_HTTP_PROXY_TEMP_PATH "/var/tmp/nginx/proxy" +#endif + + +#ifndef NGX_HTTP_FASTCGI_TEMP_PATH +#define NGX_HTTP_FASTCGI_TEMP_PATH "/var/tmp/nginx/fastcgi" +#endif + + +#ifndef NGX_HTTP_UWSGI_TEMP_PATH +#define NGX_HTTP_UWSGI_TEMP_PATH "/var/tmp/nginx/uwsgi" +#endif + + +#ifndef NGX_HTTP_SCGI_TEMP_PATH +#define NGX_HTTP_SCGI_TEMP_PATH "/var/tmp/nginx/scgi" +#endif + + +#ifndef NGX_SUPPRESS_WARN +#define NGX_SUPPRESS_WARN 1 +#endif + + +#ifndef NGX_SMP +#define NGX_SMP 1 +#endif + + +#ifndef NGX_USER +#define NGX_USER "nginx" +#endif + + +#ifndef NGX_GROUP +#define NGX_GROUP "nginx" +#endif + diff --git a/srcpkgs/nginx/template b/srcpkgs/nginx/template index 76d52cb3f221f1..cd0b19da95c6cf 100644 --- a/srcpkgs/nginx/template +++ b/srcpkgs/nginx/template @@ -1,7 +1,7 @@ # Template file for 'nginx' pkgname=nginx version=1.18.0 -revision=4 +revision=5 build_style=gnu-makefile hostmakedepends="openssl-devel pcre-devel $(vopt_if geoip geoip-devel)" makedepends="${hostmakedepends}" @@ -85,7 +85,8 @@ do_configure() { pre_build() { if [ "$CROSS_BUILD" ]; then case "$XBPS_TARGET_MACHINE" in - arm*|aarch64*) cp "${FILESDIR}/ngx_auto_config.h.armv6l" objs/ngx_auto_config.h;; + arm*) cp "${FILESDIR}/ngx_auto_config.h.armv6l" objs/ngx_auto_config.h;; + aarch64*) cp "${FILESDIR}/ngx_auto_config.h.aarch64" objs/ngx_auto_config.h;; esac fi From 86bace3ad2c39e150b668265097fa6885a8f7e5e Mon Sep 17 00:00:00 2001 From: Maxim Karasev Date: Sun, 16 May 2021 22:34:02 +0300 Subject: [PATCH 088/355] New package: python3-telegram-0.14.0 --- .../remove-precompiled-libraries.patch | 17 +++++++++++ .../patches/use-system-tdlib.patch | 29 +++++++++++++++++++ srcpkgs/python3-telegram/template | 22 ++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 srcpkgs/python3-telegram/patches/remove-precompiled-libraries.patch create mode 100644 srcpkgs/python3-telegram/patches/use-system-tdlib.patch create mode 100644 srcpkgs/python3-telegram/template diff --git a/srcpkgs/python3-telegram/patches/remove-precompiled-libraries.patch b/srcpkgs/python3-telegram/patches/remove-precompiled-libraries.patch new file mode 100644 index 00000000000000..4a84da651a6b06 --- /dev/null +++ b/srcpkgs/python3-telegram/patches/remove-precompiled-libraries.patch @@ -0,0 +1,17 @@ +# Patch from https://aur.archlinux.org/cgit/aur.git/plain/0002-Remove-binarys.diff?h=python-telegram +# Upstream issue: https://github.com/alexander-akhmetov/python-telegram/issues/119 +diff --git a/setup.py b/setup.py +index a1ac7b0..aecc107 100644 +--- setup.py ++++ setup.py +@@ -25,10 +25,4 @@ setup( + packages=[ + 'telegram', + ], +- package_data={ +- 'telegram': [ +- 'lib/darwin/*', +- 'lib/linux/*', +- ], +- }, + ) diff --git a/srcpkgs/python3-telegram/patches/use-system-tdlib.patch b/srcpkgs/python3-telegram/patches/use-system-tdlib.patch new file mode 100644 index 00000000000000..298db83a5c13d9 --- /dev/null +++ b/srcpkgs/python3-telegram/patches/use-system-tdlib.patch @@ -0,0 +1,29 @@ +# Patch from https://aur.archlinux.org/cgit/aur.git/plain/0001-Use-system-tdlib.diff?h=python-telegram +# Upstream issue: https://github.com/alexander-akhmetov/python-telegram/issues/119 +diff --git a/telegram/tdjson.py b/telegram/tdjson.py +index 091145e..21c0361 100644 +--- telegram/tdjson.py ++++ telegram/tdjson.py +@@ -2,6 +2,7 @@ import json + import logging + import platform + from ctypes import CDLL, CFUNCTYPE, c_int, c_char_p, c_double, c_void_p, c_longlong ++from ctypes.util import find_library + from typing import Any, Dict, Optional, Union + + import pkg_resources +@@ -10,13 +11,7 @@ logger = logging.getLogger(__name__) + + + def _get_tdjson_lib_path() -> str: +- if platform.system().lower() == 'darwin': +- lib_name = 'darwin/libtdjson.dylib' +- else: +- lib_name = 'linux/libtdjson.so' +- +- return pkg_resources.resource_filename('telegram', f'lib/{lib_name}') +- ++ return find_library("tdjson") + + class TDJson: + def __init__(self, library_path: Optional[str] = None, verbosity: int = 2) -> None: diff --git a/srcpkgs/python3-telegram/template b/srcpkgs/python3-telegram/template new file mode 100644 index 00000000000000..13cc66ab33c7d1 --- /dev/null +++ b/srcpkgs/python3-telegram/template @@ -0,0 +1,22 @@ +# Template file for 'python3-telegram' +pkgname=python3-telegram +version=0.14.0 +revision=1 +wrksrc=python-telegram-${version} +build_style=python3-module +hostmakedepends="python3" +depends="libtd python3-setuptools" +short_desc="Python library for building Telegram clients" +maintainer="Maxim Karasev " +license="MIT" +homepage="https://github.com/alexander-akhmetov/python-telegram" +distfiles="https://github.com/alexander-akhmetov/python-telegram/archive/${version}.tar.gz" +checksum=11b0a2387bae642eb7f134fe35b9ef67b8183aa961412bcdfa86ff404beed897 + +post_extract() { + rm -r telegram/lib +} + +post_install() { + vlicense LICENSE +} From 4a25038cad274b882495b8a3d43e0112ae2406be Mon Sep 17 00:00:00 2001 From: Maxim Karasev Date: Sun, 16 May 2021 22:34:24 +0300 Subject: [PATCH 089/355] New package: telegram-tg-0.17.0 --- srcpkgs/telegram-tg/template | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 srcpkgs/telegram-tg/template diff --git a/srcpkgs/telegram-tg/template b/srcpkgs/telegram-tg/template new file mode 100644 index 00000000000000..9d2c800d7a8feb --- /dev/null +++ b/srcpkgs/telegram-tg/template @@ -0,0 +1,16 @@ +# Template file for 'telegram-tg' +pkgname=telegram-tg +version=0.17.0 +revision=1 +wrksrc=tg-${version} +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-telegram" +short_desc="Terminal Telegram client" +maintainer="Maxim Karasev " +license="Unlicense" +homepage="https://github.com/paul-nameless/tg" +distfiles="${PYPI_SITE}/t/tg/tg-${version}.tar.gz" +checksum=aab22b1e40a28710b6e3dbe4f3bba67ff02e36d612d8388f9400e4c34feab221 +# There are no tests to run +make_check=no From 4a80c23c6c90a31b36e924c45cf4c010e59457d5 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 17 May 2021 14:22:44 +0200 Subject: [PATCH 090/355] vnstat: update to 2.7. --- srcpkgs/vnstat/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/vnstat/template b/srcpkgs/vnstat/template index 6a691501561a91..5d1b0d37dfc35a 100644 --- a/srcpkgs/vnstat/template +++ b/srcpkgs/vnstat/template @@ -1,6 +1,6 @@ # Template file for 'vnstat' pkgname=vnstat -version=2.6 +version=2.7 revision=1 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" @@ -12,7 +12,7 @@ license="GPL-2.0-only" homepage="https://humdi.net/vnstat/" changelog="https://humdi.net/vnstat/CHANGES" distfiles="https://humdi.net/vnstat/vnstat-${version}.tar.gz" -checksum=89276e0a7281943edb554b874078278ad947dc312938a2451e03eb80679f7ff7 +checksum=4c28a1d8bc03c2b6e7ab96c876e07dd8ea174b7cad73b7190ecb2b9501e83e9e conf_files="/etc/vnstat.conf" make_dirs="/var/lib/vnstat 0755 root root" From 2fff170a53f227644fb2fd47e2392745d42bb871 Mon Sep 17 00:00:00 2001 From: Arjan Mossel Date: Mon, 17 May 2021 12:59:55 +0200 Subject: [PATCH 091/355] dbeaver: update to 21.0.5. --- srcpkgs/dbeaver/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/dbeaver/template b/srcpkgs/dbeaver/template index ad84b846cdcda3..d599da2fc67cbb 100644 --- a/srcpkgs/dbeaver/template +++ b/srcpkgs/dbeaver/template @@ -1,6 +1,6 @@ # Template file for 'dbeaver' pkgname=dbeaver -version=21.0.4 +version=21.0.5 revision=1 # the build downloads binaries linked to glibc archs="x86_64" @@ -11,7 +11,7 @@ maintainer="Kyle Nusbaum " license="Apache-2.0" homepage="https://dbeaver.io" distfiles="https://github.com/dbeaver/dbeaver/archive/${version}.tar.gz" -checksum=c946fa92679edabd41d5c5f482d2572e837860f0c62450aed9bbcd836aa00cf4 +checksum=f22bf927a56802cd93052c2ea82fc87b469aeb2e666011aedb0171c4d0de9275 nopie=true do_build() { From 3eba98416f526d29786caa726a68cca5e9e18254 Mon Sep 17 00:00:00 2001 From: Mate GABRI Date: Thu, 29 Apr 2021 08:49:46 +1000 Subject: [PATCH 092/355] saml2aws: update to 2.30.0 --- srcpkgs/saml2aws/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/saml2aws/template b/srcpkgs/saml2aws/template index 640caeec61ac27..885845a0c3abd1 100644 --- a/srcpkgs/saml2aws/template +++ b/srcpkgs/saml2aws/template @@ -1,6 +1,6 @@ # Template file for 'saml2aws' pkgname=saml2aws -version=2.28.4 +version=2.30.0 revision=1 build_style=go go_import_path=github.com/versent/saml2aws/v2 @@ -13,7 +13,7 @@ maintainer="Mate GABRI " license="MIT" homepage="https://github.com/Versent/saml2aws" distfiles="https://github.com/Versent/saml2aws/archive/v${version}.tar.gz" -checksum=0a1bfd2ab51d5a9914969f5b2db19803809b27114fe127b669a8d90c543e1766 +checksum=775c4ade77c3db28d48a7700e4990919f7f4bbfc4669a1de1e25d9c093c8a006 post_install() { vlicense LICENSE.md From e59efd3a8952e28b47fff199cb4e3cbdfd143210 Mon Sep 17 00:00:00 2001 From: Frank Steinborn Date: Sun, 16 May 2021 18:18:52 +0200 Subject: [PATCH 093/355] git-team: update to 1.6.0. - dropped installation of /usr/bin/prepare-commit-message-git-team, it gets installed on-demand now by the main git-team binary into ~/.git-team/hooks. - dropped bash completion, one is supposed to source the output of `git-team completion` into their shell startup scripts now (only bash is supported for now). --- srcpkgs/git-team/template | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/srcpkgs/git-team/template b/srcpkgs/git-team/template index e6e2002a7d2c30..3a86c11a80f526 100644 --- a/srcpkgs/git-team/template +++ b/srcpkgs/git-team/template @@ -1,19 +1,16 @@ # Template file for 'git-team' pkgname=git-team -version=1.5.5 +version=1.6.0 revision=1 build_style=go go_import_path=github.com/hekmekk/git-team -go_package="${go_import_path}/cmd/git-team ${go_import_path}/cmd/prepare-commit-msg" short_desc="Manage and enhance git commit messages with co-authors" maintainer="Frank Steinborn " license="MIT" homepage="https://github.com/hekmekk/git-team" distfiles="${homepage}/archive/v${version}.tar.gz" -checksum=bc88552e78ad67327b153cdc5aeb01ddcb5a99579787a68177fae7aa1a20c27b +checksum=d474d759b81a458519c47059990d12808df28d4b313a69234aaa9574a70da723 post_install() { vlicense LICENSE - mv ${DESTDIR}/usr/bin/prepare-commit-msg ${DESTDIR}/usr/bin/prepare-commit-msg-git-team - vinstall bash_completion/git-team.bash 0644 usr/share/bash-completion/completions git-team } From 3e11f90e920276e898d35def90eccbc76e97f583 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 17 May 2021 15:52:11 +0200 Subject: [PATCH 094/355] sndio: update to 1.8.0. --- srcpkgs/sndio/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/sndio/template b/srcpkgs/sndio/template index e5c938566f4cfc..3d814b22cb5786 100644 --- a/srcpkgs/sndio/template +++ b/srcpkgs/sndio/template @@ -1,7 +1,7 @@ # Template file for 'sndio' pkgname=sndio -version=1.7.0 -revision=3 +version=1.8.0 +revision=1 build_style=configure configure_args="--prefix=/usr" makedepends="alsa-lib-devel" @@ -13,7 +13,7 @@ sndiod_descr="sndio daemon" sndiod_pgroup="audio" homepage="http://www.sndio.org/" distfiles="http://www.sndio.org/${pkgname}-${version}.tar.gz" -checksum=dda4e3d0879423ed57923975ba74668cbb9299939cad579b0ac64a4b01535552 +checksum=039c59a260622a5eb74502d9b752a1a6d0ce6b9b1ba3954daa4c401025a6f008 post_install() { vsv sndiod From 80a47b801de66b7e5d4f0cd0bf2d56837f128d37 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 17 May 2021 16:01:28 +0200 Subject: [PATCH 095/355] New package: mdns-scan-0.5 --- srcpkgs/mdns-scan/template | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 srcpkgs/mdns-scan/template diff --git a/srcpkgs/mdns-scan/template b/srcpkgs/mdns-scan/template new file mode 100644 index 00000000000000..06af1fe1bb3f3d --- /dev/null +++ b/srcpkgs/mdns-scan/template @@ -0,0 +1,15 @@ +# Template file for 'mdns-scan' +pkgname=mdns-scan +version=0.5 +revision=1 +build_style=gnu-makefile +short_desc="Scan mDNS/DNS-SD published services on the local network" +maintainer="Duncaen " +license="GPL-2.0-or-later" +homepage="https://github.com/alteholz/mdns-scan" +distfiles="https://github.com/alteholz/mdns-scan/archive/refs/tags/v${version}.tar.gz" +checksum=fa830d91b993d15f8a463c8dd68f7106f0dded87928bec36074de934c2c52f73 + +do_install() { + vbin mdns-scan +} From 398c20e1db61366941f998f2c5765771d05e2d7a Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 17 May 2021 16:54:40 +0200 Subject: [PATCH 096/355] sndio: remove upstreamed patches --- srcpkgs/sndio/patches/7a03da2.patch | 73 ----------------------------- srcpkgs/sndio/patches/fflush.patch | 12 ----- 2 files changed, 85 deletions(-) delete mode 100644 srcpkgs/sndio/patches/7a03da2.patch delete mode 100644 srcpkgs/sndio/patches/fflush.patch diff --git a/srcpkgs/sndio/patches/7a03da2.patch b/srcpkgs/sndio/patches/7a03da2.patch deleted file mode 100644 index 26c15cddcbaf15..00000000000000 --- a/srcpkgs/sndio/patches/7a03da2.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 7a03da2848551e6bd9d3e06d2beee4b2d438a999 Mon Sep 17 00:00:00 2001 -From: Duncan Overbruck -Date: Mon, 31 Aug 2020 22:36:58 +0200 -Subject: [PATCH] Add libsndio.so.${MAJ} symlink and use it as SONAME on linux - -This avoids having to rebuild a lot of packages even if the -ABI did not break. cubeb used by firefox currently dlopen's -either libsndio.so.7.1 or libsndio.so, with the major link -this would also avoid having to patch this as long as the -ABI doesn't break without having to ship the libsndio.so -symlink outside of -dev/-devel packages. ---- - configure | 4 +++- - libsndio/Makefile.in | 8 ++++++-- - 2 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/configure b/configure -index 94829c4..eb2ea9e 100755 ---- configure -+++ configure -@@ -60,8 +60,9 @@ case `uname` in - alsa=yes - ldadd="-lrt" - user=sndiod -- so_ldflags="-Wl,-soname=libsndio.so.\${MAJ}.\${MIN}" - so_link="libsndio.so" -+ so_link_maj="libsndio.so.\${MAJ}" -+ so_ldflags="-Wl,-soname=libsndio.so.\${MAJ}" - defs='-D_GNU_SOURCE -DHAVE_SOCK_CLOEXEC -DHAVE_CLOCK_GETTIME' - ;; - NetBSD) -@@ -268,6 +269,7 @@ do - -e "s:@ldadd@:$ldadd:" \ - -e "s:@so@:$so:" \ - -e "s:@so_link@:$so_link:" \ -+ -e "s:@so_link_maj@:$so_link_maj:" \ - -e "s:@so_ldflags@:$so_ldflags:" \ - -e "s:@vars@:${vars}:" \ - -e "s:@precision@:$precision:" \ -diff --git a/libsndio/Makefile.in b/libsndio/Makefile.in -index 58ec1e7..36f1fd9 100644 ---- libsndio/Makefile.in -+++ libsndio/Makefile.in -@@ -49,8 +49,9 @@ MAJ = 7 - MIN = 1 - SO = @so@ - SO_LINK = @so_link@ -+SO_LINK_MAJ = @so_link_maj@ - --all: ${SO} ${SO_LINK} -+all: ${SO} ${SO_LINK} ${SO_LINK_MAJ} - - - install: -@@ -59,7 +60,7 @@ install: - mkdir -p ${DESTDIR}${MAN3_DIR} - mkdir -p ${DESTDIR}${MAN7_DIR} - cp sndio.h ${DESTDIR}${INCLUDE_DIR} -- cp -R ${SO} ${SO_LINK} ${DESTDIR}${LIB_DIR} -+ cp -R ${SO} ${SO_LINK} ${SO_LINK_MAJ} ${DESTDIR}${LIB_DIR} - cp sio_open.3 ${DESTDIR}${MAN3_DIR} - ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_close.3 - ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_setpar.3 -@@ -126,6 +127,9 @@ ${SO}: ${OBJS} - ${SO_LINK}: - ln -sf ${SO} ${SO_LINK} - -+${SO_LINK_MAJ}: -+ ln -sf ${SO} ${SO_LINK_MAJ} -+ - issetugid.o: ../bsd-compat/issetugid.c - ${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -c -o issetugid.o ../bsd-compat/issetugid.c - diff --git a/srcpkgs/sndio/patches/fflush.patch b/srcpkgs/sndio/patches/fflush.patch deleted file mode 100644 index dbe15d6f317889..00000000000000 --- a/srcpkgs/sndio/patches/fflush.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/sndioctl/sndioctl.c b/sndioctl/sndioctl.c -index 4c4a85a..71ae298 100644 ---- sndioctl/sndioctl.c -+++ sndioctl/sndioctl.c -@@ -1014,6 +1014,7 @@ main(int argc, char **argv) - perror("malloc"); - exit(1); - } - for (;;) { -+ fflush(stdout); - nfds = sioctl_pollfd(hdl, pfds, POLLIN); - if (nfds == 0) From 2751e7d7c745a3d813c892d4295e70883e32c52d Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sun, 16 May 2021 08:32:50 -0400 Subject: [PATCH 097/355] mkinitcpio: update to 30, add mkinitcpio-zfs subpackage ZFS hooks taken from [1] and slightly modified: 1. If present, /etc/hostid is included in the image 2. Pool imports are read/write by default 3. Dracut-style root=zfs: arguments are recognized [1] https://github.com/archzfs/archzfs/tree/master/src/zfs-utils --- srcpkgs/{mkinitcpio-udev => mkinitcpio-zfs} | 0 srcpkgs/mkinitcpio/files/kernel-hook-postinst | 1 + srcpkgs/mkinitcpio/files/zfs_hook | 218 ++++++++++++++++++ srcpkgs/mkinitcpio/files/zfs_install | 102 ++++++++ srcpkgs/mkinitcpio/patches/gzip-default.patch | 39 ++++ srcpkgs/mkinitcpio/template | 41 ++-- 6 files changed, 387 insertions(+), 14 deletions(-) rename srcpkgs/{mkinitcpio-udev => mkinitcpio-zfs} (100%) create mode 100644 srcpkgs/mkinitcpio/files/zfs_hook create mode 100644 srcpkgs/mkinitcpio/files/zfs_install create mode 100644 srcpkgs/mkinitcpio/patches/gzip-default.patch diff --git a/srcpkgs/mkinitcpio-udev b/srcpkgs/mkinitcpio-zfs similarity index 100% rename from srcpkgs/mkinitcpio-udev rename to srcpkgs/mkinitcpio-zfs diff --git a/srcpkgs/mkinitcpio/files/kernel-hook-postinst b/srcpkgs/mkinitcpio/files/kernel-hook-postinst index c6f2ab81264f33..08bf4c0c95144a 100644 --- a/srcpkgs/mkinitcpio/files/kernel-hook-postinst +++ b/srcpkgs/mkinitcpio/files/kernel-hook-postinst @@ -11,5 +11,6 @@ if [ ! -x usr/bin/mkinitcpio ]; then exit 0 fi +umask 0077 usr/bin/mkinitcpio -g boot/initramfs-${VERSION}.img -k ${VERSION} exit $? diff --git a/srcpkgs/mkinitcpio/files/zfs_hook b/srcpkgs/mkinitcpio/files/zfs_hook new file mode 100644 index 00000000000000..5d296293c16377 --- /dev/null +++ b/srcpkgs/mkinitcpio/files/zfs_hook @@ -0,0 +1,218 @@ +# +# WARNING: This script is parsed by ash in busybox at boot time, not bash! +# http://linux.die.net/man/1/ash +# https://wiki.ubuntu.com/DashAsBinSh +# http://www.jpsdomain.org/public/2008-JP_bash_vs_dash.pdf +# +ZPOOL_FORCE="" +ZPOOL_IMPORT_FLAGS="" +ZFS_BOOT_ONLY="" + +zfs_get_bootfs () { + for zfs_dataset in $(zpool list -H -o bootfs); do + case ${zfs_dataset} in + "" | "-") + # skip this line/dataset + ;; + "no pools available") + return 1 + ;; + *) + ZFS_DATASET=${zfs_dataset} + return 0 + ;; + esac + done + return 1 +} + +zfs_decrypt_fs() { + dataset=$1 + + # Make sure dataset is encrypted; get fails if ZFS does not support encryption + encryption="$(zfs get -H -o value encryption "${dataset}" 2>/dev/null)" || return 0 + [ "${encryption}" != "off" ] || return 0 + + # Make sure the dataset is locked + keystatus="$(zfs get -H -o value keystatus "${dataset}")" || return 0 + [ "${keystatus}" != "available" ] || return 0 + + # Make sure the encryptionroot is sensible + encryptionroot="$(zfs get -H -o value encryptionroot "${dataset}")" || return 0 + [ "${encryptionroot}" != "-" ] || return 0 + + # Export encryption root to be used by other hooks (SSH) + echo "${encryptionroot}" > /.encryptionroot + + # If key location is a file, determine if it can by overridden by prompt + prompt_override="" + if keylocation="$(zfs get -H -o value keylocation "${dataset}")"; then + if [ "${keylocation}" != "prompt" ]; then + if keyformat="$(zfs get -H -o value keyformat "${dataset}")"; then + [ "${keyformat}" = "passphrase" ] && prompt_override="yes" + fi + fi + fi + + # Loop until key is loaded here or by another vector (SSH, for instance) + while [ "$(zfs get -H -o value keystatus "${encryptionroot}")" != "available" ]; do + # Try the default loading mechanism + zfs load-key "${encryptionroot}" && break + + # Load failed, try a prompt if the failure was not a prompt + if [ -n "${prompt_override}" ]; then + echo "Unable to load key ${keylocation}; please type the passphrase" + echo "To retry the file, interrupt now or repeatedly input a wrong passphrase" + zfs load-key -L prompt "${encryptionroot}" && break + fi + + # Throttle retry attempts + sleep 2 + done + + if [ -f /.encryptionroot ]; then + rm /.encryptionroot + fi +} + +zfs_mount_handler () { + if [ "${ZFS_DATASET}" = "bootfs" ] ; then + if ! zfs_get_bootfs ; then + # Lets import everything and try again + zpool import ${ZPOOL_IMPORT_FLAGS} -N -a ${ZPOOL_FORCE} + if ! zfs_get_bootfs ; then + err "ZFS: Cannot find bootfs." + exit 1 + fi + fi + fi + + local pool="${ZFS_DATASET%%/*}" + local rwopt_exp="${rwopt:-rw}" + + if ! zpool list -H "${pool}" > /dev/null 2>&1; then + if [ ! "${rwopt_exp}" = "rw" ]; then + msg "ZFS: Importing pool ${pool} readonly." + ZPOOL_IMPORT_FLAGS="${ZPOOL_IMPORT_FLAGS} -o readonly=on" + else + msg "ZFS: Importing pool ${pool}." + fi + + if ! zpool import ${ZPOOL_IMPORT_FLAGS} -N "${pool}" ${ZPOOL_FORCE} ; then + err "ZFS: Unable to import pool ${pool}." + exit 1 + fi + fi + + local node="$1" + local rootmnt=$(zfs get -H -o value mountpoint "${ZFS_DATASET}") + local tab_file="${node}/etc/fstab" + local zfs_datasets="$(zfs list -H -o name -t filesystem -r ${ZFS_DATASET})" + + # Mount the root, and any child datasets + for dataset in ${zfs_datasets}; do + mountpoint=$(zfs get -H -o value mountpoint "${dataset}") + canmount=$(zfs get -H -o value canmount "${dataset}") + # skip dataset + [ ${dataset} != "${ZFS_DATASET}" -a \( ${canmount} = "off" -o ${canmount} = "noauto" -o ${mountpoint} = "none" \) ] && continue + if [ ${mountpoint} = "legacy" ]; then + if [ -f "${tab_file}" ]; then + if findmnt -snero source -F "${tab_file}" -S "${dataset}" > /dev/null 2>&1; then + opt=$(findmnt -snero options -F "${tab_file}" -S "${dataset}") + mnt=$(findmnt -snero target -F "${tab_file}" -S "${dataset}") + zfs_decrypt_fs "${dataset}" + mount -t zfs -o "${opt}" "${dataset}" "${node}${mnt}" + fi + fi + else + zfs_decrypt_fs "${dataset}" + mount -t zfs -o "zfsutil,${rwopt_exp}" "${dataset}" "${node}/${mountpoint##${rootmnt}}" + fi + done +} + +set_flags() { + # Force import the pools, useful if the pool has not properly been exported using 'zpool export ' + [ ! "${zfs_force}" = "" ] && ZPOOL_FORCE="-f" + + # Disable late hook, useful if we want to use zfs-import-cache.service instead + [ ! "${zfs_boot_only}" = "" ] && ZFS_BOOT_ONLY="1" + + # Add import directory to import command flags + [ ! "${zfs_import_dir}" = "" ] && ZPOOL_IMPORT_FLAGS="${ZPOOL_IMPORT_FLAGS} -d ${zfs_import_dir}" + [ "${zfs_import_dir}" = "" ] && [ -f /etc/zfs/zpool.cache.org ] && ZPOOL_IMPORT_FLAGS="${ZPOOL_IMPORT_FLAGS} -c /etc/zfs/zpool.cache.org" +} + +run_hook() { + set_flags + + # Wait 15 seconds for ZFS devices to show up + [ "${zfs_wait}" = "" ] && ZFS_WAIT="15" || ZFS_WAIT="${zfs_wait}" + + case ${root} in + # root=zfs + "zfs") + mount_handler="zfs_mount_handler" + ;; + # root=ZFS=... syntax (grub) + "ZFS="*) + mount_handler="zfs_mount_handler" + ZFS_DATASET="${root#*[=]}" + ;; + # root=zfs:... syntax (dracut) + "zfs:"*) + mount_handler="zfs_mount_handler" + ZFS_DATASET="${root#*[:]}" + ;; + esac + + case ${zfs} in + "") + # skip this line/dataset + ;; + auto|bootfs) + ZFS_DATASET="bootfs" + mount_handler="zfs_mount_handler" + local pool="[a-zA-Z][^ ]*" + ;; + *) + ZFS_DATASET="${zfs}" + mount_handler="zfs_mount_handler" + local pool="${ZFS_DATASET%%/*}" + ;; + esac + + # Allow at least n seconds for zfs device to show up. Especially + # when using zfs_import_dir instead of zpool.cache, the listing of + # available pools can be slow, so this loop must be top-tested to + # ensure we do one 'zpool import' pass after the timer has expired. + sleep ${ZFS_WAIT} & pid=$! + local break_after=0 + while :; do + kill -0 $pid > /dev/null 2>&1 || break_after=1 + if [ -c "/dev/zfs" ]; then + zpool import ${ZPOOL_IMPORT_FLAGS} | awk " + BEGIN { pool_found=0; online=0; unavail=0 } + /^ ${pool} .*/ { pool_found=1 } + /^\$/ { pool_found=0 } + /UNAVAIL/ { if (pool_found == 1) { unavail=1 } } + /ONLINE/ { if (pool_found == 1) { online=1 } } + END { if (online == 1 && unavail != 1) + { exit 0 } + else + { exit 1 } + }" && break + fi + [ $break_after == 1 ] && break + sleep 1 + done + kill $pid > /dev/null 2>&1 +} + +run_latehook () { + set_flags + # only run zpool import, if flags were set (cache file found / zfs_import_dir specified) and zfs_boot_only is not set + [ ! "${ZPOOL_IMPORT_FLAGS}" = "" ] && [ "${ZFS_BOOT_ONLY}" = "" ] && zpool import ${ZPOOL_IMPORT_FLAGS} -N -a ${ZPOOL_FORCE} +} + +# vim:set ts=4 sw=4 ft=sh et: diff --git a/srcpkgs/mkinitcpio/files/zfs_install b/srcpkgs/mkinitcpio/files/zfs_install new file mode 100644 index 00000000000000..41f2ad279b00e7 --- /dev/null +++ b/srcpkgs/mkinitcpio/files/zfs_install @@ -0,0 +1,102 @@ +#!/bin/bash + +build() { + map add_module \ + zavl \ + znvpair \ + zunicode \ + zcommon \ + zfs \ + spl + + map add_binary \ + fsck.zfs \ + mount.zfs \ + seq \ + zdb \ + zed \ + zfs \ + zhack \ + zinject \ + zpool \ + zstreamdump \ + /usr/lib/udev/vdev_id \ + /usr/lib/udev/zvol_id \ + findmnt + + map add_file \ + /usr/lib/udev/rules.d/60-zvol.rules \ + /usr/lib/udev/rules.d/69-vdev.rules \ + /usr/lib/udev/rules.d/90-zfs.rules \ + /usr/lib/libgcc_s.so.1 + + map add_dir \ + /etc/zfs/zed.d + + add_runscript + + # allow mount(8) to "autodetect" ZFS + echo 'zfs' >>"${BUILDROOT}/etc/filesystems" + + [[ -f /etc/hostid ]] && add_file "/etc/hostid" + [[ -f /etc/zfs/zpool.cache ]] && cp "/etc/zfs/zpool.cache" "${BUILDROOT}/etc/zfs/zpool.cache.org" + [[ -f /etc/modprobe.d/zfs.conf ]] && add_file "/etc/modprobe.d/zfs.conf" +} + +help() { + cat< + + To force importing of a ZFS pool: + + zfs_force=1 + + If set to 1, this will use "zpool import -f" when attempting to import + pools. + + To change the seconds of time to wait for ZFS devices to show up at boot: + + zfs_wait=30 + + To search for devices in a directory other than "/dev": + + zfs_import_dir=/dev/disk/by-uuid + or + zfs_import_dir=/dev/disk/by-partuuid + or + zfs_import_dir=/dev/disk/by-path + etc. + + Following initcpio convention, the 'rw' option must be specified to load the + pool as read/write. Pools are loaded as read only by default. + +Examples: + + To use bootfs on your pool, use + + zfs=bootfs rw + + This will setup your root using tank/root zfs pool. + + zfs=tank/root rw + +If you want to set properties for zfs-on-linux module, you should add them to +/etc/modprobe.d/zfs.conf and then rebuild initcpio. + +HELPEOF +} + +# vim: set ts=4 sw=4 ft=sh et: diff --git a/srcpkgs/mkinitcpio/patches/gzip-default.patch b/srcpkgs/mkinitcpio/patches/gzip-default.patch new file mode 100644 index 00000000000000..7d6365a38f8171 --- /dev/null +++ b/srcpkgs/mkinitcpio/patches/gzip-default.patch @@ -0,0 +1,39 @@ +Because not all Void kernels may support zstd, change the default initramfs +compression to gzip. + +diff -ur a/man/mkinitcpio.conf.5.txt b/man/mkinitcpio.conf.5.txt +--- a/man/mkinitcpio.conf.5.txt 2021-02-16 21:37:31.000000000 -0500 ++++ b/man/mkinitcpio.conf.5.txt 2021-05-17 09:33:32.418504652 -0400 +@@ -55,7 +55,7 @@ + Defines a program to filter the generated image through. The kernel + understands the compression formats yielded by the *zstd*, *gzip*, *bzip2*, + *lz4*, *lzop*, *lzma*, and *xz* compressors. If unspecified, this setting +- defaults to *zstd* compression. In order to create an uncompressed image, ++ defaults to *gzip* compression. In order to create an uncompressed image, + define this variable as *cat*. + + + It's not hard to realize that a filter such as a *tac* or *rev* will cause +diff -ur a/mkinitcpio b/mkinitcpio +--- a/mkinitcpio 2021-02-16 21:37:31.000000000 -0500 ++++ b/mkinitcpio 2021-05-17 09:34:15.970588222 -0400 +@@ -508,7 +508,7 @@ + die 'Unable to write to %s' "$_optgenimg" + fi + +- _optcompress=${_optcompress:-${COMPRESSION:-zstd}} ++ _optcompress=${_optcompress:-${COMPRESSION:-gzip}} + if ! type -P "$_optcompress" >/dev/null; then + warning "Unable to locate compression method: %s" "$_optcompress" + _optcompress=cat +diff -ur a/mkinitcpio.conf b/mkinitcpio.conf +--- a/mkinitcpio.conf 2021-02-16 21:37:31.000000000 -0500 ++++ b/mkinitcpio.conf 2021-05-17 09:34:24.752605714 -0400 +@@ -52,7 +52,7 @@ + HOOKS=(base udev autodetect modconf block filesystems keyboard fsck) + + # COMPRESSION +-# Use this to compress the initramfs image. By default, zstd compression ++# Use this to compress the initramfs image. By default, gzip compression + # is used. Use 'cat' to create an uncompressed image. + #COMPRESSION="zstd" + #COMPRESSION="gzip" diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template index 67b3cff04f10b7..04277348348d0f 100644 --- a/srcpkgs/mkinitcpio/template +++ b/srcpkgs/mkinitcpio/template @@ -1,41 +1,45 @@ # Template file for 'mkinitcpio' pkgname=mkinitcpio -version=29 +version=30 revision=1 build_style=gnu-makefile hostmakedepends="asciidoc" depends="busybox-static bsdtar bash" +checkdepends="busybox-static" short_desc="Next generation of initramfs creation" maintainer="Andrea Brancaleoni " license="GPL-2.0-only" -homepage="https://wiki.archlinux.org/index.php/Mkinitcpio" +homepage="https://git.archlinux.org/mkinitcpio.git" distfiles="https://sources.archlinux.org/other/${pkgname}/${pkgname}-${version}.tar.gz" -checksum=0239ba7ae91d652472819457a5dd812c574ba37c3c3d9161e7742a63b85076c2 - +checksum=c7725035a06d2ab6ef6e97601b69859d6061aec95c4551e2a1ad2e27d307258f conf_files="/etc/mkinitcpio.conf" - patch_args="-Np1" +replaces="mkinitcpio-udev>=0" + +pre_check() { + sed -i -e '1s,/lib/initcpio/busybox,/usr/bin/busybox.static,' test/* +} post_install() { + # Install udev hooks + vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev + vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev + + # Remove unneeded systemd bits rm -rf ${DESTDIR}/usr/lib/kernel rm -rf ${DESTDIR}/usr/lib/systemd rm -rf ${DESTDIR}/usr/lib/initcpio/install/sd* rm -rf ${DESTDIR}/usr/lib/tmpfiles.d + + # Remove unneeded pacman hooks + rm -rf ${DESTDIR}/usr/share/libalpm + ln -s /usr/bin/busybox.static $DESTDIR/usr/lib/initcpio/busybox vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-mkinitcpio vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-mkinitcpio } -mkinitcpio-udev_package() { - depends="${sourcepkg}>=${version}_${revision} eudev" - short_desc+=" - udev support" - pkg_install() { - vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev - vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev - } -} - mkinitcpio-lvm2_package() { depends="${sourcepkg}>=${version}_${revision} lvm2 thin-provisioning-tools" short_desc+=" - lvm2 support" @@ -75,3 +79,12 @@ mkinitcpio-xbps_package() { vinstall ${FILESDIR}/xbps_install 644 usr/lib/initcpio/install xbps } } + +mkinitcpio-zfs_package() { + depends="${sourcepkg}>=${version}_${revision} zfs" + short_desc+=" - ZFS support" + pkg_install() { + vinstall ${FILESDIR}/zfs_hook 644 usr/lib/initcpio/hooks zfs + vinstall ${FILESDIR}/zfs_install 644 usr/lib/initcpio/install zfs + } +} From fca25c6a90fd05f692189624868b147e2a2c7988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 17 May 2021 15:36:04 -0300 Subject: [PATCH 098/355] iana-etc: update to 20210514. Also add shebang to update.sh script. --- srcpkgs/iana-etc/files/services | 2 ++ srcpkgs/iana-etc/files/update.sh | 1 + srcpkgs/iana-etc/template | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/srcpkgs/iana-etc/files/services b/srcpkgs/iana-etc/files/services index 3c877335d01a17..d5c2cf60299655 100644 --- a/srcpkgs/iana-etc/files/services +++ b/srcpkgs/iana-etc/files/services @@ -11184,6 +11184,8 @@ ka-sddp 31016/tcp ka-kdp 31016/udp autotrac-acp 31020/tcp yawn 31029/udp +eldim 31337/tcp +eldim 31337/udp pace-licensed 31400/tcp xqosd 31416/tcp xqosd 31416/udp diff --git a/srcpkgs/iana-etc/files/update.sh b/srcpkgs/iana-etc/files/update.sh index 600c00a7042b66..d7506e1a7fc1ea 100755 --- a/srcpkgs/iana-etc/files/update.sh +++ b/srcpkgs/iana-etc/files/update.sh @@ -1,3 +1,4 @@ +#!/bin/sh # Adapted from https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/iana-etc curl -sL https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml | diff --git a/srcpkgs/iana-etc/template b/srcpkgs/iana-etc/template index c296edefc474dc..c6974782c139fd 100644 --- a/srcpkgs/iana-etc/template +++ b/srcpkgs/iana-etc/template @@ -1,7 +1,7 @@ # Template file for 'iana-etc' pkgname=iana-etc reverts="202001016_1" -version=20210429 +version=20210514 revision=1 bootstrap=yes short_desc="Unix /etc/services and /etc/protocols files" From d38081d94ac23a27bed8fe1c26636ca6dec7986f Mon Sep 17 00:00:00 2001 From: Johannes Date: Mon, 17 May 2021 21:02:15 +0200 Subject: [PATCH 099/355] postgresql: update to 9.6.22. --- srcpkgs/postgresql/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/postgresql/template b/srcpkgs/postgresql/template index fcbf3e2a67c4e1..3167e0657fedeb 100644 --- a/srcpkgs/postgresql/template +++ b/srcpkgs/postgresql/template @@ -1,6 +1,6 @@ # Template file for 'postgresql' pkgname=postgresql -version=9.6.21 +version=9.6.22 revision=1 build_style=gnu-configure make_build_target=world @@ -19,7 +19,7 @@ license="PostgreSQL" homepage="https://www.postgresql.org" changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" distfiles="https://ftp.postgresql.org/pub/source/v${version}/${pkgname}-${version}.tar.bz2" -checksum=930feaef28885c97ec40c26ab6221903751eeb625de92b22602706d7d47d1634 +checksum=3d32cd101025a0556813397c69feff3df3d63736adb8adeaf365c522f39f2930 # initdb fails on github actions, works locally with xbps-uunshare make_check=ci-skip From ba34a95a4e37822b37309496789c245963b46cfd Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 16 Apr 2021 23:51:07 +0200 Subject: [PATCH 100/355] python3-peewee: update to 3.14.4. --- srcpkgs/python3-peewee/template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/python3-peewee/template b/srcpkgs/python3-peewee/template index 04c05d362f0421..5c0594df5dc9e2 100644 --- a/srcpkgs/python3-peewee/template +++ b/srcpkgs/python3-peewee/template @@ -1,6 +1,6 @@ # Template file for 'python3-peewee' pkgname=python3-peewee -version=3.14.0 +version=3.14.4 revision=1 wrksrc="peewee-${version}" build_style=python3-module @@ -12,8 +12,9 @@ license="MIT" homepage="https://github.com/coleifer/peewee" changelog="https://raw.githubusercontent.com/coleifer/peewee/master/CHANGELOG.md" distfiles="https://github.com/coleifer/peewee/archive/${version}.tar.gz" -checksum=7541de384953e4bfe3085d184512a810ffbf1a6ee555016718762f2877fa88a4 +checksum=cded912439699a63704fcad36ee15093bbf3cca502beb9ae648423f8722178c2 alternatives="peewee:pwiz:/usr/bin/pwiz.py3" +make_check=no # tests require postgres instance post_install() { mv $DESTDIR/usr/bin/pwiz.py $DESTDIR/usr/bin/pwiz.py3 From 260090e114abf0a9a2af208807d4f202c1b4e0ec Mon Sep 17 00:00:00 2001 From: Johannes Date: Mon, 17 May 2021 20:49:47 +0200 Subject: [PATCH 101/355] ImageMagick: update to 7.0.11.12. --- srcpkgs/ImageMagick/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/ImageMagick/template b/srcpkgs/ImageMagick/template index e2fb9c8df8b099..7bc5d7158b8101 100644 --- a/srcpkgs/ImageMagick/template +++ b/srcpkgs/ImageMagick/template @@ -1,9 +1,9 @@ # Template file for 'ImageMagick' pkgname=ImageMagick -_majorver=7.0.11 -_patchver=6 -version="${_majorver}.${_patchver}" +version=7.0.11.12 revision=1 +_majorver=${version%.*} +_patchver=${version##*.} wrksrc="${pkgname}-${_majorver}-${_patchver}" build_style=gnu-configure configure_args="--without-autotrace --with-wmf=yes @@ -21,7 +21,7 @@ license="ImageMagick" homepage="https://www.imagemagick.org/" changelog="https://imagemagick.org/script/changelog.php" distfiles="https://github.com/ImageMagick/ImageMagick/archive/${_majorver}-${_patchver}.tar.gz" -checksum=8adc1605784653b078572b825e8cd1d3d54f8a1b4ba86b32ca253c038f7e4c37 +checksum=b4054e9f6b6692791f37fe6f2ab5819152210e6628e69a8dbd66a41320c3c9d3 subpackages="libmagick libmagick-devel" From a6baefac906b7d0943258d4340bdff08de5e1d1f Mon Sep 17 00:00:00 2001 From: Johannes Date: Mon, 17 May 2021 20:49:50 +0200 Subject: [PATCH 102/355] ImageMagick6: update to 6.9.12.12. --- srcpkgs/ImageMagick6/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/ImageMagick6/template b/srcpkgs/ImageMagick6/template index 84a9821d103aa4..7ce8c1d3d25a57 100644 --- a/srcpkgs/ImageMagick6/template +++ b/srcpkgs/ImageMagick6/template @@ -1,9 +1,9 @@ # Template file for 'ImageMagick6' pkgname=ImageMagick6 -_majorver=6.9.12 -_patchver=7 -version="${_majorver}.${_patchver}" +version=6.9.12.12 revision=1 +_majorver=${version%.*} +_patchver=${version##*.} wrksrc="${pkgname}-${_majorver}-${_patchver}" build_style=gnu-configure configure_args="--without-autotrace --with-wmf=yes @@ -20,7 +20,7 @@ maintainer="Johannes " license="ImageMagick" homepage="https://www.imagemagick.org/" distfiles="https://github.com/ImageMagick/ImageMagick6/archive/${_majorver}-${_patchver}.tar.gz" -checksum=6abbd6afe7130edba7652a49c03a699657d6a71cf631a3c82014a31c8f93996d +checksum=2a5edb741828cacf42e07344a0aa7141dc657bf9dcfad6f6cd3e2774afeea47d keep_libtool_archives=yes conf_files="/etc/ImageMagick-${_majorver%%.*}/*.xml" From 00e15fdd11241478cc771f7ee821811ffa8053fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ey=C3=9Fer?= Date: Mon, 17 May 2021 22:13:50 +0200 Subject: [PATCH 103/355] youtube-dl: update to 2021.05.16. Closes: #30957 [via git-merge-pr] --- srcpkgs/youtube-dl/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/youtube-dl/template b/srcpkgs/youtube-dl/template index 90f696378b97fd..eea6dd7e11e957 100644 --- a/srcpkgs/youtube-dl/template +++ b/srcpkgs/youtube-dl/template @@ -1,6 +1,6 @@ # Template file for 'youtube-dl' pkgname=youtube-dl -version=2021.04.26 +version=2021.05.16 revision=1 wrksrc="${pkgname}" build_style=python3-module @@ -13,7 +13,7 @@ license="Unlicense" homepage="https://yt-dl.org" changelog="https://raw.githubusercontent.com/ytdl-org/youtube-dl/master/ChangeLog" distfiles="${homepage}/downloads/${version}/${pkgname}-${version}.tar.gz" -checksum=4ccf21f4a0daee0d58bef569c71dd459bd1f629248995b4e4856b6926531ea4a +checksum=d4012a5ca8d77f8ee30a21532fd1042ed287c0784a5a76fcb74cc33ef76f1afd do_check() { PYTHON=/usr/bin/python3 make offlinetest From 7d99c3e16a3d7928b3b7342c33a64f29e57adad8 Mon Sep 17 00:00:00 2001 From: prez Date: Mon, 17 May 2021 15:48:38 +0200 Subject: [PATCH 104/355] micro: update to 2.0.9. --- srcpkgs/micro/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/micro/template b/srcpkgs/micro/template index c0a2842eb85a24..8852268ba921f3 100644 --- a/srcpkgs/micro/template +++ b/srcpkgs/micro/template @@ -1,6 +1,6 @@ # Template file for 'micro' pkgname=micro -version=2.0.8 +version=2.0.9 revision=1 build_style=go go_import_path="github.com/zyedidia/micro/v2" @@ -14,7 +14,7 @@ maintainer="Diogo Leal " license="MIT" homepage="https://micro-editor.github.io" distfiles="https://github.com/zyedidia/micro/archive/v${version}.tar.gz" -checksum=3e1b7483aa2afffa8afc2c710e22541961ac3de5e026efb4bdddc8ade00d4de0 +checksum=59987763ec5edb10db50c136eeb5934b411bd5e6adbd3d785f1d64d3e225ec31 post_install() { vlicense LICENSE From f674a5c5a68ffdab824ffd0e84cbb56569fc303a Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 01:58:09 +0200 Subject: [PATCH 105/355] New package: llvm12-12.0.0 Distro changes since 11.0: - html docs are now included (except lldb where they are broken) - manpages are now included - enabled linker build id - libcxx(abi), libunwind, libomp are now built as subpackages - disabled clangd on ppc32 (crashes assembler) - template cleanups Cross fixes by Leah. Closes https://github.com/void-linux/void-packages/issues/28609 Closes https://github.com/void-linux/void-packages/issues/17935 --- common/shlibs | 7 +- srcpkgs/clang | 2 +- srcpkgs/clang-analyzer | 2 +- srcpkgs/clang-tools-extra | 2 +- srcpkgs/libclang | 2 +- srcpkgs/libclang-cpp | 2 +- srcpkgs/libcxx | 1 + srcpkgs/libcxx-devel | 2 +- srcpkgs/libcxx/template | 59 -- srcpkgs/libcxx/update | 1 - srcpkgs/libcxxabi | 1 + srcpkgs/libcxxabi-devel | 2 +- srcpkgs/libcxxabi/template | 54 -- srcpkgs/libcxxabi/update | 1 - srcpkgs/libllvm12 | 1 + srcpkgs/libomp | 1 + srcpkgs/libomp-devel | 2 +- srcpkgs/libomp/patches/ppc64-elfv2.patch | 64 --- srcpkgs/libomp/template | 29 - srcpkgs/lld | 2 +- srcpkgs/lld-devel | 2 +- srcpkgs/lldb | 2 +- srcpkgs/lldb-devel | 2 +- srcpkgs/llvm-libunwind | 1 + srcpkgs/llvm-libunwind-devel | 2 +- .../fix-unsigned-long-long-shift.patch | 15 - srcpkgs/llvm-libunwind/template | 39 -- srcpkgs/llvm-libunwind/update | 2 - .../llvm12/files/llvm-Config-llvm-config.h | 9 + ...clang-001-fix-unwind-chain-inclusion.patch | 44 ++ .../clang/clang-002-add-musl-triples.patch | 110 ++++ .../clang-003-ppc64-dynamic-linker-path.patch | 13 + .../clang/clang-004-ppc64-musl-elfv2.patch | 48 ++ .../compiler-rt-aarch64-ucontext.patch | 11 + .../compiler-rt-sanitizer-ppc64-musl.patch | 35 ++ .../compiler-rt/compiler-rt-size_t.patch | 10 + .../compiler-rt-xray-ppc64-musl.patch | 62 ++ .../files/patches/libcxx/libcxx-musl.patch} | 22 +- .../files/patches/libcxx/libcxx-ppc.patch} | 4 +- .../libcxx/libcxx-ssp-nonshared.patch} | 4 +- .../patches/libunwind/libunwind-ppc32.patch} | 20 +- srcpkgs/llvm12/files/patches/lldb/musl.patch | 31 + .../files/patches/llvm/llvm-001-musl.patch | 57 ++ .../llvm/llvm-002-musl-ppc64-elfv2.patch | 30 + .../patches/llvm/llvm-003-ppc-secureplt.patch | 11 + .../patches/llvm/llvm-004-override-opt.patch | 18 + .../patches/llvm/llvm-005-ppc-bigpic.patch | 36 ++ .../llvm/llvm-006-aarch64-mf_exec.patch | 25 + srcpkgs/llvm12/template | 529 ++++++++++++++++++ srcpkgs/llvm12/update | 3 + 50 files changed, 1128 insertions(+), 306 deletions(-) create mode 120000 srcpkgs/libcxx delete mode 100644 srcpkgs/libcxx/template delete mode 100644 srcpkgs/libcxx/update create mode 120000 srcpkgs/libcxxabi delete mode 100644 srcpkgs/libcxxabi/template delete mode 100644 srcpkgs/libcxxabi/update create mode 120000 srcpkgs/libllvm12 create mode 120000 srcpkgs/libomp delete mode 100644 srcpkgs/libomp/patches/ppc64-elfv2.patch delete mode 100644 srcpkgs/libomp/template create mode 120000 srcpkgs/llvm-libunwind delete mode 100644 srcpkgs/llvm-libunwind/patches/fix-unsigned-long-long-shift.patch delete mode 100644 srcpkgs/llvm-libunwind/template delete mode 100644 srcpkgs/llvm-libunwind/update create mode 100644 srcpkgs/llvm12/files/llvm-Config-llvm-config.h create mode 100644 srcpkgs/llvm12/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch create mode 100644 srcpkgs/llvm12/files/patches/clang/clang-002-add-musl-triples.patch create mode 100644 srcpkgs/llvm12/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch create mode 100644 srcpkgs/llvm12/files/patches/clang/clang-004-ppc64-musl-elfv2.patch create mode 100644 srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-aarch64-ucontext.patch create mode 100644 srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-sanitizer-ppc64-musl.patch create mode 100644 srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-size_t.patch create mode 100644 srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch rename srcpkgs/{libcxx/files/libcxx-0001-musl-hacks.patch => llvm12/files/patches/libcxx/libcxx-musl.patch} (63%) rename srcpkgs/{libcxx/patches/ppc.patch => llvm12/files/patches/libcxx/libcxx-ppc.patch} (95%) rename srcpkgs/{libcxx/patches/ssp_nonshared.patch => llvm12/files/patches/libcxx/libcxx-ssp-nonshared.patch} (87%) rename srcpkgs/{llvm-libunwind/patches/ppc32.patch => llvm12/files/patches/libunwind/libunwind-ppc32.patch} (86%) create mode 100644 srcpkgs/llvm12/files/patches/lldb/musl.patch create mode 100644 srcpkgs/llvm12/files/patches/llvm/llvm-001-musl.patch create mode 100644 srcpkgs/llvm12/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch create mode 100644 srcpkgs/llvm12/files/patches/llvm/llvm-003-ppc-secureplt.patch create mode 100644 srcpkgs/llvm12/files/patches/llvm/llvm-004-override-opt.patch create mode 100644 srcpkgs/llvm12/files/patches/llvm/llvm-005-ppc-bigpic.patch create mode 100644 srcpkgs/llvm12/files/patches/llvm/llvm-006-aarch64-mf_exec.patch create mode 100644 srcpkgs/llvm12/template create mode 100644 srcpkgs/llvm12/update diff --git a/common/shlibs b/common/shlibs index a584fb460e21e4..ef3ff475a4d95c 100644 --- a/common/shlibs +++ b/common/shlibs @@ -984,10 +984,11 @@ libuchardet.so.0 uchardet-0.0.6_1 libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1 libyajl.so.2 yajl-2.0.1_1 libconfuse.so.2 confuse-3.2.1_1 -liblldb.so.11 lldb-11.0.0_1 -libclang.so.11 libclang-11.0.0_1 -libclang-cpp.so.11 libclang-cpp-11.0.0_1 +liblldb.so.12 lldb-12.0.0_1 +libclang.so.12 libclang-12.0.0_1 +libclang-cpp.so.12 libclang-cpp-12.0.0_1 libLLVM-11.so libllvm11-11.0.0_1 +libLLVM-12.so libllvm12-12.0.0_1 libisofs.so.6 libisofs-0.6.24_1 libmpack.so.0 libmpack-1.0.5_1 libGeoIP.so.1 libgeoip-1.4.8_1 diff --git a/srcpkgs/clang b/srcpkgs/clang index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/clang +++ b/srcpkgs/clang @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/clang-analyzer b/srcpkgs/clang-analyzer index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/clang-analyzer +++ b/srcpkgs/clang-analyzer @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/clang-tools-extra b/srcpkgs/clang-tools-extra index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/clang-tools-extra +++ b/srcpkgs/clang-tools-extra @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/libclang b/srcpkgs/libclang index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/libclang +++ b/srcpkgs/libclang @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/libclang-cpp b/srcpkgs/libclang-cpp index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/libclang-cpp +++ b/srcpkgs/libclang-cpp @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/libcxx b/srcpkgs/libcxx new file mode 120000 index 00000000000000..cd60fd7a981bdd --- /dev/null +++ b/srcpkgs/libcxx @@ -0,0 +1 @@ +llvm12 \ No newline at end of file diff --git a/srcpkgs/libcxx-devel b/srcpkgs/libcxx-devel index 37fa9ff85ca14c..cd60fd7a981bdd 120000 --- a/srcpkgs/libcxx-devel +++ b/srcpkgs/libcxx-devel @@ -1 +1 @@ -libcxx \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/libcxx/template b/srcpkgs/libcxx/template deleted file mode 100644 index 4e5799636798b2..00000000000000 --- a/srcpkgs/libcxx/template +++ /dev/null @@ -1,59 +0,0 @@ -# Template file for 'libcxx' -pkgname=libcxx -version=11.0.0 -revision=1 -wrksrc="${pkgname}-${version}.src" -build_style=cmake -configure_args+=" -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON - -DLIBCXX_CXX_ABI_LIBRARY_PATH=${XBPS_CROSS_BASE}/usr/lib - -DLIBCXXABI_USE_LLVM_UNWINDER=1" -hostmakedepends="llvm11 clang-tools-extra python3" -makedepends="libcxxabi-devel llvm11 llvm-libunwind-devel" -short_desc="New implementation of the C++ standard library, targeting C++11, C++14 and above" -maintainer="Orphaned " -license="NCSA, MIT" -homepage="https://libcxx.llvm.org" -distfiles=" - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libcxx-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libcxxabi-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz" -checksum=" - 6c1ee6690122f2711a77bc19241834a9219dda5036e1597bfa397f341a9b8b7a - 58697d4427b7a854ec7529337477eb4fba16407222390ad81a40d125673e4c15 - 913f68c898dfb4a03b397c5e11c6a2f39d0f22ed7665c9cefa87a34423a72469" - -case "$XBPS_TARGET_MACHINE" in - *-musl) configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES" -esac - -post_extract() { - case "$XBPS_TARGET_MACHINE" in - *-musl) patch -Np1 <${FILESDIR}/libcxx-0001-musl-hacks.patch ;; - esac - - # Since llvm 11, libcxxabi and llvm need to be present next to the libcxx root - mv ../libcxxabi-${version}.src ../libcxxabi - mv ../llvm-${version}.src ../llvm -} - -post_patch() { - case "$XBPS_TARGET_MACHINE" in - i686-musl|ppc-musl) ;; - *) return 0 ;; - esac - vsed -i 's,#ssp,,' CMakeLists.txt -} - -post_install() { - vlicense LICENSE.TXT -} - -libcxx-devel_package() { - short_desc+=" - development files" - depends="${sourcepkg}>=${version}_${revision}" - pkg_install() { - vmove usr/include - vmove "usr/lib/*.so" - vmove "usr/lib/*.a" - } -} diff --git a/srcpkgs/libcxx/update b/srcpkgs/libcxx/update deleted file mode 100644 index 49e4f464a96c14..00000000000000 --- a/srcpkgs/libcxx/update +++ /dev/null @@ -1 +0,0 @@ -site="http://www.llvm.org/releases/download.html" diff --git a/srcpkgs/libcxxabi b/srcpkgs/libcxxabi new file mode 120000 index 00000000000000..cd60fd7a981bdd --- /dev/null +++ b/srcpkgs/libcxxabi @@ -0,0 +1 @@ +llvm12 \ No newline at end of file diff --git a/srcpkgs/libcxxabi-devel b/srcpkgs/libcxxabi-devel index aca879a0b90ab3..cd60fd7a981bdd 120000 --- a/srcpkgs/libcxxabi-devel +++ b/srcpkgs/libcxxabi-devel @@ -1 +1 @@ -libcxxabi \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/libcxxabi/template b/srcpkgs/libcxxabi/template deleted file mode 100644 index 2f024625fa3c9f..00000000000000 --- a/srcpkgs/libcxxabi/template +++ /dev/null @@ -1,54 +0,0 @@ -# Template file for 'libcxxabi' -pkgname=libcxxabi -version=11.0.0 -revision=1 -wrksrc="${pkgname}-${version}.src" -build_style=cmake -configure_args="-DLIBCXXABI_LIBCXX_INCLUDES=../../libcxx/include - -DLIBCXXABI_USE_LLVM_UNWINDER=1 - -DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}" -hostmakedepends="clang-tools-extra llvm11" -makedepends="llvm11 llvm-libunwind-devel" -short_desc="Low-level support for libc++ standard library" -maintainer="Orphaned " -license="NCSA, MIT" -homepage="https://libcxxabi.llvm.org" -distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libcxxabi-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libcxx-${version}.src.tar.xz" -checksum="58697d4427b7a854ec7529337477eb4fba16407222390ad81a40d125673e4c15 - 6c1ee6690122f2711a77bc19241834a9219dda5036e1597bfa397f341a9b8b7a" - -case "$XBPS_TARGET_MACHINE" in - armv[67]l) - broken="invalid operands of types 'char [8]' and 'const uint64_t' to binary 'operator&'" - ;; -esac - -post_extract() { - # Since llvm 11, libcxx needs to be present next to the libcxxabi root - mv ../libcxx-${version}.src ../libcxx -} - -post_patch() { - case "$XBPS_TARGET_MACHINE" in - i686-musl|ppc-musl) ;; - *) return 0 ;; - esac - vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' src/CMakeLists.txt -} - -post_install() { - vmkdir usr/include - vcopy include/* usr/include - vlicense LICENSE.TXT -} - -libcxxabi-devel_package() { - short_desc+=" - development files" - depends="${sourcepkg}>=${version}_${revision}" - pkg_install() { - vmove usr/include - vmove "usr/lib/*.a" - vmove "usr/lib/*.so" - } -} diff --git a/srcpkgs/libcxxabi/update b/srcpkgs/libcxxabi/update deleted file mode 100644 index 49e4f464a96c14..00000000000000 --- a/srcpkgs/libcxxabi/update +++ /dev/null @@ -1 +0,0 @@ -site="http://www.llvm.org/releases/download.html" diff --git a/srcpkgs/libllvm12 b/srcpkgs/libllvm12 new file mode 120000 index 00000000000000..cd60fd7a981bdd --- /dev/null +++ b/srcpkgs/libllvm12 @@ -0,0 +1 @@ +llvm12 \ No newline at end of file diff --git a/srcpkgs/libomp b/srcpkgs/libomp new file mode 120000 index 00000000000000..cd60fd7a981bdd --- /dev/null +++ b/srcpkgs/libomp @@ -0,0 +1 @@ +llvm12 \ No newline at end of file diff --git a/srcpkgs/libomp-devel b/srcpkgs/libomp-devel index 45c3085a62b247..cd60fd7a981bdd 120000 --- a/srcpkgs/libomp-devel +++ b/srcpkgs/libomp-devel @@ -1 +1 @@ -libomp \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/libomp/patches/ppc64-elfv2.patch b/srcpkgs/libomp/patches/ppc64-elfv2.patch deleted file mode 100644 index 7c3c62dfaff7db..00000000000000 --- a/srcpkgs/libomp/patches/ppc64-elfv2.patch +++ /dev/null @@ -1,64 +0,0 @@ -Remove the invalid assumption that ELFv2 == LE. - ---- runtime/src/z_Linux_asm.S -+++ runtime/src/z_Linux_asm.S -@@ -1503,12 +1503,12 @@ KMP_LABEL(kmp_1): - // return: r3 (always 1/TRUE) - // - .text --# if KMP_ARCH_PPC64_LE -+# if _CALL_ELF == 2 - .abiversion 2 - # endif - .globl __kmp_invoke_microtask - --# if KMP_ARCH_PPC64_LE -+# if _CALL_ELF == 2 - .p2align 4 - # else - .p2align 2 -@@ -1516,7 +1516,7 @@ KMP_LABEL(kmp_1): - - .type __kmp_invoke_microtask,@function - --# if KMP_ARCH_PPC64_LE -+# if _CALL_ELF == 2 - __kmp_invoke_microtask: - .Lfunc_begin0: - .Lfunc_gep0: -@@ -1560,7 +1560,7 @@ __kmp_invoke_microtask: - .cfi_offset lr, 16 - - // Compute the size necessary for the local stack frame. --# if KMP_ARCH_PPC64_LE -+# if _CALL_ELF == 2 - li 12, 72 - # else - li 12, 88 -@@ -1638,7 +1638,7 @@ __kmp_invoke_microtask: - // for the microtask begins 48 + 8*8 == 112 bytes above r1 for ELFv1 and - // 32 + 8*8 == 96 bytes above r1 for ELFv2. - addi 4, 4, 40 --# if KMP_ARCH_PPC64_LE -+# if _CALL_ELF == 2 - addi 12, 1, 88 - # else - addi 12, 1, 104 -@@ -1650,7 +1650,7 @@ __kmp_invoke_microtask: - bdnz .Lnext - - .Lcall: --# if KMP_ARCH_PPC64_LE -+# if _CALL_ELF == 2 - std 2, 24(1) - mr 12, 3 - #else -@@ -1666,7 +1666,7 @@ __kmp_invoke_microtask: - - mtctr 12 - bctrl --# if KMP_ARCH_PPC64_LE -+# if _CALL_ELF == 2 - ld 2, 24(1) - # else - ld 2, 40(1) diff --git a/srcpkgs/libomp/template b/srcpkgs/libomp/template deleted file mode 100644 index 4d7651b23daf12..00000000000000 --- a/srcpkgs/libomp/template +++ /dev/null @@ -1,29 +0,0 @@ -# Template file for 'libomp' -pkgname=libomp -version=8.0.0 -revision=2 -archs="x86_64* i686* armv[67]* aarch64* ppc64*" -wrksrc="openmp-${version}.src" -build_style=cmake -configure_args="-DLIBOMP_ENABLE_SHARED=ON -DLIBOMP_INSTALL_ALIASES=OFF" -hostmakedepends="perl pkg-config" -makedepends="elfutils-devel libffi-devel" -short_desc="LLVM OpenMP Runtime Library" -maintainer="Andy Weidenbaum " -license="NCSA" -homepage="https://openmp.llvm.org" -distfiles="https://releases.llvm.org/${version}/openmp-${version}.src.tar.xz" -checksum=f7b1705d2f16c4fc23d6531f67d2dd6fb78a077dd346b02fed64f4b8df65c9d5 - -do_check() { - # requires lit and clang, lit is not packaged - : -} - -libomp-devel_package() { - short_desc+=" - development files" - depends="${sourcepkg}-${version}_${revision}" - pkg_install() { - vmove usr/include - } -} diff --git a/srcpkgs/lld b/srcpkgs/lld index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/lld +++ b/srcpkgs/lld @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/lld-devel b/srcpkgs/lld-devel index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/lld-devel +++ b/srcpkgs/lld-devel @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/lldb b/srcpkgs/lldb index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/lldb +++ b/srcpkgs/lldb @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/lldb-devel b/srcpkgs/lldb-devel index decc3806c95e99..cd60fd7a981bdd 120000 --- a/srcpkgs/lldb-devel +++ b/srcpkgs/lldb-devel @@ -1 +1 @@ -llvm11 \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/llvm-libunwind b/srcpkgs/llvm-libunwind new file mode 120000 index 00000000000000..cd60fd7a981bdd --- /dev/null +++ b/srcpkgs/llvm-libunwind @@ -0,0 +1 @@ +llvm12 \ No newline at end of file diff --git a/srcpkgs/llvm-libunwind-devel b/srcpkgs/llvm-libunwind-devel index 6053fc96f5e2fb..cd60fd7a981bdd 120000 --- a/srcpkgs/llvm-libunwind-devel +++ b/srcpkgs/llvm-libunwind-devel @@ -1 +1 @@ -llvm-libunwind \ No newline at end of file +llvm12 \ No newline at end of file diff --git a/srcpkgs/llvm-libunwind/patches/fix-unsigned-long-long-shift.patch b/srcpkgs/llvm-libunwind/patches/fix-unsigned-long-long-shift.patch deleted file mode 100644 index 8c20256ceabb21..00000000000000 --- a/srcpkgs/llvm-libunwind/patches/fix-unsigned-long-long-shift.patch +++ /dev/null @@ -1,15 +0,0 @@ -Source: @pullmoll -Upstream: no -Reason: -1ULL is not a signed long long but the result is signed. - ---- src/AddressSpace.hpp 2019-05-30 06:40:21.000000000 +0200 -+++ src/AddressSpace.hpp 2020-03-04 22:55:16.140731907 +0100 -@@ -288,7 +288,7 @@ - } while (byte & 0x80); - // sign extend negative numbers - if ((byte & 0x40) != 0) -- result |= (-1ULL) << bit; -+ result |= (-1LL) << bit; - addr = (pint_t) p; - return result; - } diff --git a/srcpkgs/llvm-libunwind/template b/srcpkgs/llvm-libunwind/template deleted file mode 100644 index b9ad1c97693a32..00000000000000 --- a/srcpkgs/llvm-libunwind/template +++ /dev/null @@ -1,39 +0,0 @@ -# Template file for 'llvm-libunwind' -pkgname=llvm-libunwind -version=11.0.0 -revision=1 -build_style=cmake -wrksrc="libunwind-${version}.src" -hostmakedepends="llvm11" -makedepends="llvm11" -short_desc="LLVM version of libunwind library" -maintainer="Orphaned " -license="NCSA, MIT" -homepage="https://llvm.org" -distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libunwind-${version}.src.tar.xz" -checksum=8455011c33b14abfe57b2fd9803fb610316b16d4c9818bec552287e2ba68922f - -post_patch() { - case "$XBPS_TARGET_MACHINE" in - i686-musl|ppc-musl) ;; - *) return 0 ;; - esac - vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' src/CMakeLists.txt -} - -post_install() { - vmkdir usr/include - vcopy include/* usr/include - vlicense LICENSE.TXT LICENSE -} - -llvm-libunwind-devel_package() { - short_desc+=" - development files" - depends="${sourcepkg}>=${version}_${revision}" - conflicts="libunwind-devel>=0" - pkg_install() { - vmove usr/include - vmove "usr/lib/*.a" - vmove "usr/lib/*.so" - } -} diff --git a/srcpkgs/llvm-libunwind/update b/srcpkgs/llvm-libunwind/update deleted file mode 100644 index 4c5a2943ba0e55..00000000000000 --- a/srcpkgs/llvm-libunwind/update +++ /dev/null @@ -1,2 +0,0 @@ -pkgname=libunwind -site="http://www.llvm.org/releases/download.html" diff --git a/srcpkgs/llvm12/files/llvm-Config-llvm-config.h b/srcpkgs/llvm12/files/llvm-Config-llvm-config.h new file mode 100644 index 00000000000000..2fa08c9be69621 --- /dev/null +++ b/srcpkgs/llvm12/files/llvm-Config-llvm-config.h @@ -0,0 +1,9 @@ +#include + +#if __WORDSIZE == 32 +#include "llvm-config-32.h" +#elif __WORDSIZE == 64 +#include "llvm-config-64.h" +#else +#error "Unknown word size" +#endif diff --git a/srcpkgs/llvm12/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch b/srcpkgs/llvm12/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch new file mode 100644 index 00000000000000..04244bcc274071 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch @@ -0,0 +1,44 @@ +From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001 +From: Andrea Brancaleoni +Date: Tue, 8 Sep 2015 22:14:57 +0200 +Subject: [PATCH 2/7] fix unwind chain inclusion + +--- + lib/Headers/unwind.h | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h +index 303d792..44e10cc 100644 +--- a/lib/Headers/unwind.h ++++ b/lib/Headers/unwind.h +@@ -9,9 +9,6 @@ + + /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/ + +-#ifndef __CLANG_UNWIND_H +-#define __CLANG_UNWIND_H +- + #if defined(__APPLE__) && __has_include_next() + /* Darwin (from 11.x on) provide an unwind.h. If that's available, + * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE, +@@ -39,6 +36,9 @@ + # endif + #else + ++#ifndef __CLANG_UNWIND_H ++#define __CLANG_UNWIND_H ++ + #include + + #ifdef __cplusplus +@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *); + } + #endif + ++#endif /* __CLANG_UNWIND_H */ ++ + #endif + +-#endif /* __CLANG_UNWIND_H */ +-- +2.5.1 diff --git a/srcpkgs/llvm12/files/patches/clang/clang-002-add-musl-triples.patch b/srcpkgs/llvm12/files/patches/clang/clang-002-add-musl-triples.patch new file mode 100644 index 00000000000000..6945e7fe79e111 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/clang/clang-002-add-musl-triples.patch @@ -0,0 +1,110 @@ +--- a/lib/Driver/ToolChains/Gnu.cpp ++++ b/lib/Driver/ToolChains/Gnu.cpp +@@ -2086,7 +2086,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( + static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", + "armv7hl-redhat-linux-gnueabi", + "armv6hl-suse-linux-gnueabi", +- "armv7hl-suse-linux-gnueabi"}; ++ "armv7hl-suse-linux-gnueabi", ++ "armv7l-linux-gnueabihf"}; + static const char *const ARMebLibDirs[] = {"/lib"}; + static const char *const ARMebTriples[] = {"armeb-linux-gnueabi", + "armeb-linux-androideabi"}; +@@ -2153,8 +2154,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( + "powerpc64-suse-linux", "powerpc-montavista-linuxspe"}; + static const char *const PPCLELibDirs[] = {"/lib32", "/lib"}; + static const char *const PPCLETriples[] = {"powerpcle-linux-gnu", +- "powerpcle-unknown-linux-gnu", +- "powerpcle-linux-musl"}; ++ "powerpcle-unknown-linux-gnu"}; + + static const char *const PPC64LibDirs[] = {"/lib64", "/lib"}; + static const char *const PPC64Triples[] = { +@@ -2235,6 +2235,87 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( + return; + } + ++ if (TargetTriple.isMusl()) { ++ static const char *const AArch64MuslTriples[] = {"aarch64-linux-musl"}; ++ static const char *const ARMHFMuslTriples[] = { ++ "arm-linux-musleabihf", "armv7l-linux-musleabihf" ++ }; ++ static const char *const ARMMuslTriples[] = {"arm-linux-musleabi"}; ++ static const char *const X86_64MuslTriples[] = {"x86_64-linux-musl"}; ++ static const char *const X86MuslTriples[] = {"i686-linux-musl"}; ++ static const char *const MIPSMuslTriples[] = { ++ "mips-linux-musl", "mipsel-linux-musl", ++ "mipsel-linux-muslhf", "mips-linux-muslhf" ++ }; ++ static const char *const PPCMuslTriples[] = {"powerpc-linux-musl"}; ++ static const char *const PPCLEMuslTriples[] = {"powerpcle-linux-musl"}; ++ static const char *const PPC64MuslTriples[] = {"powerpc64-linux-musl"}; ++ static const char *const PPC64LEMuslTriples[] = {"powerpc64le-linux-musl"}; ++ ++ switch (TargetTriple.getArch()) { ++ case llvm::Triple::aarch64: ++ LibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs)); ++ TripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples)); ++ BiarchLibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs)); ++ BiarchTripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples)); ++ break; ++ case llvm::Triple::arm: ++ LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs)); ++ if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) { ++ TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples)); ++ } else { ++ TripleAliases.append(begin(ARMMuslTriples), end(ARMMuslTriples)); ++ } ++ break; ++ case llvm::Triple::x86_64: ++ LibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs)); ++ TripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples)); ++ BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs)); ++ BiarchTripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples)); ++ break; ++ case llvm::Triple::x86: ++ LibDirs.append(begin(X86LibDirs), end(X86LibDirs)); ++ TripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples)); ++ BiarchLibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs)); ++ BiarchTripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples)); ++ break; ++ case llvm::Triple::mips: ++ LibDirs.append(begin(MIPSLibDirs), end(MIPSLibDirs)); ++ TripleAliases.append(begin(MIPSMuslTriples), end(MIPSMuslTriples)); ++ break; ++ case llvm::Triple::ppc: ++ LibDirs.append(begin(PPCLibDirs), end(PPCLibDirs)); ++ TripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples)); ++ BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); ++ BiarchTripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples)); ++ break; ++ case llvm::Triple::ppcle: ++ LibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs)); ++ TripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples)); ++ BiarchLibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs)); ++ BiarchTripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples)); ++ break; ++ case llvm::Triple::ppc64: ++ LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); ++ TripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples)); ++ BiarchLibDirs.append(begin(PPCLibDirs), end(PPCLibDirs)); ++ BiarchTripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples)); ++ break; ++ case llvm::Triple::ppc64le: ++ LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs)); ++ TripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples)); ++ BiarchLibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs)); ++ BiarchTripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples)); ++ break; ++ default: ++ break; ++ } ++ TripleAliases.push_back(TargetTriple.str()); ++ if (TargetTriple.str() != BiarchTriple.str()) ++ BiarchTripleAliases.push_back(BiarchTriple.str()); ++ return; ++ } ++ + // Android targets should not use GNU/Linux tools or libraries. + if (TargetTriple.isAndroid()) { + static const char *const AArch64AndroidTriples[] = { diff --git a/srcpkgs/llvm12/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch b/srcpkgs/llvm12/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch new file mode 100644 index 00000000000000..afc0810f48debe --- /dev/null +++ b/srcpkgs/llvm12/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch @@ -0,0 +1,13 @@ +--- a/lib/Driver/ToolChains/Linux.cpp ++++ b/lib/Driver/ToolChains/Linux.cpp +@@ -504,10 +504,6 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { + Loader = "ld.so.1"; + break; + case llvm::Triple::ppc64: +- LibDir = "lib64"; +- Loader = +- (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; +- break; + case llvm::Triple::ppc64le: + LibDir = "lib64"; + Loader = diff --git a/srcpkgs/llvm12/files/patches/clang/clang-004-ppc64-musl-elfv2.patch b/srcpkgs/llvm12/files/patches/clang/clang-004-ppc64-musl-elfv2.patch new file mode 100644 index 00000000000000..912094e5535c83 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/clang/clang-004-ppc64-musl-elfv2.patch @@ -0,0 +1,48 @@ +--- a/lib/Basic/Targets/PPC.h ++++ b/lib/Basic/Targets/PPC.h +@@ -415,11 +415,10 @@ public: + LongDoubleFormat = &llvm::APFloat::IEEEdouble(); + } else if ((Triple.getArch() == llvm::Triple::ppc64le)) { + DataLayout = "e-m:e-i64:64-n32:64"; +- ABI = "elfv2"; + } else { + DataLayout = "E-m:e-i64:64-n32:64"; +- ABI = "elfv1"; + } ++ ABI = "elfv2"; + + if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) { + LongDoubleWidth = LongDoubleAlign = 64; +--- a/lib/CodeGen/TargetInfo.cpp ++++ b/lib/CodeGen/TargetInfo.cpp +@@ -10927,9 +10927,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() { + return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ true)); + + if (Triple.isOSBinFormatELF()) { +- PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv1; +- if (getTarget().getABI() == "elfv2") +- Kind = PPC64_SVR4_ABIInfo::ELFv2; ++ PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv2; ++ if (getTarget().getABI() == "elfv1") ++ Kind = PPC64_SVR4_ABIInfo::ELFv1; + bool IsSoftFloat = CodeGenOpts.FloatABI == "soft"; + + return SetCGInfo( +--- a/lib/Driver/ToolChains/Clang.cpp ++++ b/lib/Driver/ToolChains/Clang.cpp +@@ -1920,14 +1920,7 @@ void Clang::AddPPCTargetArgs(const ArgList &Args, + const llvm::Triple &T = getToolChain().getTriple(); + if (T.isOSBinFormatELF()) { + switch (getToolChain().getArch()) { +- case llvm::Triple::ppc64: { +- if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) || +- T.isOSOpenBSD() || T.isMusl()) +- ABIName = "elfv2"; +- else +- ABIName = "elfv1"; +- break; +- } ++ case llvm::Triple::ppc64: + case llvm::Triple::ppc64le: + ABIName = "elfv2"; + break; diff --git a/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-aarch64-ucontext.patch b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-aarch64-ucontext.patch new file mode 100644 index 00000000000000..49689ca01a606d --- /dev/null +++ b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-aarch64-ucontext.patch @@ -0,0 +1,11 @@ +--- compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp.orig ++++ compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +@@ -1799,7 +1799,7 @@ + + static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) { + static const u32 kEsrMagic = 0x45535201; +- u8 *aux = ucontext->uc_mcontext.__reserved; ++ u8 *aux = reinterpret_cast(ucontext->uc_mcontext.__reserved); + while (true) { + _aarch64_ctx *ctx = (_aarch64_ctx *)aux; + if (ctx->size == 0) break; diff --git a/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-sanitizer-ppc64-musl.patch b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-sanitizer-ppc64-musl.patch new file mode 100644 index 00000000000000..a776e823de1ae1 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-sanitizer-ppc64-musl.patch @@ -0,0 +1,35 @@ +--- a/lib/sanitizer_common/sanitizer_linux.cpp ++++ b/lib/sanitizer_common/sanitizer_linux.cpp +@@ -74,6 +74,10 @@ + #include + #endif + ++#if SANITIZER_LINUX && defined(__powerpc__) ++#include ++#endif ++ + #if SANITIZER_LINUX && !SANITIZER_ANDROID + #include + #endif +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -92,7 +92,7 @@ + # include + # include + #if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \ +- SANITIZER_RISCV64 ++ defined(__powerpc__) || SANITIZER_RISCV64 + # include + # ifdef __arm__ + typedef struct user_fpregs elf_fpregset_t; +--- a/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp ++++ b/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp +@@ -31,7 +31,7 @@ + #include // for pid_t + #include // for iovec + #include // for NT_PRSTATUS +-#if (defined(__aarch64__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID ++#if (defined(__aarch64__) || defined(__powerpc__) || SANITIZER_RISCV64) && !SANITIZER_ANDROID + // GLIBC 2.20+ sys/user does not include asm/ptrace.h + # include + #endif diff --git a/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-size_t.patch b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-size_t.patch new file mode 100644 index 00000000000000..2c943d92470584 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-size_t.patch @@ -0,0 +1,10 @@ +--- compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp.orig ++++ compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp +@@ -25,6 +25,7 @@ + } + + #include ++#include + #include + #include // for dlsym() + diff --git a/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch new file mode 100644 index 00000000000000..aac93c25fe8cc1 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/compiler-rt/compiler-rt-xray-ppc64-musl.patch @@ -0,0 +1,62 @@ +--- a/lib/xray/xray_powerpc64.inc ++++ b/lib/xray/xray_powerpc64.inc +@@ -12,7 +12,13 @@ + + #include + #include ++#ifdef __GLIBC__ + #include ++#else ++#include ++#include ++#include ++#endif + + #include "xray_defs.h" + +@@ -20,13 +26,45 @@ namespace __xray { + + ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT { + CPU = 0; ++#ifdef __GLIBC__ + return __ppc_get_timebase(); ++#else ++ return __builtin_ppc_get_timebase(); ++#endif + } + + inline uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT { + static std::mutex M; + std::lock_guard Guard(M); ++#ifdef __GLIBC__ + return __ppc_get_timebase_freq(); ++#else ++ /* FIXME: a less dirty implementation? */ ++ static uint64_t base; ++ if (!base) { ++ FILE *f = fopen("/proc/cpuinfo", "rb"); ++ if (f) { ++ ssize_t nr; ++ /* virtually always big enough to hold the line */ ++ char buf[512]; ++ while (fgets(buf, sizeof(buf), f)) { ++ char *ret = strstr(buf, "timebase"); ++ if (!ret) { ++ continue; ++ } ++ ret += sizeof("timebase" - 1); ++ ret = strchr(ret, ':'); ++ if (!ret) { ++ continue; ++ } ++ base = strtoul(ret + 1, nullptr, 10); ++ break; ++ } ++ fclose(f); ++ } ++ } ++ return base; ++#endif + } + + inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT { diff --git a/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch b/srcpkgs/llvm12/files/patches/libcxx/libcxx-musl.patch similarity index 63% rename from srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch rename to srcpkgs/llvm12/files/patches/libcxx/libcxx-musl.patch index f663ceaab17c75..f6068f7d44059f 100644 --- a/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch +++ b/srcpkgs/llvm12/files/patches/libcxx/libcxx-musl.patch @@ -1,28 +1,26 @@ --- a/include/locale +++ b/include/locale -@@ -10,7 +10,6 @@ - - #ifndef _LIBCPP_LOCALE - #define _LIBCPP_LOCALE -- - /* - locale synopsis - -@@ -871,7 +870,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end, +@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end, typename remove_reference::type __save_errno = errno; errno = 0; char *__p2; -- long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); ++#if defined(__linux__) && !defined(__GLIBC__) + long long __ll = strtoll(__a, &__p2, __base); ++#else + long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); ++#endif typename remove_reference::type __current_errno = errno; if (__current_errno == 0) errno = __save_errno; -@@ -911,7 +910,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end, +@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end, typename remove_reference::type __save_errno = errno; errno = 0; char *__p2; -- unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); ++#if defined(__linux__) && !defined(__GLIBC__) + unsigned long long __ll = strtoull(__a, &__p2, __base); ++#else + unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); ++#endif typename remove_reference::type __current_errno = errno; if (__current_errno == 0) errno = __save_errno; diff --git a/srcpkgs/libcxx/patches/ppc.patch b/srcpkgs/llvm12/files/patches/libcxx/libcxx-ppc.patch similarity index 95% rename from srcpkgs/libcxx/patches/ppc.patch rename to srcpkgs/llvm12/files/patches/libcxx/libcxx-ppc.patch index adcb0c57b0d85b..b1a7bab499fcdf 100644 --- a/srcpkgs/libcxx/patches/ppc.patch +++ b/srcpkgs/llvm12/files/patches/libcxx/libcxx-ppc.patch @@ -2,8 +2,8 @@ This ensures `is_iec559` is defined correctly under all long double ABIs, including musl and its 64-bit long double. Also, `__ppc__` or `__ppc64__` is not defined on gcc. ---- include/limits -+++ include/limits +--- a/include/limits ++++ b/include/limits @@ -426,8 +426,14 @@ protected: _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");} _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;} diff --git a/srcpkgs/libcxx/patches/ssp_nonshared.patch b/srcpkgs/llvm12/files/patches/libcxx/libcxx-ssp-nonshared.patch similarity index 87% rename from srcpkgs/libcxx/patches/ssp_nonshared.patch rename to srcpkgs/llvm12/files/patches/libcxx/libcxx-ssp-nonshared.patch index 10e4dc36597e75..86ce396959d231 100644 --- a/srcpkgs/libcxx/patches/ssp_nonshared.patch +++ b/srcpkgs/llvm12/files/patches/libcxx/libcxx-ssp-nonshared.patch @@ -1,5 +1,5 @@ ---- CMakeLists.txt -+++ CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt @@ -769,6 +769,8 @@ function(cxx_link_system_libraries target) target_link_libraries(${target} PRIVATE atomic) endif() diff --git a/srcpkgs/llvm-libunwind/patches/ppc32.patch b/srcpkgs/llvm12/files/patches/libunwind/libunwind-ppc32.patch similarity index 86% rename from srcpkgs/llvm-libunwind/patches/ppc32.patch rename to srcpkgs/llvm12/files/patches/libunwind/libunwind-ppc32.patch index 1408a0aafb03ae..08fdb991531114 100644 --- a/srcpkgs/llvm-libunwind/patches/ppc32.patch +++ b/srcpkgs/llvm12/files/patches/libunwind/libunwind-ppc32.patch @@ -1,7 +1,7 @@ This fixes build at least with gcc9 which does not define `__ppc__`. ---- include/__libunwind_config.h -+++ include/__libunwind_config.h +--- a/include/__libunwind_config.h ++++ b/include/__libunwind_config.h @@ -49,7 +49,7 @@ # define _LIBUNWIND_CONTEXT_SIZE 167 # define _LIBUNWIND_CURSOR_SIZE 179 @@ -11,8 +11,8 @@ This fixes build at least with gcc9 which does not define `__ppc__`. # define _LIBUNWIND_TARGET_PPC 1 # define _LIBUNWIND_CONTEXT_SIZE 117 # define _LIBUNWIND_CURSOR_SIZE 124 ---- src/UnwindRegistersRestore.S -+++ src/UnwindRegistersRestore.S +--- a/src/UnwindRegistersRestore.S ++++ b/src/UnwindRegistersRestore.S @@ -392,7 +392,7 @@ Lnovec: PPC64_LR(3) bctr @@ -22,8 +22,8 @@ This fixes build at least with gcc9 which does not define `__ppc__`. DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv) // ---- src/UnwindRegistersSave.S -+++ src/UnwindRegistersSave.S +--- a/src/UnwindRegistersSave.S ++++ b/src/UnwindRegistersSave.S @@ -554,7 +554,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) blr @@ -33,8 +33,8 @@ This fixes build at least with gcc9 which does not define `__ppc__`. // // extern int unw_getcontext(unw_context_t* thread_state) ---- src/config.h -+++ src/config.h +--- a/src/config.h ++++ b/src/config.h @@ -95,12 +95,12 @@ #define _LIBUNWIND_BUILD_SJLJ_APIS #endif @@ -50,8 +50,8 @@ This fixes build at least with gcc9 which does not define `__ppc__`. (!defined(__APPLE__) && defined(__arm__)) || \ (defined(__arm64__) || defined(__aarch64__)) || \ defined(__mips__) ---- src/libunwind.cpp -+++ src/libunwind.cpp +--- a/src/libunwind.cpp ++++ b/src/libunwind.cpp @@ -42,7 +42,7 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor, # define REGISTER_KIND Registers_x86_64 #elif defined(__powerpc64__) diff --git a/srcpkgs/llvm12/files/patches/lldb/musl.patch b/srcpkgs/llvm12/files/patches/lldb/musl.patch new file mode 100644 index 00000000000000..37416bb478dfe3 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/lldb/musl.patch @@ -0,0 +1,31 @@ +--- a/source/Plugins/Process/Linux/Procfs.h ++++ b/source/Plugins/Process/Linux/Procfs.h +@@ -10,21 +10,12 @@ + // sys/procfs.h on Android/Linux for all supported architectures. + + #include ++#include + +-#ifdef __ANDROID__ +-#if defined(__arm64__) || defined(__aarch64__) +-typedef unsigned long elf_greg_t; +-typedef elf_greg_t +- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; +-typedef struct user_fpsimd_state elf_fpregset_t; +-#ifndef NT_FPREGSET +-#define NT_FPREGSET NT_PRFPREG +-#endif // NT_FPREGSET +-#elif defined(__mips__) +-#ifndef NT_FPREGSET +-#define NT_FPREGSET NT_PRFPREG +-#endif // NT_FPREGSET +-#endif +-#else // __ANDROID__ ++#if !defined(__GLIBC__) && defined(__powerpc__) ++#define pt_regs musl_pt_regs ++#include ++#undef pt_regs ++#else + #include +-#endif // __ANDROID__ ++#endif diff --git a/srcpkgs/llvm12/files/patches/llvm/llvm-001-musl.patch b/srcpkgs/llvm12/files/patches/llvm/llvm-001-musl.patch new file mode 100644 index 00000000000000..0204a89d8af1ef --- /dev/null +++ b/srcpkgs/llvm12/files/patches/llvm/llvm-001-musl.patch @@ -0,0 +1,57 @@ +From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001 +From: Andrea Brancaleoni +Date: Tue, 8 Sep 2015 22:03:02 +0200 +Subject: [PATCH 3/3] musl + +--- + include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++ + lib/Support/DynamicLibrary.cpp | 2 +- + lib/Support/Unix/Signals.inc | 6 +++--- + utils/unittest/googletest/src/gtest.cc | 1 + + 5 files changed, 17 insertions(+), 6 deletions(-) + +diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h +index 34a8a1e3..1214ece5 100644 +--- a/include/llvm/Analysis/TargetLibraryInfo.h ++++ b/include/llvm/Analysis/TargetLibraryInfo.h +@@ -18,6 +18,15 @@ + #include "llvm/IR/PassManager.h" + #include "llvm/Pass.h" + ++#undef fopen64 ++#undef fseeko64 ++#undef fstat64 ++#undef fstatvfs64 ++#undef ftello64 ++#undef lstat64 ++#undef stat64 ++#undef tmpfile64 ++ + namespace llvm { + template class ArrayRef; + class Triple; +diff --git a/lib/Support/Unix/DynamicLibrary.inc b/lib/Support/Unix/DynamicLibrary.inc +index a2a37996..2f86c470 100644 +--- a/lib/Support/Unix/DynamicLibrary.inc ++++ b/lib/Support/Unix/DynamicLibrary.inc +@@ -102,7 +102,7 @@ static void *DoSearch(const char* SymbolName) { + + // This macro returns the address of a well-known, explicit symbol + #define EXPLICIT_SYMBOL(SYM) \ +- if (!strcmp(SymbolName, #SYM)) return &SYM ++ if (!strcmp(SymbolName, #SYM)) return (void *)&SYM + + // Under glibc we have a weird situation. The stderr/out/in symbols are both + // macros and global variables because of standards requirements. So, we +diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc +index d882ab2e..f1fb12d0 100644 +--- a/utils/unittest/googletest/src/gtest.cc ++++ b/utils/unittest/googletest/src/gtest.cc +@@ -128,6 +128,7 @@ + + #if GTEST_CAN_STREAM_RESULTS_ + # include // NOLINT ++# include // NOLINT + # include // NOLINT + # include // NOLINT + # include // NOLINT diff --git a/srcpkgs/llvm12/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch b/srcpkgs/llvm12/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch new file mode 100644 index 00000000000000..fb842cf003404b --- /dev/null +++ b/srcpkgs/llvm12/files/patches/llvm/llvm-002-musl-ppc64-elfv2.patch @@ -0,0 +1,30 @@ +This patches LLVM to use ELFv2 on ppc64 unconditionally unless overridden. We +need this because unlike most distros we use ELFv2 for both glibc and musl +on big endian ppc64. + +diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp +index 0634833e..b7cbc2e7 100644 +--- a/lib/Target/PowerPC/PPCTargetMachine.cpp ++++ b/lib/Target/PowerPC/PPCTargetMachine.cpp +@@ -222,9 +222,8 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT, + + switch (TT.getArch()) { + case Triple::ppc64le: +- return PPCTargetMachine::PPC_ABI_ELFv2; + case Triple::ppc64: +- return PPCTargetMachine::PPC_ABI_ELFv1; ++ return PPCTargetMachine::PPC_ABI_ELFv2; + default: + return PPCTargetMachine::PPC_ABI_UNKNOWN; + } +diff --git a/test/CodeGen/PowerPC/ppc64-elf-abi.ll b/test/CodeGen/PowerPC/ppc64-elf-abi.ll +index 8b1cf6b5..296a2afa 100644 +--- a/test/CodeGen/PowerPC/ppc64-elf-abi.ll ++++ b/test/CodeGen/PowerPC/ppc64-elf-abi.ll +@@ -1,4 +1,5 @@ +-; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv1 ++; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2 ++; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-musl < %s | FileCheck %s -check-prefix=CHECK-ELFv2 + ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1 + ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2 + ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2 diff --git a/srcpkgs/llvm12/files/patches/llvm/llvm-003-ppc-secureplt.patch b/srcpkgs/llvm12/files/patches/llvm/llvm-003-ppc-secureplt.patch new file mode 100644 index 00000000000000..b9e60d5629f93e --- /dev/null +++ b/srcpkgs/llvm12/files/patches/llvm/llvm-003-ppc-secureplt.patch @@ -0,0 +1,11 @@ +--- llvm/lib/Target/PowerPC/PPCSubtarget.cpp ++++ llvm/lib/Target/PowerPC/PPCSubtarget.cpp +@@ -165,7 +165,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { + + if ((TargetTriple.isOSFreeBSD() && TargetTriple.getOSMajorVersion() >= 13) || + TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() || +- TargetTriple.isMusl()) ++ isTargetLinux()) + SecurePlt = true; + + if (HasSPE && IsPPC64) diff --git a/srcpkgs/llvm12/files/patches/llvm/llvm-004-override-opt.patch b/srcpkgs/llvm12/files/patches/llvm/llvm-004-override-opt.patch new file mode 100644 index 00000000000000..3f5276c3cfdd96 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/llvm/llvm-004-override-opt.patch @@ -0,0 +1,18 @@ +This allows us to override the optimization level as not all platforms can +deal with -O3. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -918,6 +918,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) + llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2") + endif() + ++set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use") ++ ++if (NOT VOID_CXX_OPT_FLAGS STREQUAL "") ++ llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}") ++endif() ++ + # Put this before tblgen. Else we have a circular dependence. + add_subdirectory(lib/Demangle) + add_subdirectory(lib/Support) diff --git a/srcpkgs/llvm12/files/patches/llvm/llvm-005-ppc-bigpic.patch b/srcpkgs/llvm12/files/patches/llvm/llvm-005-ppc-bigpic.patch new file mode 100644 index 00000000000000..d0c0cdb06806a8 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/llvm/llvm-005-ppc-bigpic.patch @@ -0,0 +1,36 @@ +From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001 +From: Samuel Holland +Date: Sun, 3 Nov 2019 10:57:27 -0600 +Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified + +--- + llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 2 +- + llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp +index cce21f32..87ca5f9b 100644 +--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp ++++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp +@@ -520,7 +520,7 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI, + + // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI. + if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt() && +- M->getPICLevel() == PICLevel::BigPIC) ++ M->getPICLevel() != PICLevel::SmallPIC) + TlsRef = MCBinaryExpr::createAdd( + TlsRef, MCConstantExpr::create(32768, OutContext), OutContext); + const MachineOperand &MO = MI->getOperand(2); +diff --git a/lib/Target/PowerPC/PPCMCInstLower.cpp b/lib/Target/PowerPC/PPCMCInstLower.cpp +index 5cc180d7..a5b02565 100644 +--- a/lib/Target/PowerPC/PPCMCInstLower.cpp ++++ b/lib/Target/PowerPC/PPCMCInstLower.cpp +@@ -117,7 +117,7 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol, + const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx); + // If -msecure-plt -fPIC, add 32768 to symbol. + if (Subtarget->isSecurePlt() && TM.isPositionIndependent() && +- M->getPICLevel() == PICLevel::BigPIC && ++ M->getPICLevel() != PICLevel::SmallPIC && + MO.getTargetFlags() == PPCII::MO_PLT) + Expr = + MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx); diff --git a/srcpkgs/llvm12/files/patches/llvm/llvm-006-aarch64-mf_exec.patch b/srcpkgs/llvm12/files/patches/llvm/llvm-006-aarch64-mf_exec.patch new file mode 100644 index 00000000000000..098d7484c27ab0 --- /dev/null +++ b/srcpkgs/llvm12/files/patches/llvm/llvm-006-aarch64-mf_exec.patch @@ -0,0 +1,25 @@ +Fix failures in AllocationTests/MappedMemoryTest.* on aarch64: + + Failing Tests (8): + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3 + +Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10 + +--- a/lib/Support/Unix/Memory.inc ++++ b/lib/Support/Unix/Memory.inc +@@ -58,7 +58,7 @@ static int getPosixProtectionFlags(unsigned Flags) { + return PROT_READ | PROT_WRITE | PROT_EXEC; + case llvm::sys::Memory::MF_EXEC: + #if (defined(__FreeBSD__) || defined(__POWERPC__) || defined (__ppc__) || \ +- defined(_POWER) || defined(_ARCH_PPC)) ++ defined(_POWER) || defined(_ARCH_PPC) || (defined(__linux__) && defined(__aarch64__))) + // On PowerPC, having an executable page that has no read permission + // can have unintended consequences. The function InvalidateInstruction- + // Cache uses instructions dcbf and icbi, both of which are treated by diff --git a/srcpkgs/llvm12/template b/srcpkgs/llvm12/template new file mode 100644 index 00000000000000..ea5bed8e60971f --- /dev/null +++ b/srcpkgs/llvm12/template @@ -0,0 +1,529 @@ +# Template file for 'llvm12' +pkgname=llvm12 +version=12.0.0 +revision=1 +wrksrc="llvm-${version}.src" +build_style=cmake +configure_args=" + -DCMAKE_BUILD_TYPE=Release -Wno-dev + -DENABLE_LINKER_BUILD_ID=ON + -DLLDB_USE_SYSTEM_SIX=ON + -DLIBCXX_CXX_ABI=libcxxabi + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=1 + -DLIBOMP_ENABLE_SHARED=ON + -DLIBOMP_INSTALL_ALIASES=OFF + -DLLVM_INCLUDE_DOCS=ON + -DLLVM_BUILD_DOCS=ON + -DLLVM_ENABLE_SPHINX=ON + -DSPHINX_WARNINGS_AS_ERRORS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_BINUTILS_INCDIR=/usr/include" +hostmakedepends="groff perl python3 zlib-devel libffi-devel swig python3-Sphinx + python3-recommonmark python3-sphinx-automodapi" +makedepends="python3-devel zlib-devel elfutils-devel libffi-devel libedit-devel + libxml2-devel binutils-devel libatomic-devel" +depends="libllvm12>=${version}_${revision}" +short_desc="Low Level Virtual Machine" +maintainer="q66 " +license="Apache-2.0" +homepage="https://www.llvm.org" +distfiles=" + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/lldb-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/lld-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-tools-extra-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/compiler-rt-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libunwind-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libcxx-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libcxxabi-${version}.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/openmp-${version}.src.tar.xz" +checksum=" + 49dc47c8697a1a0abd4ee51629a696d7bfe803662f2a7252a3b16fc75f3a8b50 + 14bcc0f55644df1a50ae9830e1f1751a7b3f633fb8605ee50e685a3db0c705ed + 2cb7d497f3ce33ce8a2c50ad26ec93a8c45f57268d4d96953cd0f25566f753fd + e26e452e91d4542da3ebbf404f024d3e1cbf103f4cd110c26bf0a19621cca9ed + ad41e0b527a65ade95c1ba690a5434cefaab4a2daa1be307caaa1e8541fe6d5c + 85a8cd0a62413eaa0457d8d02f8edac38c4dc0c96c00b09dc550260c23268434 + 9ed2a5b28853f7f58be9d04836ff43d6e4132df5a2c058b690dc3e9d75bd1cf5 + 7dcb75ca4f6aae2c677d128460c48a57398c8b6791b77b74bea7cf9e04e7c3f1 + 6ab8e8cd148a7d5103067e05c36e36ef36e27634fc8e73b5712853c9affe75b1 + eb1b7022a247332114985ed155a8fb632c28ce7c35a476e2c0caf865150f167d" +lib32disabled=yes +python_version=3 + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES" + makedepends+=" libexecinfo-devel" +fi + +# "operand out of range" assembler failures +case "$XBPS_TARGET_MACHINE" in + ppc64*) ;; + ppc*) configure_args+=" -DCLANG_ENABLE_CLANGD=OFF" ;; +esac + +_lldb_enable=yes +_libomp_enable=no + +case "$XBPS_TARGET_MACHINE" in + ppc64le*) ;; + ppc*) _lldb_enable=no ;; +esac + +case "$XBPS_TARGET_MACHINE" in + x86_64*|aarch64*|ppc64*) _libomp_enable=yes;; +esac + +subpackages="clang-tools-extra" + +# must go before clang +if [ "$_libomp_enable" = "yes" ]; then + subpackages+=" libomp libomp-devel" + # because of cmake nonsense referencing libomptarget.so.* + depends+=" libomp>=${version}_${revision}" +fi + +subpackages+=" clang clang-analyzer libclang libclang-cpp + llvm-libunwind llvm-libunwind-devel libcxx libcxx-devel + libcxxabi libcxxabi-devel libllvm12" + +if [ "$_lldb_enable" = "yes" ]; then + # XXX fails to cross compile due to python + subpackages+=" lldb lldb-devel" +fi + +subpackages+=" lld lld-devel" + +post_patch() { + # patches + cd ${XBPS_BUILDDIR}/llvm-${version}.src + for i in ${FILESDIR}/patches/llvm/llvm-*.patch; do + msg_normal "Applying $i to llvm\n" + patch -sNp1 -i ${i} + done + + cd ${XBPS_BUILDDIR}/clang-${version}.src + for i in ${FILESDIR}/patches/clang/clang-*.patch; do + msg_normal "Applying $i to clang\n" + patch -sNp1 -i ${i} + done + + cd ${XBPS_BUILDDIR}/compiler-rt-${version}.src + for i in ${FILESDIR}/patches/compiler-rt/compiler-rt-*.patch; do + msg_normal "Applying $i to compiler-rt\n" + patch -sNp1 -i ${i} + done + + cd ${XBPS_BUILDDIR}/libunwind-${version}.src + for i in ${FILESDIR}/patches/libunwind/libunwind-*.patch; do + msg_normal "Applying $i to libunwind\n" + patch -sNp1 -i ${i} + done + + cd ${XBPS_BUILDDIR}/libcxx-${version}.src + for i in ${FILESDIR}/patches/libcxx/libcxx-*.patch; do + msg_normal "Applying $i to libcxx\n" + patch -sNp1 -i ${i} + done + + if [ "$_lldb_enable" = "yes" ]; then + cd ${XBPS_BUILDDIR}/lldb-${version}.src + for i in ${FILESDIR}/patches/lldb/*.patch; do + msg_normal "Applying $i to lldb\n" + patch -sNp1 -i ${i} + done + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + vsed -i 's|__ptrace_request|int|g' \ + source/Plugins/Process/Linux/NativeProcessLinux.cpp + fi + fi + + # Move clang files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/clang-${version}.src ]; then + mv ${XBPS_BUILDDIR}/clang-${version}.src ${wrksrc}/tools/clang + fi + # Move clang-tools-extra files into llvm source. + if [ -d ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ]; then + mv ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src \ + ${wrksrc}/tools/clang/tools/extra + fi + # Move lld files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/lld-${version}.src ]; then + mv ${XBPS_BUILDDIR}/lld-${version}.src ${wrksrc}/tools/lld + # https://bugs.llvm.org/show_bug.cgi?id=49228 + mkdir -p ${wrksrc}/tools/lld/include/mach-o + cp ${XBPS_BUILDDIR}/libunwind-${version}.src/include/mach-o/compact_unwind_encoding.h \ + ${wrksrc}/tools/lld/include/mach-o + fi + # Move lldb files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/lldb-${version}.src ]; then + if [ "$_lldb_enable" = "yes" ]; then + mv ${XBPS_BUILDDIR}/lldb-${version}.src ${wrksrc}/tools/lldb + # disable docs for lldb as they fail to generate + vsed -i '/add_subdirectory(docs)/d' \ + ${wrksrc}/tools/lldb/CMakeLists.txt + else + rm -rf ${XBPS_BUILDDIR}/lldb-${version}.src + fi + fi + # Move compiler-rt files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/compiler-rt-${version}.src ]; then + mv ${XBPS_BUILDDIR}/compiler-rt-${version}.src \ + ${wrksrc}/projects/compiler-rt + fi + # Move libunwind files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/libunwind-${version}.src ]; then + mv ${XBPS_BUILDDIR}/libunwind-${version}.src \ + ${wrksrc}/projects/libunwind + fi + # Move libcxx files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/libcxx-${version}.src ]; then + mv ${XBPS_BUILDDIR}/libcxx-${version}.src \ + ${wrksrc}/projects/libcxx + fi + # Move libcxxabi files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/libcxxabi-${version}.src ]; then + mv ${XBPS_BUILDDIR}/libcxxabi-${version}.src \ + ${wrksrc}/projects/libcxxabi + fi + # Move openmp files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/openmp-${version}.src ]; then + if [ "$_libomp_enable" = "yes" ]; then + mv ${XBPS_BUILDDIR}/openmp-${version}.src \ + ${wrksrc}/projects/openmp + else + rm -rf ${XBPS_BUILDDIR}/openmp-${version}.src + fi + fi + + # fix early build failure + vsed -e "/set(model_compiler/s:\${CMAKE_SOURCE_DIR}/\.\./clang-tools-extra/:\${CMAKE_SOURCE_DIR}/tools/clang/tools/extra/:" \ + -i ${wrksrc}/tools/clang/tools/extra/clangd/quality/CompletionModel.cmake + + # update config.guess for better platform detection + cp $XBPS_COMMONDIR/environment/configure/automake/config.guess \ + ${wrksrc}/cmake + + # fix linker failures on 32-bit ppc + case "$XBPS_TARGET_MACHINE" in + ppc64*) ;; + aarch64*|ppc*) + vsed -i 's,check_library_exists(gcc_s .*,set(LIBCXXABI_HAS_GCC_S_LIB ON),' \ + ${wrksrc}/projects/libcxxabi/cmake/config-ix.cmake + vsed -i 's,check_library_exists(gcc .*,set(LIBCXXABI_HAS_GCC_LIB ON),' \ + ${wrksrc}/projects/libcxxabi/cmake/config-ix.cmake + ;; + esac + + # need libssp_nonshared on some musl platforms (because of nodefaultlibs) + case "$XBPS_TARGET_MACHINE" in + ppc64*) ;; + ppc*-musl|i686-musl|mips*-musl) + vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \ + ${wrksrc}/projects/libunwind/src/CMakeLists.txt + vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \ + ${wrksrc}/projects/libcxxabi/src/CMakeLists.txt + vsed -i 's,#ssp,,' ${wrksrc}/projects/libcxx/CMakeLists.txt + ;; + esac + + # some sanitizer currently only on x86_64 stuff needs backtrace + case "$XBPS_TARGET_MACHINE" in + x86_64-musl) + vsed -i 's,# Set common link flags.,list(APPEND SANITIZER_COMMON_LINK_LIBS execinfo),' \ + ${wrksrc}/projects/compiler-rt/CMakeLists.txt + ;; + esac + + # sanitizer code is broken on arm*-musl since it duplicates some libc bits + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + vsed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' \ + ${wrksrc}/projects/compiler-rt/cmake/config-ix.cmake + fi +} + +pre_configure() { + # Vastly reduce size of debugging symbols: + CFLAGS=${CFLAGS/ -g/ -g1} + CXXFLAGS=${CXXFLAGS/ -g/ -g1} + + # since gcc9, the build likes to blow up for ppc32 apparently because + # of clang being too large for a 24-bit relative call to the PLT, so + # optimize for size instead + case "$XBPS_TARGET_MACHINE" in + ppc64*) ;; + mips*-musl|ppc*) configure_args+=" -DVOID_CXX_OPT_FLAGS=-Os" ;; + esac + + if [ "$CROSS_BUILD" ]; then + msg_normal "Building host tblgen\n" + mkdir -p build/HOST + cd build/HOST + CC="$BUILD_CC" CXX="$BUILD_CXX" CFLAGS="$BUILD_CFLAGS" \ + CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \ + cmake ../.. -DCMAKE_BUILD_TYPE=Release + make ${makejobs} -C utils/TableGen + make ${makejobs} -C tools/clang/utils/TableGen + [ "$_lldb_enable" = "yes" ] && make ${makejobs} -C tools/lldb/utils/TableGen + configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/build/HOST/bin/llvm-tblgen" + configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/build/HOST/bin/clang-tblgen" + [ "$_lldb_enable" = "yes" ] && configure_args+=" -DLLDB_TABLEGEN=${wrksrc}/build/HOST/bin/lldb-tblgen" + cd ../.. + fi + + case "$XBPS_TARGET_MACHINE" in + i686*) _arch="X86";; + x86_64*) _arch="X86";; + armv5*) _arch="Armv5te";; + armv6*) _arch="Armv6";; + armv7*) _arch="Armv7";; + aarch64*) _arch="AArch64";; + mips*) _arch="Mips";; + ppc*) _arch="PowerPC";; + esac + configure_args+=" -DLLVM_TARGET_ARCH=${_arch}" + configure_args+=" -DLLVM_HOST_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}" + configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}" +} + +do_install() { + cd build + cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P cmake_install.cmake + + # Required for multilib. + if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then + for _header in llvm-config; do + mv ${DESTDIR}/usr/include/llvm/Config/${_header}{,-64}.h + vinstall ${FILESDIR}/llvm-Config-${_header}.h 644 \ + usr/include/llvm/Config ${_header}.h + done + fi + + # Remove llvm-config-host in cross builds. + if [ "$CROSS_BUILD" ]; then + rm -f ${DESTDIR}/usr/bin/llvm-config-host + fi + + # Install libcxxabi headers + vinstall ${wrksrc}/projects/libcxxabi/include/__cxxabi_config.h 644 usr/include + vinstall ${wrksrc}/projects/libcxxabi/include/cxxabi.h 644 usr/include + + # Install libunwind headers + vinstall ${wrksrc}/projects/libunwind/include/__libunwind_config.h 644 usr/include + vinstall ${wrksrc}/projects/libunwind/include/libunwind.h 644 usr/include + vinstall ${wrksrc}/projects/libunwind/include/unwind.h 644 usr/include +} + +clang-analyzer_package() { + pycompile_dirs="usr/share/scan-view" + depends="clang-${version}_${revision} python3" + short_desc+=" - A source code analysis framework" + homepage="https://clang-analyzer.llvm.org/" + pkg_install() { + vmove usr/share/man/man1/scan-build.1 + vmove "/usr/bin/scan-*" + vmove "/usr/share/scan-*" + vmove "/usr/libexec/*analyzer" + } +} + +clang-tools-extra_package() { + lib32disabled=yes + depends="clang-${version}_${revision} python3" + short_desc+=" - Extra Clang tools" + homepage="https://clang.llvm.org/extra/" + pkg_install() { + vmove usr/include/clang-tidy + vmove usr/bin/clang-apply-replacements + vmove usr/bin/clang-query + vmove usr/bin/clang-rename + vmove usr/bin/clang-tidy + vmove usr/bin/diagtool + vmove usr/bin/find-all-symbols + vmove usr/bin/hmaptool + vmove usr/bin/modularize + vmove usr/bin/pp-trace + vmove usr/bin/sancov + vmove "usr/lib/libclangApplyReplacements*" + vmove "usr/lib/libclangQuery*" + vmove "usr/lib/libclangTidy*" + vmove "usr/share/clang/*tidy*" + vmove usr/share/doc/clang-tools + vmove usr/share/man/man1/extraclangtools.1 + vmove usr/share/man/man1/diagtool.1 + } +} + +clang_package() { + lib32disabled=yes + depends="libstdc++-devel libgcc-devel binutils ${XBPS_TARGET_LIBC}-devel + libclang-${version}_${revision}" + short_desc+=" - C language family frontend" + homepage="https://clang.llvm.org/" + pkg_install() { + vmove usr/include/clang + vmove usr/include/clang-c + vmove "usr/bin/*clang*" + vmove usr/bin/c-index-test + vmove usr/lib/clang + vmove usr/lib/cmake/clang + vmove "usr/lib/libclang*.a" + vmove "usr/lib/libclang*.so" + vmove usr/share/clang + vmove usr/share/doc/clang + vmove usr/share/man/man1/clang.1 + } +} + +libclang_package() { + short_desc+=" - C frontend runtime library" + pkg_install() { + vmove "usr/lib/libclang.so.*" + } +} + +libclang-cpp_package() { + short_desc+=" - C frontend runtime library (C++ interface)" + pkg_install() { + vmove "usr/lib/libclang-cpp.so.*" + } +} + +lld_package() { + lib32disabled=yes + short_desc+=" - linker" + homepage="https://lld.llvm.org" + pkg_install() { + vmove usr/bin/lld* + vmove usr/bin/wasm-ld + vmove usr/bin/ld.lld* + vmove usr/bin/ld64.lld* + vmove usr/share/doc/lld + } +} + +lld-devel_package() { + lib32disabled=yes + short_desc+=" - linker - development files" + homepage="https://lld.llvm.org" + depends="lld>=${version}_${revision}" + pkg_install() { + vmove usr/include/lld + vmove usr/lib/cmake/lld + vmove "usr/lib/liblld*a" + } +} + +lldb_package() { + lib32disabled=yes + depends+=" python3-six" + short_desc+=" - LLDB debugger" + homepage="https://lldb.llvm.org/" + pkg_install() { + vmove usr/bin/*lldb* + vmove usr/lib/liblldb*so.* + vmove /usr/lib/python* + } +} + +lldb-devel_package() { + lib32disabled=yes + depends="lldb>=${version}_${revision}" + short_desc+=" - LLDB debugger - development files" + pkg_install() { + vmove usr/include/lldb + vmove "usr/lib/liblldb*.so" + } +} + +llvm-libunwind_package() { + short_desc+=" - libunwind" + pkg_install() { + vmove "usr/lib/libunwind.so.*" + } +} + +llvm-libunwind-devel_package() { + short_desc+=" - libunwind - development files" + depends="llvm-libunwind>=${version}_${revision}" + conflicts="libunwind-devel>=0" + pkg_install() { + vmove usr/lib/libunwind.so + vmove usr/lib/libunwind.a + vmove "usr/include/*unwind*" + vmove usr/include/mach-o + vmove usr/share/doc/libunwind + } +} + +libcxxabi_package() { + short_desc+=" - low level support for libc++" + pkg_install() { + vmove "usr/lib/libc++abi.so.*" + } +} + +libcxxabi-devel_package() { + short_desc+=" - low level support for libc++ - development files" + depends="libcxxabi>=${version}_${revision}" + pkg_install() { + vmove usr/lib/libc++abi.so + vmove usr/lib/libc++abi.a + vmove "usr/include/*cxxabi*" + } +} + +libcxx_package() { + short_desc+=" - C++ standard library" + pkg_install() { + vmove "usr/lib/libc++.so.*" + } +} + +libcxx-devel_package() { + short_desc+=" - C++ standard library - development files" + depends="libcxx>=${version}_${revision}" + pkg_install() { + vmove usr/lib/libc++.so + vmove usr/lib/libc++.a + vmove usr/lib/libc++experimental.a + vmove usr/include/c++ + vmove usr/share/doc/libcxx + } +} + +libomp_package() { + short_desc+=" - Clang OpenMP support library" + pkg_install() { + vmove usr/lib/libomp.so + vmove "usr/lib/libomptarget.rtl.*.so" + vmove usr/lib/libarcher.so + vmove "usr/lib/libomp*.so.*" + } +} + +libomp-devel_package() { + short_desc+=" - Clang OpenMP support library - development files" + depends="libomp>=${version}_${revision}" + pkg_install() { + vmove "usr/lib/libomp*.so" + vmove "usr/lib/libarcher*" + vmove "usr/include/omp*.h" + vmove "usr/lib/clang/${version}/include/omp*.h" + vmove usr/share/man/man1/llvmopenmp.1 + vmove usr/share/doc/openmp + } +} + +libllvm12_package() { + short_desc+=" - runtime library" + pkg_install() { + vmove "usr/lib/libLLVM-*.so*" + } +} diff --git a/srcpkgs/llvm12/update b/srcpkgs/llvm12/update new file mode 100644 index 00000000000000..e95cf26b3586b7 --- /dev/null +++ b/srcpkgs/llvm12/update @@ -0,0 +1,3 @@ +site="https://github.com/llvm/llvm-project/releases" +pattern="llvmorg-\K(\d+.){2}\d+(-rc\d+)?" +ignore="*-rc*" From 8c91496854cc17cf8bdf2d39815ada9df4919855 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 05:04:23 +0200 Subject: [PATCH 106/355] llvm: update to 12.0.0 --- srcpkgs/llvm/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template index eb71e7d67faaef..a92db6f94f9fc1 100644 --- a/srcpkgs/llvm/template +++ b/srcpkgs/llvm/template @@ -1,10 +1,10 @@ # Template file for 'llvm' pkgname=llvm -version=11.0.0 +version=12.0.0 revision=1 build_style=meta -depends="llvm11" -replaces="llvm10>=0 llvm9>=0 llvm8>=0 llvm7>=0 llvm6.0>=0 llvm3.9>=0" +depends="llvm12" +replaces="llvm11>=0 llvm10>=0 llvm9>=0 llvm8>=0 llvm7>=0 llvm6.0>=0 llvm3.9>=0" short_desc="LLVM meta package" maintainer="Enno Boland " license="Public Domain" From 43cd298002406253e25511ec7dea2bca9800c2bd Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 03:22:47 +0200 Subject: [PATCH 107/355] llvm11: remove clang parts --- ...clang-001-fix-unwind-chain-inclusion.patch | 44 -- .../files/patches/clang/clang-001-ppcle.patch | 546 ------------------ .../clang/clang-002-add-musl-triples.patch | 100 ---- .../clang-003-ppc64-dynamic-linker-path.patch | 18 - .../clang/clang-004-ppc64-musl-elfv2.patch | 30 - .../compiler-rt/compiler-rt-armv5.patch | 11 - .../files/patches/lld/lld-001-ppcle.patch | 313 ---------- srcpkgs/llvm11/files/patches/lldb/musl.patch | 31 - srcpkgs/llvm11/template | 215 +------ 9 files changed, 2 insertions(+), 1306 deletions(-) delete mode 100644 srcpkgs/llvm11/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch delete mode 100644 srcpkgs/llvm11/files/patches/clang/clang-001-ppcle.patch delete mode 100644 srcpkgs/llvm11/files/patches/clang/clang-002-add-musl-triples.patch delete mode 100644 srcpkgs/llvm11/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch delete mode 100644 srcpkgs/llvm11/files/patches/clang/clang-004-ppc64-musl-elfv2.patch delete mode 100644 srcpkgs/llvm11/files/patches/compiler-rt/compiler-rt-armv5.patch delete mode 100644 srcpkgs/llvm11/files/patches/lld/lld-001-ppcle.patch delete mode 100644 srcpkgs/llvm11/files/patches/lldb/musl.patch diff --git a/srcpkgs/llvm11/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch b/srcpkgs/llvm11/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch deleted file mode 100644 index 04244bcc274071..00000000000000 --- a/srcpkgs/llvm11/files/patches/clang/clang-001-fix-unwind-chain-inclusion.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001 -From: Andrea Brancaleoni -Date: Tue, 8 Sep 2015 22:14:57 +0200 -Subject: [PATCH 2/7] fix unwind chain inclusion - ---- - lib/Headers/unwind.h | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h -index 303d792..44e10cc 100644 ---- a/lib/Headers/unwind.h -+++ b/lib/Headers/unwind.h -@@ -9,9 +9,6 @@ - - /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/ - --#ifndef __CLANG_UNWIND_H --#define __CLANG_UNWIND_H -- - #if defined(__APPLE__) && __has_include_next() - /* Darwin (from 11.x on) provide an unwind.h. If that's available, - * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE, -@@ -39,6 +36,9 @@ - # endif - #else - -+#ifndef __CLANG_UNWIND_H -+#define __CLANG_UNWIND_H -+ - #include - - #ifdef __cplusplus -@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *); - } - #endif - -+#endif /* __CLANG_UNWIND_H */ -+ - #endif - --#endif /* __CLANG_UNWIND_H */ --- -2.5.1 diff --git a/srcpkgs/llvm11/files/patches/clang/clang-001-ppcle.patch b/srcpkgs/llvm11/files/patches/clang/clang-001-ppcle.patch deleted file mode 100644 index c99fdc77fcf1ed..00000000000000 --- a/srcpkgs/llvm11/files/patches/clang/clang-001-ppcle.patch +++ /dev/null @@ -1,546 +0,0 @@ -From 84ec75000ec5bd35f8be3245c8fd6b78aabbd63c Mon Sep 17 00:00:00 2001 -From: Daniel Kolesa -Date: Thu, 17 Dec 2020 03:43:25 +0100 -Subject: [PATCH] ppcle suppport - -based on https://reviews.llvm.org/D92445 ---- - lib/Basic/Targets.cpp | 10 +++++++++ - lib/Basic/Targets/OSTargets.h | 2 ++ - lib/Basic/Targets/PPC.cpp | 3 ++- - lib/Basic/Targets/PPC.h | 2 ++ - lib/CodeGen/CGBuiltin.cpp | 1 + - lib/CodeGen/CodeGenModule.cpp | 4 +--- - lib/CodeGen/TargetInfo.cpp | 9 +++++++- - lib/Driver/Driver.cpp | 4 +--- - lib/Driver/ToolChain.cpp | 2 ++ - lib/Driver/ToolChains/Clang.cpp | 9 ++++++-- - lib/Driver/ToolChains/CommonArgs.cpp | 1 + - lib/Driver/ToolChains/FreeBSD.cpp | 8 ++++++- - lib/Driver/ToolChains/Gnu.cpp | 25 +++++++++++++++++++++ - lib/Driver/ToolChains/Linux.cpp | 13 +++++++++-- - lib/Frontend/CompilerInvocation.cpp | 1 + - lib/Sema/SemaChecking.cpp | 1 + - test/CodeGen/altivec.c | 15 ++++++++----- - test/CodeGen/builtins-ppc-altivec.c | 2 ++ - test/CodeGen/ppc32-and-aix-struct-return.c | 6 +++++ - test/CodeGen/target-data.c | 4 ++++ - test/Driver/ppc-endian.c | 26 +++++++++++++++------- - 21 files changed, 122 insertions(+), 26 deletions(-) - -diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp -index 965f2738..d8ff000a 100644 ---- a/lib/Basic/Targets.cpp -+++ b/lib/Basic/Targets.cpp -@@ -334,6 +334,16 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, - return new PPC32TargetInfo(Triple, Opts); - } - -+ case llvm::Triple::ppcle: -+ switch (os) { -+ case llvm::Triple::Linux: -+ return new LinuxTargetInfo(Triple, Opts); -+ case llvm::Triple::FreeBSD: -+ return new FreeBSDTargetInfo(Triple, Opts); -+ default: -+ return new PPC32TargetInfo(Triple, Opts); -+ } -+ - case llvm::Triple::ppc64: - if (Triple.isOSDarwin()) - return new DarwinPPC64TargetInfo(Triple, Opts); -diff --git a/lib/Basic/Targets/OSTargets.h b/lib/Basic/Targets/OSTargets.h -index 2a9e4f91..39e3b537 100644 ---- a/lib/Basic/Targets/OSTargets.h -+++ b/lib/Basic/Targets/OSTargets.h -@@ -252,6 +252,7 @@ public: - case llvm::Triple::mips: - case llvm::Triple::mipsel: - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - this->MCountName = "_mcount"; -@@ -408,6 +409,7 @@ public: - case llvm::Triple::mips64: - case llvm::Triple::mips64el: - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - this->MCountName = "_mcount"; -diff --git a/lib/Basic/Targets/PPC.cpp b/lib/Basic/Targets/PPC.cpp -index f0de2bf0..42f30a2f 100644 ---- a/lib/Basic/Targets/PPC.cpp -+++ b/lib/Basic/Targets/PPC.cpp -@@ -90,7 +90,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts, - } - - // Target properties. -- if (getTriple().getArch() == llvm::Triple::ppc64le) { -+ if (getTriple().getArch() == llvm::Triple::ppc64le || -+ getTriple().getArch() == llvm::Triple::ppcle) { - Builder.defineMacro("_LITTLE_ENDIAN"); - } else { - if (!getTriple().isOSNetBSD() && -diff --git a/lib/Basic/Targets/PPC.h b/lib/Basic/Targets/PPC.h -index bda6cb7d..d6d8c9a3 100644 ---- a/lib/Basic/Targets/PPC.h -+++ b/lib/Basic/Targets/PPC.h -@@ -355,6 +355,8 @@ public: - : PPCTargetInfo(Triple, Opts) { - if (Triple.isOSAIX()) - resetDataLayout("E-m:a-p:32:32-i64:64-n32"); -+ else if ((Triple.getArch() == llvm::Triple::ppcle)) -+ resetDataLayout("e-m:e-p:32:32-i64:64-n32"); - else - resetDataLayout("E-m:e-p:32:32-i64:64-n32"); - -diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp -index 8994b939..4a4b1744 100644 ---- a/lib/CodeGen/CGBuiltin.cpp -+++ b/lib/CodeGen/CGBuiltin.cpp -@@ -4523,6 +4523,7 @@ static Value *EmitTargetArchBuiltinExpr(CodeGenFunction *CGF, - case llvm::Triple::x86_64: - return CGF->EmitX86BuiltinExpr(BuiltinID, E); - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - return CGF->EmitPPCBuiltinExpr(BuiltinID, E); -diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp -index 4ae8ce7e..cbf7da1a 100644 ---- a/lib/CodeGen/CodeGenModule.cpp -+++ b/lib/CodeGen/CodeGenModule.cpp -@@ -890,9 +890,7 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, - return false; - - // PPC has no copy relocations and cannot use a plt entry as a symbol address. -- llvm::Triple::ArchType Arch = TT.getArch(); -- if (Arch == llvm::Triple::ppc || Arch == llvm::Triple::ppc64 || -- Arch == llvm::Triple::ppc64le) -+ if (TT.isPPC()) - return false; - - // If we can use copy relocations we can assume it is local. -diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp -index 9cd63ebe..0434eb6a 100644 ---- a/lib/CodeGen/TargetInfo.cpp -+++ b/lib/CodeGen/TargetInfo.cpp -@@ -4838,7 +4838,7 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAList, - - bool PPC32TargetCodeGenInfo::isStructReturnInRegABI( - const llvm::Triple &Triple, const CodeGenOptions &Opts) { -- assert(Triple.getArch() == llvm::Triple::ppc); -+ assert(Triple.isPPC32()); - - switch (Opts.getStructReturnConvention()) { - case CodeGenOptions::SRCK_Default: -@@ -10874,6 +10874,13 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() { - return SetCGInfo( - new PPC32TargetCodeGenInfo(Types, IsSoftFloat, RetSmallStructInRegABI)); - } -+ case llvm::Triple::ppcle: { -+ bool IsSoftFloat = CodeGenOpts.FloatABI == "soft"; -+ bool RetSmallStructInRegABI = -+ PPC32TargetCodeGenInfo::isStructReturnInRegABI(Triple, CodeGenOpts); -+ return SetCGInfo( -+ new PPC32TargetCodeGenInfo(Types, IsSoftFloat, RetSmallStructInRegABI)); -+ } - case llvm::Triple::ppc64: - if (Triple.isOSAIX()) - return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ true)); -diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp -index ece8222d..9b96d03c 100644 ---- a/lib/Driver/Driver.cpp -+++ b/lib/Driver/Driver.cpp -@@ -4931,9 +4931,7 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, - !Target.hasEnvironment()) - TC = std::make_unique(*this, Target, - Args); -- else if (Target.getArch() == llvm::Triple::ppc || -- Target.getArch() == llvm::Triple::ppc64 || -- Target.getArch() == llvm::Triple::ppc64le) -+ else if (Target.isPPC()) - TC = std::make_unique(*this, Target, - Args); - else if (Target.getArch() == llvm::Triple::ve) -diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp -index b8c12fc9..9507693b 100644 ---- a/lib/Driver/ToolChain.cpp -+++ b/lib/Driver/ToolChain.cpp -@@ -238,6 +238,8 @@ StringRef ToolChain::getDefaultUniversalArchName() const { - return "arm64_32"; - case llvm::Triple::ppc: - return "ppc"; -+ case llvm::Triple::ppcle: -+ return "ppc"; - case llvm::Triple::ppc64: - return "ppc64"; - case llvm::Triple::ppc64le: -diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp -index af4bcf95..3ee31620 100644 ---- a/lib/Driver/ToolChains/Clang.cpp -+++ b/lib/Driver/ToolChains/Clang.cpp -@@ -331,6 +331,7 @@ static void getTargetFeatures(const Driver &D, const llvm::Triple &Triple, - break; - - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - ppc::getPPCTargetFeatures(D, Triple, Args, Features); -@@ -527,6 +528,7 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args, - // WebAssembly never wants frame pointers. - return false; - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - case llvm::Triple::riscv32: -@@ -1370,6 +1372,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) { - return false; - - case llvm::Triple::hexagon: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64le: - case llvm::Triple::riscv32: - case llvm::Triple::riscv64: -@@ -1586,6 +1589,7 @@ void Clang::RenderTargetOptions(const llvm::Triple &EffectiveTriple, - break; - - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - AddPPCTargetArgs(Args, CmdArgs); -@@ -4508,7 +4512,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, - - if (Arg *A = Args.getLastArg(options::OPT_maix_struct_return, - options::OPT_msvr4_struct_return)) { -- if (TC.getArch() != llvm::Triple::ppc) { -+ if ((TC.getArch() != llvm::Triple::ppc) && -+ (TC.getArch() != llvm::Triple::ppcle)) { - D.Diag(diag::err_drv_unsupported_opt_for_target) - << A->getSpelling() << RawTriple.str(); - } else if (A->getOption().matches(options::OPT_maix_struct_return)) { -@@ -4621,7 +4626,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, - if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) { - if (TC.getTriple().isX86()) - A->render(Args, CmdArgs); -- else if ((TC.getArch() == llvm::Triple::ppc || TC.getTriple().isPPC64()) && -+ else if (TC.getTriple().isPPC() && - (A->getOption().getID() != options::OPT_mlong_double_80)) - A->render(Args, CmdArgs); - else -diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp -index 6b6e276b..8b63dce7 100644 ---- a/lib/Driver/ToolChains/CommonArgs.cpp -+++ b/lib/Driver/ToolChains/CommonArgs.cpp -@@ -313,6 +313,7 @@ std::string tools::getCPUName(const ArgList &Args, const llvm::Triple &T, - return ""; - - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: { - std::string TargetCPUName = ppc::getPPCTargetCPU(Args); -diff --git a/lib/Driver/ToolChains/FreeBSD.cpp b/lib/Driver/ToolChains/FreeBSD.cpp -index 909ac5e9..6ec8e807 100644 ---- a/lib/Driver/ToolChains/FreeBSD.cpp -+++ b/lib/Driver/ToolChains/FreeBSD.cpp -@@ -42,6 +42,7 @@ void freebsd::Assembler::ConstructJob(Compilation &C, const JobAction &JA, - CmdArgs.push_back("--32"); - break; - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - CmdArgs.push_back("-a32"); - break; - case llvm::Triple::mips: -@@ -191,6 +192,11 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, - CmdArgs.push_back("-m"); - CmdArgs.push_back("elf32ppc_fbsd"); - break; -+ case llvm::Triple::ppcle: -+ CmdArgs.push_back("-m"); -+ // Use generic -- only usage is for freestanding. -+ CmdArgs.push_back("elf32lppc"); -+ break; - case llvm::Triple::mips: - CmdArgs.push_back("-m"); - CmdArgs.push_back("elf32btsmip_fbsd"); -@@ -372,7 +378,7 @@ FreeBSD::FreeBSD(const Driver &D, const llvm::Triple &Triple, - // When targeting 32-bit platforms, look for '/usr/lib32/crt1.o' and fall - // back to '/usr/lib' if it doesn't exist. - if ((Triple.getArch() == llvm::Triple::x86 || Triple.isMIPS32() || -- Triple.getArch() == llvm::Triple::ppc) && -+ Triple.isPPC32()) && - D.getVFS().exists(getDriver().SysRoot + "/usr/lib32/crt1.o")) - getFilePaths().push_back(getDriver().SysRoot + "/usr/lib32"); - else -diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp -index c8a7fce0..38830c4f 100644 ---- a/lib/Driver/ToolChains/Gnu.cpp -+++ b/lib/Driver/ToolChains/Gnu.cpp -@@ -116,6 +116,7 @@ void tools::gcc::Common::ConstructJob(Compilation &C, const JobAction &JA, - break; - case llvm::Triple::x86: - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - CmdArgs.push_back("-m32"); - break; - case llvm::Triple::x86_64: -@@ -271,6 +272,8 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) { - return isArmBigEndian(T, Args) ? "armelfb_linux_eabi" : "armelf_linux_eabi"; - case llvm::Triple::ppc: - return "elf32ppclinux"; -+ case llvm::Triple::ppcle: -+ return "elf32lppclinux"; - case llvm::Triple::ppc64: - return "elf64ppc"; - case llvm::Triple::ppc64le: -@@ -736,6 +739,14 @@ void tools::gnutools::Assembler::ConstructJob(Compilation &C, - ppc::getPPCAsmModeForCPU(getCPUName(Args, getToolChain().getTriple()))); - break; - } -+ case llvm::Triple::ppcle: { -+ CmdArgs.push_back("-a32"); -+ CmdArgs.push_back("-mppc"); -+ CmdArgs.push_back("-mlittle-endian"); -+ CmdArgs.push_back( -+ ppc::getPPCAsmModeForCPU(getCPUName(Args, getToolChain().getTriple()))); -+ break; -+ } - case llvm::Triple::ppc64: { - CmdArgs.push_back("-a64"); - CmdArgs.push_back("-mppc64"); -@@ -2125,6 +2136,11 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a - // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux". - "powerpc64-suse-linux", "powerpc-montavista-linuxspe"}; -+ // PPCLE is only used in niche situations such as bootloaders -+ // and compatibility shims. -+ static const char *const PPCLELibDirs[] = {"/lib32", "/lib"}; -+ static const char *const PPCLETriples[] = {"powerpcle-linux-gnu", -+ "powerpcle-unknown-linux-gnu"}; - static const char *const PPC64LibDirs[] = {"/lib64", "/lib"}; - static const char *const PPC64Triples[] = { - "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu", -@@ -2365,6 +2381,12 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); - BiarchTripleAliases.append(begin(PPC64Triples), end(PPC64Triples)); - break; -+ case llvm::Triple::ppcle: -+ LibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs)); -+ TripleAliases.append(begin(PPCLETriples), end(PPCLETriples)); -+ BiarchLibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs)); -+ BiarchTripleAliases.append(begin(PPC64LETriples), end(PPC64LETriples)); -+ break; - case llvm::Triple::ppc64: - LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); - TripleAliases.append(begin(PPC64Triples), end(PPC64Triples)); -@@ -2374,6 +2396,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - case llvm::Triple::ppc64le: - LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs)); - TripleAliases.append(begin(PPC64LETriples), end(PPC64LETriples)); -+ BiarchLibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs)); -+ BiarchTripleAliases.append(begin(PPCLETriples), end(PPCLETriples)); - break; - case llvm::Triple::riscv32: - LibDirs.append(begin(RISCV32LibDirs), end(RISCV32LibDirs)); -@@ -2697,6 +2721,7 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const { - case llvm::Triple::thumb: - case llvm::Triple::thumbeb: - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - case llvm::Triple::riscv32: -diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp -index 18035047..765a3ec2 100644 ---- a/lib/Driver/ToolChains/Linux.cpp -+++ b/lib/Driver/ToolChains/Linux.cpp -@@ -142,6 +142,10 @@ std::string Linux::getMultiarchTriple(const Driver &D, - if (D.getVFS().exists(SysRoot + "/lib/powerpc-linux-gnu")) - return "powerpc-linux-gnu"; - break; -+ case llvm::Triple::ppcle: -+ if (D.getVFS().exists(SysRoot + "/lib/powerpcle-linux-gnu")) -+ return "powerpcle-linux-gnu"; -+ break; - case llvm::Triple::ppc64: - if (D.getVFS().exists(SysRoot + "/lib/powerpc64-linux-gnu")) - return "powerpc64-linux-gnu"; -@@ -194,8 +198,7 @@ static StringRef getOSLibDir(const llvm::Triple &Triple, const ArgList &Args) { - // FIXME: This is a bit of a hack. We should really unify this code for - // reasoning about oslibdir spellings with the lib dir spellings in the - // GCCInstallationDetector, but that is a more significant refactoring. -- if (Triple.getArch() == llvm::Triple::x86 || -- Triple.getArch() == llvm::Triple::ppc) -+ if (Triple.getArch() == llvm::Triple::x86 || Triple.isPPC32()) - return "lib32"; - - if (Triple.getArch() == llvm::Triple::x86_64 && -@@ -492,6 +495,7 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { - break; - } - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - LibDir = "lib"; - Loader = "ld.so.1"; - break; -@@ -642,6 +646,8 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, - const StringRef PPCMultiarchIncludeDirs[] = { - "/usr/include/powerpc-linux-gnu", - "/usr/include/powerpc-linux-gnuspe"}; -+ const StringRef PPCLEMultiarchIncludeDirs[] = { -+ "/usr/include/powerpcle-linux-gnu"}; - const StringRef PPC64MultiarchIncludeDirs[] = { - "/usr/include/powerpc64-linux-gnu"}; - const StringRef PPC64LEMultiarchIncludeDirs[] = { -@@ -715,6 +721,9 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, - case llvm::Triple::ppc: - MultiarchIncludeDirs = PPCMultiarchIncludeDirs; - break; -+ case llvm::Triple::ppcle: -+ MultiarchIncludeDirs = PPCLEMultiarchIncludeDirs; -+ break; - case llvm::Triple::ppc64: - MultiarchIncludeDirs = PPC64MultiarchIncludeDirs; - break; -diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp -index 73114c6d..a577e6dc 100644 ---- a/lib/Frontend/CompilerInvocation.cpp -+++ b/lib/Frontend/CompilerInvocation.cpp -@@ -3169,6 +3169,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, - if (TT.getArch() == llvm::Triple::UnknownArch || - !(TT.getArch() == llvm::Triple::aarch64 || - TT.getArch() == llvm::Triple::ppc || -+ TT.getArch() == llvm::Triple::ppcle || - TT.getArch() == llvm::Triple::ppc64 || - TT.getArch() == llvm::Triple::ppc64le || - TT.getArch() == llvm::Triple::nvptx || -diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp -index b00d2ff5..40f39654 100644 ---- a/lib/Sema/SemaChecking.cpp -+++ b/lib/Sema/SemaChecking.cpp -@@ -1425,6 +1425,7 @@ bool Sema::CheckTSBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, - case llvm::Triple::x86_64: - return CheckX86BuiltinFunctionCall(TI, BuiltinID, TheCall); - case llvm::Triple::ppc: -+ case llvm::Triple::ppcle: - case llvm::Triple::ppc64: - case llvm::Triple::ppc64le: - return CheckPPCBuiltinFunctionCall(TI, BuiltinID, TheCall); -diff --git a/test/CodeGen/altivec.c b/test/CodeGen/altivec.c -index a4d38fa2..7af963aa 100644 ---- a/test/CodeGen/altivec.c -+++ b/test/CodeGen/altivec.c -@@ -1,17 +1,22 @@ --// RUN: %clang_cc1 -target-feature +altivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s -+// RUN: %clang_cc1 -target-feature +altivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE -+// RUN: %clang_cc1 -target-feature +altivec -triple powerpcle-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-LE - - // Check initialization - - vector int test0 = (vector int)(1); // CHECK: @test0 = global <4 x i32> - vector float test1 = (vector float)(1.0); // CHECK: @test1 = global <4 x float> - --// CHECK: @v1 = global <16 x i8> -+// CHECK-BE: @v1 = global <16 x i8> -+// CHECK-LE: @v1 = global <16 x i8> - vector char v1 = (vector char)((vector int)(1, 2, 3, 4)); --// CHECK: @v2 = global <16 x i8> -+// CHECK-BE: @v2 = global <16 x i8> -+// CHECK-LE: @v2 = global <16 x i8> - vector char v2 = (vector char)((vector float)(1.0f, 2.0f, 3.0f, 4.0f)); --// CHECK: @v3 = global <16 x i8> -+// CHECK-BE: @v3 = global <16 x i8> -+// CHECK-LE: @v3 = global <16 x i8> - vector char v3 = (vector char)((vector int)('a', 'b', 'c', 'd')); --// CHECK: @v4 = global <4 x i32> -+// CHECK-BE: @v4 = global <4 x i32> -+// CHECK-LE: @v4 = global <4 x i32> - vector int v4 = (vector char){1, 2, 3, 4}; - - void test2() -diff --git a/test/CodeGen/builtins-ppc-altivec.c b/test/CodeGen/builtins-ppc-altivec.c -index 06f70a90..b29dc18a 100644 ---- a/test/CodeGen/builtins-ppc-altivec.c -+++ b/test/CodeGen/builtins-ppc-altivec.c -@@ -1,6 +1,8 @@ - // REQUIRES: powerpc-registered-target - // RUN: %clang_cc1 -target-feature +altivec -triple powerpc-unknown-unknown -emit-llvm %s \ - // RUN: -flax-vector-conversions=none -o - | FileCheck %s -+// RUN: %clang_cc1 -target-feature +altivec -triple powerpcle-unknown-unknown -emit-llvm %s \ -+// RUN: -flax-vector-conversions=none -o - | FileCheck %s -check-prefix=CHECK-LE - // RUN: %clang_cc1 -target-feature +altivec -triple powerpc64-unknown-unknown -emit-llvm %s \ - // RUN: -flax-vector-conversions=none -o - | FileCheck %s - // RUN: %clang_cc1 -target-feature +altivec -triple powerpc64le-unknown-unknown -emit-llvm %s \ -diff --git a/test/CodeGen/ppc32-and-aix-struct-return.c b/test/CodeGen/ppc32-and-aix-struct-return.c -index 1e0fb928..41418a20 100644 ---- a/test/CodeGen/ppc32-and-aix-struct-return.c -+++ b/test/CodeGen/ppc32-and-aix-struct-return.c -@@ -11,6 +11,12 @@ - // RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX - // RUN: %clang_cc1 -triple powerpc-unknown-linux -msvr4-struct-return \ - // RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4 -+// RUN: %clang_cc1 -triple powerpcle-unknown-linux \ -+// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX -+// RUN: %clang_cc1 -triple powerpcle-unknown-linux -maix-struct-return \ -+// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-AIX -+// RUN: %clang_cc1 -triple powerpcle-unknown-linux -msvr4-struct-return \ -+// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4 - // RUN: %clang_cc1 -triple powerpc-unknown-netbsd \ - // RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-SVR4 - // RUN: %clang_cc1 -triple powerpc-unknown-openbsd \ -diff --git a/test/CodeGen/target-data.c b/test/CodeGen/target-data.c -index 8c740119..239d0184 100644 ---- a/test/CodeGen/target-data.c -+++ b/test/CodeGen/target-data.c -@@ -122,6 +122,10 @@ - // RUN: FileCheck %s -check-prefix=PPC - // PPC: target datalayout = "E-m:e-p:32:32-i64:64-n32" - -+// RUN: %clang_cc1 -triple powerpcle-unknown -o - -emit-llvm %s | \ -+// RUN: FileCheck %s -check-prefix=PPCLE -+// PPCLE: target datalayout = "e-m:e-p:32:32-i64:64-n32" -+ - // RUN: %clang_cc1 -triple powerpc64-freebsd -o - -emit-llvm %s | \ - // RUN: FileCheck %s -check-prefix=PPC64-FREEBSD - // PPC64-FREEBSD: target datalayout = "E-m:e-i64:64-n32:64" -diff --git a/test/Driver/ppc-endian.c b/test/Driver/ppc-endian.c -index 4d8db389..00c1c25b 100644 ---- a/test/Driver/ppc-endian.c -+++ b/test/Driver/ppc-endian.c -@@ -1,9 +1,19 @@ --// RUN: %clang -target powerpc64le -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE %s --// RUN: %clang -target powerpc64le -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE %s --// RUN: %clang -target powerpc64 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE %s --// CHECK-LE: "-cc1"{{.*}} "-triple" "powerpc64le{{.*}}" -+// RUN: %clang -target powerpc-unknown -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE32 %s -+// RUN: %clang -target powerpc-unknown -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE32 %s -+// RUN: %clang -target powerpcle-unknown -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE32 %s -+// CHECK-BE32: "-cc1"{{.*}} "-triple" "powerpc-{{.*}}" - --// RUN: %clang -target powerpc64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE %s --// RUN: %clang -target powerpc64 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE %s --// RUN: %clang -target powerpc64le -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE %s --// CHECK-BE: "-cc1"{{.*}} "-triple" "powerpc64{{.*}}" -+// RUN: %clang -target powerpcle-unknown -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE32 %s -+// RUN: %clang -target powerpcle-unknown -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE32 %s -+// RUN: %clang -target powerpc-unknown -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE32 %s -+// CHECK-LE32: "-cc1"{{.*}} "-triple" "powerpcle-{{.*}}" -+ -+// RUN: %clang -target powerpc64-unknown -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE64 %s -+// RUN: %clang -target powerpc64-unknown -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE64 %s -+// RUN: %clang -target powerpc64le-unknown -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE64 %s -+// CHECK-BE64: "-cc1"{{.*}} "-triple" "powerpc64-{{.*}}" -+ -+// RUN: %clang -target powerpc64le-unknown -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE64 %s -+// RUN: %clang -target powerpc64le-unknown -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE64 %s -+// RUN: %clang -target powerpc64-unknown -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE64 %s -+// CHECK-LE64: "-cc1"{{.*}} "-triple" "powerpc64le-{{.*}}" --- -2.29.2 - diff --git a/srcpkgs/llvm11/files/patches/clang/clang-002-add-musl-triples.patch b/srcpkgs/llvm11/files/patches/clang/clang-002-add-musl-triples.patch deleted file mode 100644 index bb40f2312ad985..00000000000000 --- a/srcpkgs/llvm11/files/patches/clang/clang-002-add-musl-triples.patch +++ /dev/null @@ -1,100 +0,0 @@ ---- a/lib/Driver/ToolChains/Gnu.cpp -+++ b/lib/Driver/ToolChains/Gnu.cpp -@@ -1938,7 +1938,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", - "armv7hl-redhat-linux-gnueabi", - "armv6hl-suse-linux-gnueabi", -- "armv7hl-suse-linux-gnueabi"}; -+ "armv7hl-suse-linux-gnueabi", -+ "armv7l-linux-gnueabihf"}; - static const char *const ARMebLibDirs[] = {"/lib"}; - static const char *const ARMebTriples[] = {"armeb-linux-gnueabi", - "armeb-linux-androideabi"}; -@@ -2077,6 +2078,87 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( - return; - } - -+ if (TargetTriple.isMusl()) { -+ static const char *const AArch64MuslTriples[] = {"aarch64-linux-musl"}; -+ static const char *const ARMHFMuslTriples[] = { -+ "arm-linux-musleabihf", "armv7l-linux-musleabihf" -+ }; -+ static const char *const ARMMuslTriples[] = {"arm-linux-musleabi"}; -+ static const char *const X86_64MuslTriples[] = {"x86_64-linux-musl"}; -+ static const char *const X86MuslTriples[] = {"i686-linux-musl"}; -+ static const char *const MIPSMuslTriples[] = { -+ "mips-linux-musl", "mipsel-linux-musl", -+ "mipsel-linux-muslhf", "mips-linux-muslhf" -+ }; -+ static const char *const PPCMuslTriples[] = {"powerpc-linux-musl"}; -+ static const char *const PPCLEMuslTriples[] = {"powerpcle-linux-musl"}; -+ static const char *const PPC64MuslTriples[] = {"powerpc64-linux-musl"}; -+ static const char *const PPC64LEMuslTriples[] = {"powerpc64le-linux-musl"}; -+ -+ switch (TargetTriple.getArch()) { -+ case llvm::Triple::aarch64: -+ LibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs)); -+ TripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples)); -+ BiarchLibDirs.append(begin(AArch64LibDirs), end(AArch64LibDirs)); -+ BiarchTripleAliases.append(begin(AArch64MuslTriples), end(AArch64MuslTriples)); -+ break; -+ case llvm::Triple::arm: -+ LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs)); -+ if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) { -+ TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples)); -+ } else { -+ TripleAliases.append(begin(ARMMuslTriples), end(ARMMuslTriples)); -+ } -+ break; -+ case llvm::Triple::x86_64: -+ LibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs)); -+ TripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples)); -+ BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs)); -+ BiarchTripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples)); -+ break; -+ case llvm::Triple::x86: -+ LibDirs.append(begin(X86LibDirs), end(X86LibDirs)); -+ TripleAliases.append(begin(X86MuslTriples), end(X86MuslTriples)); -+ BiarchLibDirs.append(begin(X86_64LibDirs), end(X86_64LibDirs)); -+ BiarchTripleAliases.append(begin(X86_64MuslTriples), end(X86_64MuslTriples)); -+ break; -+ case llvm::Triple::mips: -+ LibDirs.append(begin(MIPSLibDirs), end(MIPSLibDirs)); -+ TripleAliases.append(begin(MIPSMuslTriples), end(MIPSMuslTriples)); -+ break; -+ case llvm::Triple::ppc: -+ LibDirs.append(begin(PPCLibDirs), end(PPCLibDirs)); -+ TripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples)); -+ BiarchLibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); -+ BiarchTripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples)); -+ break; -+ case llvm::Triple::ppcle: -+ LibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs)); -+ TripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples)); -+ BiarchLibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs)); -+ BiarchTripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples)); -+ break; -+ case llvm::Triple::ppc64: -+ LibDirs.append(begin(PPC64LibDirs), end(PPC64LibDirs)); -+ TripleAliases.append(begin(PPC64MuslTriples), end(PPC64MuslTriples)); -+ BiarchLibDirs.append(begin(PPCLibDirs), end(PPCLibDirs)); -+ BiarchTripleAliases.append(begin(PPCMuslTriples), end(PPCMuslTriples)); -+ break; -+ case llvm::Triple::ppc64le: -+ LibDirs.append(begin(PPC64LELibDirs), end(PPC64LELibDirs)); -+ TripleAliases.append(begin(PPC64LEMuslTriples), end(PPC64LEMuslTriples)); -+ BiarchLibDirs.append(begin(PPCLELibDirs), end(PPCLELibDirs)); -+ BiarchTripleAliases.append(begin(PPCLEMuslTriples), end(PPCLEMuslTriples)); -+ break; -+ default: -+ break; -+ } -+ TripleAliases.push_back(TargetTriple.str()); -+ if (TargetTriple.str() != BiarchTriple.str()) -+ BiarchTripleAliases.push_back(BiarchTriple.str()); -+ return; -+ } -+ - // Android targets should not use GNU/Linux tools or libraries. - if (TargetTriple.isAndroid()) { - static const char *const AArch64AndroidTriples[] = { diff --git a/srcpkgs/llvm11/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch b/srcpkgs/llvm11/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch deleted file mode 100644 index 4b9b0b891d5ddb..00000000000000 --- a/srcpkgs/llvm11/files/patches/clang/clang-003-ppc64-dynamic-linker-path.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/lib/Driver/ToolChains/Linux.cpp -+++ b/lib/Driver/ToolChains/Linux.cpp -@@ -593,12 +593,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { - Loader = "ld.so.1"; - break; - case llvm::Triple::ppc64: -- LibDir = "lib64"; -+ LibDir = "lib"; - Loader = -- (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; -+ (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; - break; - case llvm::Triple::ppc64le: -- LibDir = "lib64"; -+ LibDir = "lib"; - Loader = - (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; - break; diff --git a/srcpkgs/llvm11/files/patches/clang/clang-004-ppc64-musl-elfv2.patch b/srcpkgs/llvm11/files/patches/clang/clang-004-ppc64-musl-elfv2.patch deleted file mode 100644 index 2d6731d3b53bda..00000000000000 --- a/srcpkgs/llvm11/files/patches/clang/clang-004-ppc64-musl-elfv2.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/lib/Basic/Targets/PPC.h -+++ b/lib/Basic/Targets/PPC.h -@@ -408,11 +408,10 @@ - SuitableAlign = 64; - } else if ((Triple.getArch() == llvm::Triple::ppc64le)) { - resetDataLayout("e-m:e-i64:64-n32:64"); -- ABI = "elfv2"; - } else { - resetDataLayout("E-m:e-i64:64-n32:64"); -- ABI = "elfv1"; - } -+ ABI = "elfv2"; - - if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || - Triple.getOS() == llvm::Triple::AIX || Triple.isMusl()) { ---- a/lib/Driver/ToolChains/Clang.cpp -+++ b/lib/Driver/ToolChains/Clang.cpp -@@ -1883,11 +1883,7 @@ - ABIName = "elfv1-qpx"; - break; - } -- if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) || -- T.isOSOpenBSD() || T.isMusl()) -- ABIName = "elfv2"; -- else -- ABIName = "elfv1"; -+ ABIName = "elfv2"; - break; - } - case llvm::Triple::ppc64le: diff --git a/srcpkgs/llvm11/files/patches/compiler-rt/compiler-rt-armv5.patch b/srcpkgs/llvm11/files/patches/compiler-rt/compiler-rt-armv5.patch deleted file mode 100644 index 893dd244c5b2b3..00000000000000 --- a/srcpkgs/llvm11/files/patches/compiler-rt/compiler-rt-armv5.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt -+++ compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt -@@ -428,8 +428,6 @@ - ) - set(arm_Thumb1_SOURCES - ${arm_Thumb1_JT_SOURCES} -- ${arm_Thumb1_SjLj_EH_SOURCES} -- ${arm_Thumb1_VFPv2_SOURCES} - ${arm_Thumb1_icache_SOURCES} - ) - diff --git a/srcpkgs/llvm11/files/patches/lld/lld-001-ppcle.patch b/srcpkgs/llvm11/files/patches/lld/lld-001-ppcle.patch deleted file mode 100644 index 96479cdf39a331..00000000000000 --- a/srcpkgs/llvm11/files/patches/lld/lld-001-ppcle.patch +++ /dev/null @@ -1,313 +0,0 @@ -From c6347af7952635e21aaeca27c5ae6d81e29d9dbc Mon Sep 17 00:00:00 2001 -From: Daniel Kolesa -Date: Thu, 17 Dec 2020 03:20:31 +0100 -Subject: [PATCH] ppcle support - -based on https://reviews.llvm.org/D92445 ---- - ELF/Driver.cpp | 1 + - ELF/InputFiles.cpp | 1 + - ELF/ScriptParser.cpp | 1 + - test/ELF/emulation-ppc.s | 190 +++++++++++++++---------------------- - test/ELF/ppc32-gnu-ifunc.s | 6 ++ - test/ELF/ppc32-reloc-rel.s | 8 +- - 6 files changed, 91 insertions(+), 116 deletions(-) - -diff --git a/ELF/Driver.cpp b/ELF/Driver.cpp -index 4637a3b..d81b67c 100644 ---- a/ELF/Driver.cpp -+++ b/ELF/Driver.cpp -@@ -142,6 +142,7 @@ static std::tuple parseEmulation(StringRef emul) { - .Cases("elf32ltsmip", "elf32ltsmipn32", {ELF32LEKind, EM_MIPS}) - .Case("elf32lriscv", {ELF32LEKind, EM_RISCV}) - .Cases("elf32ppc", "elf32ppclinux", {ELF32BEKind, EM_PPC}) -+ .Cases("elf32lppc", "elf32lppclinux", {ELF32LEKind, EM_PPC}) - .Case("elf64btsmip", {ELF64BEKind, EM_MIPS}) - .Case("elf64ltsmip", {ELF64LEKind, EM_MIPS}) - .Case("elf64lriscv", {ELF64LEKind, EM_RISCV}) -diff --git a/ELF/InputFiles.cpp b/ELF/InputFiles.cpp -index c2f1830..f83f028 100644 ---- a/ELF/InputFiles.cpp -+++ b/ELF/InputFiles.cpp -@@ -1514,6 +1514,7 @@ static uint8_t getBitcodeMachineKind(StringRef path, const Triple &t) { - case Triple::msp430: - return EM_MSP430; - case Triple::ppc: -+ case Triple::ppcle: - return EM_PPC; - case Triple::ppc64: - case Triple::ppc64le: -diff --git a/ELF/ScriptParser.cpp b/ELF/ScriptParser.cpp -index fea6b7a..99b3e15 100644 ---- a/ELF/ScriptParser.cpp -+++ b/ELF/ScriptParser.cpp -@@ -410,6 +410,7 @@ static std::pair parseBfdName(StringRef s) { - .Case("elf64-aarch64", {ELF64LEKind, EM_AARCH64}) - .Case("elf64-littleaarch64", {ELF64LEKind, EM_AARCH64}) - .Case("elf32-powerpc", {ELF32BEKind, EM_PPC}) -+ .Case("elf32-powerpcle", {ELF32LEKind, EM_PPC}) - .Case("elf64-powerpc", {ELF64BEKind, EM_PPC64}) - .Case("elf64-powerpcle", {ELF64LEKind, EM_PPC64}) - .Case("elf64-x86-64", {ELF64LEKind, EM_X86_64}) -diff --git a/test/ELF/emulation-ppc.s b/test/ELF/emulation-ppc.s -index def78a5..004eb23 100644 ---- a/test/ELF/emulation-ppc.s -+++ b/test/ELF/emulation-ppc.s -@@ -1,144 +1,106 @@ - # REQUIRES: ppc - # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %tppc64 - # RUN: ld.lld -m elf64ppc %tppc64 -o %t2ppc64 --# RUN: llvm-readobj --file-headers %t2ppc64 | FileCheck --check-prefix=PPC64 %s -+# RUN: llvm-readobj --file-headers %t2ppc64 | FileCheck --check-prefixes=CHECK,PPC64,LINUX,PPCBE %s - # RUN: ld.lld %tppc64 -o %t3ppc64 --# RUN: llvm-readobj --file-headers %t3ppc64 | FileCheck --check-prefix=PPC64 %s -+# RUN: llvm-readobj --file-headers %t3ppc64 | FileCheck --check-prefixes=CHECK,PPC64,LINUX,PPCBE %s - # RUN: echo 'OUTPUT_FORMAT(elf64-powerpc)' > %tppc64.script - # RUN: ld.lld %tppc64.script %tppc64 -o %t4ppc64 --# RUN: llvm-readobj --file-headers %t4ppc64 | FileCheck --check-prefix=PPC64 %s -- --# PPC64: ElfHeader { --# PPC64-NEXT: Ident { --# PPC64-NEXT: Magic: (7F 45 4C 46) --# PPC64-NEXT: Class: 64-bit (0x2) --# PPC64-NEXT: DataEncoding: BigEndian (0x2) --# PPC64-NEXT: FileVersion: 1 --# PPC64-NEXT: OS/ABI: SystemV (0x0) --# PPC64-NEXT: ABIVersion: 0 --# PPC64-NEXT: Unused: (00 00 00 00 00 00 00) --# PPC64-NEXT: } --# PPC64-NEXT: Type: Executable (0x2) --# PPC64-NEXT: Machine: EM_PPC64 (0x15) --# PPC64-NEXT: Version: 1 --# PPC64-NEXT: Entry: --# PPC64-NEXT: ProgramHeaderOffset: 0x40 --# PPC64-NEXT: SectionHeaderOffset: --# PPC64-NEXT: Flags [ (0x2) --# PPC64-NEXT: 0x2 --# PPC64-NEXT: ] --# PPC64-NEXT: HeaderSize: 64 --# PPC64-NEXT: ProgramHeaderEntrySize: 56 --# PPC64-NEXT: ProgramHeaderCount: --# PPC64-NEXT: SectionHeaderEntrySize: 64 --# PPC64-NEXT: SectionHeaderCount: --# PPC64-NEXT: StringTableSectionIndex: --# PPC64-NEXT: } -- --# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-freebsd %s -o %tppc64fbsd --# RUN: echo 'OUTPUT_FORMAT(elf64-powerpc-freebsd)' > %tppc64fbsd.script --# RUN: ld.lld %tppc64fbsd.script %tppc64fbsd -o %t2ppc64fbsd --# RUN: llvm-readobj --file-headers %t2ppc64fbsd | FileCheck --check-prefix=PPC64-FBSD %s -- --# PPC64-FBSD: ElfHeader { --# PPC64-FBSD-NEXT: Ident { --# PPC64-FBSD-NEXT: Magic: (7F 45 4C 46) --# PPC64-FBSD-NEXT: Class: 64-bit (0x2) --# PPC64-FBSD-NEXT: DataEncoding: BigEndian (0x2) --# PPC64-FBSD-NEXT: FileVersion: 1 --# PPC64-FBSD-NEXT: OS/ABI: FreeBSD (0x9) --# PPC64-FBSD-NEXT: ABIVersion: 0 --# PPC64-FBSD-NEXT: Unused: (00 00 00 00 00 00 00) --# PPC64-FBSD-NEXT: } --# PPC64-FBSD-NEXT: Type: Executable (0x2) --# PPC64-FBSD-NEXT: Machine: EM_PPC64 (0x15) --# PPC64-FBSD-NEXT: Version: 1 --# PPC64-FBSD-NEXT: Entry: --# PPC64-FBSD-NEXT: ProgramHeaderOffset: 0x40 --# PPC64-FBSD-NEXT: SectionHeaderOffset: --# PPC64-FBSD-NEXT: Flags [ (0x2) --# PPC64-FBSD-NEXT: 0x2 --# PPC64-FBSD-NEXT: ] --# PPC64-FBSD-NEXT: HeaderSize: 64 --# PPC64-FBSD-NEXT: ProgramHeaderEntrySize: 56 --# PPC64-FBSD-NEXT: ProgramHeaderCount: --# PPC64-FBSD-NEXT: SectionHeaderEntrySize: 64 --# PPC64-FBSD-NEXT: SectionHeaderCount: --# PPC64-FBSD-NEXT: StringTableSectionIndex: --# PPC64-FBSD-NEXT: } -+# RUN: llvm-readobj --file-headers %t4ppc64 | FileCheck --check-prefixes=CHECK,PPC64,LINUX,PPCBE %s - - # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %tppc64le - # RUN: ld.lld -m elf64lppc %tppc64le -o %t2ppc64le --# RUN: llvm-readobj --file-headers %t2ppc64le | FileCheck --check-prefix=PPC64LE %s -+# RUN: llvm-readobj --file-headers %t2ppc64le | FileCheck --check-prefixes=CHECK,PPC64,LINUX,PPCLE %s - # RUN: ld.lld %tppc64le -o %t3ppc64le --# RUN: llvm-readobj --file-headers %t3ppc64le | FileCheck --check-prefix=PPC64LE %s -+# RUN: llvm-readobj --file-headers %t3ppc64le | FileCheck --check-prefixes=CHECK,PPC64,LINUX,PPCLE %s - # RUN: echo 'OUTPUT_FORMAT(elf64-powerpcle)' > %tppc64le.script - # RUN: ld.lld %tppc64le.script %tppc64le -o %t4ppc64le --# RUN: llvm-readobj --file-headers %t4ppc64le | FileCheck --check-prefix=PPC64LE %s -- --# PPC64LE: ElfHeader { --# PPC64LE-NEXT: Ident { --# PPC64LE-NEXT: Magic: (7F 45 4C 46) --# PPC64LE-NEXT: Class: 64-bit (0x2) --# PPC64LE-NEXT: DataEncoding: LittleEndian (0x1) --# PPC64LE-NEXT: FileVersion: 1 --# PPC64LE-NEXT: OS/ABI: SystemV (0x0) --# PPC64LE-NEXT: ABIVersion: 0 --# PPC64LE-NEXT: Unused: (00 00 00 00 00 00 00) --# PPC64LE-NEXT: } --# PPC64LE-NEXT: Type: Executable (0x2) --# PPC64LE-NEXT: Machine: EM_PPC64 (0x15) --# PPC64LE-NEXT: Version: 1 --# PPC64LE-NEXT: Entry: --# PPC64LE-NEXT: ProgramHeaderOffset: 0x40 --# PPC64LE-NEXT: SectionHeaderOffset: --# PPC64LE-NEXT: Flags [ (0x2) --# PPC64LE-NEXT: 0x2 --# PPC64LE-NEXT: ] --# PPC64LE-NEXT: HeaderSize: 64 --# PPC64LE-NEXT: ProgramHeaderEntrySize: 56 --# PPC64LE-NEXT: ProgramHeaderCount: --# PPC64LE-NEXT: SectionHeaderEntrySize: 64 --# PPC64LE-NEXT: SectionHeaderCount: --# PPC64LE-NEXT: StringTableSectionIndex: --# PPC64LE-NEXT: } -+# RUN: llvm-readobj --file-headers %t4ppc64le | FileCheck --check-prefixes=CHECK,PPC64,LINUX,PPCLE %s - - # RUN: llvm-mc -filetype=obj -triple=powerpc-unknown-linux %s -o %tppc32 - # RUN: ld.lld -m elf32ppc %tppc32 -o %t2ppc32 --# RUN: llvm-readobj --file-headers %t2ppc32 | FileCheck --check-prefix=PPC32 %s -+# RUN: llvm-readobj --file-headers %t2ppc32 | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCBE %s - # RUN: ld.lld %tppc32 -o %t3ppc32 --# RUN: llvm-readobj --file-headers %t3ppc32 | FileCheck --check-prefix=PPC32 %s -+# RUN: llvm-readobj --file-headers %t3ppc32 | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCBE %s - # RUN: echo 'OUTPUT_FORMAT(elf32-powerpc)' > %tppc32.script - # RUN: ld.lld %tppc32.script %tppc32 -o %t4ppc32 --# RUN: llvm-readobj --file-headers %t4ppc32 | FileCheck --check-prefix=PPC32 %s -+# RUN: llvm-readobj --file-headers %t4ppc32 | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCBE %s - # RUN: ld.lld -m elf32ppclinux %tppc32 -o %t5ppc32 --# RUN: llvm-readobj --file-headers %t5ppc32 | FileCheck --check-prefix=PPC32 %s -+# RUN: llvm-readobj --file-headers %t5ppc32 | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCBE %s -+ -+# RUN: llvm-mc -filetype=obj -triple=powerpcle-unknown-linux %s -o %tppc32le -+# RUN: ld.lld -m elf32lppc %tppc32le -o %t2ppc32le -+# RUN: llvm-readobj --file-headers %t2ppc32le | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCLE %s -+# RUN: ld.lld %tppc32le -o %t3ppc32le -+# RUN: llvm-readobj --file-headers %t3ppc32le | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCLE %s -+# RUN: echo 'OUTPUT_FORMAT(elf32-powerpcle)' > %tppc32le.script -+# RUN: ld.lld %tppc32le.script %tppc32le -o %t4ppc32le -+# RUN: llvm-readobj --file-headers %t4ppc32le | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCLE %s -+# RUN: ld.lld -m elf32lppclinux %tppc32le -o %t5ppc32le -+# RUN: llvm-readobj --file-headers %t5ppc32le | FileCheck --check-prefixes=CHECK,PPC32,LINUX,PPCLE %s -+ -+# RUN: llvm-mc -filetype=obj -triple=powerpc-unknown-freebsd %s -o %tppc32fbsd -+# RUN: echo 'OUTPUT_FORMAT(elf32-powerpc-freebsd)' > %tppc32fbsd.script -+# RUN: ld.lld %tppc32fbsd.script %tppc32fbsd -o %t2ppc32fbsd -+# RUN: llvm-readobj --file-headers %t2ppc32fbsd | FileCheck --check-prefixes=CHECK,PPC32,FBSD,PPCBE %s -+ -+# RUN: llvm-mc -filetype=obj -triple=powerpcle-unknown-freebsd %s -o %tppc32fbsdle -+# RUN: echo 'OUTPUT_FORMAT(elf32-powerpcle-freebsd)' > %tppc32fbsdle.script -+# RUN: ld.lld %tppc32fbsdle.script %tppc32fbsdle -o %t2ppc32fbsdle -+# RUN: llvm-readobj --file-headers %t2ppc32fbsdle | FileCheck --check-prefixes=CHECK,PPC32,FBSD,PPCLE %s -+ -+# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-freebsd %s -o %tppc64fbsd -+# RUN: echo 'OUTPUT_FORMAT(elf64-powerpc-freebsd)' > %tppc64fbsd.script -+# RUN: ld.lld %tppc64fbsd.script %tppc64fbsd -o %t2ppc64fbsd -+# RUN: llvm-readobj --file-headers %t2ppc64fbsd | FileCheck --check-prefixes=CHECK,PPC64,FBSD,PPCBE %s -+ -+# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-freebsd %s -o %tppc64fbsdle -+# RUN: echo 'OUTPUT_FORMAT(elf64-powerpcle-freebsd)' > %tppc64fbsdle.script -+# RUN: ld.lld %tppc64fbsdle.script %tppc64fbsdle -o %t2ppc64fbsdle -+# RUN: llvm-readobj --file-headers %t2ppc64fbsdle | FileCheck --check-prefixes=CHECK,PPC64,FBSD,PPCLE %s - --# PPC32: ElfHeader { --# PPC32-NEXT: Ident { --# PPC32-NEXT: Magic: (7F 45 4C 46) -+# CHECK: ElfHeader { -+# CHECK-NEXT: Ident { -+# CHECK-NEXT: Magic: (7F 45 4C 46) -+ -+# PPC64-NEXT: Class: 64-bit (0x2) - # PPC32-NEXT: Class: 32-bit (0x1) --# PPC32-NEXT: DataEncoding: BigEndian (0x2) --# PPC32-NEXT: FileVersion: 1 --# PPC32-NEXT: OS/ABI: SystemV (0x0) --# PPC32-NEXT: ABIVersion: 0 --# PPC32-NEXT: Unused: (00 00 00 00 00 00 00) --# PPC32-NEXT: } --# PPC32-NEXT: Type: Executable (0x2) -+ -+# PPCBE-NEXT: DataEncoding: BigEndian (0x2) -+# PPCLE-NEXT: DataEncoding: LittleEndian (0x1) -+ -+# CHECK-NEXT: FileVersion: 1 -+ -+# LINUX-NEXT: OS/ABI: SystemV (0x0) -+# FBSD-NEXT: OS/ABI: FreeBSD (0x9) -+ -+# CHECK-NEXT: ABIVersion: 0 -+# CHECK-NEXT: Unused: (00 00 00 00 00 00 00) -+# CHECK-NEXT: } -+# CHECK-NEXT: Type: Executable (0x2) -+ -+# PPC64-NEXT: Machine: EM_PPC64 (0x15) - # PPC32-NEXT: Machine: EM_PPC (0x14) --# PPC32-NEXT: Version: 1 --# PPC32-NEXT: Entry: -+ -+# CHECK-NEXT: Version: 1 -+# CHECK-NEXT: Entry: -+# PPC64-NEXT: ProgramHeaderOffset: 0x40 - # PPC32-NEXT: ProgramHeaderOffset: 0x34 --# PPC32-NEXT: SectionHeaderOffset: -+# CHECK-NEXT: SectionHeaderOffset: -+# PPC64-NEXT: Flags [ (0x2) - # PPC32-NEXT: Flags [ (0x0) --# PPC32-NEXT: ] -+# PPC64-NEXT: 0x2 -+# CHECK-NEXT: ] -+# PPC64-NEXT: HeaderSize: 64 - # PPC32-NEXT: HeaderSize: 52 -+# PPC64-NEXT: ProgramHeaderEntrySize: 56 - # PPC32-NEXT: ProgramHeaderEntrySize: 32 --# PPC32-NEXT: ProgramHeaderCount: -+# CHECK-NEXT: ProgramHeaderCount: -+# PPC64-NEXT: SectionHeaderEntrySize: 64 - # PPC32-NEXT: SectionHeaderEntrySize: 40 --# PPC32-NEXT: SectionHeaderCount: --# PPC32-NEXT: StringTableSectionIndex: --# PPC32-NEXT: } -+# CHECK-NEXT: SectionHeaderCount: -+# CHECK-NEXT: StringTableSectionIndex: -+# CHECK-NEXT: } - - .globl _start - _start: -diff --git a/test/ELF/ppc32-gnu-ifunc.s b/test/ELF/ppc32-gnu-ifunc.s -index b85b9eb..66efd5e 100644 ---- a/test/ELF/ppc32-gnu-ifunc.s -+++ b/test/ELF/ppc32-gnu-ifunc.s -@@ -5,6 +5,12 @@ - # RUN: llvm-readelf -S -s %t | FileCheck --check-prefixes=SEC,SYM %s - # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s - -+# RUN: llvm-mc -filetype=obj -triple=powerpcle %s -o %t.o -+# RUN: ld.lld %t.o -o %t -+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s -+# RUN: llvm-readelf -S -s %t | FileCheck --check-prefixes=SEC,SYM %s -+# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s -+ - # RELOC: .rela.dyn { - # RELOC-NEXT: 0x10020118 R_PPC_IRELATIVE - 0x100100E0 - # RELOC-NEXT: } -diff --git a/test/ELF/ppc32-reloc-rel.s b/test/ELF/ppc32-reloc-rel.s -index fefeeba..29501fd 100644 ---- a/test/ELF/ppc32-reloc-rel.s -+++ b/test/ELF/ppc32-reloc-rel.s -@@ -1,6 +1,10 @@ - # REQUIRES: ppc --# RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o --# RUN: ld.lld %t.o -o %t -+# RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.be.o -+# RUN: ld.lld %t.be.o -o %t -+# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s -+ -+# RUN: llvm-mc -filetype=obj -triple=powerpcle %s -o %t.le.o -+# RUN: ld.lld %t.le.o -o %t - # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s - - .section .R_PPC_REL14,"ax",@progbits --- -2.29.2 - diff --git a/srcpkgs/llvm11/files/patches/lldb/musl.patch b/srcpkgs/llvm11/files/patches/lldb/musl.patch deleted file mode 100644 index 37416bb478dfe3..00000000000000 --- a/srcpkgs/llvm11/files/patches/lldb/musl.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/source/Plugins/Process/Linux/Procfs.h -+++ b/source/Plugins/Process/Linux/Procfs.h -@@ -10,21 +10,12 @@ - // sys/procfs.h on Android/Linux for all supported architectures. - - #include -+#include - --#ifdef __ANDROID__ --#if defined(__arm64__) || defined(__aarch64__) --typedef unsigned long elf_greg_t; --typedef elf_greg_t -- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; --typedef struct user_fpsimd_state elf_fpregset_t; --#ifndef NT_FPREGSET --#define NT_FPREGSET NT_PRFPREG --#endif // NT_FPREGSET --#elif defined(__mips__) --#ifndef NT_FPREGSET --#define NT_FPREGSET NT_PRFPREG --#endif // NT_FPREGSET --#endif --#else // __ANDROID__ -+#if !defined(__GLIBC__) && defined(__powerpc__) -+#define pt_regs musl_pt_regs -+#include -+#undef pt_regs -+#else - #include --#endif // __ANDROID__ -+#endif diff --git a/srcpkgs/llvm11/template b/srcpkgs/llvm11/template index 12ecb4bdc4c4be..6204f1e8e3695f 100644 --- a/srcpkgs/llvm11/template +++ b/srcpkgs/llvm11/template @@ -21,40 +21,12 @@ maintainer="q66 " license="NCSA" homepage="https://www.llvm.org" distfiles=" - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/lldb-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/lld-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-tools-extra-${version}.src.tar.xz - https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/compiler-rt-${version}.src.tar.xz" + https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz" checksum=" - 913f68c898dfb4a03b397c5e11c6a2f39d0f22ed7665c9cefa87a34423a72469 - 8570c09f57399e21e0eea0dcd66ae0231d47eafc7a04d6fe5c4951b13c4d2c72 - efe7be4a7b7cdc6f3bcf222827c6f837439e6e656d12d6c885d5c8a80ff4fd1c - 0f96acace1e8326b39f220ba19e055ba99b0ab21c2475042dbc6a482649c5209 - fed318f75d560d0e0ae728e2fb8abce71e9d0c60dd120c9baac118522ce76c09 - 374aff82ff573a449f9aabbd330a5d0a441181c535a3599996127378112db234" + 913f68c898dfb4a03b397c5e11c6a2f39d0f22ed7665c9cefa87a34423a72469" lib32disabled=yes python_version=3 -_lldb_enable=yes - -if [ "$CROSS_BUILD" ]; then - _lldb_enable=no -fi - -case "$XBPS_TARGET_MACHINE" in - ppc64le*) ;; - ppc*) _lldb_enable=no ;; -esac - -subpackages="clang-tools-extra clang clang-analyzer libclang libclang-cpp libllvm11" -if [ "$_lldb_enable" = "yes" ]; then - # XXX fails to cross compile due to python - subpackages+=" lldb lldb-devel" -fi -subpackages+=" lld lld-devel" - post_patch() { # patches cd ${XBPS_BUILDDIR}/llvm-${version}.src @@ -63,70 +35,6 @@ post_patch() { patch -sNp1 -i ${i} done - cd ${XBPS_BUILDDIR}/clang-${version}.src - for i in ${FILESDIR}/patches/clang/clang-*.patch; do - msg_normal "Applying $i to clang\n" - patch -sNp1 -i ${i} - done - - cd ${XBPS_BUILDDIR}/lld-${version}.src - for i in ${FILESDIR}/patches/lld/lld-*.patch; do - msg_normal "Applying $i to lld\n" - patch -sNp1 -i ${i} - done - - case "$XBPS_TARGET_MACHINE" in - armv5*) - cd ${XBPS_BUILDDIR}/compiler-rt-${version}.src - for i in ${FILESDIR}/patches/compiler-rt/compiler-rt-*.patch; do - msg_normal "Applying $i to compiler-rt\n" - patch -sNp1 -i ${i} - done - ;; - esac - - if [ "$_lldb_enable" = "yes" ]; then - cd ${XBPS_BUILDDIR}/lldb-${version}.src - for i in ${FILESDIR}/patches/lldb/*.patch; do - msg_normal "Applying $i to lldb\n" - patch -sNp1 -i ${i} - done - case "$XBPS_TARGET_MACHINE" in - *-musl) sed -i 's|__ptrace_request|int|g' source/Plugins/Process/Linux/NativeProcessLinux.cpp ;; - esac - fi - - # Move clang files into the llvm source. - if [ -d ${XBPS_BUILDDIR}/clang-${version}.src ]; then - mv ${XBPS_BUILDDIR}/clang-${version}.src ${wrksrc}/tools/clang - fi - # Move clang-tools-extra files into llvm source. - if [ -d ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ]; then - mv ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ${wrksrc}/tools/clang/tools/extra - fi - # Move lld files into the llvm source. - if [ -d ${XBPS_BUILDDIR}/lld-${version}.src ]; then - mv ${XBPS_BUILDDIR}/lld-${version}.src ${wrksrc}/tools/lld - fi - # Move lldb files into the llvm source. - if [ -d ${XBPS_BUILDDIR}/lldb-${version}.src ]; then - if [ "$_lldb_enable" = "yes" ]; then - mv ${XBPS_BUILDDIR}/lldb-${version}.src ${wrksrc}/tools/lldb - else - rm -rf ${XBPS_BUILDDIR}/lldb-${version}.src - fi - fi - # Move compiler-rt files into the llvm source. - if [ -d ${XBPS_BUILDDIR}/compiler-rt-${version}.src ]; then - mv ${XBPS_BUILDDIR}/compiler-rt-${version}.src ${wrksrc}/projects/compiler-rt - fi - case "$XBPS_TARGET_MACHINE" in - *-musl) - # Disable sanitizers - sed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' ${wrksrc}/projects/compiler-rt/cmake/config-ix.cmake - ;; - esac - # update config.guess for better platform detection cp $XBPS_COMMONDIR/environment/configure/automake/config.guess ${wrksrc}/cmake } @@ -151,9 +59,7 @@ pre_configure() { CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \ cmake ../.. -DCMAKE_BUILD_TYPE=Release make ${makejobs} -C utils/TableGen - make ${makejobs} -C tools/clang/utils/TableGen configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/build/HOST/bin/llvm-tblgen" - configure_args+=" -DCLANG_TABLEGEN=${wrksrc}/build/HOST/bin/clang-tblgen" cd ../.. fi @@ -196,123 +102,6 @@ do_install() { fi } -clang-analyzer_package() { - pycompile_dirs="usr/share/scan-view" - depends="clang-${version}_${revision} python3" - short_desc+=" - A source code analysis framework" - homepage="https://clang-analyzer.llvm.org/" - pkg_install() { - vmove usr/share/man/man1/scan-build.1 - vmove "/usr/bin/scan-*" - vmove "/usr/share/scan-*" - vmove "/usr/libexec/*analyzer" - } -} - -clang-tools-extra_package() { - lib32disabled=yes - depends="clang-${version}_${revision} python3" - short_desc+=" - Extra Clang tools" - homepage="https://clang.llvm.org/extra/" - pkg_install() { - vmove usr/include/clang-tidy - vmove usr/bin/clang-apply-replacements - vmove usr/bin/clang-query - vmove usr/bin/clang-rename - vmove usr/bin/clang-tidy - vmove usr/bin/diagtool - vmove usr/bin/find-all-symbols - vmove usr/bin/hmaptool - vmove usr/bin/modularize - vmove usr/bin/pp-trace - vmove usr/bin/sancov - vmove "usr/lib/libclangApplyReplacements*" - vmove "usr/lib/libclangQuery*" - vmove "usr/lib/libclangTidy*" - vmove "usr/share/clang/*tidy*" - } -} - -clang_package() { - lib32disabled=yes - depends="libstdc++-devel libgcc-devel binutils ${XBPS_TARGET_LIBC}-devel - libclang-${version}_${revision}" - short_desc+=" - C language family frontend" - homepage="https://clang.llvm.org/" - pkg_install() { - vmove usr/include/clang - vmove usr/include/clang-c - vmove "usr/bin/*clang*" - vmove usr/bin/c-index-test - vmove usr/lib/clang - vmove usr/lib/cmake/clang - vmove "usr/lib/libclang*.a" - vmove "usr/lib/libclang*.so" - vmove "usr/share/clang" - } -} - -libclang_package() { - short_desc+=" - C frontend runtime library" - pkg_install() { - vmove "usr/lib/libclang.so.*" - } -} - -libclang-cpp_package() { - short_desc+=" - C frontend runtime library (C++ interface)" - pkg_install() { - vmove "usr/lib/libclang-cpp.so.*" - } -} - -lld_package() { - lib32disabled=yes - short_desc+=" - linker" - homepage="https://lld.llvm.org" - pkg_install() { - vmove usr/bin/lld* - vmove usr/bin/wasm-ld - vmove usr/bin/ld.lld* - vmove usr/bin/ld64.lld* - } -} - -lld-devel_package() { - lib32disabled=yes - short_desc+=" - linker - development files" - homepage="https://lld.llvm.org" - pkg_install() { - vmove usr/include/lld - vmove usr/lib/cmake/lld - vmove "usr/lib/liblld*a" - } -} - -lldb_package() { - lib32disabled=yes - depends+=" python3-six" - short_desc+=" - LLDB debugger" - homepage="https://lldb.llvm.org/" - pkg_install() { - vmove usr/bin/*lldb* - vmove usr/lib/liblldb*so.* - vmove /usr/lib/python* - # Depend on python3-six instead of conflicting - rm ${PKGDESTDIR}/usr/lib/python3*/site-packages/six.py - } -} - -lldb-devel_package() { - lib32disabled=yes - depends="lldb>=${version}_${revision}" - short_desc+=" - LLDB debugger - development files" - pkg_install() { - vmove usr/include/lldb - vmove "usr/lib/liblldb*.so" - } -} - libllvm11_package() { short_desc+=" - runtime library" pkg_install() { From 005960e6e5ce374143eabeeecd54e84d64347c4a Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 22:33:45 +0200 Subject: [PATCH 108/355] New package: SPIRV-LLVM-Translator-12.0.0 --- srcpkgs/SPIRV-LLVM-Translator-devel | 1 + srcpkgs/SPIRV-LLVM-Translator/template | 32 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 120000 srcpkgs/SPIRV-LLVM-Translator-devel create mode 100644 srcpkgs/SPIRV-LLVM-Translator/template diff --git a/srcpkgs/SPIRV-LLVM-Translator-devel b/srcpkgs/SPIRV-LLVM-Translator-devel new file mode 120000 index 00000000000000..170ae65aedae7b --- /dev/null +++ b/srcpkgs/SPIRV-LLVM-Translator-devel @@ -0,0 +1 @@ +SPIRV-LLVM-Translator \ No newline at end of file diff --git a/srcpkgs/SPIRV-LLVM-Translator/template b/srcpkgs/SPIRV-LLVM-Translator/template new file mode 100644 index 00000000000000..2504cabed367ad --- /dev/null +++ b/srcpkgs/SPIRV-LLVM-Translator/template @@ -0,0 +1,32 @@ +# Template file for 'SPIRV-LLVM-Translator' +pkgname=SPIRV-LLVM-Translator +version=12.0.0 +revision=1 +build_style=cmake +make_build_args="llvm-spirv" +configure_args="-Wno-dev -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_SKIP_RPATH=ON + -DLLVM_SPIRV_INCLUDE_TESTS=OFF -DBUILD_SHARED_LIBS=ON" +hostmakedepends="clang clang-tools-extra llvm" +makedepends="llvm" +short_desc="API and commands for processing SPIR-V modules" +maintainer="Orphaned " +license="NCSA" +homepage="https://github.com/KhronosGroup/SPIRV-LLVM-Translator" +distfiles="https://github.com/KhronosGroup/${pkgname}/archive/refs/tags/v${version}.tar.gz" +checksum=6e4fad04203f25fcde4c308c53e9f59bd05a390978992db3212d4b63aff62108 +make_check=no + +post_install() { + vlicense LICENSE.TXT + vbin ${wrksrc}/${cmake_builddir}/tools/llvm-spirv/llvm-spirv +} + +SPIRV-LLVM-Translator-devel_package() { + depends="SPIRV-LLVM-Translator-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +} From e5bba606460f2ab8a54026e25a52fbd6acf12063 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 22:35:30 +0200 Subject: [PATCH 109/355] libclc: update to 12.0.0 --- srcpkgs/libclc/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/libclc/template b/srcpkgs/libclc/template index b73aac741dc083..0644a1be661ea6 100644 --- a/srcpkgs/libclc/template +++ b/srcpkgs/libclc/template @@ -1,18 +1,18 @@ # Template file for 'libclc' pkgname=libclc -version=11.0.0 +version=12.0.0 revision=1 wrksrc="${pkgname}-${version}.src" build_style=cmake configure_args="-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release" hostmakedepends="cmake clang llvm python3 libedit-devel libffi-devel - ncurses-devel zlib-devel" + ncurses-devel zlib-devel SPIRV-LLVM-Translator" short_desc="Open implementation of the OpenCL C programming language" maintainer="Orphaned " license="BSD-3-Clause, MIT" homepage="https://libclc.llvm.org" distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/libclc-${version}.src.tar.xz" -checksum=5a0a2f67b85ede09b2f08c071c5b0b6b5ad56bfb00b39a22c369afcc613c42ee +checksum=6b777ee2cd57da1b122f76c208463f620eef508f4128210c6b1a96bfb75c74dc replaces="libclc-git>=0" do_configure() { From 6cd83333a2831f76d7a25cf15a5867c865bc45bf Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 04:59:56 +0200 Subject: [PATCH 110/355] mesa: rebuild for llvm12 --- ...b2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch | 87 +++++++++++++++++++ ...cd957879ff642cfd921dda6e8b04dd35fec4.patch | 25 ++++++ srcpkgs/mesa/template | 2 +- 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/mesa/patches/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch create mode 100644 srcpkgs/mesa/patches/f0dccd957879ff642cfd921dda6e8b04dd35fec4.patch diff --git a/srcpkgs/mesa/patches/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch b/srcpkgs/mesa/patches/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch new file mode 100644 index 00000000000000..0b1e5fdc0435d5 --- /dev/null +++ b/srcpkgs/mesa/patches/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch @@ -0,0 +1,87 @@ +From d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Wed, 24 Feb 2021 12:44:41 +0100 +Subject: [PATCH] clover: Fix build with llvm-12. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix build error after LLVM commit c495dfe0268b ("[clang][cli] NFC: +Decrease the scope of ParseLangArgs parameters"). + +../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector >&, std::string&)’: +../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector >&’ + 252 | c->getPreprocessorOpts(), + | ~~~~~~~~~~~~~~~~~~~~~~^~ + | | + | clang::PreprocessorOptions + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114 +Signed-off-by: Karol Herbst +Reviewed-by: Francisco Jerez +Part-of: +--- + src/gallium/frontends/clover/llvm/compat.hpp | 22 +++++++++++++++---- + .../frontends/clover/llvm/invocation.cpp | 5 ++--- + 2 files changed, 20 insertions(+), 7 deletions(-) + +diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp +index 78eb8c982a8..d537819f292 100644 +--- src/gallium/frontends/clover/llvm/compat.hpp ++++ src/gallium/frontends/clover/llvm/compat.hpp +@@ -38,14 +38,14 @@ + + #include + ++#include ++#include ++#include + #include + #include ++#include + #include + #include +-#include +- +-#include +-#include + + #include + #include +@@ -88,6 +88,20 @@ namespace clover { + cinv, copts.data(), copts.data() + copts.size(), diag); + #endif + } ++ ++ static inline void ++ compiler_set_lang_defaults(std::unique_ptr &c, ++ clang::InputKind ik, const ::llvm::Triple& triple, ++ clang::LangStandard::Kind d) ++ { ++ c->getInvocation().setLangDefaults(c->getLangOpts(), ik, triple, ++#if LLVM_VERSION_MAJOR >= 12 ++ c->getPreprocessorOpts().Includes, ++#else ++ c->getPreprocessorOpts(), ++#endif ++ d); ++ } + } + } + } +diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp +index 536e952b100..30592e4343b 100644 +--- src/gallium/frontends/clover/llvm/invocation.cpp ++++ src/gallium/frontends/clover/llvm/invocation.cpp +@@ -247,9 +247,8 @@ namespace { + // http://www.llvm.org/bugs/show_bug.cgi?id=19735 + c->getDiagnosticOpts().ShowCarets = false; + +- c->getInvocation().setLangDefaults(c->getLangOpts(), +- compat::ik_opencl, ::llvm::Triple(target.triple), +- c->getPreprocessorOpts(), ++ compat::compiler_set_lang_defaults(c, compat::ik_opencl, ++ ::llvm::Triple(target.triple), + get_language_version(opts, device_clc_version)); + + c->createDiagnostics(new clang::TextDiagnosticPrinter( diff --git a/srcpkgs/mesa/patches/f0dccd957879ff642cfd921dda6e8b04dd35fec4.patch b/srcpkgs/mesa/patches/f0dccd957879ff642cfd921dda6e8b04dd35fec4.patch new file mode 100644 index 00000000000000..84b0f9e018c8b9 --- /dev/null +++ b/srcpkgs/mesa/patches/f0dccd957879ff642cfd921dda6e8b04dd35fec4.patch @@ -0,0 +1,25 @@ +From f0dccd957879ff642cfd921dda6e8b04dd35fec4 Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Tue, 2 Mar 2021 20:09:39 +0100 +Subject: [PATCH] clover: Add missing include for llvm-12 build fix + +Fixes: d1eab2b1eb1 ("clover: Fix build with llvm-12.") +Signed-off-by: Karol Herbst +Reviewed-by: Francisco Jerez +Part-of: +--- + src/gallium/frontends/clover/llvm/compat.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp +index d537819f292..380d16a8346 100644 +--- src/gallium/frontends/clover/llvm/compat.hpp ++++ src/gallium/frontends/clover/llvm/compat.hpp +@@ -49,6 +49,7 @@ + + #include + #include ++#include + + #if LLVM_VERSION_MAJOR >= 10 + #include diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template index 267419298baacc..45da25b78ddfae 100644 --- a/srcpkgs/mesa/template +++ b/srcpkgs/mesa/template @@ -1,7 +1,7 @@ # Template file for 'mesa' pkgname=mesa version=21.0.3 -revision=2 +revision=3 wrksrc="mesa-${version}" build_style=meson configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled From f5111405d68b0a0232bd8c11371e0a8f244ecf39 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 06:27:29 +0200 Subject: [PATCH 111/355] include-what-you-use: rebuild for llvm12 --- srcpkgs/include-what-you-use/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/include-what-you-use/template b/srcpkgs/include-what-you-use/template index ef508ff0b97b2c..1ea09e544e5d26 100644 --- a/srcpkgs/include-what-you-use/template +++ b/srcpkgs/include-what-you-use/template @@ -1,7 +1,7 @@ # Template file for 'include-what-you-use' pkgname=include-what-you-use version=0.15 -revision=1 +revision=2 create_wrksrc="yes" build_style=cmake configure_args="-DIWYU_LLVM_ROOT_PATH=${XBPS_CROSS_BASE}/usr " From 4bb7f79828ef1c681df4299b10c7f568ffb99886 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 19:51:45 +0200 Subject: [PATCH 112/355] ccls: rebuild for llvm12 --- srcpkgs/ccls/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/ccls/template b/srcpkgs/ccls/template index f2fcebc6b01642..fbb7c6847bc1d3 100644 --- a/srcpkgs/ccls/template +++ b/srcpkgs/ccls/template @@ -1,7 +1,7 @@ # Template file for 'ccls' pkgname=ccls version=0.20210330 -revision=1 +revision=2 build_style=cmake hostmakedepends="clang-tools-extra" makedepends="llvm ncurses-devel rapidjson zlib-devel clang-tools-extra" From f0dc03ee2deb43370552a993d360afba83e7ee7b Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 19:51:52 +0200 Subject: [PATCH 113/355] clazy: rebuild for llvm12 --- ...a6e3393ebc75e16c91e606ad2015a16295c3.patch | 88 +++++++++++++++++++ srcpkgs/clazy/template | 2 +- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/clazy/patches/2592a6e3393ebc75e16c91e606ad2015a16295c3.patch diff --git a/srcpkgs/clazy/patches/2592a6e3393ebc75e16c91e606ad2015a16295c3.patch b/srcpkgs/clazy/patches/2592a6e3393ebc75e16c91e606ad2015a16295c3.patch new file mode 100644 index 00000000000000..9a91341513d137 --- /dev/null +++ b/srcpkgs/clazy/patches/2592a6e3393ebc75e16c91e606ad2015a16295c3.patch @@ -0,0 +1,88 @@ +From 2592a6e3393ebc75e16c91e606ad2015a16295c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20Sch=C3=A4rf?= +Date: Sat, 23 Jan 2021 15:34:10 +0100 +Subject: [PATCH] Fix build with Clang 12 + +Required due to Clang changes https://github.com/llvm/llvm-project/commit/b3eff6b7bb31e7ef059a3d238de138849839fbbd and https://github.com/llvm/llvm-project/commit/d758f79e5d381bd4f5122193a9538d89c907c812 +--- + src/SourceCompatibilityHelpers.h | 26 ++++++++++++++++++++++++++ + src/SuppressionManager.cpp | 5 ++--- + 2 files changed, 28 insertions(+), 3 deletions(-) + +diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h +index 4db141ab..1737d5a5 100644 +--- src/SourceCompatibilityHelpers.h ++++ src/SourceCompatibilityHelpers.h +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + + #if defined(CLAZY_USES_BOOST_REGEX) +@@ -103,6 +104,31 @@ inline clang::tooling::Replacements& DiagnosticFix(clang::tooling::Diagnostic &d + #endif + } + ++inline auto getBuffer(const clang::SourceManager &sm, clang::FileID id, bool *invalid) ++{ ++#if LLVM_VERSION_MAJOR >= 12 ++ auto buffer = sm.getBufferOrNone(id); ++ *invalid = !buffer.hasValue(); ++ return buffer; ++#else ++ return sm.getBuffer(id, invalid); ++#endif ++} ++ ++#if LLVM_VERSION_MAJOR >= 12 ++inline clang::Lexer getLexer(clang::FileID id, llvm::Optional inputFile, ++ const clang::SourceManager &sm, const clang::LangOptions &lo) ++{ ++ return clang::Lexer(id, inputFile.getValue(), sm, lo); ++} ++#else ++inline clang::Lexer getLexer(clang::FileID id, const llvm::MemoryBuffer *inputFile, ++ const clang::SourceManager &sm, const clang::LangOptions &lo) ++{ ++ return clang::Lexer(id, inputFile, sm, lo); ++} ++#endif ++ + } + + #endif +diff --git a/src/SuppressionManager.cpp b/src/SuppressionManager.cpp +index 9d774ea6..9881388d 100644 +--- src/SuppressionManager.cpp ++++ src/SuppressionManager.cpp +@@ -24,7 +24,6 @@ + #include "clazy_stl.h" + + #include +-#include + #include + #include + #include +@@ -84,7 +83,7 @@ void SuppressionManager::parseFile(FileID id, const SourceManager &sm, const cla + Suppressions &suppressions = (*it).second; + + bool invalid = false; +- auto buffer = sm.getBuffer(id, &invalid); ++ auto buffer = clazy::getBuffer(sm, id, &invalid); + if (invalid) { + llvm::errs() << "SuppressionManager::parseFile: Invalid buffer "; + if (buffer) +@@ -92,7 +91,7 @@ void SuppressionManager::parseFile(FileID id, const SourceManager &sm, const cla + return; + } + +- Lexer lexer(id, buffer, sm, lo); ++ auto lexer = clazy::getLexer(id, buffer, sm, lo); + lexer.SetCommentRetentionState(true); + + Token token; +-- +GitLab + diff --git a/srcpkgs/clazy/template b/srcpkgs/clazy/template index 39f529593ebd0e..2c958d5d481f7f 100644 --- a/srcpkgs/clazy/template +++ b/srcpkgs/clazy/template @@ -1,7 +1,7 @@ # Template file for 'clazy' pkgname=clazy version=1.9 -revision=1 +revision=2 build_style=cmake makedepends="clang llvm" depends="clang" From 2bb9f9e9e910fb6b0864cf663962ff315fe55dce Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 20:08:25 +0200 Subject: [PATCH 114/355] bpftrace: rebuild for llvm12 --- srcpkgs/bpftrace/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/bpftrace/template b/srcpkgs/bpftrace/template index 2576fb5a4556dd..6890b9226294b1 100644 --- a/srcpkgs/bpftrace/template +++ b/srcpkgs/bpftrace/template @@ -1,7 +1,7 @@ # Template file for 'bpftrace' pkgname=bpftrace version=0.12.1 -revision=1 +revision=2 archs="x86_64* aarch64* ppc64*" build_style=cmake configure_args="-DBUILD_TESTING=OFF" # needs root to run From e9f62c25523c82c36c980fad7f822f6e4aaa16f9 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 20:08:58 +0200 Subject: [PATCH 115/355] qt5: rebuild for llvm12 --- srcpkgs/qt5/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index fd13cbdaa4449b..a88df53ca3456b 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -3,7 +3,7 @@ pkgname=qt5 version=5.15.3+20210429 # commit d42afef0e48a102334ecfda6a492286fb9fc5996 # base repo: https://invent.kde.org/qt/qt/qt5 -revision=1 +revision=2 build_style=meta hostmakedepends="cmake clang flex perl glib-devel pkg-config python re2c ruby which" From ffe954070649658e1a6a7856cf0e4fde81f7bd7f Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 21:35:45 +0200 Subject: [PATCH 116/355] rtags: rebuild for llvm12 --- srcpkgs/rtags/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/rtags/template b/srcpkgs/rtags/template index baf721c4160cfc..b496a1b0e7210d 100644 --- a/srcpkgs/rtags/template +++ b/srcpkgs/rtags/template @@ -1,7 +1,7 @@ # Template file for 'rtags' pkgname=rtags version=2.38 -revision=4 +revision=5 build_style=cmake # Don't run tests in do_install, please. configure_args="-DSKIP_CTEST=TRUE" From a5c99e630c024efab9adaaf99b5946ac45402573 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 21:40:27 +0200 Subject: [PATCH 117/355] shiboken2: rebuild for llvm12 --- srcpkgs/shiboken2/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/shiboken2/template b/srcpkgs/shiboken2/template index 6a7298d51d333d..ed06a780e1a911 100644 --- a/srcpkgs/shiboken2/template +++ b/srcpkgs/shiboken2/template @@ -1,7 +1,7 @@ # Template file for 'shiboken2' pkgname=shiboken2 version=5.15.2 -revision=1 +revision=2 _pkgname="pyside-setup-opensource-src-${version}" wrksrc="${_pkgname/%5.14.2.1/5.14.2}" build_wrksrc="sources/shiboken2" From 844cd4dbdd354cd942114997f44cd0dee2986b5f Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 21:49:33 +0200 Subject: [PATCH 118/355] gnome-builder: rebuild for llvm12 --- srcpkgs/gnome-builder/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/gnome-builder/template b/srcpkgs/gnome-builder/template index 568d23be55db8a..a9011a5c7f8025 100644 --- a/srcpkgs/gnome-builder/template +++ b/srcpkgs/gnome-builder/template @@ -1,7 +1,7 @@ # Template file for 'gnome-builder' pkgname=gnome-builder version=3.40.2 -revision=1 +revision=2 build_style=meson build_helper=qemu configure_args="-Dwith_webkit=true -Dwith_sysprof=true -Dhelp=true -Dnetwork_tests=false" From 6079c5ca0aa434003f084ac1a38b23ffca27e482 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 23:24:54 +0200 Subject: [PATCH 119/355] bcc: rebuild for llvm12 --- srcpkgs/bcc/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/bcc/template b/srcpkgs/bcc/template index 756f2952ced5f2..985568af0e55fb 100644 --- a/srcpkgs/bcc/template +++ b/srcpkgs/bcc/template @@ -1,7 +1,7 @@ # Template file for 'bcc' pkgname=bcc version=0.20.0 -revision=1 +revision=2 wrksrc="bcc" build_style=cmake configure_args="-DREVISION=${version}" From 27cf62e374ad1f328c845924ed9af6db941e54ea Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 23:47:21 +0200 Subject: [PATCH 120/355] ghdl: update to 1.0.0 --- ...b764f49666616063d4239df83b5aed961fff.patch | 49 +++++++++++++++++++ srcpkgs/ghdl/patches/install-paths.patch | 48 +++++++++--------- srcpkgs/ghdl/patches/llvm11.patch | 10 ---- srcpkgs/ghdl/patches/llvm12.patch | 12 +++++ srcpkgs/ghdl/template | 8 +-- 5 files changed, 89 insertions(+), 38 deletions(-) create mode 100644 srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch delete mode 100644 srcpkgs/ghdl/patches/llvm11.patch create mode 100644 srcpkgs/ghdl/patches/llvm12.patch diff --git a/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch b/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch new file mode 100644 index 00000000000000..23c5673e593ec2 --- /dev/null +++ b/srcpkgs/ghdl/patches/396eb764f49666616063d4239df83b5aed961fff.patch @@ -0,0 +1,49 @@ +From 396eb764f49666616063d4239df83b5aed961fff Mon Sep 17 00:00:00 2001 +From: Jeroen Van den Keybus +Date: Mon, 26 Apr 2021 20:17:40 +0200 +Subject: [PATCH] Migrate deprecated DebugLoc::get to DILocation::get + +--- + src/ortho/llvm6/llvm-cbindings.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/ortho/llvm6/llvm-cbindings.cpp b/src/ortho/llvm6/llvm-cbindings.cpp +index f82845ffcd..98470d8fab 100644 +--- a/src/ortho/llvm6/llvm-cbindings.cpp ++++ b/src/ortho/llvm6/llvm-cbindings.cpp +@@ -1254,7 +1254,7 @@ new_var_decl(ODnode *Res, OIdent Ident, OStorage Storage, OTnode Atype) + DebugCurrentLine, Atype->Dbg, true); + DBuilder->insertDeclare + (unwrap(Decl), D, DBuilder->createExpression(), +- DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope), ++ DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope), + unwrap(LLVMGetInsertBlock(DeclBuilder))); + } + #endif +@@ -1597,7 +1597,7 @@ start_subprogram_body(ODnodeSubprg *Func) + DebugCurrentScope = DebugCurrentSubprg; + + unwrap(Builder)->SetCurrentDebugLocation +- (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope)); ++ (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope)); + } + + if (FlagDebug) { +@@ -1612,7 +1612,7 @@ start_subprogram_body(ODnodeSubprg *Func) + DebugCurrentFile, DebugCurrentLine, Inter->Dtype->Dbg, true); + DBuilder->insertDeclare + (unwrap(Var), D, DBuilder->createExpression(), +- DebugLoc::get(DebugCurrentLine, 0, DebugCurrentSubprg), ++ DILocation::get(DebugCurrentSubprg->getContext(), DebugCurrentLine, 0, DebugCurrentSubprg), + unwrap(LLVMGetInsertBlock(DeclBuilder))); + LLVMBuildStore(DeclBuilder, Inter->Ref, Var); + Inter->Ref = Var; +@@ -2759,7 +2759,7 @@ new_debug_line_stmt (unsigned Line) + if (FlagDebugLines && Line != DebugCurrentLine) { + DebugCurrentLine = Line; + unwrap(Builder)->SetCurrentDebugLocation +- (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope)); ++ (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope)); + } + #endif + } diff --git a/srcpkgs/ghdl/patches/install-paths.patch b/srcpkgs/ghdl/patches/install-paths.patch index f23b2f151025eb..6575b34ff39639 100644 --- a/srcpkgs/ghdl/patches/install-paths.patch +++ b/srcpkgs/ghdl/patches/install-paths.patch @@ -7,10 +7,10 @@ Last-Update: 2020-03-28 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ diff --git a/Makefile.in b/Makefile.in -index 9a6b1731..3aba6532 100644 +index e4923c2..c94853f 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -26,6 +26,7 @@ prefix=@prefix@ +@@ -24,6 +24,7 @@ prefix=@prefix@ backend=@backend@ libdirsuffix=@libdirsuffix@ libdirreverse=@libdirreverse@ @@ -18,7 +18,7 @@ index 9a6b1731..3aba6532 100644 EXEEXT=@EXEEXT@ SOEXT=@SOEXT@ PIC_FLAGS=@PIC_FLAGS@ -@@ -48,8 +49,8 @@ INSTALL_DATA=install -m 644 +@@ -46,8 +47,8 @@ INSTALL_DATA=install -m 644 PWD=$(CURDIR) DESTDIR= bindir=$(prefix)/bin @@ -29,7 +29,7 @@ index 9a6b1731..3aba6532 100644 MKDIR=mkdir LN=ln -s CP=cp -@@ -192,7 +193,7 @@ libs.vhdl.mcode: ghdl_mcode$(EXEEXT) +@@ -200,7 +201,7 @@ libs.vhdl.mcode: ghdl_mcode$(EXEEXT) $(MAKE) -f $(srcdir)/libraries/Makefile.inc $(LIBVHDL_FLAGS_TO_PASS) GHDL=$(PWD)/ghdl_mcode$(EXEEXT) GHDL_FLAGS="" VHDL_COPY_OBJS=no vhdl.libs.all install.mcode.program: install.dirs ghdl_mcode$(EXEEXT) @@ -38,7 +38,7 @@ index 9a6b1731..3aba6532 100644 uninstall.mcode.program: $(RM) $(DESTDIR)$(bindir)/ghdl$(EXEEXT) -@@ -355,8 +356,8 @@ oread-llvm$(EXEEXT): force +@@ -372,8 +373,8 @@ oread-llvm$(EXEEXT): force LLVM_CONFIG="$(LLVM_CONFIG)" CXX="$(CXX)" install.llvm.program: install.dirs ghdl1-llvm$(EXEEXT) ghdl_llvm$(EXEEXT) @@ -47,13 +47,13 @@ index 9a6b1731..3aba6532 100644 + $(INSTALL_PROGRAM) ghdl_llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl-llvm$(EXEEXT) + $(INSTALL_PROGRAM) ghdl1-llvm$(EXEEXT) $(DESTDIR)$(libdir)/ghdl1-llvm$(EXEEXT) - uninstall.llvm.program: - $(RM) $(DESTDIR)$(bindir)/ghdl1-llvm$(EXEEXT) + test.llvm: ghdl_llvm$(EXEEXT) + cd $(srcdir)/testsuite; GHDL=$(CURDIR)/ghdl_llvm$(EXEEXT) ./testsuite.sh diff --git a/configure b/configure -index ce052534..22e1335a 100755 +index 917215a..c1c1a6d 100755 --- a/configure +++ b/configure -@@ -34,6 +34,7 @@ MAKE=${MAKE:-make} +@@ -32,6 +32,7 @@ MAKE=${MAKE:-make} LDFLAGS= prefix=/usr/local libdirsuffix=lib/ghdl @@ -61,16 +61,16 @@ index ce052534..22e1335a 100755 libdirreverse=../.. gcc_src_dir= llvm_config= -@@ -54,7 +55,7 @@ PIC_FLAGS=-fPIC +@@ -52,7 +53,7 @@ PIC_FLAGS=-fPIC show_help=no progname=$0 --subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_openieee enable_libghdl libghdl_version ghdl_version" -+subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse incdirsuffix gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_openieee enable_libghdl libghdl_version ghdl_version" +-subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_gplcompat enable_libghdl libghdl_version ghdl_version" ++subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse incdirsuffix gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_gplcompat enable_libghdl libghdl_version ghdl_version" # Find srcdir srcdir=`dirname $progname` -@@ -93,6 +94,8 @@ for opt do +@@ -91,6 +92,8 @@ for opt do ;; --prefix=*) prefix="$optarg";; --srcdir=*) srcdir="$optarg";; @@ -79,7 +79,7 @@ index ce052534..22e1335a 100755 --with-gcc=*) gcc_src_dir="$optarg"; backend=gcc;; --with-llvm=*) echo "--with-llvm is deprecated, use --with-llvm-config" -@@ -128,6 +131,8 @@ Usage: configure [options] +@@ -126,6 +129,8 @@ Usage: configure [options] Options [defaults in brackets]: --prefix=PREFIX install in PREFIX [$prefix] --srcdir=SRCDIR source code path [$srcdir] @@ -88,7 +88,7 @@ index ce052534..22e1335a 100755 --with-gcc=DIR use gcc backend from DIR --with-llvm-config[=LLVM-CONFIG] use llvm backend [llvm-config] --with-backtrace-lib=LIB.a link with libbacktrace LIB.a to display a -@@ -405,10 +410,11 @@ echo "Generate default_paths.ads" +@@ -400,10 +405,11 @@ echo "Generate default_paths.ads" sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \ -e "s%@COMPILER_DEBUG@%ghdl1-debug$EXEEXT%" \ -e "s%@COMPILER_MCODE@%ghdl1-mcode$EXEEXT%" \ @@ -101,10 +101,10 @@ index ce052534..22e1335a 100755 -e "s%@SOEXT@%$SOEXT%" \ -e "s%@default_pic@%$default_pic%" \ < $srcdir/src/ghdldrv/default_paths.ads.in > default_paths.ads -diff --git a/dist/gcc/Make-lang.in b/dist/gcc/Make-lang.in -index cca1e4df..37d95d20 100644 ---- a/dist/gcc/Make-lang.in -+++ b/dist/gcc/Make-lang.in +diff --git a/scripts/gcc/Make-lang.in b/scripts/gcc/Make-lang.in +index 108b05b..f9f3b16 100644 +--- a/scripts/gcc/Make-lang.in ++++ b/scripts/gcc/Make-lang.in @@ -104,7 +104,9 @@ vhdl/default_paths.ads: Makefile echo " Compiler_Llvm : constant String := \"\";" >> tmp-dpaths.ads echo " Post_Processor : constant String := \"\";" >> tmp-dpaths.ads @@ -128,10 +128,10 @@ index cca1e4df..37d95d20 100644 -mkdir $(DESTDIR)$(libdir)/ghdl $(INSTALL_DATA) ../libbacktrace/.libs/libbacktrace.a $(DESTDIR)$(libdir)/ghdl diff --git a/src/ghdldrv/default_paths.ads.in b/src/ghdldrv/default_paths.ads.in -index ae321011..228c0696 100644 +index ec6b68d..0b773ce 100644 --- a/src/ghdldrv/default_paths.ads.in +++ b/src/ghdldrv/default_paths.ads.in -@@ -25,6 +25,8 @@ package Default_Paths is +@@ -23,6 +23,8 @@ package Default_Paths is "@INSTALL_PREFIX@"; Lib_Prefix : constant String := "@LIB_PREFIX@"; @@ -141,10 +141,10 @@ index ae321011..228c0696 100644 Compiler_Gcc : constant String := "@COMPILER_GCC@"; diff --git a/src/ghdldrv/ghdlvpi.adb b/src/ghdldrv/ghdlvpi.adb -index 295b7300..487eb0e6 100644 +index 3ecd831..36fdc6f 100644 --- a/src/ghdldrv/ghdlvpi.adb +++ b/src/ghdldrv/ghdlvpi.adb -@@ -39,7 +39,7 @@ package body Ghdlvpi is +@@ -37,7 +37,7 @@ package body Ghdlvpi is -- Compute install path Ghdllocal.Set_Exec_Prefix_From_Program_Name; @@ -153,7 +153,7 @@ index 295b7300..487eb0e6 100644 end Get_Vpi_Include_Dir; -- Return the lib directory. -@@ -50,7 +50,7 @@ package body Ghdlvpi is +@@ -48,7 +48,7 @@ package body Ghdlvpi is Ghdllocal.Set_Exec_Prefix_From_Program_Name; end if; diff --git a/srcpkgs/ghdl/patches/llvm11.patch b/srcpkgs/ghdl/patches/llvm11.patch deleted file mode 100644 index b2637d01bffeaa..00000000000000 --- a/srcpkgs/ghdl/patches/llvm11.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/configure -+++ b/configure -@@ -279,6 +279,7 @@ if test $backend = llvm; then - check_version 7.0 $llvm_version || - check_version 8.0 $llvm_version || - check_version 9.0 $llvm_version || -+ check_version 11.0 $llvm_version || - false; then - echo "Debugging is not enabled with llvm $llvm_version" - llvm_be=llvm4-nodebug diff --git a/srcpkgs/ghdl/patches/llvm12.patch b/srcpkgs/ghdl/patches/llvm12.patch new file mode 100644 index 00000000000000..8d2f76bfda06c7 --- /dev/null +++ b/srcpkgs/ghdl/patches/llvm12.patch @@ -0,0 +1,12 @@ +diff --git a/configure b/configure +index c1c1a6d..dad7c38 100755 +--- a/configure ++++ b/configure +@@ -280,6 +280,7 @@ if test $backend = llvm; then + check_version 9.0 $llvm_version || + check_version 10.0 $llvm_version || + check_version 11.0 $llvm_version || ++ check_version 12.0 $llvm_version || + false; then + echo "Debugging is enabled with llvm $llvm_version" + else diff --git a/srcpkgs/ghdl/template b/srcpkgs/ghdl/template index 1a1540e8fc5b1d..1b6f0d50e327a4 100644 --- a/srcpkgs/ghdl/template +++ b/srcpkgs/ghdl/template @@ -6,8 +6,8 @@ # pkgname=ghdl reverts="20181129_1" -version=0.37 -revision=3 +version=1.0.0 +revision=1 build_style=configure configure_args="--prefix=/usr --srcdir=.. --incdir=lib/ghdl/include" makedepends="zlib-devel" @@ -16,7 +16,7 @@ maintainer="m3tav3rse " license="GPL-2.0-or-later" homepage="https://github.com/ghdl/ghdl" distfiles="https://github.com/ghdl/ghdl/archive/v${version}.tar.gz" -checksum=3008616201cc3b0b596872e4ad59d8bc36e6ee3ff798bdce066828fbdad041e4 +checksum=cb424766fbe831ff41bec84016a6af0406d735c272b0b639d507c3503df30495 nocross=yes patch_args="-Np1" make_check=extended @@ -52,7 +52,7 @@ fi if [ "$build_option_llvm" ]; then subpackages+=" ghdl-llvm" - makedepends+=" llvm11" + makedepends+=" llvm12" fi do_configure() { From 82d39eac164b089a2624ee8b5062082a7c7ef40f Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 23:53:28 +0200 Subject: [PATCH 121/355] juCi++: rebuild for llvm12 --- srcpkgs/juCi++/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/juCi++/template b/srcpkgs/juCi++/template index c7a4e8655f3a1e..a8460b01521d11 100644 --- a/srcpkgs/juCi++/template +++ b/srcpkgs/juCi++/template @@ -1,7 +1,7 @@ # Template file for 'juCi++' pkgname=juCi++ version=1.6.2 -revision=1 +revision=2 _libclangmm_commit="b342f4dd6de4fe509a692a4b4fcfc7e24aae9590" _tiny_commit="c9c8bf810ddad8cd17882b9a9ee628a690e779f5" wrksrc="jucipp-v${version}" From 0fc97a69c66a89f148130ecff74842bdc6672cbc Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 16 May 2021 23:57:56 +0200 Subject: [PATCH 122/355] kdevelop: rebuild for llvm12 --- srcpkgs/kdevelop/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/kdevelop/template b/srcpkgs/kdevelop/template index 57466b22a5eeb6..3adc8427360793 100644 --- a/srcpkgs/kdevelop/template +++ b/srcpkgs/kdevelop/template @@ -1,7 +1,7 @@ # Template file for 'kdevelop' pkgname=kdevelop version=5.6.2 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_TESTING=OFF" hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools qt5-tools From ad11e0906d78ceb04e46214c9c7974f4787de8c7 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 17 May 2021 00:04:30 +0200 Subject: [PATCH 123/355] codelite: rebuild for llvm12 --- srcpkgs/codelite/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/codelite/template b/srcpkgs/codelite/template index 4475b703435640..f8476252ce34a4 100644 --- a/srcpkgs/codelite/template +++ b/srcpkgs/codelite/template @@ -1,7 +1,7 @@ # Template file for 'codelite' pkgname=codelite version=13.0 -revision=4 +revision=5 archs="i686* x86_64* ppc64le*" build_style=cmake build_helper=cmake-wxWidgets-gtk3 From ce39fb20c31f918c036161765d4735732bc99688 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 17 May 2021 00:17:34 +0200 Subject: [PATCH 124/355] qtcreator: update to 4.15.0 --- srcpkgs/qtcreator/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qtcreator/template b/srcpkgs/qtcreator/template index d98e49cb4e4c14..d60f3b02b92bc8 100644 --- a/srcpkgs/qtcreator/template +++ b/srcpkgs/qtcreator/template @@ -1,6 +1,6 @@ # Template file for 'qtcreator' pkgname=qtcreator -version=4.14.2 +version=4.15.0 revision=1 wrksrc="qt-creator-opensource-src-${version}" build_style=qmake @@ -15,7 +15,7 @@ maintainer="Piotr Wójcik " license="LGPL-3.0-or-later, custom:QtCompany-GPL-Exception-1.0" homepage="https://wiki.qt.io/Category:Tools::QtCreator" distfiles="https://download.qt.io/official_releases/qtcreator/${version%.*}/${version}/${wrksrc}.tar.xz" -checksum=bd2bb62474f07466d8b59b0f751f29064deea3ed56173bce82548cb80e2d1a29 +checksum=d9829abc370b56e84dc48f9a61311b369d645bc1181ea4dbec5ec7a30db6f210 replaces="qtcreator-data>=0" python_version=3 From e5c8eebdfd658531caadd72afe65e9cf7adb148f Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 17 May 2021 19:37:13 +0200 Subject: [PATCH 125/355] beignet: rebuild for llvm12 --- srcpkgs/beignet/patches/llvm12.patch | 115 +++++++++++++++++++++++++++ srcpkgs/beignet/template | 2 +- 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/beignet/patches/llvm12.patch diff --git a/srcpkgs/beignet/patches/llvm12.patch b/srcpkgs/beignet/patches/llvm12.patch new file mode 100644 index 00000000000000..a773b4488d91ba --- /dev/null +++ b/srcpkgs/beignet/patches/llvm12.patch @@ -0,0 +1,115 @@ +diff --git backend/src/llvm/ExpandLargeIntegers.cpp backend/src/llvm/ExpandLargeIntegers.cpp +index 8515dc13..27080380 100644 +--- backend/src/llvm/ExpandLargeIntegers.cpp ++++ backend/src/llvm/ExpandLargeIntegers.cpp +@@ -328,7 +328,7 @@ static Value *buildVectorOrScalar(ConversionState &State, IRBuilder<> &IRB, Smal + // splited, that's why these temporary values should be erased. + bool KeepInsert = isLegalBitSize(ElemTy->getPrimitiveSizeInBits() * ElemNo); + for (unsigned i = 0; i < ElemNo; ++i) { +- Value *tmp = vec ? vec : UndefValue::get(VectorType::get(ElemTy, ElemNo)); ++ Value *tmp = vec ? vec : UndefValue::get(VectorType::get(ElemTy, ElemNo, false)); + Value *idx = ConstantInt::get(IntTy, i); + vec = IRB.CreateInsertElement(tmp, Elements[i], idx); + if (!KeepInsert && !isa(vec)) { +@@ -373,7 +373,7 @@ static void unifyElementType(IRBuilder<> &IRB, SmallVector &Src, Sm + assert((Size % MinWidth) == 0); + + if (Size > MinWidth) { +- VectorType *VecTy = VectorType::get(ElemTy, Size/MinWidth); ++ VectorType *VecTy = VectorType::get(ElemTy, Size/MinWidth, false); + Value *Casted = IRB.CreateBitCast(Src[i], VecTy); + for (unsigned j = 0; j < Size/MinWidth; j++) + Dst.push_back(IRB.CreateExtractElement(Casted, ConstantInt::get(IntTy, j))); +@@ -462,7 +462,7 @@ static void convertInstruction(Instruction *Inst, ConversionState &State, + unsigned ElemNo = Unified.size(); + Type *ElemTy = Unified[0]->getType(); + for (unsigned i = 0; i < ElemNo; ++i) { +- Value *tmp = vec ? vec : UndefValue::get(VectorType::get(ElemTy, ElemNo)); ++ Value *tmp = vec ? vec : UndefValue::get(VectorType::get(ElemTy, ElemNo, false)); + Value *idx = ConstantInt::get(IntTy, i); + vec = IRB.CreateInsertElement(tmp, Unified[i], idx); + } +diff --git backend/src/llvm/llvm_gen_backend.cpp backend/src/llvm/llvm_gen_backend.cpp +index c93d89cc..64d5b0e5 100644 +--- backend/src/llvm/llvm_gen_backend.cpp ++++ backend/src/llvm/llvm_gen_backend.cpp +@@ -304,7 +304,7 @@ namespace gbe + TYPESIZEVEC(long,8) + TYPESIZEVEC(unsigned long,8) + else{ +- StructType *StrTy = M->getTypeByName("struct."+name); ++ StructType *StrTy = StructType::getTypeByName(M->getContext(), "struct."+name); + if(StrTy) + return getTypeByteSize(unit,StrTy); + } +diff --git backend/src/llvm/llvm_loadstore_optimization.cpp backend/src/llvm/llvm_loadstore_optimization.cpp +index 5aa38bef..6b5c1bad 100644 +--- backend/src/llvm/llvm_loadstore_optimization.cpp ++++ backend/src/llvm/llvm_loadstore_optimization.cpp +@@ -152,7 +152,7 @@ namespace gbe { + unsigned addrSpace = ld->getPointerAddressSpace(); + // insert before first load + Builder.SetInsertPoint(ld); +- VectorType *vecTy = VectorType::get(ld->getType(), size); ++ VectorType *vecTy = VectorType::get(ld->getType(), size, false); + Value *vecPtr = Builder.CreateBitCast(ld->getPointerOperand(), + PointerType::get(vecTy, addrSpace)); + LoadInst *vecValue = Builder.CreateLoad(vecPtr); +@@ -236,7 +236,7 @@ namespace gbe { + Builder.SetInsertPoint(merged[size-1]); + + Type *dataTy = st->getValueOperand()->getType(); +- VectorType *vecTy = VectorType::get(dataTy, size); ++ VectorType *vecTy = VectorType::get(dataTy, size, false); + Value * parent = UndefValue::get(vecTy); + for(unsigned i = 0; i < size; i++) { + parent = Builder.CreateInsertElement(parent, values[i], ConstantInt::get(IntegerType::get(st->getContext(), 32), i)); +diff --git backend/src/llvm/llvm_printf_parser.cpp backend/src/llvm/llvm_printf_parser.cpp +index 6bb7c52a..af459cd2 100644 +--- backend/src/llvm/llvm_printf_parser.cpp ++++ backend/src/llvm/llvm_printf_parser.cpp +@@ -630,7 +630,7 @@ error: + if (elt_type != elt_dst_type) { + Value *II = NULL; + for (int i = 0; i < vec_num; i++) { +- Value *vec = II ? II : UndefValue::get(VectorType::get(elt_dst_type, vec_num)); ++ Value *vec = II ? II : UndefValue::get(VectorType::get(elt_dst_type, vec_num, false)); + Value *cv = ConstantInt::get(Type::getInt32Ty(elt_type->getContext()), i); + Value *org = builder->CreateExtractElement(arg, cv); + Value *cvt = builder->CreateIntCast(org, elt_dst_type, sign); +@@ -658,7 +658,7 @@ error: + if (elt_type->getTypeID() != Type::FloatTyID) { + Value *II = NULL; + for (int i = 0; i < vec_num; i++) { +- Value *vec = II ? II : UndefValue::get(VectorType::get(Type::getFloatTy(elt_type->getContext()), vec_num)); ++ Value *vec = II ? II : UndefValue::get(VectorType::get(Type::getFloatTy(elt_type->getContext()), vec_num, false)); + Value *cv = ConstantInt::get(Type::getInt32Ty(elt_type->getContext()), i); + Value *org = builder->CreateExtractElement(arg, cv); + Value* cvt = builder->CreateFPCast(org, Type::getFloatTy(module->getContext())); +diff --git backend/src/llvm/llvm_to_gen.cpp backend/src/llvm/llvm_to_gen.cpp +index 7f7deffe..9e8ccc67 100644 +--- backend/src/llvm/llvm_to_gen.cpp ++++ backend/src/llvm/llvm_to_gen.cpp +@@ -358,7 +358,7 @@ namespace gbe + passes.add(createScalarReplAggregatesPass(64, true, -1, -1, 64)); + #endif + passes.add(createLoadStoreOptimizationPass()); +- passes.add(createConstantPropagationPass()); ++ //passes.add(createConstantPropagationPass()); + passes.add(createPromoteMemoryToRegisterPass()); + if(optLevel > 0) + passes.add(createGVNPass()); // Remove redundancies +@@ -367,11 +367,11 @@ namespace gbe + passes.add(createScalarizePass()); // Expand all vector ops + passes.add(createExpandLargeIntegersPass()); // legalize large integer operation + passes.add(createInstructionCombiningPass()); // legalize will generate some silly instructions +- passes.add(createConstantPropagationPass()); // propagate constant after scalarize/legalize ++ //passes.add(createConstantPropagationPass()); // propagate constant after scalarize/legalize + passes.add(createExpandConstantExprPass()); // constant prop may generate ConstantExpr + passes.add(createPromoteIntegersPass()); // align integer size to power of two + passes.add(createRemoveGEPPass(unit)); // Constant prop may generate gep +- passes.add(createDeadInstEliminationPass()); // Remove simplified instructions ++ //passes.add(createDeadInstEliminationPass()); // Remove simplified instructions + passes.add(createCFGSimplificationPass()); // Merge & remove BBs + passes.add(createLowerSwitchPass()); // simplify cfg will generate switch-case instruction + if (profiling) { diff --git a/srcpkgs/beignet/template b/srcpkgs/beignet/template index e37102ce14f5c6..5fc51311d7f7eb 100644 --- a/srcpkgs/beignet/template +++ b/srcpkgs/beignet/template @@ -1,7 +1,7 @@ # Template file for 'beignet' pkgname=beignet version=1.3.2 -revision=9 +ievision=10 archs="i686* x86_64*" wrksrc="Beignet-${version}-Source" build_style=cmake From 0d29e1355434055a6e0d5f2df56ba1ab148e202e Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Mon, 17 May 2021 17:55:01 +0200 Subject: [PATCH 126/355] ispc: rebuild for llvm12 --- srcpkgs/ispc/patches/llvm12-001.patch | 57 + srcpkgs/ispc/patches/llvm12-002.patch | 923 +++++++++++ srcpkgs/ispc/patches/llvm12-003.patch | 1504 ++++++++++++++++++ srcpkgs/ispc/patches/llvm12-004.patch | 34 + srcpkgs/ispc/patches/llvm12-005.patch | 372 +++++ srcpkgs/ispc/patches/llvm12-006.patch | 126 ++ srcpkgs/ispc/patches/llvm12-007.patch | 160 ++ srcpkgs/ispc/patches/llvm12-008.patch | 149 ++ srcpkgs/ispc/patches/llvm12-009.patch | 2109 +++++++++++++++++++++++++ srcpkgs/ispc/template | 2 +- 10 files changed, 5435 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/ispc/patches/llvm12-001.patch create mode 100644 srcpkgs/ispc/patches/llvm12-002.patch create mode 100644 srcpkgs/ispc/patches/llvm12-003.patch create mode 100644 srcpkgs/ispc/patches/llvm12-004.patch create mode 100644 srcpkgs/ispc/patches/llvm12-005.patch create mode 100644 srcpkgs/ispc/patches/llvm12-006.patch create mode 100644 srcpkgs/ispc/patches/llvm12-007.patch create mode 100644 srcpkgs/ispc/patches/llvm12-008.patch create mode 100644 srcpkgs/ispc/patches/llvm12-009.patch diff --git a/srcpkgs/ispc/patches/llvm12-001.patch b/srcpkgs/ispc/patches/llvm12-001.patch new file mode 100644 index 00000000000000..5f2d3f5a409ee9 --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-001.patch @@ -0,0 +1,57 @@ +From 1c0f89dccb774f216c7f6e76a99ee907a1e641cb Mon Sep 17 00:00:00 2001 +From: Dmitry Babokin +Date: Tue, 22 Dec 2020 17:03:59 -0800 +Subject: [PATCH] Fix to work with LLVM trunk after llvm/llvm-project@41c3b2713 + +--- + src/ctx.cpp | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/src/ctx.cpp b/src/ctx.cpp +index 6fbb8b9cf..977e9d222 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -1473,11 +1473,15 @@ void FunctionEmitContext::AddDebugPos(llvm::Value *value, const SourcePos *pos, + llvm::Instruction *inst = llvm::dyn_cast(value); + if (inst != NULL && m->diBuilder) { + SourcePos p = pos ? *pos : currentPos; +- if (p.first_line != 0) ++ if (p.first_line != 0) { + // If first_line == 0, then we're in the middle of setting up + // the standard library or the like; don't add debug positions + // for those functions +- inst->setDebugLoc(llvm::DebugLoc::get(p.first_line, p.first_column, scope ? scope : GetDIScope())); ++ scope = scope ? scope : GetDIScope(); ++ llvm::DebugLoc diLoc = ++ llvm::DILocation::get(scope->getContext(), p.first_line, p.first_column, scope, nullptr, false); ++ inst->setDebugLoc(diLoc); ++ } + } + } + +@@ -1518,9 +1522,10 @@ void FunctionEmitContext::EmitVariableDebugInfo(Symbol *sym) { + llvm::DILocalVariable *var = m->diBuilder->createAutoVariable( + scope, sym->name, sym->pos.GetDIFile(), sym->pos.first_line, diType, true /* preserve through opts */); + ++ llvm::DebugLoc diLoc = ++ llvm::DILocation::get(scope->getContext(), sym->pos.first_line, sym->pos.first_column, scope, nullptr, false); + llvm::Instruction *declareInst = +- m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(), +- llvm::DebugLoc::get(sym->pos.first_line, sym->pos.first_column, scope), bblock); ++ m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(), diLoc, bblock); + AddDebugPos(declareInst, &sym->pos, scope); + } + +@@ -1535,9 +1540,10 @@ void FunctionEmitContext::EmitFunctionParameterDebugInfo(Symbol *sym, int argNum + m->diBuilder->createParameterVariable(scope, sym->name, argNum + 1, sym->pos.GetDIFile(), sym->pos.first_line, + diType, true /* preserve through opts */, flags); + ++ llvm::DebugLoc diLoc = ++ llvm::DILocation::get(scope->getContext(), sym->pos.first_line, sym->pos.first_column, scope, nullptr, false); + llvm::Instruction *declareInst = +- m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(), +- llvm::DebugLoc::get(sym->pos.first_line, sym->pos.first_column, scope), bblock); ++ m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(), diLoc, bblock); + AddDebugPos(declareInst, &sym->pos, scope); + } + diff --git a/srcpkgs/ispc/patches/llvm12-002.patch b/srcpkgs/ispc/patches/llvm12-002.patch new file mode 100644 index 00000000000000..0903f30da10d10 --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-002.patch @@ -0,0 +1,923 @@ +From 0597a79d084c014780136da906afe21d15e982cb Mon Sep 17 00:00:00 2001 +From: DeepakRajendrakumaran +Date: Tue, 5 Jan 2021 13:53:30 -0800 +Subject: [PATCH] Remove LLVM 8.0 and LLVM 9.0. (#1966) + +--- + .appveyor.yml | 3 -- + .travis.yml | 7 --- + CMakeLists.txt | 12 ++---- + src/ast.cpp | 4 -- + src/ctx.cpp | 30 ------------- + src/gen/GlobalsLocalization.cpp | 4 -- + src/ispc.cpp | 20 --------- + src/ispc.h | 3 +- + src/ispc_version.h | 4 +- + src/main.cpp | 13 ------ + src/module.cpp | 27 ------------ + src/module.h | 2 - + src/opt.cpp | 64 ++-------------------------- + src/type.cpp | 10 ++--- + tests/lit-tests/1771.ispc | 1 - + tests/lit-tests/1844.ispc | 3 -- + tests/lit-tests/1926.ispc | 2 - + tests/lit-tests/cpus_x86.ispc | 2 + + tests/lit-tests/cpus_x86_llvm10.ispc | 11 ----- + tests/lit-tests/lit.cfg | 5 --- + 20 files changed, 14 insertions(+), 213 deletions(-) + delete mode 100644 tests/lit-tests/cpus_x86_llvm10.ispc + +diff --git a/.appveyor.yml b/.appveyor.yml +index 451a7b3e0..7945cca2a 100644 +--- a/.appveyor.yml ++++ b/.appveyor.yml +@@ -41,8 +41,6 @@ environment: + LLVM_VERSION: latest + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + LLVM_VERSION: 10.0 +- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 +- LLVM_VERSION: 9.0 + + for: + - +@@ -62,7 +60,6 @@ for: + if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( (set generator="Visual Studio 16") & (set vsversion=2019)) + set LLVM_TAR=llvm-11.0.0-win.vs2019-Release+Asserts-x86.arm.wasm.7z + if "%LLVM_VERSION%"=="10.0" (set LLVM_TAR=llvm-10.0.1-win.vs2019-Release+Asserts-x86.arm.wasm.zip) +- if "%LLVM_VERSION%"=="9.0" (set LLVM_TAR=llvm-9.0.1-win.vs2017-Release+Asserts-x86.arm.wasm.zip) + install: + - ps: choco install --no-progress winflexbison3 wget 7zip + - cmd: |- +diff --git a/.travis.yml b/.travis.yml +index 2e96017a6..3a6b85264 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -108,13 +108,6 @@ jobs: + - LLVM_TAR=llvm-10.0.1-ubuntu16.04-Release+Asserts-x86.arm.wasm.tar.xz + - LLVM_REPO=https://github.com/dbabokin/llvm-project + - ISPC_HOME=$TRAVIS_BUILD_DIR +- # LLVM 9.0 + Ubuntu 16.04: build, lit tests, examples (build + run), benchmarks (build + trial run) +- - <<: *my_tag +- env: +- - LLVM_VERSION=9.0 OS=Ubuntu16.04 +- - LLVM_TAR=llvm-9.0.1-ubuntu16.04-Release+Asserts-x86.arm.wasm.tar.xz +- - LLVM_REPO=https://github.com/dbabokin/llvm-project +- - ISPC_HOME=$TRAVIS_BUILD_DIR + # WASM enabled build + # LLVM 11.0 + Ubuntu 16.04: build, lit tests, examples (build), benchmarks (build + trial run) + - <<: *my_tag +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5fa863fcf..a6b3ed251 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -241,10 +241,8 @@ if (X86_ENABLED) + avx2-i8x32 avx2-i16x16 + avx2-i32x4 avx2-i32x8 avx2-i32x16 avx2-i64x4 + avx512knl-i32x16 +- avx512skx-i32x16 avx512skx-i32x8) +- if (${LLVM_VERSION_NUMBER} VERSION_GREATER_EQUAL "10.0.0") +- list(APPEND ISPC_TARGETS avx512skx-i8x64 avx512skx-i16x32) +- endif() ++ avx512skx-i32x16 avx512skx-i32x8 ++ avx512skx-i8x64 avx512skx-i16x32) + endif() + if (ARM_ENABLED) + list(APPEND ISPC_TARGETS neon-i8x16 neon-i16x8 neon-i32x4 neon-i32x8) +@@ -259,11 +257,7 @@ if (WASM_ENABLED) + endif() + + set(CLANG_LIBRARY_LIST clangFrontend clangDriver clangSerialization clangParse clangSema clangAnalysis clangAST clangBasic clangEdit clangLex) +-set(LLVM_COMPONENTS engine ipo bitreader bitwriter instrumentation linker option) +- +-if (${LLVM_VERSION_NUMBER} VERSION_GREATER_EQUAL "10.0.0") +- list(APPEND LLVM_COMPONENTS frontendopenmp) +-endif() ++set(LLVM_COMPONENTS engine ipo bitreader bitwriter instrumentation linker option frontendopenmp) + + if (X86_ENABLED) + list(APPEND LLVM_COMPONENTS x86) +diff --git a/src/ast.cpp b/src/ast.cpp +index 20f75a29c..5a43c4854 100644 +--- a/src/ast.cpp ++++ b/src/ast.cpp +@@ -44,9 +44,7 @@ + #include "sym.h" + #include "util.h" + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + #include +-#endif + /////////////////////////////////////////////////////////////////////////// + // ASTNode + +@@ -62,9 +60,7 @@ void AST::AddFunction(Symbol *sym, Stmt *code) { + } + + void AST::GenerateIR() { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("GenerateIR"); +-#endif + for (unsigned int i = 0; i < functions.size(); ++i) + functions[i]->GenerateIR(); + } +diff --git a/src/ctx.cpp b/src/ctx.cpp +index 977e9d222..42c4ea09d 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -309,21 +309,13 @@ FunctionEmitContext::FunctionEmitContext(Function *func, Symbol *funSym, llvm::F + char buf[256]; + snprintf(buf, sizeof(buf), "__off_all_on_mask_%s", g->target->GetISAString()); + +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_8_0 +- llvm::Constant *offFunc = m->module->getOrInsertFunction(buf, LLVMTypes::VoidType); +-#else // LLVM 9.0+ + llvm::FunctionCallee offFuncCallee = m->module->getOrInsertFunction(buf, LLVMTypes::VoidType); + llvm::Constant *offFunc = llvm::cast(offFuncCallee.getCallee()); +-#endif + AssertPos(currentPos, llvm::isa(offFunc)); + llvm::BasicBlock *offBB = llvm::BasicBlock::Create(*g->ctx, "entry", (llvm::Function *)offFunc, 0); + llvm::StoreInst *inst = new llvm::StoreInst(LLVMMaskAllOff, globalAllOnMaskPtr, offBB); + if (g->opt.forceAlignedMemory) { +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- inst->setAlignment(g->target->getNativeVectorAlignment()); +-#else // LLVM 10.0+ + inst->setAlignment(llvm::MaybeAlign(g->target->getNativeVectorAlignment()).valueOrOne()); +-#endif + } + llvm::ReturnInst::Create(*g->ctx, offBB); + } +@@ -2288,11 +2280,7 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, const Type *type, c + #endif + + if (g->opt.forceAlignedMemory && llvm::dyn_cast(pt->getElementType())) { +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- inst->setAlignment(g->target->getNativeVectorAlignment()); +-#else // LLVM 10.0+ + inst->setAlignment(llvm::MaybeAlign(g->target->getNativeVectorAlignment()).valueOrOne()); +-#endif + } + + AddDebugPos(inst); +@@ -2431,11 +2419,7 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask, + // vs the proper alignment in practice.) + int align = 1; + +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- inst->setAlignment(align); +-#else // LLVM 10.0+ + inst->setAlignment(llvm::MaybeAlign(align).valueOrOne()); +-#endif + } + + AddDebugPos(inst); +@@ -2649,11 +2633,7 @@ llvm::Value *FunctionEmitContext::AllocaInst(llvm::Type *llvmType, const char *n + align = g->target->getNativeVectorAlignment(); + + if (align != 0) { +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- inst->setAlignment(align); +-#else // LLVM 10.0+ + inst->setAlignment(llvm::MaybeAlign(align).valueOrOne()); +-#endif + } + // Don't add debugging info to alloca instructions + return inst; +@@ -2926,11 +2906,7 @@ void FunctionEmitContext::StoreInst(llvm::Value *value, llvm::Value *ptr, const + llvm::StoreInst *inst = new llvm::StoreInst(value, ptr, bblock); + + if (g->opt.forceAlignedMemory && llvm::dyn_cast(pt->getElementType())) { +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- inst->setAlignment(g->target->getNativeVectorAlignment()); +-#else // LLVM 10.0+ + inst->setAlignment(llvm::MaybeAlign(g->target->getNativeVectorAlignment()).valueOrOne()); +-#endif + } + + #ifdef ISPC_GENX_ENABLED +@@ -3025,16 +3001,10 @@ void FunctionEmitContext::MemcpyInst(llvm::Value *dest, llvm::Value *src, llvm:: + } + if (align == NULL) + align = LLVMInt32(1); +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_8_0 +- llvm::Constant *mcFunc = +- m->module->getOrInsertFunction("llvm.memcpy.p0i8.p0i8.i64", LLVMTypes::VoidType, LLVMTypes::VoidPointerType, +- LLVMTypes::VoidPointerType, LLVMTypes::Int64Type, LLVMTypes::BoolType); +-#else // LLVM 9.0+ + llvm::FunctionCallee mcFuncCallee = + m->module->getOrInsertFunction("llvm.memcpy.p0i8.p0i8.i64", LLVMTypes::VoidType, LLVMTypes::VoidPointerType, + LLVMTypes::VoidPointerType, LLVMTypes::Int64Type, LLVMTypes::BoolType); + llvm::Constant *mcFunc = llvm::cast(mcFuncCallee.getCallee()); +-#endif + AssertPos(currentPos, mcFunc != NULL); + AssertPos(currentPos, llvm::isa(mcFunc)); + +diff --git a/src/gen/GlobalsLocalization.cpp b/src/gen/GlobalsLocalization.cpp +index 193a66289..a176e9462 100644 +--- a/src/gen/GlobalsLocalization.cpp ++++ b/src/gen/GlobalsLocalization.cpp +@@ -470,11 +470,7 @@ void GlobalsLocalization::LocalizeGlobals(LocalizationInfo &LI) { + Instruction &FirstI = *Fn->getEntryBlock().begin(); + Type *ElemTy = GV->getType()->getElementType(); + AllocaInst *Alloca = new AllocaInst(ElemTy, 0, GV->getName() + ".local", &FirstI); +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- Alloca->setAlignment(GV->getAlignment()); +-#else // LLVM 10.0+ + Alloca->setAlignment(llvm::MaybeAlign(GV->getAlignment())); +-#endif + if (!isa(GV->getInitializer())) + new StoreInst(GV->getInitializer(), Alloca, &FirstI); + +diff --git a/src/ispc.cpp b/src/ispc.cpp +index e2d0f206e..fac5233f7 100644 +--- a/src/ispc.cpp ++++ b/src/ispc.cpp +@@ -272,9 +272,7 @@ typedef enum { + CPU_Silvermont, + + CPU_ICX, +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + CPU_TGL, +-#endif + #if ISPC_LLVM_VERSION >= ISPC_LLVM_12_0 + CPU_ADL, + CPU_SPR, +@@ -365,10 +363,8 @@ class AllCPUs { + + names[CPU_ICX].push_back("icelake-server"); + names[CPU_ICX].push_back("icx"); +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + names[CPU_TGL].push_back("tigerlake"); + names[CPU_TGL].push_back("tgl"); +-#endif + #if ISPC_LLVM_VERSION >= ISPC_LLVM_12_0 + names[CPU_ADL].push_back("alderlake"); + names[CPU_ADL].push_back("adl"); +@@ -411,11 +407,9 @@ class AllCPUs { + compat[CPU_ADL] = Set(CPU_ADL, CPU_x86_64, CPU_Bonnell, CPU_Penryn, CPU_Core2, CPU_Nehalem, CPU_Silvermont, + CPU_SandyBridge, CPU_IvyBridge, CPU_Haswell, CPU_Broadwell, CPU_None); + #endif +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + compat[CPU_TGL] = + Set(CPU_TGL, CPU_x86_64, CPU_Bonnell, CPU_Penryn, CPU_Core2, CPU_Nehalem, CPU_Silvermont, CPU_SandyBridge, + CPU_IvyBridge, CPU_Haswell, CPU_Broadwell, CPU_SKX, CPU_ICL, CPU_ICX, CPU_None); +-#endif + compat[CPU_ICX] = Set(CPU_ICX, CPU_x86_64, CPU_Bonnell, CPU_Penryn, CPU_Core2, CPU_Nehalem, CPU_Silvermont, + CPU_SandyBridge, CPU_IvyBridge, CPU_Haswell, CPU_Broadwell, CPU_SKX, CPU_ICL, CPU_None); + +@@ -556,9 +550,7 @@ Target::Target(Arch arch, const char *cpu, ISPCTarget ispc_target, bool pic, boo + #if ISPC_LLVM_VERSION >= ISPC_LLVM_12_0 + case CPU_SPR: + #endif +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + case CPU_TGL: +-#endif + case CPU_ICX: + case CPU_ICL: + case CPU_SKX: +@@ -916,7 +908,6 @@ Target::Target(Arch arch, const char *cpu, ISPCTarget ispc_target, bool pic, boo + } + break; + case ISPCTarget::avx512skx_i8x64: +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 // LLVM 10.0+ + // This target is enabled only for LLVM 10.0 and later + // because LLVM requires a number of fixes, which are + // committed to LLVM 11.0 and can be applied to 10.0, but not +@@ -937,12 +928,7 @@ Target::Target(Arch arch, const char *cpu, ISPCTarget ispc_target, bool pic, boo + this->m_hasVecPrefetch = false; + CPUfromISA = CPU_SKX; + break; +-#else +- unsupported_target = true; +- break; +-#endif + case ISPCTarget::avx512skx_i16x32: +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 // LLVM 10.0+ + // This target is enabled only for LLVM 10.0 and later + // because LLVM requires a number of fixes, which are + // committed to LLVM 11.0 and can be applied to 10.0, but not +@@ -963,10 +949,6 @@ Target::Target(Arch arch, const char *cpu, ISPCTarget ispc_target, bool pic, boo + this->m_hasVecPrefetch = false; + CPUfromISA = CPU_SKX; + break; +-#else +- unsupported_target = true; +- break; +-#endif + #ifdef ISPC_ARM_ENABLED + case ISPCTarget::neon_i8x16: + this->m_isa = Target::NEON; +@@ -1662,11 +1644,9 @@ Globals::Globals() { + isMultiTargetCompilation = false; + errorLimit = -1; + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + enableTimeTrace = false; + // set default granularity to 500. + timeTraceGranularity = 500; +-#endif + target = NULL; + ctx = new llvm::LLVMContext; + +diff --git a/src/ispc.h b/src/ispc.h +index e25d8830e..de357a21c 100644 +--- a/src/ispc.h ++++ b/src/ispc.h +@@ -695,13 +695,12 @@ struct Globals { + + /* Number of errors to show in ISPC. */ + int errorLimit; +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 ++ + /* When true, enable compile time tracing. */ + bool enableTimeTrace; + + /* When compile time tracing is enabled, set time granularity. */ + int timeTraceGranularity; +-#endif + }; + + enum { +diff --git a/src/ispc_version.h b/src/ispc_version.h +index d781347fd..434b2d678 100644 +--- a/src/ispc_version.h ++++ b/src/ispc_version.h +@@ -44,13 +44,11 @@ + + #define ISPC_LLVM_VERSION (LLVM_VERSION_MAJOR * 10000 + LLVM_VERSION_MINOR * 100) + +-#define ISPC_LLVM_8_0 80000 +-#define ISPC_LLVM_9_0 90000 + #define ISPC_LLVM_10_0 100000 + #define ISPC_LLVM_11_0 110000 + #define ISPC_LLVM_12_0 120000 + +-#define OLDEST_SUPPORTED_LLVM ISPC_LLVM_8_0 ++#define OLDEST_SUPPORTED_LLVM ISPC_LLVM_10_0 + #define LATEST_SUPPORTED_LLVM ISPC_LLVM_12_0 + + #ifdef __ispc__xstr +diff --git a/src/main.cpp b/src/main.cpp +index 8f64330cc..5c920eabc 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -55,9 +55,7 @@ + #include + #include + #include +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + #include +-#endif + + #ifdef ISPC_HOST_IS_WINDOWS + #define strcasecmp stricmp +@@ -181,11 +179,9 @@ static void lPrintVersion() { + snprintf(targetHelp, sizeof(targetHelp), "[--target-os=]\t\t\tSelect target OS. ={%s}", + g->target_registry->getSupportedOSes().c_str()); + PrintWithWordBreaks(targetHelp, 24, TerminalWidth(), stdout); +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + printf(" [--time-trace]\t\t\tTurn on time profiler. Generates JSON file based on output filename.\n"); + printf(" [--time-trace-granularity=\tMinimum time granularity (in microseconds) traced by time " + "profiler.\n"); +-#endif + printf(" [--version]\t\t\t\tPrint ispc version\n"); + #ifdef ISPC_GENX_ENABLED + printf(" [--vc-options=<\"-option1 -option2...\">]\t\t\t\tPass additional options to Vector Compiler backend\n"); +@@ -462,7 +458,6 @@ static void setCallingConv(VectorCallStatus vectorCall, Arch arch) { + } + } + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + static void writeCompileTimeFile(const char *outFileName) { + llvm::SmallString<128> jsonFileName(outFileName); + jsonFileName.append(".json"); +@@ -479,7 +474,6 @@ static void writeCompileTimeFile(const char *outFileName) { + of->keep(); + return; + } +-#endif + + static std::set ParsingPhases(char *stages, ArgErrors &errorHandler) { + constexpr int parsing_limit = 100; +@@ -791,12 +785,10 @@ int main(int Argc, char *Argv[]) { + } + } else if (!strncmp(argv[i], "--force-alignment=", 18)) { + g->forceAlignment = atoi(argv[i] + 18); +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + } else if (!strcmp(argv[i], "--time-trace")) { + g->enableTimeTrace = true; + } else if (!strncmp(argv[i], "--time-trace-granularity=", 25)) { + g->timeTraceGranularity = atoi(argv[i] + 25); +-#endif + } else if (!strcmp(argv[i], "--woff") || !strcmp(argv[i], "-woff")) { + g->disableWarnings = true; + g->emitPerfWarnings = false; +@@ -1059,7 +1051,6 @@ int main(int Argc, char *Argv[]) { + + // This needs to happen after the TargetOS is decided. + setCallingConv(vectorCall, arch); +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + if (g->enableTimeTrace) { + llvm::timeTraceProfilerInitialize(g->timeTraceGranularity, "ispc"); + } +@@ -1077,9 +1068,5 @@ int main(int Argc, char *Argv[]) { + } + llvm::timeTraceProfilerCleanup(); + } +-#else +- int ret = Module::CompileAndOutput(file, arch, cpu, targets, flags, ot, outFileName, headerFileName, depsFileName, +- depsTargetName, hostStubFileName, devStubFileName); +-#endif + return ret; + } +diff --git a/src/module.cpp b/src/module.cpp +index fe7452df1..a85fec77a 100644 +--- a/src/module.cpp ++++ b/src/module.cpp +@@ -170,9 +170,7 @@ Module::Module(const char *fn) { + module->setDataLayout(g->target->getDataLayout()->getStringRepresentation()); + + if (g->generateDebuggingSymbols) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("Create Debug Data"); +-#endif + // To enable debug information on Windows, we have to let llvm know, that + // debug information should be emitted in CodeView format. + if (g->target_os == TargetOS::windows) { +@@ -226,10 +224,8 @@ extern YY_BUFFER_STATE yy_create_buffer(FILE *, int); + extern void yy_delete_buffer(YY_BUFFER_STATE); + + int Module::CompileFile() { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope CompileFileTimeScope( + "CompileFile", llvm::StringRef(filename + ("_" + std::string(g->target->GetISAString())))); +-#endif + extern void ParserInit(); + ParserInit(); + +@@ -238,18 +234,14 @@ int Module::CompileFile() { + // variable 'm' to be initialized and available (which it isn't until + // the Module constructor returns...) + { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("DefineStdlib"); +-#endif + DefineStdlib(symbolTable, g->ctx, module, g->includeStdlib); + } + + bool runPreprocessor = g->runCPP; + + if (runPreprocessor) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("Frontend parser"); +-#endif + if (!IsStdin(filename)) { + // Try to open the file first, since otherwise we crash in the + // preprocessor if the file doesn't exist. +@@ -268,9 +260,7 @@ int Module::CompileFile() { + yyparse(); + yy_delete_buffer(strbuf); + } else { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("Frontend parser"); +-#endif + // No preprocessor, just open up the file if it's not stdin.. + FILE *f = NULL; + if (IsStdin(filename)) { +@@ -297,9 +287,7 @@ int Module::CompileFile() { + + if (diBuilder) + diBuilder->finalize(); +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("Optimize"); +-#endif + if (errorCount == 0) + Optimize(module, g->opt.level); + +@@ -1243,15 +1231,8 @@ bool Module::writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine, llvm: + const char *outFileName) { + // Figure out if we're generating object file or assembly output, and + // set binary output for object files +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- Assert(!g->target->isGenXTarget()); +- llvm::TargetMachine::CodeGenFileType fileType = +- (outputType == Object) ? llvm::TargetMachine::CGFT_ObjectFile : llvm::TargetMachine::CGFT_AssemblyFile; +- bool binary = (fileType == llvm::TargetMachine::CGFT_ObjectFile); +-#else // LLVM 10.0+ + llvm::CodeGenFileType fileType = (outputType == Object) ? llvm::CGFT_ObjectFile : llvm::CGFT_AssemblyFile; + bool binary = (fileType == llvm::CGFT_ObjectFile); +-#endif + + llvm::sys::fs::OpenFlags flags = binary ? llvm::sys::fs::F_None : llvm::sys::fs::F_Text; + +@@ -2219,11 +2200,7 @@ void Module::execPreprocessor(const char *infilename, llvm::raw_string_ostream * + inst.setTarget(target); + inst.createSourceManager(inst.getFileManager()); + +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- clang::FrontendInputFile inputFile(infilename, clang::InputKind::Unknown); +-#else // LLVM 10.0+ + clang::FrontendInputFile inputFile(infilename, clang::InputKind()); +-#endif + + inst.InitializeSourceManager(inputFile); + +@@ -2722,9 +2699,7 @@ int Module::CompileAndOutput(const char *srcFile, Arch arch, const char *cpu, st + + m = new Module(srcFile); + if (m->CompileFile() == 0) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("Backend"); +-#endif + #ifdef ISPC_GENX_ENABLED + if (outputType == Asm || outputType == Object) { + if (g->target->isGenXTarget()) { +@@ -2855,9 +2830,7 @@ int Module::CompileAndOutput(const char *srcFile, Arch arch, const char *cpu, st + + m = new Module(srcFile); + int compileFileError = m->CompileFile(); +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope TimeScope("Backend"); +-#endif + if (compileFileError == 0) { + // Create the dispatch module, unless already created; + // in the latter case, just do the checking +diff --git a/src/module.h b/src/module.h +index 61d3cfea0..603124d50 100644 +--- a/src/module.h ++++ b/src/module.h +@@ -43,9 +43,7 @@ + + #include + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + #include +-#endif + + #ifdef ISPC_GENX_ENABLED + #include "ocl_igc_interface/igc_ocl_device_ctx.h" +diff --git a/src/opt.cpp b/src/opt.cpp +index a655a8344..5b1ac7b63 100644 +--- a/src/opt.cpp ++++ b/src/opt.cpp +@@ -66,6 +66,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -85,9 +86,6 @@ + #include + #include + #include +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 +-#include +-#endif + + #ifdef ISPC_HOST_IS_LINUX + #include +@@ -1003,10 +1001,7 @@ bool IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock &bb) { + else + align = callInst->getCalledFunction() == avxMaskedLoad32 ? 4 : 8; + name = LLVMGetName(callInst->getArgOperand(0), "_load"); +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- llvm::Instruction *loadInst = +- new llvm::LoadInst(castPtr, name, false /* not volatile */, align, (llvm::Instruction *)NULL); +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_10_0 ++#if ISPC_LLVM_VERSION == ISPC_LLVM_10_0 + llvm::Instruction *loadInst = new llvm::LoadInst(castPtr, name, false /* not volatile */, + llvm::MaybeAlign(align), (llvm::Instruction *)NULL); + #else +@@ -1043,13 +1038,8 @@ bool IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock &bb) { + align = g->target->getNativeVectorAlignment(); + else + align = callInst->getCalledFunction() == avxMaskedStore32 ? 4 : 8; +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- llvm::StoreInst *storeInst = new llvm::StoreInst(rvalue, castPtr, (llvm::Instruction *)NULL); +- storeInst->setAlignment(align); +-#else + llvm::StoreInst *storeInst = new llvm::StoreInst(rvalue, castPtr, (llvm::Instruction *)NULL, + llvm::MaybeAlign(align).valueOrOne()); +-#endif + lCopyMetadata(storeInst, callInst); + llvm::ReplaceInstWithInst(callInst, storeInst); + +@@ -1066,9 +1056,7 @@ bool IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool IntrinsicsOpt::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("IntrinsicsOpt::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -1239,9 +1227,7 @@ bool InstructionSimplifyPass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool InstructionSimplifyPass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("InstructionSimplifyPass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -2974,16 +2960,10 @@ static bool lImproveMaskedStore(llvm::CallInst *callInst) { + + lvalue = new llvm::BitCastInst(lvalue, ptrType, "lvalue_to_ptr_type", callInst); + lCopyMetadata(lvalue, callInst); +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- store = +- new llvm::StoreInst(rvalue, lvalue, false /* not volatile */, +- g->opt.forceAlignedMemory ? g->target->getNativeVectorAlignment() : info->align); +-#else + store = new llvm::StoreInst( + rvalue, lvalue, false /* not volatile */, + llvm::MaybeAlign(g->opt.forceAlignedMemory ? g->target->getNativeVectorAlignment() : info->align) + .valueOrOne()); +-#endif + } + if (store != NULL) { + lCopyMetadata(store, callInst); +@@ -3059,11 +3039,7 @@ static bool lImproveMaskedLoad(llvm::CallInst *callInst, llvm::BasicBlock::itera + { + llvm::Type *ptrType = llvm::PointerType::get(callInst->getType(), 0); + ptr = new llvm::BitCastInst(ptr, ptrType, "ptr_cast_for_load", callInst); +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- load = new llvm::LoadInst(ptr, callInst->getName(), false /* not volatile */, +- g->opt.forceAlignedMemory ? g->target->getNativeVectorAlignment() : info->align, +- (llvm::Instruction *)NULL); +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_10_0 ++#if ISPC_LLVM_VERSION == ISPC_LLVM_10_0 + load = new llvm::LoadInst( + ptr, callInst->getName(), false /* not volatile */, + llvm::MaybeAlign(g->opt.forceAlignedMemory ? g->target->getNativeVectorAlignment() : info->align) +@@ -3129,9 +3105,7 @@ bool ImproveMemoryOpsPass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool ImproveMemoryOpsPass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("ImproveMemoryOpsPass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -3424,9 +3398,7 @@ llvm::Value *lGEPAndLoad(llvm::Value *basePtr, int64_t offset, int align, llvm:: + llvm::Type *type) { + llvm::Value *ptr = lGEPInst(basePtr, LLVMInt64(offset), "new_base", insertBefore); + ptr = new llvm::BitCastInst(ptr, llvm::PointerType::get(type, 0), "ptr_cast", insertBefore); +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- return new llvm::LoadInst(ptr, "gather_load", false /* not volatile */, align, insertBefore); +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_10_0 ++#if ISPC_LLVM_VERSION == ISPC_LLVM_10_0 + return new llvm::LoadInst(ptr, "gather_load", false /* not volatile */, llvm::MaybeAlign(align), insertBefore); + #else // LLVM 11.0+ + return new llvm::LoadInst(llvm::dyn_cast(ptr->getType())->getPointerElementType(), ptr, +@@ -4135,9 +4107,7 @@ bool GatherCoalescePass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool GatherCoalescePass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("GatherCoalescePass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -4467,9 +4437,7 @@ bool ReplacePseudoMemoryOpsPass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool ReplacePseudoMemoryOpsPass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("ReplacePseudoMemoryOpsPass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -4573,9 +4541,7 @@ bool IsCompileTimeConstantPass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool IsCompileTimeConstantPass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("IsCompileTimeConstantPass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -5201,9 +5167,7 @@ bool PeepholePass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool PeepholePass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("PeepholePass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -5299,9 +5263,7 @@ bool ReplaceStdlibShiftPass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool ReplaceStdlibShiftPass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("ReplaceStdlibShiftPass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -5399,9 +5361,7 @@ llvm::Instruction *FixBooleanSelectPass::fixSelect(llvm::SelectInst *sel, llvm:: + } + + bool FixBooleanSelectPass::runOnFunction(llvm::Function &F) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("FixBooleanSelectPass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + + return modifiedAny; +@@ -5964,9 +5924,7 @@ bool GenXGatherCoalescing::runOnBasicBlock(llvm::BasicBlock &bb) { + } + + bool GenXGatherCoalescing::runOnFunction(llvm::Function &F) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("GenXGatherCoalescing::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -6113,9 +6071,7 @@ bool PromoteToPrivateMemoryPass::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool PromoteToPrivateMemoryPass::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("PromoteToPrivateMemoryPass::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -6181,9 +6137,7 @@ bool ReplaceLLVMIntrinsics::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool ReplaceLLVMIntrinsics::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("ReplaceLLVMIntrinsics::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -6278,9 +6232,7 @@ bool ReplaceUnsupportedInsts::runOnBasicBlock(llvm::BasicBlock &bb) { + + bool ReplaceUnsupportedInsts::runOnFunction(llvm::Function &F) { + +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("ReplaceUnsupportedInsts::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -6369,9 +6321,7 @@ bool CheckUnsupportedInsts::runOnBasicBlock(llvm::BasicBlock &bb) { + } + + bool CheckUnsupportedInsts::runOnFunction(llvm::Function &F) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("CheckUnsupportedInsts::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -6440,9 +6390,7 @@ bool MangleOpenCLBuiltins::runOnBasicBlock(llvm::BasicBlock &bb) { + } + + bool MangleOpenCLBuiltins::runOnFunction(llvm::Function &F) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("MangleOpenCLBuiltins::runOnFunction", F.getName()); +-#endif + bool modifiedAny = false; + for (llvm::BasicBlock &BB : F) { + modifiedAny |= runOnBasicBlock(BB); +@@ -6828,9 +6776,7 @@ bool FixAddressSpace::runOnFunction(llvm::Function &F) { + // Transformations are correct when the function is not internal. + // This is due to address space calculation algorithm. + // TODO: problems can be met in case of Stack Calls +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("FixAddressSpace::runOnFunction", F.getName()); +-#endif + if (F.getLinkage() == llvm::GlobalValue::LinkageTypes::InternalLinkage) + return false; + +@@ -6854,9 +6800,7 @@ class DemotePHIs : public llvm::FunctionPass { + char DemotePHIs::ID = 0; + + bool DemotePHIs::runOnFunction(llvm::Function &F) { +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_10_0 + llvm::TimeTraceScope FuncScope("DemotePHIs::runOnFunction", F.getName()); +-#endif + if (F.isDeclaration() || skipFunction(F)) + return false; + std::vector WorkList; +diff --git a/src/type.cpp b/src/type.cpp +index 688a4e874..fa0cb04db 100644 +--- a/src/type.cpp ++++ b/src/type.cpp +@@ -1822,14 +1822,10 @@ llvm::DIType *StructType::GetDIType(llvm::DIScope *scope) const { + llvm::DIFile *diFile = pos.GetDIFile(); + llvm::DINamespace *diSpace = pos.GetDINamespace(); + return m->diBuilder->createStructType(diSpace, GetString(), diFile, +- pos.first_line, // Line number +- layout->getSizeInBits(), // Size in bits +-#if ISPC_LLVM_VERSION <= ISPC_LLVM_9_0 +- layout->getAlignment() * 8, // Alignment in bits +-#else // LLVM 10.0+ ++ pos.first_line, // Line number ++ layout->getSizeInBits(), // Size in bits + layout->getAlignment().value() * 8, // Alignment in bits +-#endif +- llvm::DINode::FlagZero, // Flags ++ llvm::DINode::FlagZero, // Flags + NULL, elements); + } + +diff --git a/tests/lit-tests/1771.ispc b/tests/lit-tests/1771.ispc +index 98064d84d..4feb73dd7 100644 +--- a/tests/lit-tests/1771.ispc ++++ b/tests/lit-tests/1771.ispc +@@ -5,7 +5,6 @@ + // RUN: %{ispc} %s --target=sse4-i16x8 --emit-asm -o - | FileCheck %s -check-prefix=CHECKSSE4_I16X8 + // RUN: %{ispc} %s --target=sse4-i8x16 --emit-asm -o - | FileCheck %s -check-prefix=CHECKSSE4_I8X16 + +-// REQUIRES: LLVM_10_0+ + // REQUIRES: X86_ENABLED + + // CHECKAVX2_I32X8: {{[a-z]*xor[a-z]*}} %xmm0, %xmm0, %xmm0 +diff --git a/tests/lit-tests/1844.ispc b/tests/lit-tests/1844.ispc +index 793a8866c..189edf4c3 100644 +--- a/tests/lit-tests/1844.ispc ++++ b/tests/lit-tests/1844.ispc +@@ -6,9 +6,6 @@ + + // REQUIRES: X86_ENABLED + +-// It doesn't work for anything earlier than 10.0, but it will not be fixed, so don't run. +-// REQUIRES: LLVM_10_0+ +- + extern uniform unsigned int64 var_6; + extern uniform unsigned int16 var_11; + extern uniform bool arr_201 [1] [15] [20]; +diff --git a/tests/lit-tests/1926.ispc b/tests/lit-tests/1926.ispc +index 70f7cc3c2..7921c91a6 100644 +--- a/tests/lit-tests/1926.ispc ++++ b/tests/lit-tests/1926.ispc +@@ -2,8 +2,6 @@ + // RUN: cat %T/1926.o.json \ + // RUN: | FileCheck %s + +-// REQUIRES: LLVM_10_0+ +- + // CHECK: "traceEvents" + // CHECK: "detail" + export uniform int foo(uniform int a[], uniform int count) { +diff --git a/tests/lit-tests/cpus_x86.ispc b/tests/lit-tests/cpus_x86.ispc +index 516efdd4c..4d60186f6 100644 +--- a/tests/lit-tests/cpus_x86.ispc ++++ b/tests/lit-tests/cpus_x86.ispc +@@ -24,6 +24,8 @@ + //; RUN: %{ispc} %s -o %t.o --nostdlib --target=sse2-i32x4 --cpu=icl + //; RUN: %{ispc} %s -o %t.o --nostdlib --target=sse2-i32x4 --cpu=icelake-server + //; RUN: %{ispc} %s -o %t.o --nostdlib --target=sse2-i32x4 --cpu=icx ++//; RUN: %{ispc} %s -o %t.o --nostdlib --target=sse2-i32x4 --cpu=tigerlake ++//; RUN: %{ispc} %s -o %t.o --nostdlib --target=sse2-i32x4 --cpu=tgl + + // REQUIRES: X86_ENABLED + +diff --git a/tests/lit-tests/cpus_x86_llvm10.ispc b/tests/lit-tests/cpus_x86_llvm10.ispc +deleted file mode 100644 +index ef00000e5..000000000 +--- a/tests/lit-tests/cpus_x86_llvm10.ispc ++++ /dev/null +@@ -1,11 +0,0 @@ +-// The test checks that cpu definitions (including all synonyms) are successfully consumed by compiler. +- +-//; RUN: %{ispc} %s -o %t.o --nostdlib --target=sse2-i32x4 --cpu=tigerlake +-//; RUN: %{ispc} %s -o %t.o --nostdlib --target=sse2-i32x4 --cpu=tgl +- +-// REQUIRES: X86_ENABLED +-// REQUIRES: LLVM_10_0+ +- +-uniform int i; +- +-void foo() {} +diff --git a/tests/lit-tests/lit.cfg b/tests/lit-tests/lit.cfg +index 17016579d..045e69437 100644 +--- a/tests/lit-tests/lit.cfg ++++ b/tests/lit-tests/lit.cfg +@@ -30,11 +30,6 @@ print("Config:") + + # LLVM version + llvm_version = LooseVersion(ispc_llvm_version_number) +-if llvm_version >= LooseVersion("10.0.0"): +- print("LLVM_10_0+: YES") +- config.available_features.add("LLVM_10_0+") +-else: +- print("LLVM_10_0+: NO") + + if llvm_version >= LooseVersion("12.0.0"): + print("LLVM_12_0+: YES") diff --git a/srcpkgs/ispc/patches/llvm12-003.patch b/srcpkgs/ispc/patches/llvm12-003.patch new file mode 100644 index 00000000000000..0423afc9e3f93e --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-003.patch @@ -0,0 +1,1504 @@ +From 1851d18b213dbad169937076176b2d5509733c76 Mon Sep 17 00:00:00 2001 +From: Deepak Rajendrakumaran +Date: Tue, 12 Jan 2021 22:15:12 -0800 +Subject: [PATCH] fixes #1821 - Removing LLVMGetName() and switching to + LLVM::Twine. + +--- + src/ctx.cpp | 304 ++++++++++++++++++++++------------------------- + src/ctx.h | 72 +++++------ + src/expr.cpp | 36 +++--- + src/llvmutil.cpp | 17 --- + src/llvmutil.h | 5 - + src/opt.cpp | 103 +++++++++------- + 6 files changed, 255 insertions(+), 282 deletions(-) + +diff --git a/src/ctx.cpp b/src/ctx.cpp +index 42c4ea09d..ded524b71 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -1020,8 +1020,8 @@ void FunctionEmitContext::EmitCaseLabel(int value, bool checkMask, SourcePos pos + llvm::BasicBlock *bbCaseImpl = NULL; + if (emitGenXHardwareMask()) { + // Create basic block with actual case implementation +- std::string bbName = bbCase->getName().str() + "_impl"; +- bbCaseImpl = CreateBasicBlock(bbName.c_str(), bbCase); ++ llvm::Twine bbName = llvm::Twine(bbCase->getName()) + "_impl"; ++ bbCaseImpl = CreateBasicBlock(bbName, bbCase); + } + #endif + +@@ -1185,7 +1185,7 @@ bool FunctionEmitContext::initLabelBBlocks(ASTNode *node, void *data) { + if (ctx->labelMap.find(ls->name) != ctx->labelMap.end()) + Error(ls->pos, "Multiple labels named \"%s\" in function.", ls->name.c_str()); + else { +- llvm::BasicBlock *bb = ctx->CreateBasicBlock(ls->name.c_str()); ++ llvm::BasicBlock *bb = ctx->CreateBasicBlock(ls->name); + ctx->labelMap[ls->name] = bb; + } + return true; +@@ -1299,7 +1299,7 @@ llvm::Value *FunctionEmitContext::Any(llvm::Value *mask) { + // We can actually call either one, since both are i32s as far as + // LLVM's type system is concerned... + llvm::Function *fmm = mm[0]->function; +- return CallInst(fmm, NULL, mask, LLVMGetName(mask, "_any")); ++ return CallInst(fmm, NULL, mask, llvm::Twine(mask->getName()) + "_any"); + } + + llvm::Value *FunctionEmitContext::All(llvm::Value *mask) { +@@ -1315,7 +1315,7 @@ llvm::Value *FunctionEmitContext::All(llvm::Value *mask) { + // We can actually call either one, since both are i32s as far as + // LLVM's type system is concerned... + llvm::Function *fmm = mm[0]->function; +- return CallInst(fmm, NULL, mask, LLVMGetName(mask, "_all")); ++ return CallInst(fmm, NULL, mask, llvm::Twine(mask->getName()) + "_all"); + } + + llvm::Value *FunctionEmitContext::None(llvm::Value *mask) { +@@ -1331,7 +1331,7 @@ llvm::Value *FunctionEmitContext::None(llvm::Value *mask) { + // We can actually call either one, since both are i32s as far as + // LLVM's type system is concerned... + llvm::Function *fmm = mm[0]->function; +- return CallInst(fmm, NULL, mask, LLVMGetName(mask, "_none")); ++ return CallInst(fmm, NULL, mask, llvm::Twine(mask->getName()) + "_none"); + } + + llvm::Value *FunctionEmitContext::LaneMask(llvm::Value *v) { +@@ -1349,7 +1349,7 @@ llvm::Value *FunctionEmitContext::LaneMask(llvm::Value *v) { + // We can actually call either one, since both are i32s as far as + // LLVM's type system is concerned... + llvm::Function *fmm = mm[0]->function; +- return CallInst(fmm, NULL, v, LLVMGetName(v, "_movmsk")); ++ return CallInst(fmm, NULL, v, llvm::Twine(v->getName()) + "_movmsk"); + } + + llvm::Value *FunctionEmitContext::MasksAllEqual(llvm::Value *v1, llvm::Value *v2) { +@@ -1364,11 +1364,12 @@ llvm::Value *FunctionEmitContext::MasksAllEqual(llvm::Value *v1, llvm::Value *v2 + #else + if (g->target->getArch() == Arch::wasm32) { + llvm::Function *fmm = m->module->getFunction("__wasm_cmp_msk_eq"); +- return CallInst(fmm, NULL, {v1, v2}, LLVMGetName("wasm_cmp_msk_eq", v1, v2)); ++ return CallInst(fmm, NULL, {v1, v2}, ((llvm::Twine("wasm_cmp_msk_eq_") + v1->getName()) + "_") + v2->getName()); + } + llvm::Value *mm1 = LaneMask(v1); + llvm::Value *mm2 = LaneMask(v2); +- return CmpInst(llvm::Instruction::ICmp, llvm::CmpInst::ICMP_EQ, mm1, mm2, LLVMGetName("equal", v1, v2)); ++ return CmpInst(llvm::Instruction::ICmp, llvm::CmpInst::ICMP_EQ, mm1, mm2, ++ ((llvm::Twine("equal_") + v1->getName()) + "_") + v2->getName()); + #endif + } + +@@ -1392,7 +1393,7 @@ llvm::Value *FunctionEmitContext::GetStringPtr(const std::string &str) { + return new llvm::BitCastInst(lstrPtr, LLVMTypes::VoidPointerType, "str_void_ptr", bblock); + } + +-llvm::BasicBlock *FunctionEmitContext::CreateBasicBlock(const char *name, llvm::BasicBlock *insertAfter) { ++llvm::BasicBlock *FunctionEmitContext::CreateBasicBlock(const llvm::Twine &name, llvm::BasicBlock *insertAfter) { + llvm::BasicBlock *newBB = llvm::BasicBlock::Create(*g->ctx, name, llvmFunction); + if (insertAfter) + newBB->moveAfter(insertAfter); +@@ -1416,14 +1417,15 @@ llvm::Value *FunctionEmitContext::I1VecToBoolVec(llvm::Value *b) { + + for (unsigned int i = 0; i < at->getNumElements(); ++i) { + llvm::Value *elt = ExtractInst(b, i); +- llvm::Value *sext = SwitchBoolSize(elt, LLVMTypes::BoolVectorStorageType, LLVMGetName(elt, "_to_boolvec")); ++ llvm::Value *sext = ++ SwitchBoolSize(elt, LLVMTypes::BoolVectorStorageType, llvm::Twine(elt->getName()) + "_to_boolvec"); + ret = InsertInst(ret, sext, i); + } + return ret; + } else { + // For non-array types, convert to 'LLVMTypes::BoolVectorType' if + // necessary. +- return SwitchBoolSize(b, LLVMTypes::BoolVectorType, LLVMGetName(b, "_to_boolvec")); ++ return SwitchBoolSize(b, LLVMTypes::BoolVectorType, llvm::Twine(b->getName()) + "_to_boolvec"); + } + } + +@@ -1563,7 +1565,7 @@ static int lArrayVectorWidth(llvm::Type *t) { + } + + llvm::Value *FunctionEmitContext::BinaryOperator(llvm::Instruction::BinaryOps inst, llvm::Value *v0, llvm::Value *v1, +- const char *name) { ++ const llvm::Twine &name) { + if (v0 == NULL || v1 == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -1573,7 +1575,7 @@ llvm::Value *FunctionEmitContext::BinaryOperator(llvm::Instruction::BinaryOps in + llvm::Type *type = v0->getType(); + int arraySize = lArrayVectorWidth(type); + if (arraySize == 0) { +- llvm::Instruction *bop = llvm::BinaryOperator::Create(inst, v0, v1, name ? name : "", bblock); ++ llvm::Instruction *bop = llvm::BinaryOperator::Create(inst, v0, v1, name, bblock); + AddDebugPos(bop); + return bop; + } else { +@@ -1591,7 +1593,7 @@ llvm::Value *FunctionEmitContext::BinaryOperator(llvm::Instruction::BinaryOps in + } + } + +-llvm::Value *FunctionEmitContext::NotOperator(llvm::Value *v, const char *name) { ++llvm::Value *FunctionEmitContext::NotOperator(llvm::Value *v, const llvm::Twine &name) { + if (v == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -1603,14 +1605,14 @@ llvm::Value *FunctionEmitContext::NotOperator(llvm::Value *v, const char *name) + llvm::Type *type = v->getType(); + int arraySize = lArrayVectorWidth(type); + if (arraySize == 0) { +- llvm::Instruction *binst = llvm::BinaryOperator::CreateNot(v, name ? name : "not", bblock); ++ llvm::Instruction *binst = llvm::BinaryOperator::CreateNot(v, name.isTriviallyEmpty() ? "not" : name, bblock); + AddDebugPos(binst); + return binst; + } else { + llvm::Value *ret = llvm::UndefValue::get(type); + for (int i = 0; i < arraySize; ++i) { + llvm::Value *a = ExtractInst(v, i); +- llvm::Value *op = llvm::BinaryOperator::CreateNot(a, name ? name : "not", bblock); ++ llvm::Value *op = llvm::BinaryOperator::CreateNot(a, name.isTriviallyEmpty() ? "not" : name, bblock); + AddDebugPos(op); + ret = InsertInst(ret, op, i); + } +@@ -1638,7 +1640,7 @@ static llvm::Type *lGetMatchingBoolVectorType(llvm::Type *type) { + } + + llvm::Value *FunctionEmitContext::CmpInst(llvm::Instruction::OtherOps inst, llvm::CmpInst::Predicate pred, +- llvm::Value *v0, llvm::Value *v1, const char *name) { ++ llvm::Value *v0, llvm::Value *v1, const llvm::Twine &name) { + if (v0 == NULL || v1 == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -1648,7 +1650,8 @@ llvm::Value *FunctionEmitContext::CmpInst(llvm::Instruction::OtherOps inst, llvm + llvm::Type *type = v0->getType(); + int arraySize = lArrayVectorWidth(type); + if (arraySize == 0) { +- llvm::Instruction *ci = llvm::CmpInst::Create(inst, pred, v0, v1, name ? name : "cmp", bblock); ++ llvm::Instruction *ci = ++ llvm::CmpInst::Create(inst, pred, v0, v1, name.isTriviallyEmpty() ? "cmp" : name, bblock); + AddDebugPos(ci); + return ci; + } else { +@@ -1657,14 +1660,14 @@ llvm::Value *FunctionEmitContext::CmpInst(llvm::Instruction::OtherOps inst, llvm + for (int i = 0; i < arraySize; ++i) { + llvm::Value *a = ExtractInst(v0, i); + llvm::Value *b = ExtractInst(v1, i); +- llvm::Value *op = CmpInst(inst, pred, a, b, name); ++ llvm::Value *op = CmpInst(inst, pred, a, b, name.isTriviallyEmpty() ? "cmp" : name); + ret = InsertInst(ret, op, i); + } + return ret; + } + } + +-llvm::Value *FunctionEmitContext::SmearUniform(llvm::Value *value, const char *name) { ++llvm::Value *FunctionEmitContext::SmearUniform(llvm::Value *value, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -1704,21 +1707,19 @@ llvm::Value *FunctionEmitContext::SmearUniform(llvm::Value *value, const char *n + return ret; + } + +-llvm::Value *FunctionEmitContext::BitCastInst(llvm::Value *value, llvm::Type *type, const char *name) { ++llvm::Value *FunctionEmitContext::BitCastInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_bitcast"); +- +- llvm::Instruction *inst = new llvm::BitCastInst(value, type, name, bblock); ++ llvm::Instruction *inst = new llvm::BitCastInst( ++ value, type, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_bitcast" : name, bblock); + AddDebugPos(inst); + return inst; + } + +-llvm::Value *FunctionEmitContext::PtrToIntInst(llvm::Value *value, const char *name) { ++llvm::Value *FunctionEmitContext::PtrToIntInst(llvm::Value *value, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -1728,23 +1729,19 @@ llvm::Value *FunctionEmitContext::PtrToIntInst(llvm::Value *value, const char *n + // no-op for varying pointers; they're already vectors of ints + return value; + +- if (name == NULL) +- name = LLVMGetName(value, "_ptr2int"); + llvm::Type *type = LLVMTypes::PointerIntType; +- llvm::Instruction *inst = new llvm::PtrToIntInst(value, type, name, bblock); ++ llvm::Instruction *inst = new llvm::PtrToIntInst( ++ value, type, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_ptr2int" : name, bblock); + AddDebugPos(inst); + return inst; + } + +-llvm::Value *FunctionEmitContext::PtrToIntInst(llvm::Value *value, llvm::Type *toType, const char *name) { ++llvm::Value *FunctionEmitContext::PtrToIntInst(llvm::Value *value, llvm::Type *toType, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_ptr2int"); +- + llvm::Type *fromType = value->getType(); + if (llvm::isa(fromType)) { + // varying pointer +@@ -1752,27 +1749,26 @@ llvm::Value *FunctionEmitContext::PtrToIntInst(llvm::Value *value, llvm::Type *t + // already the right type--done + return value; + else if (fromType->getScalarSizeInBits() > toType->getScalarSizeInBits()) +- return TruncInst(value, toType, name); ++ return TruncInst(value, toType, ++ name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_ptr2int" : name); + else { + AssertPos(currentPos, fromType->getScalarSizeInBits() < toType->getScalarSizeInBits()); +- return ZExtInst(value, toType, name); ++ return ZExtInst(value, toType, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_ptr2int" : name); + } + } + +- llvm::Instruction *inst = new llvm::PtrToIntInst(value, toType, name, bblock); ++ llvm::Instruction *inst = new llvm::PtrToIntInst( ++ value, toType, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_ptr2int" : name, bblock); + AddDebugPos(inst); + return inst; + } + +-llvm::Value *FunctionEmitContext::IntToPtrInst(llvm::Value *value, llvm::Type *toType, const char *name) { ++llvm::Value *FunctionEmitContext::IntToPtrInst(llvm::Value *value, llvm::Type *toType, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_int2ptr"); +- + llvm::Type *fromType = value->getType(); + if (llvm::isa(fromType)) { + // varying pointer +@@ -1780,95 +1776,87 @@ llvm::Value *FunctionEmitContext::IntToPtrInst(llvm::Value *value, llvm::Type *t + // done + return value; + else if (fromType->getScalarSizeInBits() > toType->getScalarSizeInBits()) +- return TruncInst(value, toType, name); ++ return TruncInst(value, toType, ++ name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_int2ptr" : name); + else { + AssertPos(currentPos, fromType->getScalarSizeInBits() < toType->getScalarSizeInBits()); +- return ZExtInst(value, toType, name); ++ return ZExtInst(value, toType, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_int2ptr" : name); + } + } + +- llvm::Instruction *inst = new llvm::IntToPtrInst(value, toType, name, bblock); ++ llvm::Instruction *inst = new llvm::IntToPtrInst( ++ value, toType, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_int2ptr" : name, bblock); + AddDebugPos(inst); + return inst; + } + +-llvm::Instruction *FunctionEmitContext::TruncInst(llvm::Value *value, llvm::Type *type, const char *name) { ++llvm::Instruction *FunctionEmitContext::TruncInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_trunc"); +- + // TODO: we should probably handle the array case as in + // e.g. BitCastInst(), but we don't currently need that functionality +- llvm::Instruction *inst = new llvm::TruncInst(value, type, name, bblock); ++ llvm::Instruction *inst = new llvm::TruncInst( ++ value, type, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_trunc" : name, bblock); + AddDebugPos(inst); + return inst; + } + + llvm::Instruction *FunctionEmitContext::CastInst(llvm::Instruction::CastOps op, llvm::Value *value, llvm::Type *type, +- const char *name) { ++ const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_cast"); +- + // TODO: we should probably handle the array case as in + // e.g. BitCastInst(), but we don't currently need that functionality +- llvm::Instruction *inst = llvm::CastInst::Create(op, value, type, name, bblock); ++ llvm::Instruction *inst = llvm::CastInst::Create( ++ op, value, type, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_cast" : name, bblock); + AddDebugPos(inst); + return inst; + } + +-llvm::Instruction *FunctionEmitContext::FPCastInst(llvm::Value *value, llvm::Type *type, const char *name) { ++llvm::Instruction *FunctionEmitContext::FPCastInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_cast"); +- + // TODO: we should probably handle the array case as in + // e.g. BitCastInst(), but we don't currently need that functionality +- llvm::Instruction *inst = llvm::CastInst::CreateFPCast(value, type, name, bblock); ++ llvm::Instruction *inst = llvm::CastInst::CreateFPCast( ++ value, type, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_cast" : name, bblock); + AddDebugPos(inst); + return inst; + } + +-llvm::Instruction *FunctionEmitContext::SExtInst(llvm::Value *value, llvm::Type *type, const char *name) { ++llvm::Instruction *FunctionEmitContext::SExtInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_sext"); +- + // TODO: we should probably handle the array case as in + // e.g. BitCastInst(), but we don't currently need that functionality +- llvm::Instruction *inst = new llvm::SExtInst(value, type, name, bblock); ++ llvm::Instruction *inst = new llvm::SExtInst( ++ value, type, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_sext" : name, bblock); + AddDebugPos(inst); + return inst; + } + +-llvm::Instruction *FunctionEmitContext::ZExtInst(llvm::Value *value, llvm::Type *type, const char *name) { ++llvm::Instruction *FunctionEmitContext::ZExtInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name) { + if (value == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(value, "_zext"); +- + // TODO: we should probably handle the array case as in + // e.g. BitCastInst(), but we don't currently need that functionality +- llvm::Instruction *inst = new llvm::ZExtInst(value, type, name, bblock); ++ llvm::Instruction *inst = new llvm::ZExtInst( ++ value, type, name.isTriviallyEmpty() ? llvm::Twine(value->getName()) + "_zext" : name, bblock); + AddDebugPos(inst); + return inst; + } +@@ -1913,14 +1901,15 @@ llvm::Value *FunctionEmitContext::applyVaryingGEP(llvm::Value *basePtr, llvm::Va + scale = SmearUniform(scale); + Assert(index != NULL); + // offset = index * scale +- offset = BinaryOperator(llvm::Instruction::Mul, scale, index, LLVMGetName("mul", scale, index)); ++ offset = BinaryOperator(llvm::Instruction::Mul, scale, index, ++ ((llvm::Twine("mul_") + scale->getName()) + "_") + index->getName()); + } + + // For 64-bit targets, if we've been doing our offset calculations in + // 32 bits, we still have to convert to a 64-bit value before we + // actually add the offset to the pointer. + if (g->target->is32Bit() == false && g->opt.force32BitAddressing == true) +- offset = SExtInst(offset, LLVMTypes::Int64VectorType, LLVMGetName(offset, "_to_64")); ++ offset = SExtInst(offset, LLVMTypes::Int64VectorType, llvm::Twine(offset->getName()) + "_to_64"); + + // Smear out the pointer to be varying; either the base pointer or the + // index must be varying for this method to be called. +@@ -1929,7 +1918,7 @@ llvm::Value *FunctionEmitContext::applyVaryingGEP(llvm::Value *basePtr, llvm::Va + llvm::Value *varyingPtr = baseIsUniform ? SmearUniform(basePtr) : basePtr; + + // newPtr = ptr + offset +- return BinaryOperator(llvm::Instruction::Add, varyingPtr, offset, LLVMGetName(basePtr, "_offset")); ++ return BinaryOperator(llvm::Instruction::Add, varyingPtr, offset, llvm::Twine(basePtr->getName()) + "_offset"); + } + + void FunctionEmitContext::MatchIntegerTypes(llvm::Value **v0, llvm::Value **v1) { +@@ -2006,13 +1995,13 @@ llvm::Value *FunctionEmitContext::MakeSlicePointer(llvm::Value *ptr, llvm::Value + llvm::StructType *st = llvm::StructType::get(*g->ctx, eltTypes); + + llvm::Value *ret = llvm::UndefValue::get(st); +- ret = InsertInst(ret, ptr, 0, LLVMGetName(ret, "_slice_ptr")); +- ret = InsertInst(ret, offset, 1, LLVMGetName(ret, "_slice_offset")); ++ ret = InsertInst(ret, ptr, 0, llvm::Twine(ret->getName()) + "_slice_ptr"); ++ ret = InsertInst(ret, offset, 1, llvm::Twine(ret->getName()) + "_slice_offset"); + return ret; + } + + llvm::Value *FunctionEmitContext::GetElementPtrInst(llvm::Value *basePtr, llvm::Value *index, const Type *ptrRefType, +- const char *name) { ++ const llvm::Twine &name) { + if (basePtr == NULL || index == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -2065,8 +2054,8 @@ llvm::Value *FunctionEmitContext::GetElementPtrInst(llvm::Value *basePtr, llvm:: + // uniform, so just emit the regular LLVM GEP instruction + llvm::Value *ind[1] = {index}; + llvm::ArrayRef arrayRef(&ind[0], &ind[1]); +- llvm::Instruction *inst = +- llvm::GetElementPtrInst::Create(PTYPE(basePtr), basePtr, arrayRef, name ? name : "gep", bblock); ++ llvm::Instruction *inst = llvm::GetElementPtrInst::Create(PTYPE(basePtr), basePtr, arrayRef, ++ name.isTriviallyEmpty() ? "gep" : name, bblock); + AddDebugPos(inst); + return inst; + } else +@@ -2074,7 +2063,7 @@ llvm::Value *FunctionEmitContext::GetElementPtrInst(llvm::Value *basePtr, llvm:: + } + + llvm::Value *FunctionEmitContext::GetElementPtrInst(llvm::Value *basePtr, llvm::Value *index0, llvm::Value *index1, +- const Type *ptrRefType, const char *name) { ++ const Type *ptrRefType, const llvm::Twine &name) { + if (basePtr == NULL || index0 == NULL || index1 == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -2114,8 +2103,8 @@ llvm::Value *FunctionEmitContext::GetElementPtrInst(llvm::Value *basePtr, llvm:: + // uniform, so just emit the regular LLVM GEP instruction + llvm::Value *indices[2] = {index0, index1}; + llvm::ArrayRef arrayRef(&indices[0], &indices[2]); +- llvm::Instruction *inst = +- llvm::GetElementPtrInst::Create(PTYPE(basePtr), basePtr, arrayRef, name ? name : "gep", bblock); ++ llvm::Instruction *inst = llvm::GetElementPtrInst::Create(PTYPE(basePtr), basePtr, arrayRef, ++ name.isTriviallyEmpty() ? "gep" : name, bblock); + AddDebugPos(inst); + return inst; + } else { +@@ -2138,7 +2127,7 @@ llvm::Value *FunctionEmitContext::GetElementPtrInst(llvm::Value *basePtr, llvm:: + } + + llvm::Value *FunctionEmitContext::AddElementOffset(llvm::Value *fullBasePtr, int elementNum, const Type *ptrRefType, +- const char *name, const PointerType **resultPtrType) { ++ const llvm::Twine &name, const PointerType **resultPtrType) { + if (resultPtrType != NULL) + AssertPos(currentPos, ptrRefType != NULL); + +@@ -2195,8 +2184,8 @@ llvm::Value *FunctionEmitContext::AddElementOffset(llvm::Value *fullBasePtr, int + // If the pointer is uniform, we can use the regular LLVM GEP. + llvm::Value *offsets[2] = {LLVMInt32(0), LLVMInt32(elementNum)}; + llvm::ArrayRef arrayRef(&offsets[0], &offsets[2]); +- resultPtr = +- llvm::GetElementPtrInst::Create(PTYPE(basePtr), basePtr, arrayRef, name ? name : "struct_offset", bblock); ++ resultPtr = llvm::GetElementPtrInst::Create(PTYPE(basePtr), basePtr, arrayRef, ++ name.isTriviallyEmpty() ? "struct_offset" : name, bblock); + } else { + // Otherwise do the math to find the offset and add it to the given + // varying pointers +@@ -2237,7 +2226,7 @@ llvm::Value *FunctionEmitContext::AddElementOffset(llvm::Value *fullBasePtr, int + return resultPtr; + } + +-llvm::Value *FunctionEmitContext::SwitchBoolSize(llvm::Value *value, llvm::Type *toType, const char *name) { ++llvm::Value *FunctionEmitContext::SwitchBoolSize(llvm::Value *value, llvm::Type *toType, const llvm::Twine &name) { + if ((value == NULL) || (toType == NULL)) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -2248,20 +2237,18 @@ llvm::Value *FunctionEmitContext::SwitchBoolSize(llvm::Value *value, llvm::Type + llvm::Value *newBool = value; + if (g->target->getDataLayout()->getTypeSizeInBits(fromType) > + g->target->getDataLayout()->getTypeSizeInBits(toType)) { +- if (name == NULL) +- name = LLVMGetName(value, "_switchBool"); +- newBool = TruncInst(value, toType, name); ++ newBool = ++ TruncInst(value, toType, name.isTriviallyEmpty() ? (llvm::Twine(value->getName()) + "_switchBool") : name); + } else if (g->target->getDataLayout()->getTypeSizeInBits(fromType) < + g->target->getDataLayout()->getTypeSizeInBits(toType)) { +- if (name == NULL) +- name = LLVMGetName(value, "_switchBool"); +- newBool = SExtInst(value, toType, name); ++ newBool = ++ SExtInst(value, toType, name.isTriviallyEmpty() ? (llvm::Twine(value->getName()) + "_switchBool") : name); + } + + return newBool; + } + +-llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, const Type *type, const char *name) { ++llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, const Type *type, const llvm::Twine &name) { + if (ptr == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -2270,13 +2257,13 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, const Type *type, c + llvm::PointerType *pt = llvm::dyn_cast(ptr->getType()); + AssertPos(currentPos, pt != NULL); + +- if (name == NULL) +- name = LLVMGetName(ptr, "_load"); +- + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 +- llvm::LoadInst *inst = new llvm::LoadInst(pt->getPointerElementType(), ptr, name, bblock); ++ llvm::LoadInst *inst = ++ new llvm::LoadInst(pt->getPointerElementType(), ptr, ++ name.isTriviallyEmpty() ? (llvm::Twine(ptr->getName()) + "_load") : name, bblock); + #else +- llvm::LoadInst *inst = new llvm::LoadInst(ptr, name, bblock); ++ llvm::LoadInst *inst = ++ new llvm::LoadInst(ptr, name.isTriviallyEmpty() ? (llvm::Twine(ptr->getName()) + "_load") : name, bblock); + #endif + + if (g->opt.forceAlignedMemory && llvm::dyn_cast(pt->getElementType())) { +@@ -2307,8 +2294,8 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, const Type *type, c + static llvm::Value *lFinalSliceOffset(FunctionEmitContext *ctx, llvm::Value *ptr, const PointerType **ptrType) { + Assert(CastType(*ptrType) != NULL); + +- llvm::Value *slicePtr = ctx->ExtractInst(ptr, 0, LLVMGetName(ptr, "_ptr")); +- llvm::Value *sliceOffset = ctx->ExtractInst(ptr, 1, LLVMGetName(ptr, "_offset")); ++ llvm::Value *slicePtr = ctx->ExtractInst(ptr, 0, llvm::Twine(ptr->getName()) + "_ptr"); ++ llvm::Value *sliceOffset = ctx->ExtractInst(ptr, 1, llvm::Twine(ptr->getName()) + "_offset"); + + // slicePtr should be a pointer to an soa-width wide array of the + // final atomic/enum/pointer type +@@ -2327,14 +2314,14 @@ static llvm::Value *lFinalSliceOffset(FunctionEmitContext *ctx, llvm::Value *ptr + slicePtr = ctx->BitCastInst(slicePtr, (*ptrType)->LLVMType(g->ctx)); + + // And finally index based on the slice offset +- return ctx->GetElementPtrInst(slicePtr, sliceOffset, *ptrType, LLVMGetName(slicePtr, "_final_gep")); ++ return ctx->GetElementPtrInst(slicePtr, sliceOffset, *ptrType, llvm::Twine(slicePtr->getName()) + "_final_gep"); + } + + /** Utility routine that loads from a uniform pointer to soa<> data, + returning a regular uniform (non-SOA result). + */ + llvm::Value *FunctionEmitContext::loadUniformFromSOA(llvm::Value *ptr, llvm::Value *mask, const PointerType *ptrType, +- const char *name) { ++ const llvm::Twine &name) { + const Type *unifType = ptrType->GetBaseType()->GetAsUniformType(); + + const CollectionType *ct = CastType(ptrType->GetBaseType()); +@@ -2363,7 +2350,7 @@ llvm::Value *FunctionEmitContext::loadUniformFromSOA(llvm::Value *ptr, llvm::Val + } + + llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask, const Type *ptrRefType, +- const char *name, bool one_elem) { ++ const llvm::Twine &name, bool one_elem) { + if (ptr == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -2371,9 +2358,6 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask, + + AssertPos(currentPos, ptrRefType != NULL && mask != NULL); + +- if (name == NULL) +- name = LLVMGetName(ptr, "_load"); +- + const PointerType *ptrType; + const Type *elType; + if (CastType(ptrRefType) != NULL) { +@@ -2393,7 +2377,8 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask, + + if (ptrType->IsUniformType()) { + if (ptrType->IsSlice()) { +- return loadUniformFromSOA(ptr, mask, ptrType, name); ++ return loadUniformFromSOA(ptr, mask, ptrType, ++ name.isTriviallyEmpty() ? (llvm::Twine(ptr->getName()) + "_load") : name); + } else { + // FIXME: same issue as above load inst regarding alignment... + // +@@ -2405,11 +2390,15 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask, + const AtomicType *atomicType = CastType(ptrType->GetBaseType()); + + #if ISPC_LLVM_VERSION <= ISPC_LLVM_10_0 +- llvm::LoadInst *inst = new llvm::LoadInst(ptr, name, false /* not volatile */, bblock); ++ llvm::LoadInst *inst = ++ new llvm::LoadInst(ptr, name.isTriviallyEmpty() ? (llvm::Twine(ptr->getName()) + "_load") : name, ++ false /* not volatile */, bblock); + #else // LLVM 11.0+ + llvm::PointerType *ptr_type = llvm::dyn_cast(ptr->getType()); + llvm::LoadInst *inst = +- new llvm::LoadInst(ptr_type->getPointerElementType(), ptr, name, false /* not volatile */, bblock); ++ new llvm::LoadInst(ptr_type->getPointerElementType(), ptr, ++ name.isTriviallyEmpty() ? (llvm::Twine(ptr->getName()) + "_load") : name, ++ false /* not volatile */, bblock); + #endif + + if (atomicType != NULL && atomicType->IsVaryingType()) { +@@ -2433,7 +2422,8 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask, + } else { + // Otherwise we should have a varying ptr and it's time for a + // gather. +- llvm::Value *gather_result = gather(ptr, ptrType, GetFullMask(), name); ++ llvm::Value *gather_result = gather(ptr, ptrType, GetFullMask(), ++ name.isTriviallyEmpty() ? (llvm::Twine(ptr->getName()) + "_load") : name); + if (!one_elem) + return gather_result; + +@@ -2453,19 +2443,19 @@ llvm::Value *FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask, + // We can actually call either one, since both are i32s as far as + // LLVM's type system is concerned... + llvm::Function *fmm = mm[0]->function; +- llvm::Value *int_mask = CallInst(fmm, NULL, mask, LLVMGetName(mask, "_movmsk")); ++ llvm::Value *int_mask = CallInst(fmm, NULL, mask, llvm::Twine(mask->getName()) + "_movmsk"); + std::vector lz; + m->symbolTable->LookupFunction("__count_trailing_zeros_i64", &lz); + llvm::Function *flz = lz[0]->function; +- llvm::Value *elem_idx = CallInst(flz, NULL, int_mask, LLVMGetName(mask, "_clz")); +- llvm::Value *elem = llvm::ExtractElementInst::Create(gather_result, elem_idx, +- LLVMGetName(gather_result, "_umasked_elem"), bblock); ++ llvm::Value *elem_idx = CallInst(flz, NULL, int_mask, llvm::Twine(mask->getName()) + "_clz"); ++ llvm::Value *elem = llvm::ExtractElementInst::Create( ++ gather_result, elem_idx, llvm::Twine(gather_result->getName()) + "_umasked_elem", bblock); + return elem; + } + } + + llvm::Value *FunctionEmitContext::gather(llvm::Value *ptr, const PointerType *ptrType, llvm::Value *mask, +- const char *name) { ++ const llvm::Twine &name) { + // We should have a varying pointer if we get here... + AssertPos(currentPos, ptrType->IsVaryingType()); + +@@ -2602,7 +2592,8 @@ void FunctionEmitContext::addGSMetadata(llvm::Value *v, SourcePos pos) { + inst->setMetadata("last_column", md); + } + +-llvm::Value *FunctionEmitContext::AllocaInst(llvm::Type *llvmType, const char *name, int align, bool atEntryBlock) { ++llvm::Value *FunctionEmitContext::AllocaInst(llvm::Type *llvmType, const llvm::Twine &name, int align, ++ bool atEntryBlock) { + if (llvmType == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -2615,12 +2606,12 @@ llvm::Value *FunctionEmitContext::AllocaInst(llvm::Type *llvmType, const char *n + llvm::Instruction *retInst = allocaBlock->getTerminator(); + AssertPos(currentPos, retInst); + unsigned AS = llvmFunction->getParent()->getDataLayout().getAllocaAddrSpace(); +- inst = new llvm::AllocaInst(llvmType, AS, name ? name : "", retInst); ++ inst = new llvm::AllocaInst(llvmType, AS, name, retInst); + } else { + // Unless the caller overrode the default and wants it in the + // current basic block + unsigned AS = llvmFunction->getParent()->getDataLayout().getAllocaAddrSpace(); +- inst = new llvm::AllocaInst(llvmType, AS, name ? name : "", bblock); ++ inst = new llvm::AllocaInst(llvmType, AS, name, bblock); + } + + // If no alignment was specified but we have an array of a uniform +@@ -2639,7 +2630,8 @@ llvm::Value *FunctionEmitContext::AllocaInst(llvm::Type *llvmType, const char *n + return inst; + } + +-llvm::Value *FunctionEmitContext::AllocaInst(const Type *ptrType, const char *name, int align, bool atEntryBlock) { ++llvm::Value *FunctionEmitContext::AllocaInst(const Type *ptrType, const llvm::Twine &name, int align, ++ bool atEntryBlock) { + if (ptrType == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -3075,66 +3067,59 @@ llvm::Instruction *FunctionEmitContext::BranchInst(llvm::BasicBlock *trueBlock, + return b; + } + +-llvm::Value *FunctionEmitContext::ExtractInst(llvm::Value *v, int elt, const char *name) { ++llvm::Value *FunctionEmitContext::ExtractInst(llvm::Value *v, int elt, const llvm::Twine &name) { + if (v == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) { +- char buf[32]; +- snprintf(buf, sizeof(buf), "_extract_%d", elt); +- name = LLVMGetName(v, buf); +- } + llvm::Instruction *ei = NULL; + if (llvm::isa(v->getType())) +- ei = llvm::ExtractElementInst::Create(v, LLVMInt32(elt), name, bblock); ++ ei = llvm::ExtractElementInst::Create( ++ v, LLVMInt32(elt), ++ name.isTriviallyEmpty() ? ((llvm::Twine(v->getName()) + "_extract_") + llvm::Twine(elt)) : name, bblock); + else +- ei = llvm::ExtractValueInst::Create(v, elt, name, bblock); ++ ei = llvm::ExtractValueInst::Create( ++ v, elt, name.isTriviallyEmpty() ? ((llvm::Twine(v->getName()) + "_extract_") + llvm::Twine(elt)) : name, ++ bblock); + AddDebugPos(ei); + return ei; + } + +-llvm::Value *FunctionEmitContext::InsertInst(llvm::Value *v, llvm::Value *eltVal, int elt, const char *name) { ++llvm::Value *FunctionEmitContext::InsertInst(llvm::Value *v, llvm::Value *eltVal, int elt, const llvm::Twine &name) { + if (v == NULL || eltVal == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) { +- char buf[32]; +- snprintf(buf, sizeof(buf), "_insert_%d", elt); +- name = LLVMGetName(v, buf); +- } +- + llvm::Instruction *ii = NULL; + if (llvm::isa(v->getType())) +- ii = llvm::InsertElementInst::Create(v, eltVal, LLVMInt32(elt), name, bblock); ++ ii = llvm::InsertElementInst::Create( ++ v, eltVal, LLVMInt32(elt), ++ name.isTriviallyEmpty() ? ((llvm::Twine(v->getName()) + "_insert_") + llvm::Twine(elt)) : name, bblock); + else +- ii = llvm::InsertValueInst::Create(v, eltVal, elt, name, bblock); ++ ii = llvm::InsertValueInst::Create( ++ v, eltVal, elt, ++ name.isTriviallyEmpty() ? ((llvm::Twine(v->getName()) + "_insert_") + llvm::Twine(elt)) : name, bblock); + AddDebugPos(ii); + return ii; + } + +-llvm::Value *FunctionEmitContext::ShuffleInst(llvm::Value *v1, llvm::Value *v2, llvm::Value *mask, const char *name) { ++llvm::Value *FunctionEmitContext::ShuffleInst(llvm::Value *v1, llvm::Value *v2, llvm::Value *mask, ++ const llvm::Twine &name) { + if (v1 == NULL || v2 == NULL || mask == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) { +- char buf[32]; +- snprintf(buf, sizeof(buf), "_shuffle"); +- name = LLVMGetName(v1, buf); +- } +- +- llvm::Instruction *ii = new llvm::ShuffleVectorInst(v1, v2, mask, name, bblock); ++ llvm::Instruction *ii = new llvm::ShuffleVectorInst( ++ v1, v2, mask, name.isTriviallyEmpty() ? (llvm::Twine(v1->getName()) + "_shuffle") : name, bblock); + + AddDebugPos(ii); + return ii; + } + +-llvm::Value *FunctionEmitContext::BroadcastValue(llvm::Value *v, llvm::Type *vecType, const char *name) { ++llvm::Value *FunctionEmitContext::BroadcastValue(llvm::Value *v, llvm::Type *vecType, const llvm::Twine &name) { + if (v == NULL || vecType == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -3148,12 +3133,6 @@ llvm::Value *FunctionEmitContext::BroadcastValue(llvm::Value *v, llvm::Type *vec + Assert(ty && ty->getVectorElementType() == v->getType()); + #endif + +- if (name == NULL) { +- char buf[32]; +- snprintf(buf, sizeof(buf), "_broadcast"); +- name = LLVMGetName(v, buf); +- } +- + // Generate the following sequence: + // %name_init.i = insertelement <4 x i32> undef, i32 %val, i32 0 + // %name.i = shufflevector <4 x i32> %name_init.i, <4 x i32> undef, +@@ -3163,7 +3142,7 @@ llvm::Value *FunctionEmitContext::BroadcastValue(llvm::Value *v, llvm::Type *vec + llvm::Value *undef2 = llvm::UndefValue::get(vecType); + + // InsertElement +- llvm::Twine tw = llvm::Twine(name) + llvm::Twine("_init"); ++ llvm::Twine tw = name.isTriviallyEmpty() ? (llvm::Twine(v->getName()) + "_broadcast") : name + llvm::Twine("_init"); + llvm::Value *insert = InsertInst(undef1, v, 0, tw.str().c_str()); + + // ShuffleVector +@@ -3179,28 +3158,27 @@ llvm::Value *FunctionEmitContext::BroadcastValue(llvm::Value *v, llvm::Type *vec + llvm::ConstantVector::getSplat(llvm::ElementCount::get(static_cast(ty->getNumElements()), false), + llvm::Constant::getNullValue(llvm::Type::getInt32Ty(*g->ctx))); + #endif +- llvm::Value *ret = ShuffleInst(insert, undef2, zeroVec, name); ++ llvm::Value *ret = ShuffleInst(insert, undef2, zeroVec, ++ name.isTriviallyEmpty() ? (llvm::Twine(v->getName()) + "_broadcast") : name); + + return ret; + } + +-llvm::PHINode *FunctionEmitContext::PhiNode(llvm::Type *type, int count, const char *name) { +- llvm::PHINode *pn = llvm::PHINode::Create(type, count, name ? name : "phi", bblock); ++llvm::PHINode *FunctionEmitContext::PhiNode(llvm::Type *type, int count, const llvm::Twine &name) { ++ llvm::PHINode *pn = llvm::PHINode::Create(type, count, name.isTriviallyEmpty() ? "phi" : name, bblock); + AddDebugPos(pn); + return pn; + } + + llvm::Instruction *FunctionEmitContext::SelectInst(llvm::Value *test, llvm::Value *val0, llvm::Value *val1, +- const char *name) { ++ const llvm::Twine &name) { + if (test == NULL || val0 == NULL || val1 == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; + } + +- if (name == NULL) +- name = LLVMGetName(test, "_select"); +- +- llvm::Instruction *inst = llvm::SelectInst::Create(test, val0, val1, name, bblock); ++ llvm::Instruction *inst = llvm::SelectInst::Create( ++ test, val0, val1, name.isTriviallyEmpty() ? (llvm::Twine(test->getName()) + "_select") : name, bblock); + AddDebugPos(inst); + return inst; + } +@@ -3226,7 +3204,7 @@ static unsigned int lCalleeArgCount(llvm::Value *callee, const FunctionType *fun + } + + llvm::Value *FunctionEmitContext::CallInst(llvm::Value *func, const FunctionType *funcType, +- const std::vector &args, const char *name) { ++ const std::vector &args, const llvm::Twine &name) { + if (func == NULL) { + AssertPos(currentPos, m->errorCount > 0); + return NULL; +@@ -3258,9 +3236,9 @@ llvm::Value *FunctionEmitContext::CallInst(llvm::Value *func, const FunctionType + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 + llvm::PointerType *func_ptr_type = llvm::dyn_cast(func->getType()); + llvm::FunctionType *func_type = llvm::dyn_cast(func_ptr_type->getPointerElementType()); +- llvm::CallInst *callinst = llvm::CallInst::Create(func_type, func, argVals, name ? name : "", bblock); ++ llvm::CallInst *callinst = llvm::CallInst::Create(func_type, func, argVals, name, bblock); + #else +- llvm::CallInst *callinst = llvm::CallInst::Create(func, argVals, name ? name : "", bblock); ++ llvm::CallInst *callinst = llvm::CallInst::Create(func, argVals, name, bblock); + #endif + + // We could be dealing with a function pointer in which case this will not be a 'llvm::Function'. +@@ -3464,14 +3442,14 @@ llvm::Value *FunctionEmitContext::CallInst(llvm::Value *func, const FunctionType + } + + llvm::Value *FunctionEmitContext::CallInst(llvm::Value *func, const FunctionType *funcType, llvm::Value *arg, +- const char *name) { ++ const llvm::Twine &name) { + std::vector args; + args.push_back(arg); + return CallInst(func, funcType, args, name); + } + + llvm::Value *FunctionEmitContext::CallInst(llvm::Value *func, const FunctionType *funcType, llvm::Value *arg0, +- llvm::Value *arg1, const char *name) { ++ llvm::Value *arg1, const llvm::Twine &name) { + std::vector args; + args.push_back(arg0); + args.push_back(arg1); +diff --git a/src/ctx.h b/src/ctx.h +index 6e5ad74ba..48b3bb826 100644 +--- a/src/ctx.h ++++ b/src/ctx.h +@@ -302,7 +302,7 @@ class FunctionEmitContext { + llvm::Value *GetStringPtr(const std::string &str); + + /** Create a new basic block with given name */ +- llvm::BasicBlock *CreateBasicBlock(const char *name, llvm::BasicBlock *insertAfter = NULL); ++ llvm::BasicBlock *CreateBasicBlock(const llvm::Twine &name, llvm::BasicBlock *insertAfter = NULL); + + /** Given a vector with element type i1, return a vector of type + LLVMTypes::BoolVectorType. This method handles the conversion for +@@ -380,33 +380,33 @@ class FunctionEmitContext { + this also handles applying the given operation to the vector + elements. */ + llvm::Value *BinaryOperator(llvm::Instruction::BinaryOps inst, llvm::Value *v0, llvm::Value *v1, +- const char *name = NULL); ++ const llvm::Twine &name = ""); + + /** Emit the "not" operator. Like BinaryOperator(), this also handles + a VectorType-based operand. */ +- llvm::Value *NotOperator(llvm::Value *v, const char *name = NULL); ++ llvm::Value *NotOperator(llvm::Value *v, const llvm::Twine &name = ""); + + /** Emit a comparison instruction. If the operands are VectorTypes, + then a value for the corresponding boolean VectorType is + returned. */ + llvm::Value *CmpInst(llvm::Instruction::OtherOps inst, llvm::CmpInst::Predicate pred, llvm::Value *v0, +- llvm::Value *v1, const char *name = NULL); ++ llvm::Value *v1, const llvm::Twine &name = ""); + + /** Given a scalar value, return a vector of the same type (or an + array, for pointer types). */ +- llvm::Value *SmearUniform(llvm::Value *value, const char *name = NULL); ++ llvm::Value *SmearUniform(llvm::Value *value, const llvm::Twine &name = ""); + +- llvm::Value *BitCastInst(llvm::Value *value, llvm::Type *type, const char *name = NULL); +- llvm::Value *PtrToIntInst(llvm::Value *value, const char *name = NULL); +- llvm::Value *PtrToIntInst(llvm::Value *value, llvm::Type *type, const char *name = NULL); +- llvm::Value *IntToPtrInst(llvm::Value *value, llvm::Type *type, const char *name = NULL); ++ llvm::Value *BitCastInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name = ""); ++ llvm::Value *PtrToIntInst(llvm::Value *value, const llvm::Twine &name = ""); ++ llvm::Value *PtrToIntInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name = ""); ++ llvm::Value *IntToPtrInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name = ""); + +- llvm::Instruction *TruncInst(llvm::Value *value, llvm::Type *type, const char *name = NULL); ++ llvm::Instruction *TruncInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name = ""); + llvm::Instruction *CastInst(llvm::Instruction::CastOps op, llvm::Value *value, llvm::Type *type, +- const char *name = NULL); +- llvm::Instruction *FPCastInst(llvm::Value *value, llvm::Type *type, const char *name = NULL); +- llvm::Instruction *SExtInst(llvm::Value *value, llvm::Type *type, const char *name = NULL); +- llvm::Instruction *ZExtInst(llvm::Value *value, llvm::Type *type, const char *name = NULL); ++ const llvm::Twine &name = ""); ++ llvm::Instruction *FPCastInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name = ""); ++ llvm::Instruction *SExtInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name = ""); ++ llvm::Instruction *ZExtInst(llvm::Value *value, llvm::Type *type, const llvm::Twine &name = ""); + + /** Given two integer-typed values (but possibly one vector and the + other not, and or of possibly-different bit-widths), update their +@@ -426,9 +426,9 @@ class FunctionEmitContext { + pointers. The underlying type of the base pointer must be provided + via the ptrType parameter */ + llvm::Value *GetElementPtrInst(llvm::Value *basePtr, llvm::Value *index, const Type *ptrType, +- const char *name = NULL); ++ const llvm::Twine &name = ""); + llvm::Value *GetElementPtrInst(llvm::Value *basePtr, llvm::Value *index0, llvm::Value *index1, const Type *ptrType, +- const char *name = NULL); ++ const llvm::Twine &name = ""); + + /** This method returns a new pointer that represents offsetting the + given base pointer to point at the given element number of the +@@ -436,26 +436,26 @@ class FunctionEmitContext { + pointer must be a pointer to a structure type. The ptrType gives + the type of the pointer, though it may be NULL if the base pointer + is uniform. */ +- llvm::Value *AddElementOffset(llvm::Value *basePtr, int elementNum, const Type *ptrType, const char *name = NULL, +- const PointerType **resultPtrType = NULL); ++ llvm::Value *AddElementOffset(llvm::Value *basePtr, int elementNum, const Type *ptrType, ++ const llvm::Twine &name = "", const PointerType **resultPtrType = NULL); + + /** Bool is stored as i8 and but represented in IR as i1 and + * . This is a helper function to match bool size at storage + * interface. */ +- llvm::Value *SwitchBoolSize(llvm::Value *value, llvm::Type *toType, const char *name = NULL); ++ llvm::Value *SwitchBoolSize(llvm::Value *value, llvm::Type *toType, const llvm::Twine &name = ""); + /** Load from the memory location(s) given by lvalue, using the given + mask. The lvalue may be varying, in which case this corresponds to + a gather from the multiple memory locations given by the array of + pointer values given by the lvalue. If the lvalue is not varying, + then both the mask pointer and the type pointer may be NULL. */ +- llvm::Value *LoadInst(llvm::Value *ptr, llvm::Value *mask, const Type *ptrType, const char *name = NULL, ++ llvm::Value *LoadInst(llvm::Value *ptr, llvm::Value *mask, const Type *ptrType, const llvm::Twine &name = "", + bool one_elem = false); + + /* Load from memory location(s) given. + * 'type' needs to be provided when storage type is different from IR type. For example, + * 'unform bool' is 'i1' in IR but stored as 'i8'. + * Otherwise leave this as NULL. */ +- llvm::Value *LoadInst(llvm::Value *ptr, const Type *type = NULL, const char *name = NULL); ++ llvm::Value *LoadInst(llvm::Value *ptr, const Type *type = NULL, const llvm::Twine &name = ""); + + /** Emits an alloca instruction to allocate stack storage for the given + type. If a non-zero alignment is specified, the object is also +@@ -463,7 +463,8 @@ class FunctionEmitContext { + instruction is added at the start of the function in the entry + basic block; if it should be added to the current basic block, then + the atEntryBlock parameter should be false. */ +- llvm::Value *AllocaInst(llvm::Type *llvmType, const char *name = NULL, int align = 0, bool atEntryBlock = true); ++ llvm::Value *AllocaInst(llvm::Type *llvmType, const llvm::Twine &name = "", int align = 0, ++ bool atEntryBlock = true); + + /** Emits an alloca instruction to allocate stack storage for the given + type. If a non-zero alignment is specified, the object is also +@@ -474,7 +475,7 @@ class FunctionEmitContext { + This implementation is preferred when possible. It is needed when + storage type is different from IR type. For example, + 'unform bool' is 'i1' in IR but stored as 'i8'. */ +- llvm::Value *AllocaInst(const Type *ptrType, const char *name = NULL, int align = 0, bool atEntryBlock = true); ++ llvm::Value *AllocaInst(const Type *ptrType, const llvm::Twine &name = "", int align = 0, bool atEntryBlock = true); + + /** Standard store instruction; for this variant, the lvalue must be a + single pointer, not a varying lvalue. +@@ -502,39 +503,41 @@ class FunctionEmitContext { + /** This convenience method maps to an llvm::ExtractElementInst if the + given value is a llvm::VectorType, and to an llvm::ExtractValueInst + otherwise. */ +- llvm::Value *ExtractInst(llvm::Value *v, int elt, const char *name = NULL); ++ llvm::Value *ExtractInst(llvm::Value *v, int elt, const llvm::Twine &name = ""); + + /** This convenience method maps to an llvm::InsertElementInst if the + given value is a llvm::VectorType, and to an llvm::InsertValueInst + otherwise. */ +- llvm::Value *InsertInst(llvm::Value *v, llvm::Value *eltVal, int elt, const char *name = NULL); ++ llvm::Value *InsertInst(llvm::Value *v, llvm::Value *eltVal, int elt, const llvm::Twine &name = ""); + + /** This convenience method maps to an llvm::ShuffleVectorInst. */ +- llvm::Value *ShuffleInst(llvm::Value *v1, llvm::Value *v2, llvm::Value *mask, const char *name = NULL); ++ llvm::Value *ShuffleInst(llvm::Value *v1, llvm::Value *v2, llvm::Value *mask, const llvm::Twine &name = ""); + + /** This convenience method to generate broadcast pattern. It takes a value + and a vector type. Type of the value must match element type of the + vector. */ +- llvm::Value *BroadcastValue(llvm::Value *v, llvm::Type *vecType, const char *name = NULL); ++ llvm::Value *BroadcastValue(llvm::Value *v, llvm::Type *vecType, const llvm::Twine &name = ""); + +- llvm::PHINode *PhiNode(llvm::Type *type, int count, const char *name = NULL); +- llvm::Instruction *SelectInst(llvm::Value *test, llvm::Value *val0, llvm::Value *val1, const char *name = NULL); ++ llvm::PHINode *PhiNode(llvm::Type *type, int count, const llvm::Twine &name = ""); ++ llvm::Instruction *SelectInst(llvm::Value *test, llvm::Value *val0, llvm::Value *val1, ++ const llvm::Twine &name = ""); + + /** Emits IR to do a function call with the given arguments. If the + function type is a varying function pointer type, its full type + must be provided in funcType. funcType can be NULL if func is a + uniform function pointer. */ + llvm::Value *CallInst(llvm::Value *func, const FunctionType *funcType, const std::vector &args, +- const char *name = NULL); ++ const llvm::Twine &name = ""); + + /** This is a convenience method that issues a call instruction to a + function that takes just a single argument. */ +- llvm::Value *CallInst(llvm::Value *func, const FunctionType *funcType, llvm::Value *arg, const char *name = NULL); ++ llvm::Value *CallInst(llvm::Value *func, const FunctionType *funcType, llvm::Value *arg, ++ const llvm::Twine &name = ""); + + /** This is a convenience method that issues a call instruction to a + function that takes two arguments. */ + llvm::Value *CallInst(llvm::Value *func, const FunctionType *funcType, llvm::Value *arg0, llvm::Value *arg1, +- const char *name = NULL); ++ const llvm::Twine &name = ""); + + /** Launch an asynchronous task to run the given function, passing it + he given argument values. */ +@@ -756,9 +759,10 @@ class FunctionEmitContext { + void maskedStore(llvm::Value *value, llvm::Value *ptr, const Type *ptrType, llvm::Value *mask); + void storeUniformToSOA(llvm::Value *value, llvm::Value *ptr, llvm::Value *mask, const Type *valueType, + const PointerType *ptrType); +- llvm::Value *loadUniformFromSOA(llvm::Value *ptr, llvm::Value *mask, const PointerType *ptrType, const char *name); ++ llvm::Value *loadUniformFromSOA(llvm::Value *ptr, llvm::Value *mask, const PointerType *ptrType, ++ const llvm::Twine &name = ""); + +- llvm::Value *gather(llvm::Value *ptr, const PointerType *ptrType, llvm::Value *mask, const char *name); ++ llvm::Value *gather(llvm::Value *ptr, const PointerType *ptrType, llvm::Value *mask, const llvm::Twine &name = ""); + + llvm::Value *addVaryingOffsetsIfNeeded(llvm::Value *ptr, const Type *ptrType); + }; +diff --git a/src/expr.cpp b/src/expr.cpp +index 80cc3020a..6d38d1889 100644 +--- a/src/expr.cpp ++++ b/src/expr.cpp +@@ -1021,11 +1021,11 @@ static llvm::Value *lEmitNegate(Expr *arg, SourcePos pos, FunctionEmitContext *c + ctx->SetDebugPos(pos); + if (type->IsFloatType()) { + llvm::Value *zero = llvm::ConstantFP::getZeroValueForNegation(type->LLVMType(g->ctx)); +- return ctx->BinaryOperator(llvm::Instruction::FSub, zero, argVal, LLVMGetName(argVal, "_negate")); ++ return ctx->BinaryOperator(llvm::Instruction::FSub, zero, argVal, llvm::Twine(argVal->getName()) + "_negate"); + } else { + llvm::Value *zero = lLLVMConstantValue(type, g->ctx, 0.); + AssertPos(pos, type->IsIntType()); +- return ctx->BinaryOperator(llvm::Instruction::Sub, zero, argVal, LLVMGetName(argVal, "_negate")); ++ return ctx->BinaryOperator(llvm::Instruction::Sub, zero, argVal, llvm::Twine(argVal->getName()) + "_negate"); + } + } + +@@ -1047,11 +1047,11 @@ llvm::Value *UnaryExpr::GetValue(FunctionEmitContext *ctx) const { + return lEmitNegate(expr, pos, ctx); + case LogicalNot: { + llvm::Value *argVal = expr->GetValue(ctx); +- return ctx->NotOperator(argVal, LLVMGetName(argVal, "_logicalnot")); ++ return ctx->NotOperator(argVal, llvm::Twine(argVal->getName()) + "_logicalnot"); + } + case BitNot: { + llvm::Value *argVal = expr->GetValue(ctx); +- return ctx->NotOperator(argVal, LLVMGetName(argVal, "_bitnot")); ++ return ctx->NotOperator(argVal, llvm::Twine(argVal->getName()) + "_bitnot"); + } + default: + FATAL("logic error"); +@@ -1518,7 +1518,8 @@ static llvm::Value *lEmitBinaryArith(BinaryExpr::Op op, llvm::Value *value0, llv + return NULL; + } + +- return ctx->BinaryOperator(inst, value0, value1, LLVMGetName(opName, value0, value1)); ++ return ctx->BinaryOperator(inst, value0, value1, ++ (((llvm::Twine(opName) + "_") + value0->getName()) + "_") + value1->getName()); + } + } + +@@ -1563,7 +1564,7 @@ static llvm::Value *lEmitBinaryCmp(BinaryExpr::Op op, llvm::Value *e0Val, llvm:: + } + + llvm::Value *cmp = ctx->CmpInst(isFloatOp ? llvm::Instruction::FCmp : llvm::Instruction::ICmp, pred, e0Val, e1Val, +- LLVMGetName(opName, e0Val, e1Val)); ++ (((llvm::Twine(opName) + "_") + e0Val->getName()) + "_") + e1Val->getName()); + // This is a little ugly: CmpInst returns i1 values, but we use vectors + // of i32s for varying bool values; type convert the result here if + // needed. +@@ -4177,7 +4178,7 @@ static llvm::Value *lConvertToSlicePointer(FunctionEmitContext *ctx, llvm::Value + // offsets + llvm::Value *result = llvm::Constant::getNullValue(sliceStructType); + // And replace the pointer in the struct with the given pointer +- return ctx->InsertInst(result, ptr, 0, LLVMGetName(ptr, "_slice")); ++ return ctx->InsertInst(result, ptr, 0, llvm::Twine(ptr->getName()) + "_slice"); + } + + /** If the given array index is a compile time constant, check to see if it +@@ -4258,8 +4259,8 @@ llvm::Value *IndexExpr::GetLValue(FunctionEmitContext *ctx) const { + // Convert to a slice pointer if we're indexing into SOA data + basePtrValue = lConvertPtrToSliceIfNeeded(ctx, basePtrValue, &baseExprType); + +- llvm::Value *ptr = +- ctx->GetElementPtrInst(basePtrValue, indexValue, baseExprType, LLVMGetName(basePtrValue, "_offset")); ++ llvm::Value *ptr = ctx->GetElementPtrInst(basePtrValue, indexValue, baseExprType, ++ llvm::Twine(basePtrValue->getName()) + "_offset"); + return lAddVaryingOffsetsIfNeeded(ctx, ptr, GetLValueType()); + } + +@@ -4290,8 +4291,8 @@ llvm::Value *IndexExpr::GetLValue(FunctionEmitContext *ctx) const { + ctx->SetDebugPos(pos); + + // And do the actual indexing calculation.. +- llvm::Value *ptr = +- ctx->GetElementPtrInst(basePtr, LLVMInt32(0), indexValue, basePtrType, LLVMGetName(basePtr, "_offset")); ++ llvm::Value *ptr = ctx->GetElementPtrInst(basePtr, LLVMInt32(0), indexValue, basePtrType, ++ llvm::Twine(basePtr->getName()) + "_offset"); + return lAddVaryingOffsetsIfNeeded(ctx, ptr, GetLValueType()); + } + +@@ -4788,15 +4789,14 @@ llvm::Value *VectorMemberExpr::GetValue(FunctionEmitContext *ctx) const { + for (size_t i = 0; i < identifier.size(); ++i) { + char idStr[2] = {identifier[i], '\0'}; + llvm::Value *elementPtr = +- ctx->AddElementOffset(basePtr, indices[i], basePtrType, LLVMGetName(basePtr, idStr)); ++ ctx->AddElementOffset(basePtr, indices[i], basePtrType, llvm::Twine(basePtr->getName()) + idStr); + llvm::Value *elementValue = ctx->LoadInst(elementPtr, elementMask, elementPtrType); + +- const char *resultName = LLVMGetName(resultPtr, idStr); +- llvm::Value *ptmp = ctx->AddElementOffset(resultPtr, i, NULL, resultName); ++ llvm::Value *ptmp = ctx->AddElementOffset(resultPtr, i, NULL, llvm::Twine(resultPtr->getName()) + idStr); + ctx->StoreInst(elementValue, ptmp, elementPtrType, expr->GetType()->IsUniformType()); + } + +- return ctx->LoadInst(resultPtr, memberType, LLVMGetName(basePtr, "_swizzle")); ++ return ctx->LoadInst(resultPtr, memberType, llvm::Twine(basePtr->getName()) + "_swizzle"); + } + } + +@@ -4932,7 +4932,7 @@ llvm::Value *MemberExpr::GetValue(FunctionEmitContext *ctx) const { + + ctx->SetDebugPos(pos); + std::string suffix = std::string("_") + identifier; +- return ctx->LoadInst(lvalue, mask, lvalueType, LLVMGetName(lvalue, suffix.c_str())); ++ return ctx->LoadInst(lvalue, mask, lvalueType, llvm::Twine(lvalue->getName()) + suffix); + } + + const Type *MemberExpr::GetType() const { return NULL; } +@@ -6502,7 +6502,7 @@ static llvm::Value *lTypeConvAtomic(FunctionEmitContext *ctx, llvm::Value *exprV + // does for everyone else... + Assert(cast); + cast = ctx->SwitchBoolSize(cast, LLVMTypes::BoolVectorType->getElementType(), +- LLVMGetName(cast, "to_i_bool")); ++ llvm::Twine(cast->getName()) + "to_i_bool"); + } + } else { + // fromType->IsVaryingType()) +@@ -8246,7 +8246,7 @@ llvm::Value *NewExpr::GetValue(FunctionEmitContext *ctx) const { + // pointer of the return type and to run the code for initializers, + // if present. + llvm::Type *ptrType = retType->LLVMType(g->ctx); +- ptrValue = ctx->BitCastInst(ptrValue, ptrType, LLVMGetName(ptrValue, "_cast_ptr")); ++ ptrValue = ctx->BitCastInst(ptrValue, ptrType, llvm::Twine(ptrValue->getName()) + "_cast_ptr"); + + if (initExpr != NULL) + InitSymbol(ptrValue, allocType, initExpr, ctx, pos); +diff --git a/src/llvmutil.cpp b/src/llvmutil.cpp +index 970175dbf..d0becb9f5 100644 +--- a/src/llvmutil.cpp ++++ b/src/llvmutil.cpp +@@ -1605,23 +1605,6 @@ llvm::Value *LLVMShuffleVectors(llvm::Value *v1, llvm::Value *v2, int32_t shuf[] + return new llvm::ShuffleVectorInst(v1, v2, vec, "shuffle", insertBefore); + } + +-const char *LLVMGetName(llvm::Value *v, const char *s) { +- if (v == NULL) +- return s; +- std::string ret = std::string(v->getName()); +- ret += s; +- return strdup(ret.c_str()); +-} +- +-const char *LLVMGetName(const char *op, llvm::Value *v1, llvm::Value *v2) { +- std::string r = op; +- r += "_"; +- r += v1->getName().str(); +- r += "_"; +- r += v2->getName().str(); +- return strdup(r.c_str()); +-} +- + #ifdef ISPC_GENX_ENABLED + bool lIsSVMLoad(llvm::Instruction *inst) { + Assert(inst); +diff --git a/src/llvmutil.h b/src/llvmutil.h +index 42cce4d83..07d089bb4 100644 +--- a/src/llvmutil.h ++++ b/src/llvmutil.h +@@ -328,11 +328,6 @@ extern llvm::Value *LLVMConcatVectors(llvm::Value *v1, llvm::Value *v2, llvm::In + extern llvm::Value *LLVMShuffleVectors(llvm::Value *v1, llvm::Value *v2, int32_t shuf[], int shufSize, + llvm::Instruction *insertBefore); + +-/** Utility routines to concat strings with the names of existing values to +- create meaningful new names for instruction values. +-*/ +-extern const char *LLVMGetName(llvm::Value *v, const char *); +-extern const char *LLVMGetName(const char *op, llvm::Value *v1, llvm::Value *v2); + #ifdef ISPC_GENX_ENABLED + enum AddressSpace { Local, Global, External }; + +diff --git a/src/opt.cpp b/src/opt.cpp +index 5b1ac7b63..9d6cae058 100644 +--- a/src/opt.cpp ++++ b/src/opt.cpp +@@ -257,7 +257,7 @@ static bool lGetSourcePosFromMetadata(const llvm::Instruction *inst, SourcePos * + return true; + } + +-static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llvm::Value *arg1, const char *name, ++static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llvm::Value *arg1, const llvm::Twine &name, + llvm::Instruction *insertBefore = NULL) { + llvm::Value *args[2] = {arg0, arg1}; + llvm::ArrayRef newArgArray(&args[0], &args[2]); +@@ -265,21 +265,22 @@ static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llv + } + + static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llvm::Value *arg1, llvm::Value *arg2, +- const char *name, llvm::Instruction *insertBefore = NULL) { ++ const llvm::Twine &name, llvm::Instruction *insertBefore = NULL) { + llvm::Value *args[3] = {arg0, arg1, arg2}; + llvm::ArrayRef newArgArray(&args[0], &args[3]); + return llvm::CallInst::Create(func, newArgArray, name, insertBefore); + } + + static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llvm::Value *arg1, llvm::Value *arg2, +- llvm::Value *arg3, const char *name, llvm::Instruction *insertBefore = NULL) { ++ llvm::Value *arg3, const llvm::Twine &name, ++ llvm::Instruction *insertBefore = NULL) { + llvm::Value *args[4] = {arg0, arg1, arg2, arg3}; + llvm::ArrayRef newArgArray(&args[0], &args[4]); + return llvm::CallInst::Create(func, newArgArray, name, insertBefore); + } + + static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llvm::Value *arg1, llvm::Value *arg2, +- llvm::Value *arg3, llvm::Value *arg4, const char *name, ++ llvm::Value *arg3, llvm::Value *arg4, const llvm::Twine &name, + llvm::Instruction *insertBefore = NULL) { + llvm::Value *args[5] = {arg0, arg1, arg2, arg3, arg4}; + llvm::ArrayRef newArgArray(&args[0], &args[5]); +@@ -287,7 +288,7 @@ static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llv + } + + static llvm::Instruction *lCallInst(llvm::Function *func, llvm::Value *arg0, llvm::Value *arg1, llvm::Value *arg2, +- llvm::Value *arg3, llvm::Value *arg4, llvm::Value *arg5, const char *name, ++ llvm::Value *arg3, llvm::Value *arg4, llvm::Value *arg5, const llvm::Twine &name, + llvm::Instruction *insertBefore = NULL) { + llvm::Value *args[6] = {arg0, arg1, arg2, arg3, arg4, arg5}; + llvm::ArrayRef newArgArray(&args[0], &args[6]); +@@ -991,23 +992,24 @@ bool IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock &bb) { + llvm::Type *returnType = callInst->getType(); + Assert(llvm::isa(returnType)); + // cast the i8 * to the appropriate type +- const char *name = LLVMGetName(callInst->getArgOperand(0), "_cast"); +- llvm::Value *castPtr = new llvm::BitCastInst(callInst->getArgOperand(0), +- llvm::PointerType::get(returnType, 0), name, callInst); ++ llvm::Value *castPtr = ++ new llvm::BitCastInst(callInst->getArgOperand(0), llvm::PointerType::get(returnType, 0), ++ llvm::Twine(callInst->getArgOperand(0)->getName()) + "_cast", callInst); + lCopyMetadata(castPtr, callInst); + int align; + if (g->opt.forceAlignedMemory) + align = g->target->getNativeVectorAlignment(); + else + align = callInst->getCalledFunction() == avxMaskedLoad32 ? 4 : 8; +- name = LLVMGetName(callInst->getArgOperand(0), "_load"); + #if ISPC_LLVM_VERSION == ISPC_LLVM_10_0 +- llvm::Instruction *loadInst = new llvm::LoadInst(castPtr, name, false /* not volatile */, +- llvm::MaybeAlign(align), (llvm::Instruction *)NULL); ++ llvm::Instruction *loadInst = ++ new llvm::LoadInst(castPtr, llvm::Twine(callInst->getArgOperand(0)->getName()) + "_load", ++ false /* not volatile */, llvm::MaybeAlign(align), (llvm::Instruction *)NULL); + #else + llvm::Instruction *loadInst = new llvm::LoadInst( +- llvm::dyn_cast(castPtr->getType())->getPointerElementType(), castPtr, name, +- false /* not volatile */, llvm::MaybeAlign(align).valueOrOne(), (llvm::Instruction *)NULL); ++ llvm::dyn_cast(castPtr->getType())->getPointerElementType(), castPtr, ++ llvm::Twine(callInst->getArgOperand(0)->getName()) + "_load", false /* not volatile */, ++ llvm::MaybeAlign(align).valueOrOne(), (llvm::Instruction *)NULL); + #endif + lCopyMetadata(loadInst, callInst); + llvm::ReplaceInstWithInst(callInst, loadInst); +@@ -1028,9 +1030,9 @@ bool IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock &bb) { + // all lanes storing, so replace with a regular store + llvm::Value *rvalue = callInst->getArgOperand(2); + llvm::Type *storeType = rvalue->getType(); +- const char *name = LLVMGetName(callInst->getArgOperand(0), "_ptrcast"); +- llvm::Value *castPtr = new llvm::BitCastInst(callInst->getArgOperand(0), +- llvm::PointerType::get(storeType, 0), name, callInst); ++ llvm::Value *castPtr = ++ new llvm::BitCastInst(callInst->getArgOperand(0), llvm::PointerType::get(storeType, 0), ++ llvm::Twine(callInst->getArgOperand(0)->getName()) + "_ptrcast", callInst); + lCopyMetadata(castPtr, callInst); + + int align; +@@ -1339,8 +1341,8 @@ static llvm::Value *lGetBasePointer(llvm::Value *v, llvm::Instruction *insertBef + if (t == NULL) { + return NULL; + } else { +- return llvm::CastInst::Create(ci->getOpcode(), t, ci->getType()->getScalarType(), LLVMGetName(t, "_cast"), +- insertBefore); ++ return llvm::CastInst::Create(ci->getOpcode(), t, ci->getType()->getScalarType(), ++ llvm::Twine(t->getName()) + "_cast", insertBefore); + } + } + +@@ -1583,13 +1585,13 @@ static void lExtractConstantOffset(llvm::Value *vec, llvm::Value **constOffset, + if (co == NULL) + *constOffset = NULL; + else +- *constOffset = +- llvm::CastInst::Create(cast->getOpcode(), co, cast->getType(), LLVMGetName(co, "_cast"), insertBefore); ++ *constOffset = llvm::CastInst::Create(cast->getOpcode(), co, cast->getType(), ++ llvm::Twine(co->getName()) + "_cast", insertBefore); + if (vo == NULL) + *variableOffset = NULL; + else +- *variableOffset = +- llvm::CastInst::Create(cast->getOpcode(), vo, cast->getType(), LLVMGetName(vo, "_cast"), insertBefore); ++ *variableOffset = llvm::CastInst::Create(cast->getOpcode(), vo, cast->getType(), ++ llvm::Twine(vo->getName()) + "_cast", insertBefore); + return; + } + +@@ -1608,16 +1610,18 @@ static void lExtractConstantOffset(llvm::Value *vec, llvm::Value **constOffset, + else if (c1 == NULL || llvm::isa(c1)) + *constOffset = c0; + else +- *constOffset = llvm::BinaryOperator::Create(llvm::Instruction::Add, c0, c1, LLVMGetName("add", c0, c1), +- insertBefore); ++ *constOffset = llvm::BinaryOperator::Create( ++ llvm::Instruction::Add, c0, c1, ((llvm::Twine("add_") + c0->getName()) + "_") + c1->getName(), ++ insertBefore); + + if (v0 == NULL || llvm::isa(v0)) + *variableOffset = v1; + else if (v1 == NULL || llvm::isa(v1)) + *variableOffset = v0; + else +- *variableOffset = llvm::BinaryOperator::Create(llvm::Instruction::Add, v0, v1, +- LLVMGetName("add", v0, v1), insertBefore); ++ *variableOffset = llvm::BinaryOperator::Create( ++ llvm::Instruction::Add, v0, v1, ((llvm::Twine("add_") + v0->getName()) + "_") + v1->getName(), ++ insertBefore); + return; + } else if (bop->getOpcode() == llvm::Instruction::Shl) { + lExtractConstantOffset(op0, &c0, &v0, insertBefore); +@@ -1633,10 +1637,12 @@ static void lExtractConstantOffset(llvm::Value *vec, llvm::Value **constOffset, + *constOffset = vec; + *variableOffset = NULL; + } else { +- *constOffset = llvm::BinaryOperator::Create(llvm::Instruction::Shl, c0, c1, LLVMGetName("shl", c0, c1), +- insertBefore); +- *variableOffset = llvm::BinaryOperator::Create(llvm::Instruction::Shl, v0, c1, +- LLVMGetName("shl", v0, c1), insertBefore); ++ *constOffset = llvm::BinaryOperator::Create( ++ llvm::Instruction::Shl, c0, c1, ((llvm::Twine("shl_") + c0->getName()) + "_") + c1->getName(), ++ insertBefore); ++ *variableOffset = llvm::BinaryOperator::Create( ++ llvm::Instruction::Shl, v0, c1, ((llvm::Twine("shl_") + v0->getName()) + "_") + c1->getName(), ++ insertBefore); + } + return; + } else if (bop->getOpcode() == llvm::Instruction::Mul) { +@@ -1648,25 +1654,30 @@ static void lExtractConstantOffset(llvm::Value *vec, llvm::Value **constOffset, + // Note that the first term is a constant and the last three are + // variable. + if (c0 != NULL && c1 != NULL) +- *constOffset = llvm::BinaryOperator::Create(llvm::Instruction::Mul, c0, c1, LLVMGetName("mul", c0, c1), +- insertBefore); ++ *constOffset = llvm::BinaryOperator::Create( ++ llvm::Instruction::Mul, c0, c1, ((llvm::Twine("mul_") + c0->getName()) + "_") + c1->getName(), ++ insertBefore); + else + *constOffset = NULL; + + llvm::Value *va = NULL, *vb = NULL, *vc = NULL; + if (v0 != NULL && c1 != NULL) +- va = llvm::BinaryOperator::Create(llvm::Instruction::Mul, v0, c1, LLVMGetName("mul", v0, c1), ++ va = llvm::BinaryOperator::Create(llvm::Instruction::Mul, v0, c1, ++ ((llvm::Twine("mul_") + v0->getName()) + "_") + c1->getName(), + insertBefore); + if (c0 != NULL && v1 != NULL) +- vb = llvm::BinaryOperator::Create(llvm::Instruction::Mul, c0, v1, LLVMGetName("mul", c0, v1), ++ vb = llvm::BinaryOperator::Create(llvm::Instruction::Mul, c0, v1, ++ ((llvm::Twine("mul_") + c0->getName()) + "_") + v1->getName(), + insertBefore); + if (v0 != NULL && v1 != NULL) +- vc = llvm::BinaryOperator::Create(llvm::Instruction::Mul, v0, v1, LLVMGetName("mul", v0, v1), ++ vc = llvm::BinaryOperator::Create(llvm::Instruction::Mul, v0, v1, ++ ((llvm::Twine("mul_") + v0->getName()) + "_") + v1->getName(), + insertBefore); + + llvm::Value *vab = NULL; + if (va != NULL && vb != NULL) +- vab = llvm::BinaryOperator::Create(llvm::Instruction::Add, va, vb, LLVMGetName("add", va, vb), ++ vab = llvm::BinaryOperator::Create(llvm::Instruction::Add, va, vb, ++ ((llvm::Twine("add_") + va->getName()) + "_") + vb->getName(), + insertBefore); + else if (va != NULL) + vab = va; +@@ -1674,8 +1685,9 @@ static void lExtractConstantOffset(llvm::Value *vec, llvm::Value **constOffset, + vab = vb; + + if (vab != NULL && vc != NULL) +- *variableOffset = llvm::BinaryOperator::Create(llvm::Instruction::Add, vab, vc, +- LLVMGetName("add", vab, vc), insertBefore); ++ *variableOffset = llvm::BinaryOperator::Create( ++ llvm::Instruction::Add, vab, vc, ((llvm::Twine("add_") + vab->getName()) + "_") + vc->getName(), ++ insertBefore); + else if (vab != NULL) + *variableOffset = vab; + else +@@ -1943,7 +1955,7 @@ static bool lOffsets32BitSafe(llvm::Value **variableOffsetPtr, llvm::Value **con + // all zeros (i.e. a ConstantAggregateZero, but just in case, + // do the more general check with lVectorIs32BitInts(). + variableOffset = new llvm::TruncInst(variableOffset, LLVMTypes::Int32VectorType, +- LLVMGetName(variableOffset, "_trunc"), insertBefore); ++ llvm::Twine(variableOffset->getName()) + "_trunc", insertBefore); + else + return false; + } +@@ -1952,7 +1964,7 @@ static bool lOffsets32BitSafe(llvm::Value **variableOffsetPtr, llvm::Value **con + if (lVectorIs32BitInts(constOffset)) { + // Truncate them so we have a 32-bit vector type for them. + constOffset = new llvm::TruncInst(constOffset, LLVMTypes::Int32VectorType, +- LLVMGetName(constOffset, "_trunc"), insertBefore); ++ llvm::Twine(constOffset->getName()) + "_trunc", insertBefore); + } else { + // FIXME: otherwise we just assume that all constant offsets + // can actually always fit into 32-bits... (This could be +@@ -1963,7 +1975,7 @@ static bool lOffsets32BitSafe(llvm::Value **variableOffsetPtr, llvm::Value **con + // llvm::ConstantFoldInstruction() doesn't seem to be doing + // enough for us in some cases if we call it from here. + constOffset = new llvm::TruncInst(constOffset, LLVMTypes::Int32VectorType, +- LLVMGetName(constOffset, "_trunc"), insertBefore); ++ llvm::Twine(constOffset->getName()) + "_trunc", insertBefore); + } + } + +@@ -2012,8 +2024,8 @@ static bool lOffsets32BitSafe(llvm::Value **offsetPtr, llvm::Instruction *insert + + // Alternatively, offset could be a sequence of adds terminating + // in safe constant vectors or a SExt. +- *offsetPtr = +- new llvm::TruncInst(offset, LLVMTypes::Int32VectorType, LLVMGetName(offset, "_trunc"), insertBefore); ++ *offsetPtr = new llvm::TruncInst(offset, LLVMTypes::Int32VectorType, llvm::Twine(offset->getName()) + "_trunc", ++ insertBefore); + return true; + } else + return false; +@@ -2229,7 +2241,8 @@ static bool lGSToGSBaseOffsets(llvm::CallInst *callInst) { + } + // Cast the base pointer to a void *, since that's what the + // __pseudo_*_base_offsets_* functions want. +- basePtr = new llvm::IntToPtrInst(basePtr, LLVMTypes::VoidPointerType, LLVMGetName(basePtr, "_2void"), callInst); ++ basePtr = new llvm::IntToPtrInst(basePtr, LLVMTypes::VoidPointerType, llvm::Twine(basePtr->getName()) + "_2void", ++ callInst); + lCopyMetadata(basePtr, callInst); + llvm::Function *gatherScatterFunc = info->baseOffsetsFunc; + +@@ -2803,7 +2816,7 @@ static bool lGSToLoadStore(llvm::CallInst *callInst) { + lCopyMetadata(ptr, callInst); + Debug(pos, "Transformed gather to unaligned vector load!"); + llvm::Instruction *newCall = +- lCallInst(gatherInfo->loadMaskedFunc, ptr, mask, LLVMGetName(ptr, "_masked_load")); ++ lCallInst(gatherInfo->loadMaskedFunc, ptr, mask, llvm::Twine(ptr->getName()) + "_masked_load"); + lCopyMetadata(newCall, callInst); + llvm::ReplaceInstWithInst(callInst, newCall); + return true; diff --git a/srcpkgs/ispc/patches/llvm12-004.patch b/srcpkgs/ispc/patches/llvm12-004.patch new file mode 100644 index 00000000000000..3a94d8443a5e12 --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-004.patch @@ -0,0 +1,34 @@ +From c03a5142444476a1caa5c2ba7fa2d92d7793d6f1 Mon Sep 17 00:00:00 2001 +From: Deepak Rajendrakumaran +Date: Mon, 25 Jan 2021 09:22:49 -0800 +Subject: [PATCH] Fixing build on llvm trunk. + +--- + src/ctx.cpp | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/ctx.cpp b/src/ctx.cpp +index ded524b71..b60e6fe84 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -1020,8 +1020,7 @@ void FunctionEmitContext::EmitCaseLabel(int value, bool checkMask, SourcePos pos + llvm::BasicBlock *bbCaseImpl = NULL; + if (emitGenXHardwareMask()) { + // Create basic block with actual case implementation +- llvm::Twine bbName = llvm::Twine(bbCase->getName()) + "_impl"; +- bbCaseImpl = CreateBasicBlock(bbName, bbCase); ++ bbCaseImpl = CreateBasicBlock(llvm::Twine(bbCase->getName()) + "_impl", bbCase); + } + #endif + +@@ -3142,8 +3141,8 @@ llvm::Value *FunctionEmitContext::BroadcastValue(llvm::Value *v, llvm::Type *vec + llvm::Value *undef2 = llvm::UndefValue::get(vecType); + + // InsertElement +- llvm::Twine tw = name.isTriviallyEmpty() ? (llvm::Twine(v->getName()) + "_broadcast") : name + llvm::Twine("_init"); +- llvm::Value *insert = InsertInst(undef1, v, 0, tw.str().c_str()); ++ llvm::Value *insert = ++ InsertInst(undef1, v, 0, name.isTriviallyEmpty() ? (llvm::Twine(v->getName()) + "_broadcast") : name + "_init"); + + // ShuffleVector + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 diff --git a/srcpkgs/ispc/patches/llvm12-005.patch b/srcpkgs/ispc/patches/llvm12-005.patch new file mode 100644 index 00000000000000..e3e96b00abfaa0 --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-005.patch @@ -0,0 +1,372 @@ +From c1d0a51bf8416d42144de9e2bdd59825eaeff1ac Mon Sep 17 00:00:00 2001 +From: Arina Neshlyaeva +Date: Fri, 8 Jan 2021 14:13:49 -0800 +Subject: [PATCH] LLVM 11 support for gen code + +--- + src/ctx.cpp | 13 ++- + src/gen/GlobalsLocalization.cpp | 9 +- + src/opt.cpp | 143 ++++++++++++++++++++++++-------- + 3 files changed, 124 insertions(+), 41 deletions(-) + +diff --git a/src/ctx.cpp b/src/ctx.cpp +index b60e6fe84..2a72e6837 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2010-2020, Intel Corporation ++ Copyright (c) 2010-2021, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without +@@ -3685,8 +3685,17 @@ llvm::Value *FunctionEmitContext::GenXSimdCFPredicate(llvm::Value *value, llvm:: + AssertPos(currentPos, llvm::isa(value->getType())); + llvm::VectorType *vt = llvm::dyn_cast(value->getType()); + if (defaults == NULL) { +- defaults = llvm::ConstantVector::getSplat(value->getType()->getVectorNumElements(), ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 ++ defaults = llvm::ConstantVector::getSplat(vt->getVectorNumElements(), ++ llvm::Constant::getNullValue(vt->getElementType())); ++#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++ defaults = llvm::ConstantVector::getSplat({static_cast(vt->getNumElements()), false}, + llvm::Constant::getNullValue(vt->getElementType())); ++#else ++ defaults = llvm::ConstantVector::getSplat( ++ llvm::ElementCount::get(static_cast(vt->getNumElements()), false), ++ llvm::Constant::getNullValue(vt->getElementType())); ++#endif + } + + auto Fn = llvm::GenXIntrinsic::getGenXDeclaration(m->module, llvm::GenXIntrinsic::genx_simdcf_predicate, +diff --git a/src/gen/GlobalsLocalization.cpp b/src/gen/GlobalsLocalization.cpp +index a176e9462..41f3b00e2 100644 +--- a/src/gen/GlobalsLocalization.cpp ++++ b/src/gen/GlobalsLocalization.cpp +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2014, 2016-2020, Intel Corporation ++ Copyright (c) 2014, 2016-2021, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without +@@ -53,8 +53,10 @@ + #include + #include + #include +-#include ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + #include ++#endif ++#include + #include + #include + #include +@@ -470,7 +472,8 @@ void GlobalsLocalization::LocalizeGlobals(LocalizationInfo &LI) { + Instruction &FirstI = *Fn->getEntryBlock().begin(); + Type *ElemTy = GV->getType()->getElementType(); + AllocaInst *Alloca = new AllocaInst(ElemTy, 0, GV->getName() + ".local", &FirstI); +- Alloca->setAlignment(llvm::MaybeAlign(GV->getAlignment())); ++ Alloca->setAlignment(llvm::MaybeAlign(GV->getAlignment()).valueOrOne()); ++ + if (!isa(GV->getInitializer())) + new StoreInst(GV->getInitializer(), Alloca, &FirstI); + +diff --git a/src/opt.cpp b/src/opt.cpp +index d58d77f73..1789b8476 100644 +--- a/src/opt.cpp ++++ b/src/opt.cpp +@@ -2899,15 +2899,17 @@ static llvm::Function *lGenXMaskedInt8Inst(llvm::Instruction *inst, bool isStore + static llvm::CallInst *lGenXStoreInst(llvm::Value *val, llvm::Value *ptr, llvm::Instruction *inst) { + Assert(g->target->isGenXTarget()); + Assert(llvm::isa(val->getType())); +- Assert(llvm::isPowerOf2_32(val->getType()->getVectorNumElements())); +- Assert(val->getType()->getPrimitiveSizeInBits() / 8 <= 8 * OWORD); ++ ++ llvm::VectorType *valVecType = llvm::dyn_cast(val->getType()); ++ Assert(llvm::isPowerOf2_32(valVecType->getNumElements())); ++ Assert(valVecType->getPrimitiveSizeInBits() / 8 <= 8 * OWORD); + + // The data write of svm store must have a size that is a power of two from 16 to 128 + // bytes. However for int8 type and simd width = 8, the data write size is 8. + // So we use masked store function here instead of svm store which process int8 type + // correctly. +- if (val->getType()->getPrimitiveSizeInBits() / 8 < 16) { +- Assert(val->getType()->getScalarType() == LLVMTypes::Int8Type); ++ if (valVecType->getPrimitiveSizeInBits() / 8 < 16) { ++ Assert(valVecType->getScalarType() == LLVMTypes::Int8Type); + if (llvm::Function *maskedFunc = lGenXMaskedInt8Inst(inst, true)) + return llvm::dyn_cast(lCallInst(maskedFunc, ptr, val, LLVMMaskAllOn, "")); + else { +@@ -2923,15 +2925,17 @@ static llvm::CallInst *lGenXStoreInst(llvm::Value *val, llvm::Value *ptr, llvm:: + + static llvm::CallInst *lGenXLoadInst(llvm::Value *ptr, llvm::Type *retType, llvm::Instruction *inst) { + Assert(llvm::isa(retType)); +- Assert(llvm::isPowerOf2_32(retType->getVectorNumElements())); +- Assert(retType->getPrimitiveSizeInBits()); +- Assert(retType->getPrimitiveSizeInBits() / 8 <= 8 * OWORD); ++ ++ llvm::VectorType *retVecType = llvm::dyn_cast(retType); ++ Assert(llvm::isPowerOf2_32(retVecType->getNumElements())); ++ Assert(retVecType->getPrimitiveSizeInBits()); ++ Assert(retVecType->getPrimitiveSizeInBits() / 8 <= 8 * OWORD); + // The data read of svm load must have a size that is a power of two from 16 to 128 + // bytes. However for int8 type and simd width = 8, the data read size is 8. + // So we use masked load function here instead of svm load which process int8 type + // correctly. +- if (retType->getPrimitiveSizeInBits() / 8 < 16) { +- Assert(retType->getScalarType() == LLVMTypes::Int8Type); ++ if (retVecType->getPrimitiveSizeInBits() / 8 < 16) { ++ Assert(retVecType->getScalarType() == LLVMTypes::Int8Type); + if (llvm::Function *maskedFunc = lGenXMaskedInt8Inst(inst, false)) + return llvm::dyn_cast(lCallInst(maskedFunc, ptr, LLVMMaskAllOn, "")); + else { +@@ -5622,15 +5626,24 @@ static bool lVectorizeGEPs(llvm::Value *ptr, std::vector &ptrUses, std:: + llvm::PtrToIntInst *ptrToInt = + new llvm::PtrToIntInst(ptr, LLVMTypes::Int64Type, "vectorized_ptrtoint", insertBefore); + llvm::Instruction *addr = llvm::BinaryOperator::CreateAdd(ptrToInt, offset, "vectorized_address", insertBefore); ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ llvm::Type *retType = llvm::FixedVectorType::get(scalar_type, reqSize / t_size); ++#else + llvm::Type *retType = llvm::VectorType::get(scalar_type, reqSize / t_size); ++#endif + llvm::Function *fn = llvm::GenXIntrinsic::getGenXDeclaration( + m->module, llvm::GenXIntrinsic::genx_svm_block_ld_unaligned, {retType, addr->getType()}); + llvm::Instruction *ld = llvm::CallInst::Create(fn, {addr}, "vectorized_ld", insertBefore); + + if (loadingPtr) { + // Cast int to ptr via inttoptr ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ ld = new llvm::IntToPtrInst(ld, llvm::FixedVectorType::get(originalType, reqSize / t_size), ++ "vectorized_inttoptr", insertBefore); ++#else + ld = new llvm::IntToPtrInst(ld, llvm::VectorType::get(originalType, reqSize / t_size), + "vectorized_inttoptr", insertBefore); ++#endif + } + + // Scalar extracts for all loaded elements +@@ -6160,19 +6173,34 @@ bool ReplaceLLVMIntrinsics::runOnBasicBlock(llvm::BasicBlock &bb) { + llvm::Instruction *inst = &*I; + if (llvm::CallInst *ci = llvm::dyn_cast(inst)) { + llvm::Function *func = ci->getCalledFunction(); +- if (func && func->getName() == "llvm.trap") { ++ if (func && func->getName().equals("llvm.trap")) { + llvm::Type *argTypes[] = {LLVMTypes::Int1VectorType, LLVMTypes::Int16VectorType}; + // Description of parameters for genx_raw_send_noresult can be found in target-genx.ll + auto Fn = +llvm::GenXIntrinsic::getGenXDeclaration( + m->module, llvm::GenXIntrinsic::genx_raw_send_noresult, argTypes); + llvm::SmallVector Args; + Args.push_back(llvm::ConstantInt::get(LLVMTypes::Int32Type, 0)); +- Args.push_back(llvm::ConstantVector::getSplat(g->target->getNativeVectorWidth(), +- llvm::ConstantInt::getTrue(*g->ctx))); ++ Args.push_back(llvm::ConstantVector::getSplat( ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 ++ g->target->getNativeVectorWidth(), ++#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++ {static_cast(g->target->getNativeVectorWidth()), false}, ++#else // LLVM 12.0+ ++ llvm::ElementCount::get(static_cast(g->target->getNativeVectorWidth()), false), ++#endif ++ llvm::ConstantInt::getTrue(*g->ctx))); ++ + Args.push_back(llvm::ConstantInt::get(LLVMTypes::Int32Type, 39)); + Args.push_back(llvm::ConstantInt::get(LLVMTypes::Int32Type, 33554448)); + llvm::Value *zeroMask = llvm::ConstantVector::getSplat( +- g->target->getNativeVectorWidth(), llvm::Constant::getNullValue(llvm::Type::getInt16Ty(*g->ctx))); ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 ++ g->target->getNativeVectorWidth(), ++#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++ {static_cast(g->target->getNativeVectorWidth()), false}, ++#else // LLVM 12.0+ ++ llvm::ElementCount::get(static_cast(g->target->getNativeVectorWidth()), false), ++#endif ++ llvm::Constant::getNullValue(llvm::Type::getInt16Ty(*g->ctx))); + Args.push_back(zeroMask); + + llvm::Instruction *newInst = llvm::CallInst::Create(Fn, Args, ci->getName()); +@@ -6181,7 +6209,7 @@ bool ReplaceLLVMIntrinsics::runOnBasicBlock(llvm::BasicBlock &bb) { + modifiedAny = true; + goto restart; + } +- } else if (func && func->getName() == "llvm.assume") { ++ } else if (func && func->getName().equals("llvm.assume")) { + ci->eraseFromParent(); + modifiedAny = true; + goto restart; +@@ -6335,7 +6363,7 @@ bool CheckUnsupportedInsts::runOnBasicBlock(llvm::BasicBlock &bb) { + continue; + for (int i = 0; i < unsupportedFuncs.size(); i++) { + std::smatch match; +- std::string funcName = func->getName(); ++ std::string funcName = func->getName().str(); + if (std::regex_match(funcName, match, unsupportedFuncs[i])) { + // We found unsupported function. Generate error and stop compilation. + SourcePos pos; +@@ -6418,12 +6446,14 @@ bool MangleOpenCLBuiltins::runOnBasicBlock(llvm::BasicBlock &bb) { + if (func->getName().startswith("__spirv_ocl")) { + std::string mangledName; + llvm::Type *retType = func->getReturnType(); +- std::string funcName = func->getName(); ++ std::string funcName = func->getName().str(); + std::vector ArgTy; + // spirv OpenCL builtins are used for double types only +- Assert(retType->isVectorTy() && retType->getVectorElementType()->isDoubleTy() || ++ Assert(retType->isVectorTy() && ++ llvm::dyn_cast(retType)->getElementType()->isDoubleTy() || + retType->isSingleValueType() && retType->isDoubleTy()); +- if (retType->isVectorTy() && retType->getVectorElementType()->isDoubleTy()) { ++ if (retType->isVectorTy() && ++ llvm::dyn_cast(retType)->getElementType()->isDoubleTy()) { + ArgTy.push_back(LLVMTypes::DoubleVectorType); + // _DvWIDTH suffix is used in target file to differentiate scalar + // and vector versions of intrinsics. Here we remove this +@@ -6511,8 +6541,15 @@ llvm::Value *FixAddressSpace::calculateGatherScatterAddress(llvm::Value *Ptr, ll + + // Cast offsets to int64 + Offsets = new llvm::ZExtInst( ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ Offsets, ++ llvm::FixedVectorType::get(LLVMTypes::Int64Type, ++ llvm::dyn_cast(Offsets->getType())->getNumElements()), ++ "svm_offset_zext", InsertBefore); ++#else + Offsets, llvm::VectorType::get(LLVMTypes::Int64Type, Offsets->getType()->getVectorNumElements()), + "svm_offset_zext", InsertBefore); ++#endif + + if (!llvm::isa(Ptr)) { + // Cast ptr to int64 +@@ -6520,13 +6557,31 @@ llvm::Value *FixAddressSpace::calculateGatherScatterAddress(llvm::Value *Ptr, ll + + // Vectorize ptr + llvm::Value *undefInsertValue = ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ llvm::UndefValue::get(llvm::FixedVectorType::get( ++ LLVMTypes::Int64Type, llvm::dyn_cast(addressType)->getNumElements())); ++#else + llvm::UndefValue::get(llvm::VectorType::get(LLVMTypes::Int64Type, addressType->getVectorNumElements())); ++#endif + address = llvm::InsertElementInst::Create(undefInsertValue, address, LLVMInt32(0), "svm_ptr_iei", InsertBefore); + llvm::Constant *zeroVec = llvm::ConstantVector::getSplat( ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + addressType->getVectorNumElements(), ++#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++ {llvm::dyn_cast(addressType)->getNumElements(), false}, ++#else ++ llvm::ElementCount::get( ++ llvm::dyn_cast(addressType->getNumElements(), false), ++#endif + llvm::Constant::getNullValue(llvm::Type::getInt32Ty(InsertBefore->getContext()))); ++ + llvm::Value *undefShuffleValue = ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ llvm::UndefValue::get(llvm::FixedVectorType::get( ++ LLVMTypes::Int64Type, llvm::dyn_cast(addressType)->getNumElements())); ++#else + llvm::UndefValue::get(llvm::VectorType::get(LLVMTypes::Int64Type, addressType->getVectorNumElements())); ++#endif + address = new llvm::ShuffleVectorInst(address, undefShuffleValue, zeroVec, "svm_ptr_svi", InsertBefore); + + // Calculate address +@@ -6553,9 +6608,12 @@ llvm::Instruction *FixAddressSpace::processVectorLoad(llvm::LoadInst *LI) { + if (retType->getScalarType()->isPointerTy()) { + isPtrLoad = true; + auto scalarType = g->target->is32Bit() ? LLVMTypes::Int32Type : LLVMTypes::Int64Type; ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ retType = llvm::FixedVectorType::get(scalarType, llvm::dyn_cast(retType)->getNumElements()); ++#else + retType = llvm::VectorType::get(scalarType, retType->getVectorNumElements()); ++#endif + } +- + llvm::Instruction *res = lGenXLoadInst(ptr, retType, llvm::dyn_cast(LI)); + Assert(res); + +@@ -6580,11 +6638,16 @@ llvm::Instruction *FixAddressSpace::processSVMVectorLoad(llvm::Instruction *CI) + ptr = new llvm::IntToPtrInst(ptr, llvm::PointerType::get(retType, 0), CI->getName() + "_inttoptr", CI); + llvm::Instruction *loadInst = NULL; + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 +- loadInst = new llvm::LoadInst(llvm::dyn_cast(ptr->getType())->getPointerElementType(), loadInst, +- CI->getName(), (llvm::Instruction *)NULL); ++ loadInst = new llvm::LoadInst(llvm::dyn_cast(ptr->getType())->getPointerElementType(), ptr, ++ CI->getName(), false /* not volatile */, ++ llvm::MaybeAlign(g->target->getNativeVectorAlignment()).valueOrOne(), ++ (llvm::Instruction *)NULL); + #else +- loadInst = new llvm::LoadInst(ptr, CI->getName(), (llvm::Instruction *)NULL); ++ loadInst = new llvm::LoadInst(ptr, CI->getName(), false, ++ llvm::MaybeAlign(g->target->getNativeVectorAlignment()).valueOrOne(), ++ (llvm::Instruction *)NULL); + #endif ++ + Assert(loadInst); + return loadInst; + } +@@ -6606,7 +6669,11 @@ llvm::Instruction *FixAddressSpace::processVectorStore(llvm::StoreInst *SI) { + // Note: it doesn't look like a normal case for GenX target + if (valType->getScalarType()->isPointerTy()) { + auto scalarType = g->target->is32Bit() ? LLVMTypes::Int32Type : LLVMTypes::Int64Type; ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ valType = llvm::FixedVectorType::get(scalarType, llvm::dyn_cast(valType)->getNumElements()); ++#else + valType = llvm::VectorType::get(scalarType, valType->getVectorNumElements()); ++#endif + val = new llvm::PtrToIntInst(val, valType, "svm_st_val_ptrtoint", SI); + } + +@@ -6631,12 +6698,8 @@ llvm::Instruction *FixAddressSpace::processSVMVectorStore(llvm::Instruction *CI) + ptr = new llvm::IntToPtrInst(ptr, llvm::PointerType::get(valType, 0), CI->getName() + "_inttoptr", CI); + + llvm::Instruction *storeInst = NULL; +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 +- loadInst = new llvm::StoreInst(val, llvm::dyn_cast(ptr->getType())->getPointerElementType(), +- storeInst, CI->getName(), (llvm::Instruction *)NULL); +-#else +- storeInst = new llvm::StoreInst(val, ptr, (llvm::Instruction *)NULL); +-#endif ++ storeInst = new llvm::StoreInst(val, ptr, (llvm::Instruction *)NULL, ++ llvm::MaybeAlign(g->target->getNativeVectorAlignment()).valueOrOne()); + Assert(storeInst); + return storeInst; + } +@@ -6645,15 +6708,18 @@ llvm::Instruction *FixAddressSpace::createInt8WrRegion(llvm::Value *Val, llvm::V + int width = g->target->getVectorWidth(); + + llvm::Value *Args[8]; +- ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ Args[0] = llvm::UndefValue::get(llvm::FixedVectorType::get(LLVMTypes::Int8Type, width * 4)); // old value ++#else + Args[0] = llvm::UndefValue::get(llvm::VectorType::get(LLVMTypes::Int8Type, width * 4)); // old value +- Args[1] = Val; // value to store +- Args[2] = llvm::ConstantInt::get(LLVMTypes::Int32Type, 0); // vstride +- Args[3] = llvm::ConstantInt::get(LLVMTypes::Int32Type, width); // width +- Args[4] = llvm::ConstantInt::get(LLVMTypes::Int32Type, 4); // stride +- Args[5] = llvm::ConstantInt::get(LLVMTypes::Int16Type, 0); // offsets +- Args[6] = llvm::ConstantInt::get(LLVMTypes::Int32Type, 0); // parent width (ignored) +- Args[7] = Mask; // mask ++#endif ++ Args[1] = Val; // value to store ++ Args[2] = llvm::ConstantInt::get(LLVMTypes::Int32Type, 0); // vstride ++ Args[3] = llvm::ConstantInt::get(LLVMTypes::Int32Type, width); // width ++ Args[4] = llvm::ConstantInt::get(LLVMTypes::Int32Type, 4); // stride ++ Args[5] = llvm::ConstantInt::get(LLVMTypes::Int16Type, 0); // offsets ++ Args[6] = llvm::ConstantInt::get(LLVMTypes::Int32Type, 0); // parent width (ignored) ++ Args[7] = Mask; // mask + + llvm::Type *Tys[4]; + +@@ -6708,7 +6774,12 @@ llvm::Instruction *FixAddressSpace::processGatherScatterPrivate(llvm::CallInst * + return NULL; + + llvm::Value *address = calculateGatherScatterAddress(ptr, offsets, CI); ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ llvm::Type *i8VecType = llvm::FixedVectorType::get(LLVMTypes::Int8Type, width * 4); ++#else + llvm::Type *i8VecType = llvm::VectorType::get(LLVMTypes::Int8Type, width * 4); ++#endif ++ + bool isInt8 = (value->getType()->getScalarType() == LLVMTypes::Int8Type); + + Assert(address && "Bad gather/scatter address!"); diff --git a/srcpkgs/ispc/patches/llvm12-006.patch b/srcpkgs/ispc/patches/llvm12-006.patch new file mode 100644 index 00000000000000..a829ea48391eb2 --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-006.patch @@ -0,0 +1,126 @@ +From bb3f493d1fbd45c79e1d9dee67a0430ba313eaad Mon Sep 17 00:00:00 2001 +From: Arina Neshlyaeva +Date: Tue, 19 Jan 2021 11:07:33 -0800 +Subject: [PATCH] Fixed ifdefs for LLVM_11 + +--- + src/ctx.cpp | 6 +++--- + src/opt.cpp | 18 +++++++++--------- + 2 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/src/ctx.cpp b/src/ctx.cpp +index 2a72e6837..527a02f30 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -1691,7 +1691,7 @@ llvm::Value *FunctionEmitContext::SmearUniform(llvm::Value *value, const llvm::T + if (llvm::Constant *const_val = llvm::dyn_cast(value)) { + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + ret = llvm::ConstantVector::getSplat(g->target->getVectorWidth(), const_val); +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + ret = + llvm::ConstantVector::getSplat({static_cast(g->target->getVectorWidth()), false}, const_val); + #else // LLVM 12.0+ +@@ -3148,7 +3148,7 @@ llvm::Value *FunctionEmitContext::BroadcastValue(llvm::Value *v, llvm::Type *vec + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + llvm::Constant *zeroVec = llvm::ConstantVector::getSplat( + vecType->getVectorNumElements(), llvm::Constant::getNullValue(llvm::Type::getInt32Ty(*g->ctx))); +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + llvm::Constant *zeroVec = + llvm::ConstantVector::getSplat({static_cast(ty->getNumElements()), false}, + llvm::Constant::getNullValue(llvm::Type::getInt32Ty(*g->ctx))); +@@ -3688,7 +3688,7 @@ llvm::Value *FunctionEmitContext::GenXSimdCFPredicate(llvm::Value *value, llvm:: + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + defaults = llvm::ConstantVector::getSplat(vt->getVectorNumElements(), + llvm::Constant::getNullValue(vt->getElementType())); +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + defaults = llvm::ConstantVector::getSplat({static_cast(vt->getNumElements()), false}, + llvm::Constant::getNullValue(vt->getElementType())); + #else +diff --git a/src/opt.cpp b/src/opt.cpp +index 1789b8476..3ff191a0a 100644 +--- a/src/opt.cpp ++++ b/src/opt.cpp +@@ -1045,7 +1045,7 @@ bool IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock &bb) { + align = g->target->getNativeVectorAlignment(); + else + align = callInst->getCalledFunction() == avxMaskedLoad32 ? 4 : 8; +-#if ISPC_LLVM_VERSION == ISPC_LLVM_10_0 ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + llvm::Instruction *loadInst = + new llvm::LoadInst(castPtr, llvm::Twine(callInst->getArgOperand(0)->getName()) + "_load", + false /* not volatile */, llvm::MaybeAlign(align), (llvm::Instruction *)NULL); +@@ -1472,7 +1472,7 @@ static llvm::Value *lGetBasePtrAndOffsets(llvm::Value *ptrs, llvm::Value **offse + llvm::Value *zeroMask = + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + llvm::ConstantVector::getSplat(cv->getType()->getVectorNumElements(), +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + llvm::ConstantVector::getSplat( + {llvm::dyn_cast(cv->getType())->getNumElements(), false}, + #else // LLVM 12.0+ +@@ -1495,7 +1495,7 @@ static llvm::Value *lGetBasePtrAndOffsets(llvm::Value *ptrs, llvm::Value **offse + llvm::Value *zeroMask = llvm::ConstantVector::getSplat( + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + bop_var_type->getVectorNumElements(), +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + {llvm::dyn_cast(bop_var_type)->getNumElements(), false}, + #else // LLVM 12.0+ + llvm::ElementCount::get( +@@ -2803,7 +2803,7 @@ static bool lGSToLoadStore(llvm::CallInst *callInst) { + llvm::Value *zeroMask = + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + llvm::ConstantVector::getSplat(callInst->getType()->getVectorNumElements(), +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + llvm::ConstantVector::getSplat( + {llvm::dyn_cast(callInst->getType())->getNumElements(), false}, + +@@ -3100,7 +3100,7 @@ static bool lImproveMaskedLoad(llvm::CallInst *callInst, llvm::BasicBlock::itera + { + llvm::Type *ptrType = llvm::PointerType::get(callInst->getType(), 0); + ptr = new llvm::BitCastInst(ptr, ptrType, "ptr_cast_for_load", callInst); +-#if ISPC_LLVM_VERSION == ISPC_LLVM_10_0 ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + load = new llvm::LoadInst( + ptr, callInst->getName(), false /* not volatile */, + llvm::MaybeAlign(g->opt.forceAlignedMemory ? g->target->getNativeVectorAlignment() : info->align) +@@ -3459,7 +3459,7 @@ llvm::Value *lGEPAndLoad(llvm::Value *basePtr, int64_t offset, int align, llvm:: + llvm::Type *type) { + llvm::Value *ptr = lGEPInst(basePtr, LLVMInt64(offset), "new_base", insertBefore); + ptr = new llvm::BitCastInst(ptr, llvm::PointerType::get(type, 0), "ptr_cast", insertBefore); +-#if ISPC_LLVM_VERSION == ISPC_LLVM_10_0 ++#if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + return new llvm::LoadInst(ptr, "gather_load", false /* not volatile */, llvm::MaybeAlign(align), insertBefore); + #else // LLVM 11.0+ + return new llvm::LoadInst(llvm::dyn_cast(ptr->getType())->getPointerElementType(), ptr, +@@ -6183,7 +6183,7 @@ bool ReplaceLLVMIntrinsics::runOnBasicBlock(llvm::BasicBlock &bb) { + Args.push_back(llvm::ConstantVector::getSplat( + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + g->target->getNativeVectorWidth(), +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + {static_cast(g->target->getNativeVectorWidth()), false}, + #else // LLVM 12.0+ + llvm::ElementCount::get(static_cast(g->target->getNativeVectorWidth()), false), +@@ -6195,7 +6195,7 @@ bool ReplaceLLVMIntrinsics::runOnBasicBlock(llvm::BasicBlock &bb) { + llvm::Value *zeroMask = llvm::ConstantVector::getSplat( + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + g->target->getNativeVectorWidth(), +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + {static_cast(g->target->getNativeVectorWidth()), false}, + #else // LLVM 12.0+ + llvm::ElementCount::get(static_cast(g->target->getNativeVectorWidth()), false), +@@ -6567,7 +6567,7 @@ llvm::Value *FixAddressSpace::calculateGatherScatterAddress(llvm::Value *Ptr, ll + llvm::Constant *zeroVec = llvm::ConstantVector::getSplat( + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + addressType->getVectorNumElements(), +-#elif ISPC_LLVM_VERSION == ISPC_LLVM_11_0 ++#elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 + {llvm::dyn_cast(addressType)->getNumElements(), false}, + #else + llvm::ElementCount::get( diff --git a/srcpkgs/ispc/patches/llvm12-007.patch b/srcpkgs/ispc/patches/llvm12-007.patch new file mode 100644 index 00000000000000..1b975f896c7ef8 --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-007.patch @@ -0,0 +1,160 @@ +From 62f5a6c37bf26fc25a7cf81868052d3472874610 Mon Sep 17 00:00:00 2001 +From: Arina Neshlyaeva +Date: Tue, 23 Mar 2021 23:07:30 -0700 +Subject: [PATCH] Do not generate function mask when it is not required + +--- + src/ctx.cpp | 39 ++++++++++++++------- + tests/lit-tests/full_mask.ispc | 63 ++++++++++++++++++++++++++++++++++ + 2 files changed, 90 insertions(+), 12 deletions(-) + create mode 100644 tests/lit-tests/full_mask.ispc + +diff --git a/src/ctx.cpp b/src/ctx.cpp +index 527a02f30..9e775fc5c 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -231,10 +231,18 @@ FunctionEmitContext::FunctionEmitContext(Function *func, Symbol *funSym, llvm::F + internalMaskPointer = AllocaInst(LLVMTypes::MaskType, "internal_mask_memory"); + StoreInst(LLVMMaskAllOn, internalMaskPointer); + +- functionMaskValue = LLVMMaskAllOn; +- +- fullMaskPointer = AllocaInst(LLVMTypes::MaskType, "full_mask_memory"); +- StoreInst(LLVMMaskAllOn, fullMaskPointer); ++ // If the function doesn't have __mask in parameters, there is no need to ++ // have function mask ++ if ((func->GetType()->isExported && ++ (lf->getFunctionType()->getNumParams() == func->GetType()->GetNumParameters())) || ++ (func->GetType()->isUnmasked) || (func->GetType()->isTask)) { ++ functionMaskValue = NULL; ++ fullMaskPointer = NULL; ++ } else { ++ functionMaskValue = LLVMMaskAllOn; ++ fullMaskPointer = AllocaInst(LLVMTypes::MaskType, "full_mask_memory"); ++ StoreInst(LLVMMaskAllOn, fullMaskPointer); ++ } + + blockEntryMask = NULL; + breakLanesPtr = continueLanesPtr = NULL; +@@ -389,20 +397,26 @@ llvm::BasicBlock *FunctionEmitContext::GetCurrentBasicBlock() { return bblock; } + + void FunctionEmitContext::SetCurrentBasicBlock(llvm::BasicBlock *bb) { bblock = bb; } + +-llvm::Value *FunctionEmitContext::GetFunctionMask() { return functionMaskValue; } ++llvm::Value *FunctionEmitContext::GetFunctionMask() { return fullMaskPointer ? functionMaskValue : LLVMMaskAllOn; } + + llvm::Value *FunctionEmitContext::GetInternalMask() { return LoadInst(internalMaskPointer, NULL, "load_mask"); } + + llvm::Value *FunctionEmitContext::GetFullMask() { +- return BinaryOperator(llvm::Instruction::And, GetInternalMask(), functionMaskValue, "internal_mask&function_mask"); ++ return fullMaskPointer ? BinaryOperator(llvm::Instruction::And, GetInternalMask(), functionMaskValue, ++ "internal_mask&function_mask") ++ : GetInternalMask(); + } + +-llvm::Value *FunctionEmitContext::GetFullMaskPointer() { return fullMaskPointer; } ++llvm::Value *FunctionEmitContext::GetFullMaskPointer() { ++ return fullMaskPointer ? fullMaskPointer : internalMaskPointer; ++} + + void FunctionEmitContext::SetFunctionMask(llvm::Value *value) { +- functionMaskValue = value; +- if (bblock != NULL) +- StoreInst(GetFullMask(), fullMaskPointer); ++ if (fullMaskPointer != NULL) { ++ functionMaskValue = value; ++ if (bblock != NULL) ++ StoreInst(GetFullMask(), fullMaskPointer); ++ } + } + + void FunctionEmitContext::SetBlockEntryMask(llvm::Value *value) { blockEntryMask = value; } +@@ -410,7 +424,8 @@ void FunctionEmitContext::SetBlockEntryMask(llvm::Value *value) { blockEntryMask + void FunctionEmitContext::SetInternalMask(llvm::Value *value) { + StoreInst(value, internalMaskPointer); + // kludge so that __mask returns the right value in ispc code. +- StoreInst(GetFullMask(), fullMaskPointer); ++ if (fullMaskPointer) ++ StoreInst(GetFullMask(), fullMaskPointer); + } + + void FunctionEmitContext::SetInternalMaskAnd(llvm::Value *oldMask, llvm::Value *test) { +@@ -1265,7 +1280,7 @@ void FunctionEmitContext::CurrentLanesReturned(Expr *expr, bool doCoherenceCheck + // lanes have returned + if (doCoherenceCheck) { + // if newReturnedLanes == functionMaskValue, get out of here! +- llvm::Value *cmp = MasksAllEqual(functionMaskValue, newReturnedLanes); ++ llvm::Value *cmp = MasksAllEqual(GetFunctionMask(), newReturnedLanes); + llvm::BasicBlock *bDoReturn = CreateBasicBlock("do_return"); + llvm::BasicBlock *bNoReturn = CreateBasicBlock("no_return"); + BranchInst(bDoReturn, bNoReturn, cmp); +diff --git a/tests/lit-tests/full_mask.ispc b/tests/lit-tests/full_mask.ispc +new file mode 100644 +index 000000000..ac0b0bca3 +--- /dev/null ++++ b/tests/lit-tests/full_mask.ispc +@@ -0,0 +1,63 @@ ++// RUN: %{ispc} %s -DISPC_EXPORT --emit-llvm-text -O0 --nowrap -o %t.ll ++// RUN: FileCheck --input-file=%t.ll -check-prefix=CHECK_ISPC_EXPORT %s ++ ++// RUN: %{ispc} %s -DISPC_UNMASKED --emit-llvm-text -O0 --nowrap -o %t.ll ++// RUN: FileCheck --input-file=%t.ll -check-prefix=CHECK_ISPC_UNMASKED %s ++ ++// RUN: %{ispc} %s -DISPC_NOQUALIF --emit-llvm-text -O0 --nowrap -o %t.ll ++// RUN: FileCheck --input-file=%t.ll -check-prefix=CHECK_ISPC_NOQUALIF %s ++ ++// RUN: %{ispc} %s -DISPC_TASK --emit-llvm-text -O0 --nowrap -o %t.ll ++// RUN: FileCheck --input-file=%t.ll -check-prefix=CHECK_ISPC_TASK %s ++ ++struct Parameters { ++ float *vout; ++ int param; ++}; ++ ++#ifdef ISPC_EXPORT ++// CHECK_ISPC_EXPORT: define void @simple_export___ ++// CHECK_ISPC_EXPORT: %full_mask_memory = alloca ++// CHECK_ISPC_EXPORT: define void @simple_export( ++// CHECK_ISPC_EXPORT-NOT: %full_mask_memory = alloca ++export void simple_export(void *uniform _p) { ++ Parameters *uniform p = (Parameters * uniform) _p; ++ if (programIndex > p->param) ++ p->vout[programIndex] = programCount * programIndex; ++} ++#endif ++#ifdef ISPC_UNMASKED ++// CHECK_ISPC_UNMASKED: define void @simple_unmasked ++// CHECK_ISPC_UNMASKED-NOT: %full_mask_memory = alloca ++unmasked void simple_unmasked(void *uniform _p) { ++ Parameters *uniform p = (Parameters * uniform) _p; ++ if (programIndex > p->param) ++ p->vout[programIndex] = programCount * programIndex; ++} ++#endif ++#ifdef ISPC_NOQUALIF ++// CHECK_ISPC_NOQUALIF: define void @simple ++// CHECK_ISPC_NOQUALIF: %full_mask_memory = alloca ++void simple(void *uniform _p) { ++ Parameters *uniform p = (Parameters * uniform) _p; ++ if (programIndex > p->param) ++ p->vout[programIndex] = programCount * programIndex; ++} ++#endif ++#ifdef ISPC_TASK ++ ++// CHECK_ISPC_TASK: define void @simple_task ++// CHECK_ISPC_TASK-NOT: %full_mask_memory = alloca ++// CHECK_ISPC_TASK: define void @simple_entry_point__ ++// CHECK_ISPC_TASK: %full_mask_memory = alloca ++// CHECK_ISPC_TASK: define void @simple_entry_point( ++// CHECK_ISPC_TASK-NOT: %full_mask_memory = alloca ++task void simple_task(void *uniform _p) { ++ Parameters *uniform p = (Parameters * uniform) _p; ++ if (programIndex > p->param) ++ p->vout[programIndex] = programCount * programIndex; ++} ++export void simple_entry_point(void *uniform parameters, uniform int dim0, uniform int dim1, uniform int dim2) { ++ launch[dim0, dim1, dim2] simple_task(parameters); ++} ++#endif +\ No newline at end of file diff --git a/srcpkgs/ispc/patches/llvm12-008.patch b/srcpkgs/ispc/patches/llvm12-008.patch new file mode 100644 index 00000000000000..c8413d8b7887b1 --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-008.patch @@ -0,0 +1,149 @@ +From afad14227d9204a3c8a626ca608f5b43c3218fe9 Mon Sep 17 00:00:00 2001 +From: Arina Neshlyaeva +Date: Tue, 4 May 2021 11:43:52 -0700 +Subject: [PATCH] Fixed ISPC gen build for LLVM12 + +--- + src/ctx.cpp | 4 ++++ + src/opt.cpp | 43 +++++++++++++++++++++++++++++-------------- + 2 files changed, 33 insertions(+), 14 deletions(-) + +diff --git a/src/ctx.cpp b/src/ctx.cpp +index 0c7050591..f7dc06939 100644 +--- a/src/ctx.cpp ++++ b/src/ctx.cpp +@@ -3738,7 +3738,11 @@ llvm::Value *FunctionEmitContext::GenXSimdCFAny(llvm::Value *value) { + + llvm::Value *FunctionEmitContext::GenXSimdCFPredicate(llvm::Value *value, llvm::Value *defaults) { + AssertPos(currentPos, llvm::isa(value->getType())); ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ llvm::FixedVectorType *vt = llvm::dyn_cast(value->getType()); ++#else + llvm::VectorType *vt = llvm::dyn_cast(value->getType()); ++#endif + if (defaults == NULL) { + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + defaults = llvm::ConstantVector::getSplat(vt->getVectorNumElements(), +diff --git a/src/opt.cpp b/src/opt.cpp +index cea4afa23..4e33d6b1a 100644 +--- a/src/opt.cpp ++++ b/src/opt.cpp +@@ -2916,9 +2916,13 @@ static llvm::Function *lGenXMaskedInt8Inst(llvm::Instruction *inst, bool isStore + + static llvm::CallInst *lGenXStoreInst(llvm::Value *val, llvm::Value *ptr, llvm::Instruction *inst) { + Assert(g->target->isGenXTarget()); ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ Assert(llvm::isa(val->getType())); ++ llvm::FixedVectorType *valVecType = llvm::dyn_cast(val->getType()); ++#else + Assert(llvm::isa(val->getType())); +- + llvm::VectorType *valVecType = llvm::dyn_cast(val->getType()); ++#endif + Assert(llvm::isPowerOf2_32(valVecType->getNumElements())); + Assert(valVecType->getPrimitiveSizeInBits() / 8 <= 8 * OWORD); + +@@ -2942,9 +2946,13 @@ static llvm::CallInst *lGenXStoreInst(llvm::Value *val, llvm::Value *ptr, llvm:: + } + + static llvm::CallInst *lGenXLoadInst(llvm::Value *ptr, llvm::Type *retType, llvm::Instruction *inst) { ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ Assert(llvm::isa(retType)); ++ llvm::FixedVectorType *retVecType = llvm::dyn_cast(retType); ++#else + Assert(llvm::isa(retType)); +- + llvm::VectorType *retVecType = llvm::dyn_cast(retType); ++#endif + Assert(llvm::isPowerOf2_32(retVecType->getNumElements())); + Assert(retVecType->getPrimitiveSizeInBits()); + Assert(retVecType->getPrimitiveSizeInBits() / 8 <= 8 * OWORD); +@@ -5485,8 +5493,13 @@ static void lCreateBlockLDUse(llvm::Instruction *currInst, std::vector(ui->getUser()))) { + // Collect idxs from gather and fix users + llvm::Value *res = llvm::UndefValue::get(gather->getType()); +- for (unsigned i = 0, end = llvm::dyn_cast(res->getType())->getNumElements(); i < end; +- ++i) { ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 ++ for (unsigned i = 0, end = llvm::dyn_cast(res->getType())->getNumElements(); i < end; ++ ++i) ++#else ++ for (unsigned i = 0, end = llvm::dyn_cast(res->getType())->getNumElements(); i < end; ++i) ++#endif ++ { + // Get element via IEI + res = llvm::InsertElementInst::Create(res, EEIs[ptrUse.idxs[curr_idx++]], + llvm::ConstantInt::get(LLVMTypes::Int32Type, i), +@@ -5522,10 +5535,11 @@ static bool lVectorizeGEPs(llvm::Value *ptr, std::vector &ptrUses, std:: + + // Adjust values for vector load + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 +- if (auto vecTy = llvm::dyn_cast(type)) { ++ if (auto vecTy = llvm::dyn_cast(type)) + #else +- if (auto vecTy = llvm::dyn_cast(type)) { ++ if (auto vecTy = llvm::dyn_cast(type)) + #endif ++ { + // Get single element size + t_size /= vecTy->getNumElements(); + // Get single element type +@@ -6477,7 +6491,7 @@ llvm::Value *FixAddressSpace::calculateGatherScatterAddress(llvm::Value *Ptr, ll + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 + Offsets, + llvm::FixedVectorType::get(LLVMTypes::Int64Type, +- llvm::dyn_cast(Offsets->getType())->getNumElements()), ++ llvm::dyn_cast(Offsets->getType())->getNumElements()), + "svm_offset_zext", InsertBefore); + #else + Offsets, llvm::VectorType::get(LLVMTypes::Int64Type, Offsets->getType()->getVectorNumElements()), +@@ -6492,7 +6506,7 @@ llvm::Value *FixAddressSpace::calculateGatherScatterAddress(llvm::Value *Ptr, ll + llvm::Value *undefInsertValue = + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 + llvm::UndefValue::get(llvm::FixedVectorType::get( +- LLVMTypes::Int64Type, llvm::dyn_cast(addressType)->getNumElements())); ++ LLVMTypes::Int64Type, llvm::dyn_cast(addressType)->getNumElements())); + #else + llvm::UndefValue::get(llvm::VectorType::get(LLVMTypes::Int64Type, addressType->getVectorNumElements())); + #endif +@@ -6501,17 +6515,16 @@ llvm::Value *FixAddressSpace::calculateGatherScatterAddress(llvm::Value *Ptr, ll + #if ISPC_LLVM_VERSION < ISPC_LLVM_11_0 + addressType->getVectorNumElements(), + #elif ISPC_LLVM_VERSION < ISPC_LLVM_12_0 +- {llvm::dyn_cast(addressType)->getNumElements(), false}, ++ {llvm::dyn_cast(addressType)->getNumElements(), false}, + #else +- llvm::ElementCount::get( +- llvm::dyn_cast(addressType->getNumElements(), false), ++ llvm::ElementCount::get(llvm::dyn_cast(addressType)->getNumElements(), false), + #endif + llvm::Constant::getNullValue(llvm::Type::getInt32Ty(InsertBefore->getContext()))); + + llvm::Value *undefShuffleValue = + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 + llvm::UndefValue::get(llvm::FixedVectorType::get( +- LLVMTypes::Int64Type, llvm::dyn_cast(addressType)->getNumElements())); ++ LLVMTypes::Int64Type, llvm::dyn_cast(addressType)->getNumElements())); + #else + llvm::UndefValue::get(llvm::VectorType::get(LLVMTypes::Int64Type, addressType->getVectorNumElements())); + #endif +@@ -6542,7 +6555,8 @@ llvm::Instruction *FixAddressSpace::processVectorLoad(llvm::LoadInst *LI) { + isPtrLoad = true; + auto scalarType = g->target->is32Bit() ? LLVMTypes::Int32Type : LLVMTypes::Int64Type; + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 +- retType = llvm::FixedVectorType::get(scalarType, llvm::dyn_cast(retType)->getNumElements()); ++ retType = ++ llvm::FixedVectorType::get(scalarType, llvm::dyn_cast(retType)->getNumElements()); + #else + retType = llvm::VectorType::get(scalarType, retType->getVectorNumElements()); + #endif +@@ -6604,7 +6618,8 @@ llvm::Instruction *FixAddressSpace::processVectorStore(llvm::StoreInst *SI) { + if (valType->getScalarType()->isPointerTy()) { + auto scalarType = g->target->is32Bit() ? LLVMTypes::Int32Type : LLVMTypes::Int64Type; + #if ISPC_LLVM_VERSION >= ISPC_LLVM_11_0 +- valType = llvm::FixedVectorType::get(scalarType, llvm::dyn_cast(valType)->getNumElements()); ++ valType = ++ llvm::FixedVectorType::get(scalarType, llvm::dyn_cast(valType)->getNumElements()); + #else + valType = llvm::VectorType::get(scalarType, valType->getVectorNumElements()); + #endif diff --git a/srcpkgs/ispc/patches/llvm12-009.patch b/srcpkgs/ispc/patches/llvm12-009.patch new file mode 100644 index 00000000000000..d3ea67828582cf --- /dev/null +++ b/srcpkgs/ispc/patches/llvm12-009.patch @@ -0,0 +1,2109 @@ +From 97b13c32132e2704a5e3e7b2eae49d854d087e3e Mon Sep 17 00:00:00 2001 +From: Arina Neshlyaeva +Date: Tue, 4 May 2021 11:31:55 -0700 +Subject: [PATCH] Updated builtins-cm* for switch to LLVM12 + +--- + builtins/builtins-cm-32.ll | 234 ++++++++++++++++++------------------- + builtins/builtins-cm-64.ll | 232 ++++++++++++++++++------------------ + 2 files changed, 233 insertions(+), 233 deletions(-) + +diff --git a/builtins/builtins-cm-32.ll b/builtins/builtins-cm-32.ll +index 32debf32e..481bbdc48 100644 +--- a/builtins/builtins-cm-32.ll ++++ b/builtins/builtins-cm-32.ll +@@ -557,7 +557,7 @@ $_ZN13VaryingWriter12WriteVecElemIPvEEvv = comdat any + @.str.10 = private unnamed_addr constant [5 x i8] c"%08X\00", align 1 + + ; Function Attrs: noinline nounwind +-define dso_local signext i8 @_Z24__cm_intrinsic_impl_sdivcc(i8 signext, i8 signext) #0 { ++define internal signext i8 @_Z24__cm_intrinsic_impl_sdivcc(i8 signext, i8 signext) #0 { + %3 = alloca i8, align 1 + %4 = alloca i8, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -618,7 +618,7 @@ define internal <1 x i8> @_ZN7details13__impl_divremILi1EEEu2CMvbT__cS1_S1_u2CMv + declare <1 x i8> @llvm.genx.rdregioni.v1i8.v1i8.i16(<1 x i8>, i32, i32, i32, i16, i32) #2 + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_cS_(<1 x i8>, <1 x i8>) #0 { ++define internal <1 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_cS_(<1 x i8>, <1 x i8>) #0 { + %3 = alloca <1 x i8>, align 1 + %4 = alloca <1 x i8>, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -634,7 +634,7 @@ define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_cS_(<1 x i8>, <1 + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb2_cS_(<2 x i8>, <2 x i8>) #3 { ++define internal <2 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb2_cS_(<2 x i8>, <2 x i8>) #3 { + %3 = alloca <2 x i8>, align 2 + %4 = alloca <2 x i8>, align 2 + %5 = alloca <2 x i8>, align 2 +@@ -680,7 +680,7 @@ define internal <2 x i8> @_ZN7details13__impl_divremILi2EEEu2CMvbT__cS1_S1_u2CMv + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb4_cS_(<4 x i8>, <4 x i8>) #5 { ++define internal <4 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb4_cS_(<4 x i8>, <4 x i8>) #5 { + %3 = alloca <4 x i8>, align 4 + %4 = alloca <4 x i8>, align 4 + %5 = alloca <4 x i8>, align 4 +@@ -818,7 +818,7 @@ define internal <16 x i8> @_ZN7details13__impl_divremILi16EEEu2CMvbT__cS1_S1_u2C + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb32_cS_(<32 x i8>, <32 x i8>) #11 { ++define internal <32 x i8> @_Z24__cm_intrinsic_impl_sdivu2CMvb32_cS_(<32 x i8>, <32 x i8>) #11 { + %3 = alloca <32 x i8>, align 32 + %4 = alloca <32 x i8>, align 32 + %5 = alloca <32 x i8>, align 32 +@@ -864,7 +864,7 @@ define internal <32 x i8> @_ZN7details13__impl_divremILi32EEEu2CMvbT__cS1_S1_u2C + } + + ; Function Attrs: noinline nounwind +-define dso_local signext i8 @_Z24__cm_intrinsic_impl_sremcc(i8 signext, i8 signext) #0 { ++define internal signext i8 @_Z24__cm_intrinsic_impl_sremcc(i8 signext, i8 signext) #0 { + %3 = alloca i8, align 1 + %4 = alloca i8, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -890,7 +890,7 @@ define dso_local signext i8 @_Z24__cm_intrinsic_impl_sremcc(i8 signext, i8 signe + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb1_cS_(<1 x i8>, <1 x i8>) #0 { ++define internal <1 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb1_cS_(<1 x i8>, <1 x i8>) #0 { + %3 = alloca <1 x i8>, align 1 + %4 = alloca <1 x i8>, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -904,7 +904,7 @@ define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb1_cS_(<1 x i8>, <1 + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb2_cS_(<2 x i8>, <2 x i8>) #3 { ++define internal <2 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb2_cS_(<2 x i8>, <2 x i8>) #3 { + %3 = alloca <2 x i8>, align 2 + %4 = alloca <2 x i8>, align 2 + %5 = alloca <2 x i8>, align 2 +@@ -918,7 +918,7 @@ define dso_local <2 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb2_cS_(<2 x i8>, <2 + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb4_cS_(<4 x i8>, <4 x i8>) #5 { ++define internal <4 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb4_cS_(<4 x i8>, <4 x i8>) #5 { + %3 = alloca <4 x i8>, align 4 + %4 = alloca <4 x i8>, align 4 + %5 = alloca <4 x i8>, align 4 +@@ -932,7 +932,7 @@ define dso_local <4 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb4_cS_(<4 x i8>, <4 + } + + ; Function Attrs: noinline nounwind +-define dso_local <8 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb8_cS_(<8 x i8>, <8 x i8>) #7 { ++define internal <8 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb8_cS_(<8 x i8>, <8 x i8>) #7 { + %3 = alloca <8 x i8>, align 8 + %4 = alloca <8 x i8>, align 8 + %5 = alloca <8 x i8>, align 8 +@@ -946,7 +946,7 @@ define dso_local <8 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb8_cS_(<8 x i8>, <8 + } + + ; Function Attrs: noinline nounwind +-define dso_local <16 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb16_cS_(<16 x i8>, <16 x i8>) #9 { ++define internal <16 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb16_cS_(<16 x i8>, <16 x i8>) #9 { + %3 = alloca <16 x i8>, align 16 + %4 = alloca <16 x i8>, align 16 + %5 = alloca <16 x i8>, align 16 +@@ -960,7 +960,7 @@ define dso_local <16 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb16_cS_(<16 x i8>, + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb32_cS_(<32 x i8>, <32 x i8>) #11 { ++define internal <32 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb32_cS_(<32 x i8>, <32 x i8>) #11 { + %3 = alloca <32 x i8>, align 32 + %4 = alloca <32 x i8>, align 32 + %5 = alloca <32 x i8>, align 32 +@@ -974,7 +974,7 @@ define dso_local <32 x i8> @_Z24__cm_intrinsic_impl_sremu2CMvb32_cS_(<32 x i8>, + } + + ; Function Attrs: noinline nounwind +-define dso_local signext i16 @_Z24__cm_intrinsic_impl_sdivss(i16 signext, i16 signext) #3 { ++define internal signext i16 @_Z24__cm_intrinsic_impl_sdivss(i16 signext, i16 signext) #3 { + %3 = alloca i16, align 2 + %4 = alloca i16, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -1058,7 +1058,7 @@ define internal <1 x i16> @_ZN7details13__impl_divremILi1EEEu2CMvbT__sS1_S1_u2CM + declare <1 x i16> @llvm.genx.rdregioni.v1i16.v1i16.i16(<1 x i16>, i32, i32, i32, i16, i32) #2 + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_sS_(<1 x i16>, <1 x i16>) #3 { ++define internal <1 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_sS_(<1 x i16>, <1 x i16>) #3 { + %3 = alloca <1 x i16>, align 2 + %4 = alloca <1 x i16>, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -1074,7 +1074,7 @@ define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_sS_(<1 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb2_sS_(<2 x i16>, <2 x i16>) #5 { ++define internal <2 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb2_sS_(<2 x i16>, <2 x i16>) #5 { + %3 = alloca <2 x i16>, align 4 + %4 = alloca <2 x i16>, align 4 + %5 = alloca <2 x i16>, align 4 +@@ -1143,7 +1143,7 @@ define internal <2 x i16> @_ZN7details13__impl_divremILi2EEEu2CMvbT__sS1_S1_u2CM + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb4_sS_(<4 x i16>, <4 x i16>) #7 { ++define internal <4 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb4_sS_(<4 x i16>, <4 x i16>) #7 { + %3 = alloca <4 x i16>, align 8 + %4 = alloca <4 x i16>, align 8 + %5 = alloca <4 x i16>, align 8 +@@ -1350,7 +1350,7 @@ define internal <16 x i16> @_ZN7details13__impl_divremILi16EEEu2CMvbT__sS1_S1_u2 + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb32_sS_(<32 x i16>, <32 x i16>) #13 { ++define internal <32 x i16> @_Z24__cm_intrinsic_impl_sdivu2CMvb32_sS_(<32 x i16>, <32 x i16>) #13 { + %3 = alloca <32 x i16>, align 64 + %4 = alloca <32 x i16>, align 64 + %5 = alloca <32 x i16>, align 64 +@@ -1419,7 +1419,7 @@ define internal <32 x i16> @_ZN7details13__impl_divremILi32EEEu2CMvbT__sS1_S1_u2 + } + + ; Function Attrs: noinline nounwind +-define dso_local signext i16 @_Z24__cm_intrinsic_impl_sremss(i16 signext, i16 signext) #3 { ++define internal signext i16 @_Z24__cm_intrinsic_impl_sremss(i16 signext, i16 signext) #3 { + %3 = alloca i16, align 2 + %4 = alloca i16, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -1445,7 +1445,7 @@ define dso_local signext i16 @_Z24__cm_intrinsic_impl_sremss(i16 signext, i16 si + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb1_sS_(<1 x i16>, <1 x i16>) #3 { ++define internal <1 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb1_sS_(<1 x i16>, <1 x i16>) #3 { + %3 = alloca <1 x i16>, align 2 + %4 = alloca <1 x i16>, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -1459,7 +1459,7 @@ define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb1_sS_(<1 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb2_sS_(<2 x i16>, <2 x i16>) #5 { ++define internal <2 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb2_sS_(<2 x i16>, <2 x i16>) #5 { + %3 = alloca <2 x i16>, align 4 + %4 = alloca <2 x i16>, align 4 + %5 = alloca <2 x i16>, align 4 +@@ -1473,7 +1473,7 @@ define dso_local <2 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb2_sS_(<2 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb4_sS_(<4 x i16>, <4 x i16>) #7 { ++define internal <4 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb4_sS_(<4 x i16>, <4 x i16>) #7 { + %3 = alloca <4 x i16>, align 8 + %4 = alloca <4 x i16>, align 8 + %5 = alloca <4 x i16>, align 8 +@@ -1487,7 +1487,7 @@ define dso_local <4 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb4_sS_(<4 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <8 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb8_sS_(<8 x i16>, <8 x i16>) #9 { ++define internal <8 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb8_sS_(<8 x i16>, <8 x i16>) #9 { + %3 = alloca <8 x i16>, align 16 + %4 = alloca <8 x i16>, align 16 + %5 = alloca <8 x i16>, align 16 +@@ -1501,7 +1501,7 @@ define dso_local <8 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb8_sS_(<8 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <16 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb16_sS_(<16 x i16>, <16 x i16>) #11 { ++define internal <16 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb16_sS_(<16 x i16>, <16 x i16>) #11 { + %3 = alloca <16 x i16>, align 32 + %4 = alloca <16 x i16>, align 32 + %5 = alloca <16 x i16>, align 32 +@@ -1515,7 +1515,7 @@ define dso_local <16 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb16_sS_(<16 x i16> + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb32_sS_(<32 x i16>, <32 x i16>) #13 { ++define internal <32 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb32_sS_(<32 x i16>, <32 x i16>) #13 { + %3 = alloca <32 x i16>, align 64 + %4 = alloca <32 x i16>, align 64 + %5 = alloca <32 x i16>, align 64 +@@ -1529,7 +1529,7 @@ define dso_local <32 x i16> @_Z24__cm_intrinsic_impl_sremu2CMvb32_sS_(<32 x i16> + } + + ; Function Attrs: noinline nounwind +-define dso_local i32 @_Z24__cm_intrinsic_impl_sdivii(i32, i32) #14 { ++define internal i32 @_Z24__cm_intrinsic_impl_sdivii(i32, i32) #14 { + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -1730,7 +1730,7 @@ define internal <1 x i32> @_ZN7details13__impl_divremILi1EEEu2CMvbT__iS1_S1_u2CM + declare <1 x i32> @llvm.genx.rdregioni.v1i32.v1i32.i16(<1 x i32>, i32, i32, i32, i16, i32) #2 + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_iS_(<1 x i32>, <1 x i32>) #14 { ++define internal <1 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_iS_(<1 x i32>, <1 x i32>) #14 { + %3 = alloca <1 x i32>, align 4 + %4 = alloca <1 x i32>, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -1746,7 +1746,7 @@ define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb1_iS_(<1 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb2_iS_(<2 x i32>, <2 x i32>) #15 { ++define internal <2 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb2_iS_(<2 x i32>, <2 x i32>) #15 { + %3 = alloca <2 x i32>, align 8 + %4 = alloca <2 x i32>, align 8 + %5 = alloca <2 x i32>, align 8 +@@ -1932,7 +1932,7 @@ define internal <2 x i32> @_ZN7details13__impl_divremILi2EEEu2CMvbT__iS1_S1_u2CM + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb4_iS_(<4 x i32>, <4 x i32>) #16 { ++define internal <4 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb4_iS_(<4 x i32>, <4 x i32>) #16 { + %3 = alloca <4 x i32>, align 16 + %4 = alloca <4 x i32>, align 16 + %5 = alloca <4 x i32>, align 16 +@@ -2490,7 +2490,7 @@ define internal <16 x i32> @_ZN7details13__impl_divremILi16EEEu2CMvbT__iS1_S1_u2 + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb32_iS_(<32 x i32>, <32 x i32>) #19 { ++define internal <32 x i32> @_Z24__cm_intrinsic_impl_sdivu2CMvb32_iS_(<32 x i32>, <32 x i32>) #19 { + %3 = alloca <32 x i32>, align 128 + %4 = alloca <32 x i32>, align 128 + %5 = alloca <32 x i32>, align 128 +@@ -2676,7 +2676,7 @@ define internal <32 x i32> @_ZN7details13__impl_divremILi32EEEu2CMvbT__iS1_S1_u2 + } + + ; Function Attrs: noinline nounwind +-define dso_local i32 @_Z24__cm_intrinsic_impl_sremii(i32, i32) #14 { ++define internal i32 @_Z24__cm_intrinsic_impl_sremii(i32, i32) #14 { + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -2702,7 +2702,7 @@ define dso_local i32 @_Z24__cm_intrinsic_impl_sremii(i32, i32) #14 { + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb1_iS_(<1 x i32>, <1 x i32>) #14 { ++define internal <1 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb1_iS_(<1 x i32>, <1 x i32>) #14 { + %3 = alloca <1 x i32>, align 4 + %4 = alloca <1 x i32>, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -2716,7 +2716,7 @@ define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb1_iS_(<1 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb2_iS_(<2 x i32>, <2 x i32>) #15 { ++define internal <2 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb2_iS_(<2 x i32>, <2 x i32>) #15 { + %3 = alloca <2 x i32>, align 8 + %4 = alloca <2 x i32>, align 8 + %5 = alloca <2 x i32>, align 8 +@@ -2730,7 +2730,7 @@ define dso_local <2 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb2_iS_(<2 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb4_iS_(<4 x i32>, <4 x i32>) #16 { ++define internal <4 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb4_iS_(<4 x i32>, <4 x i32>) #16 { + %3 = alloca <4 x i32>, align 16 + %4 = alloca <4 x i32>, align 16 + %5 = alloca <4 x i32>, align 16 +@@ -2744,7 +2744,7 @@ define dso_local <4 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb4_iS_(<4 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <8 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb8_iS_(<8 x i32>, <8 x i32>) #17 { ++define internal <8 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb8_iS_(<8 x i32>, <8 x i32>) #17 { + %3 = alloca <8 x i32>, align 32 + %4 = alloca <8 x i32>, align 32 + %5 = alloca <8 x i32>, align 32 +@@ -2758,7 +2758,7 @@ define dso_local <8 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb8_iS_(<8 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <16 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb16_iS_(<16 x i32>, <16 x i32>) #18 { ++define internal <16 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb16_iS_(<16 x i32>, <16 x i32>) #18 { + %3 = alloca <16 x i32>, align 64 + %4 = alloca <16 x i32>, align 64 + %5 = alloca <16 x i32>, align 64 +@@ -2772,7 +2772,7 @@ define dso_local <16 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb16_iS_(<16 x i32> + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb32_iS_(<32 x i32>, <32 x i32>) #19 { ++define internal <32 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb32_iS_(<32 x i32>, <32 x i32>) #19 { + %3 = alloca <32 x i32>, align 128 + %4 = alloca <32 x i32>, align 128 + %5 = alloca <32 x i32>, align 128 +@@ -2786,7 +2786,7 @@ define dso_local <32 x i32> @_Z24__cm_intrinsic_impl_sremu2CMvb32_iS_(<32 x i32> + } + + ; Function Attrs: noinline nounwind +-define dso_local zeroext i8 @_Z24__cm_intrinsic_impl_udivhh(i8 zeroext, i8 zeroext) #21 { ++define internal zeroext i8 @_Z24__cm_intrinsic_impl_udivhh(i8 zeroext, i8 zeroext) #21 { + %3 = alloca i8, align 1 + %4 = alloca i8, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -2844,7 +2844,7 @@ define internal <1 x i8> @_ZN7details14__impl_udivremILi1EEEu2CMvbT__hS1_S1_u2CM + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb1_hS_(<1 x i8>, <1 x i8>) #21 { ++define internal <1 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb1_hS_(<1 x i8>, <1 x i8>) #21 { + %3 = alloca <1 x i8>, align 1 + %4 = alloca <1 x i8>, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -2860,7 +2860,7 @@ define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb1_hS_(<1 x i8>, <1 + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb2_hS_(<2 x i8>, <2 x i8>) #22 { ++define internal <2 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb2_hS_(<2 x i8>, <2 x i8>) #22 { + %3 = alloca <2 x i8>, align 2 + %4 = alloca <2 x i8>, align 2 + %5 = alloca <2 x i8>, align 2 +@@ -2906,7 +2906,7 @@ define internal <2 x i8> @_ZN7details14__impl_udivremILi2EEEu2CMvbT__hS1_S1_u2CM + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb4_hS_(<4 x i8>, <4 x i8>) #14 { ++define internal <4 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb4_hS_(<4 x i8>, <4 x i8>) #14 { + %3 = alloca <4 x i8>, align 4 + %4 = alloca <4 x i8>, align 4 + %5 = alloca <4 x i8>, align 4 +@@ -3044,7 +3044,7 @@ define internal <16 x i8> @_ZN7details14__impl_udivremILi16EEEu2CMvbT__hS1_S1_u2 + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb32_hS_(<32 x i8>, <32 x i8>) #17 { ++define internal <32 x i8> @_Z24__cm_intrinsic_impl_udivu2CMvb32_hS_(<32 x i8>, <32 x i8>) #17 { + %3 = alloca <32 x i8>, align 32 + %4 = alloca <32 x i8>, align 32 + %5 = alloca <32 x i8>, align 32 +@@ -3090,7 +3090,7 @@ define internal <32 x i8> @_ZN7details14__impl_udivremILi32EEEu2CMvbT__hS1_S1_u2 + } + + ; Function Attrs: noinline nounwind +-define dso_local zeroext i8 @_Z24__cm_intrinsic_impl_uremhh(i8 zeroext, i8 zeroext) #21 { ++define internal zeroext i8 @_Z24__cm_intrinsic_impl_uremhh(i8 zeroext, i8 zeroext) #21 { + %3 = alloca i8, align 1 + %4 = alloca i8, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -3116,7 +3116,7 @@ define dso_local zeroext i8 @_Z24__cm_intrinsic_impl_uremhh(i8 zeroext, i8 zeroe + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb1_hS_(<1 x i8>, <1 x i8>) #21 { ++define internal <1 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb1_hS_(<1 x i8>, <1 x i8>) #21 { + %3 = alloca <1 x i8>, align 1 + %4 = alloca <1 x i8>, align 1 + %5 = alloca <1 x i8>, align 1 +@@ -3130,7 +3130,7 @@ define dso_local <1 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb1_hS_(<1 x i8>, <1 + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb2_hS_(<2 x i8>, <2 x i8>) #22 { ++define internal <2 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb2_hS_(<2 x i8>, <2 x i8>) #22 { + %3 = alloca <2 x i8>, align 2 + %4 = alloca <2 x i8>, align 2 + %5 = alloca <2 x i8>, align 2 +@@ -3144,7 +3144,7 @@ define dso_local <2 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb2_hS_(<2 x i8>, <2 + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb4_hS_(<4 x i8>, <4 x i8>) #14 { ++define internal <4 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb4_hS_(<4 x i8>, <4 x i8>) #14 { + %3 = alloca <4 x i8>, align 4 + %4 = alloca <4 x i8>, align 4 + %5 = alloca <4 x i8>, align 4 +@@ -3158,7 +3158,7 @@ define dso_local <4 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb4_hS_(<4 x i8>, <4 + } + + ; Function Attrs: noinline nounwind +-define dso_local <8 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb8_hS_(<8 x i8>, <8 x i8>) #15 { ++define internal <8 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb8_hS_(<8 x i8>, <8 x i8>) #15 { + %3 = alloca <8 x i8>, align 8 + %4 = alloca <8 x i8>, align 8 + %5 = alloca <8 x i8>, align 8 +@@ -3172,7 +3172,7 @@ define dso_local <8 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb8_hS_(<8 x i8>, <8 + } + + ; Function Attrs: noinline nounwind +-define dso_local <16 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb16_hS_(<16 x i8>, <16 x i8>) #16 { ++define internal <16 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb16_hS_(<16 x i8>, <16 x i8>) #16 { + %3 = alloca <16 x i8>, align 16 + %4 = alloca <16 x i8>, align 16 + %5 = alloca <16 x i8>, align 16 +@@ -3186,7 +3186,7 @@ define dso_local <16 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb16_hS_(<16 x i8>, + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb32_hS_(<32 x i8>, <32 x i8>) #17 { ++define internal <32 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb32_hS_(<32 x i8>, <32 x i8>) #17 { + %3 = alloca <32 x i8>, align 32 + %4 = alloca <32 x i8>, align 32 + %5 = alloca <32 x i8>, align 32 +@@ -3200,7 +3200,7 @@ define dso_local <32 x i8> @_Z24__cm_intrinsic_impl_uremu2CMvb32_hS_(<32 x i8>, + } + + ; Function Attrs: noinline nounwind +-define dso_local zeroext i16 @_Z24__cm_intrinsic_impl_udivtt(i16 zeroext, i16 zeroext) #22 { ++define internal zeroext i16 @_Z24__cm_intrinsic_impl_udivtt(i16 zeroext, i16 zeroext) #22 { + %3 = alloca i16, align 2 + %4 = alloca i16, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -3278,7 +3278,7 @@ define internal <1 x i16> @_ZN7details14__impl_udivremILi1EEEu2CMvbT__tS1_S1_u2C + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb1_tS_(<1 x i16>, <1 x i16>) #22 { ++define internal <1 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb1_tS_(<1 x i16>, <1 x i16>) #22 { + %3 = alloca <1 x i16>, align 2 + %4 = alloca <1 x i16>, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -3294,7 +3294,7 @@ define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb1_tS_(<1 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb2_tS_(<2 x i16>, <2 x i16>) #14 { ++define internal <2 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb2_tS_(<2 x i16>, <2 x i16>) #14 { + %3 = alloca <2 x i16>, align 4 + %4 = alloca <2 x i16>, align 4 + %5 = alloca <2 x i16>, align 4 +@@ -3360,7 +3360,7 @@ define internal <2 x i16> @_ZN7details14__impl_udivremILi2EEEu2CMvbT__tS1_S1_u2C + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb4_tS_(<4 x i16>, <4 x i16>) #15 { ++define internal <4 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb4_tS_(<4 x i16>, <4 x i16>) #15 { + %3 = alloca <4 x i16>, align 8 + %4 = alloca <4 x i16>, align 8 + %5 = alloca <4 x i16>, align 8 +@@ -3558,7 +3558,7 @@ define internal <16 x i16> @_ZN7details14__impl_udivremILi16EEEu2CMvbT__tS1_S1_u + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb32_tS_(<32 x i16>, <32 x i16>) #18 { ++define internal <32 x i16> @_Z24__cm_intrinsic_impl_udivu2CMvb32_tS_(<32 x i16>, <32 x i16>) #18 { + %3 = alloca <32 x i16>, align 64 + %4 = alloca <32 x i16>, align 64 + %5 = alloca <32 x i16>, align 64 +@@ -3624,7 +3624,7 @@ define internal <32 x i16> @_ZN7details14__impl_udivremILi32EEEu2CMvbT__tS1_S1_u + } + + ; Function Attrs: noinline nounwind +-define dso_local zeroext i16 @_Z24__cm_intrinsic_impl_uremtt(i16 zeroext, i16 zeroext) #22 { ++define internal zeroext i16 @_Z24__cm_intrinsic_impl_uremtt(i16 zeroext, i16 zeroext) #22 { + %3 = alloca i16, align 2 + %4 = alloca i16, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -3650,7 +3650,7 @@ define dso_local zeroext i16 @_Z24__cm_intrinsic_impl_uremtt(i16 zeroext, i16 ze + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb1_tS_(<1 x i16>, <1 x i16>) #22 { ++define internal <1 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb1_tS_(<1 x i16>, <1 x i16>) #22 { + %3 = alloca <1 x i16>, align 2 + %4 = alloca <1 x i16>, align 2 + %5 = alloca <1 x i16>, align 2 +@@ -3664,7 +3664,7 @@ define dso_local <1 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb1_tS_(<1 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb2_tS_(<2 x i16>, <2 x i16>) #14 { ++define internal <2 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb2_tS_(<2 x i16>, <2 x i16>) #14 { + %3 = alloca <2 x i16>, align 4 + %4 = alloca <2 x i16>, align 4 + %5 = alloca <2 x i16>, align 4 +@@ -3678,7 +3678,7 @@ define dso_local <2 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb2_tS_(<2 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb4_tS_(<4 x i16>, <4 x i16>) #15 { ++define internal <4 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb4_tS_(<4 x i16>, <4 x i16>) #15 { + %3 = alloca <4 x i16>, align 8 + %4 = alloca <4 x i16>, align 8 + %5 = alloca <4 x i16>, align 8 +@@ -3692,7 +3692,7 @@ define dso_local <4 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb4_tS_(<4 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <8 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb8_tS_(<8 x i16>, <8 x i16>) #16 { ++define internal <8 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb8_tS_(<8 x i16>, <8 x i16>) #16 { + %3 = alloca <8 x i16>, align 16 + %4 = alloca <8 x i16>, align 16 + %5 = alloca <8 x i16>, align 16 +@@ -3706,7 +3706,7 @@ define dso_local <8 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb8_tS_(<8 x i16>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <16 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb16_tS_(<16 x i16>, <16 x i16>) #17 { ++define internal <16 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb16_tS_(<16 x i16>, <16 x i16>) #17 { + %3 = alloca <16 x i16>, align 32 + %4 = alloca <16 x i16>, align 32 + %5 = alloca <16 x i16>, align 32 +@@ -3720,7 +3720,7 @@ define dso_local <16 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb16_tS_(<16 x i16> + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb32_tS_(<32 x i16>, <32 x i16>) #18 { ++define internal <32 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb32_tS_(<32 x i16>, <32 x i16>) #18 { + %3 = alloca <32 x i16>, align 64 + %4 = alloca <32 x i16>, align 64 + %5 = alloca <32 x i16>, align 64 +@@ -3734,7 +3734,7 @@ define dso_local <32 x i16> @_Z24__cm_intrinsic_impl_uremu2CMvb32_tS_(<32 x i16> + } + + ; Function Attrs: noinline nounwind +-define dso_local i32 @_Z24__cm_intrinsic_impl_udivjj(i32, i32) #14 { ++define internal i32 @_Z24__cm_intrinsic_impl_udivjj(i32, i32) #14 { + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -3892,7 +3892,7 @@ define internal <1 x i32> @_ZN7details14__impl_udivremILi1EEEu2CMvbT__jS1_S1_u2C + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb1_jS_(<1 x i32>, <1 x i32>) #14 { ++define internal <1 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb1_jS_(<1 x i32>, <1 x i32>) #14 { + %3 = alloca <1 x i32>, align 4 + %4 = alloca <1 x i32>, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -3908,7 +3908,7 @@ define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb1_jS_(<1 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb2_jS_(<2 x i32>, <2 x i32>) #15 { ++define internal <2 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb2_jS_(<2 x i32>, <2 x i32>) #15 { + %3 = alloca <2 x i32>, align 8 + %4 = alloca <2 x i32>, align 8 + %5 = alloca <2 x i32>, align 8 +@@ -4054,7 +4054,7 @@ define internal <2 x i32> @_ZN7details14__impl_udivremILi2EEEu2CMvbT__jS1_S1_u2C + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb4_jS_(<4 x i32>, <4 x i32>) #16 { ++define internal <4 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb4_jS_(<4 x i32>, <4 x i32>) #16 { + %3 = alloca <4 x i32>, align 16 + %4 = alloca <4 x i32>, align 16 + %5 = alloca <4 x i32>, align 16 +@@ -4492,7 +4492,7 @@ define internal <16 x i32> @_ZN7details14__impl_udivremILi16EEEu2CMvbT__jS1_S1_u + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb32_jS_(<32 x i32>, <32 x i32>) #19 { ++define internal <32 x i32> @_Z24__cm_intrinsic_impl_udivu2CMvb32_jS_(<32 x i32>, <32 x i32>) #19 { + %3 = alloca <32 x i32>, align 128 + %4 = alloca <32 x i32>, align 128 + %5 = alloca <32 x i32>, align 128 +@@ -4638,7 +4638,7 @@ define internal <32 x i32> @_ZN7details14__impl_udivremILi32EEEu2CMvbT__jS1_S1_u + } + + ; Function Attrs: noinline nounwind +-define dso_local i32 @_Z24__cm_intrinsic_impl_uremjj(i32, i32) #14 { ++define internal i32 @_Z24__cm_intrinsic_impl_uremjj(i32, i32) #14 { + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -4664,7 +4664,7 @@ define dso_local i32 @_Z24__cm_intrinsic_impl_uremjj(i32, i32) #14 { + } + + ; Function Attrs: noinline nounwind +-define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb1_jS_(<1 x i32>, <1 x i32>) #14 { ++define internal <1 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb1_jS_(<1 x i32>, <1 x i32>) #14 { + %3 = alloca <1 x i32>, align 4 + %4 = alloca <1 x i32>, align 4 + %5 = alloca <1 x i32>, align 4 +@@ -4678,7 +4678,7 @@ define dso_local <1 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb1_jS_(<1 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <2 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb2_jS_(<2 x i32>, <2 x i32>) #15 { ++define internal <2 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb2_jS_(<2 x i32>, <2 x i32>) #15 { + %3 = alloca <2 x i32>, align 8 + %4 = alloca <2 x i32>, align 8 + %5 = alloca <2 x i32>, align 8 +@@ -4692,7 +4692,7 @@ define dso_local <2 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb2_jS_(<2 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <4 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb4_jS_(<4 x i32>, <4 x i32>) #16 { ++define internal <4 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb4_jS_(<4 x i32>, <4 x i32>) #16 { + %3 = alloca <4 x i32>, align 16 + %4 = alloca <4 x i32>, align 16 + %5 = alloca <4 x i32>, align 16 +@@ -4706,7 +4706,7 @@ define dso_local <4 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb4_jS_(<4 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <8 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb8_jS_(<8 x i32>, <8 x i32>) #17 { ++define internal <8 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb8_jS_(<8 x i32>, <8 x i32>) #17 { + %3 = alloca <8 x i32>, align 32 + %4 = alloca <8 x i32>, align 32 + %5 = alloca <8 x i32>, align 32 +@@ -4720,7 +4720,7 @@ define dso_local <8 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb8_jS_(<8 x i32>, < + } + + ; Function Attrs: noinline nounwind +-define dso_local <16 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb16_jS_(<16 x i32>, <16 x i32>) #18 { ++define internal <16 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb16_jS_(<16 x i32>, <16 x i32>) #18 { + %3 = alloca <16 x i32>, align 64 + %4 = alloca <16 x i32>, align 64 + %5 = alloca <16 x i32>, align 64 +@@ -4734,7 +4734,7 @@ define dso_local <16 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb16_jS_(<16 x i32> + } + + ; Function Attrs: noinline nounwind +-define dso_local <32 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb32_jS_(<32 x i32>, <32 x i32>) #19 { ++define internal <32 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb32_jS_(<32 x i32>, <32 x i32>) #19 { + %3 = alloca <32 x i32>, align 128 + %4 = alloca <32 x i32>, align 128 + %5 = alloca <32 x i32>, align 128 +@@ -4748,7 +4748,7 @@ define dso_local <32 x i32> @_Z24__cm_intrinsic_impl_uremu2CMvb32_jS_(<32 x i32> + } + + ; Function Attrs: noinline nounwind +-define dso_local void @__do_print_cm(i8*, i8*, i32, i64, i32*, i32, i32) #23 !dbg !15 { ++define internal void @__do_print_cm(i8*, i8*, i32, i64, i32*, i32, i32) #23 !dbg !15 { + %8 = alloca i8*, align 4 + %9 = alloca i8*, align 4 + %10 = alloca i32, align 4 +@@ -4988,7 +4988,7 @@ define internal void @_ZN7details16_cm_print_formatILi128EEEv15cm_surfaceindexju + } + + ; Function Attrs: noinline nounwind +-define dso_local void @__do_print_lz(i32, i8*, i32, i64, i32*, i32, i32, i32, i32) #26 !dbg !117 { ++define internal void @__do_print_lz(i32, i8*, i32, i64, i32*, i32, i32, i32, i32) #26 !dbg !117 { + %10 = alloca i32, align 4 + %11 = alloca i8*, align 4 + %12 = alloca i32, align 4 +@@ -5069,7 +5069,7 @@ define dso_local void @__do_print_lz(i32, i8*, i32, i64, i32*, i32, i32, i32, i3 + %67 = load i64, i64* %13, align 8, !dbg !159, !tbaa !19 + %68 = load <5 x i32>, <5 x i32>* %21, align 32, !dbg !160, !tbaa !7 + call void @_ZN13VaryingWriterC2ERjRPKjiyu2CMvb5_i(%class.VaryingWriter* %23, i32* dereferenceable(4) %19, i32** dereferenceable(4) %14, i32 %66, i64 %67, <5 x i32> %68), !dbg !161 +- %69 = call zeroext i1 @_ZN9PrintInfo14switchEncodingI13UniformWriter13VaryingWriterEEbNS_8EncodingET_T0_(i8 signext %62, %class.UniformWriter* byval align 32 %22, %class.VaryingWriter* byval align 32 %23), !dbg !162 ++ %69 = call zeroext i1 @_ZN9PrintInfo14switchEncodingI13UniformWriter13VaryingWriterEEbNS_8EncodingET_T0_(i8 signext %62, %class.UniformWriter* byval(%class.UniformWriter) align 32 %22, %class.VaryingWriter* byval(%class.VaryingWriter) align 32 %23), !dbg !162 + br label %70, !dbg !163 + + ;