Github messages for voidlinux
 help / color / mirror / Atom feed
From: unspecd <unspecd@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] llvm11: update to 11.1.0.
Date: Sat, 13 Mar 2021 09:26:19 +0100	[thread overview]
Message-ID: <20210313082619.Ixs9KXUXmLabyTTV-IHiCQy1r1zaoiz6cSYn4WQbqZE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29431@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2510 bytes --]

There is an updated pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages pkg/llvm11
https://github.com/void-linux/void-packages/pull/29431

llvm11: update to 11.1.0.
Also:
- Clean up template.
- Update `srcpkgs/llvm11/update` due to #29429.

Fixes: #28609, #17935.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures (TODO):
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
  - [ ] ppc-musl
  - [ ] ppc
  - [ ] ppcle-musl
  - [ ] ppcle
  - [ ] ppc64-musl
  - [ ] ppc64
  - [ ] ppc64le-musl
  - [ ] ppc64le

Currently, the documentation fails to build:
```
[2824/5792] Generating man Sphinx documentation for clang-tools into "/builddir/llvm-project-11.1.0.src/llvm/build/tools/clang/tools/extra/docs/man"
FAILED: tools/clang/tools/extra/docs/CMakeFiles/docs-clang-tools-man 
cd /builddir/llvm-project-11.1.0.src/llvm/build/tools/clang/tools/extra/docs && /usr/bin/sphinx-build -b man -d /builddir/llvm-project-11.1.0.src/llvm/build/tools/clang/tools/extra/docs/_doctrees-clang-tools-man -q -t builder-man -W /builddir/llvm-project-11.1.0.src/clang-tools-extra/docs /builddir/llvm-project-11.1.0.src/llvm/build/tools/clang/tools/extra/docs/man

Warning, treated as error:
/builddir/llvm-project-11.1.0.src/clang-tools-extra/docs/clang-tidy/Integrations.rst::"table cell spanning" not supported
```

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/29431.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/llvm11-29431.patch --]
[-- Type: text/x-diff, Size: 8399 bytes --]

From 4b842657bf492ae4611d0f3dca3289299bdaf3cf Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Sat, 13 Mar 2021 18:12:31 +1100
Subject: [PATCH] llvm11: update to 11.1.0.

Also clean up template.
---
 srcpkgs/llvm11/template | 124 ++++++++++++----------------------------
 srcpkgs/llvm11/update   |   5 +-
 2 files changed, 40 insertions(+), 89 deletions(-)

diff --git a/srcpkgs/llvm11/template b/srcpkgs/llvm11/template
index 12ecb4bdc4c..5029b7f8c11 100644
--- a/srcpkgs/llvm11/template
+++ b/srcpkgs/llvm11/template
@@ -1,18 +1,23 @@
 # Template file for 'llvm11'
 pkgname=llvm11
-version=11.0.0
+version=11.1.0
 revision=1
-wrksrc="llvm-${version}.src"
+wrksrc="llvm-project-${version}.src"
+build_wrksrc=llvm
 build_style=cmake
 configure_args="
- -DCMAKE_BUILD_TYPE=Release
+ -DENABLE_LINKER_BUILD_ID=ON
+ -DLLDB_USE_SYSTEM_SIX=ON
  -DLLVM_INSTALL_UTILS=ON
+ -DLLVM_BUILD_DOCS=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"
+# TODO: configure_args+=" -DLLVM_ENABLE_SPHINX=ON"
+_projects="clang clang-tools-extra compiler-rt lld lldb"
+hostmakedepends="groff perl python3 python3-Sphinx zlib-devel libffi-devel swig"
 makedepends="python3-devel zlib-devel libffi-devel libedit-devel
  libxml2-devel binutils-devel libatomic-devel"
 depends="libllvm11"
@@ -20,20 +25,8 @@ short_desc="Low Level Virtual Machine"
 maintainer="q66 <daniel@octaforce.org>"
 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"
-checksum="
- 913f68c898dfb4a03b397c5e11c6a2f39d0f22ed7665c9cefa87a34423a72469
- 8570c09f57399e21e0eea0dcd66ae0231d47eafc7a04d6fe5c4951b13c4d2c72
- efe7be4a7b7cdc6f3bcf222827c6f837439e6e656d12d6c885d5c8a80ff4fd1c
- 0f96acace1e8326b39f220ba19e055ba99b0ab21c2475042dbc6a482649c5209
- fed318f75d560d0e0ae728e2fb8abce71e9d0c60dd120c9baac118522ce76c09
- 374aff82ff573a449f9aabbd330a5d0a441181c535a3599996127378112db234"
+distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-project-${version}.src.tar.xz"
+checksum="74d2529159fd118c3eac6f90107b5611bccc6f647fdea104024183e8d5e25831"
 lib32disabled=yes
 python_version=3
 
@@ -55,80 +48,39 @@ if [ "$_lldb_enable" = "yes" ]; then
 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
+_apply_patches() {
+	local project=$1
 
-	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}
+	for i in ${FILESDIR}/patches/${project}/*.patch; do
+		msg_normal "Applying ${i/${FILESDIR}\//} to ${project}\n"
+		patch -sNp1 -d ${wrksrc}/${project} -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}
+post_patch() {
+	for project in llvm clang lld lldb; do
+		_apply_patches ${project}
 	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
-		;;
+		_apply_patches compiler-rt ;;
 	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
+	case "$XBPS_TARGET_MACHINE" in
+		*-musl) sed -i 's|__ptrace_request|int|g' ${wrksrc}/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+			;;
+	esac
 
-	# 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
+			sed -i 's/set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)/set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)/' ${wrksrc}/compiler-rt/cmake/config-ix.cmake
 			;;
 	esac
 
 	# update config.guess for better platform detection
-	cp $XBPS_COMMONDIR/environment/configure/automake/config.guess ${wrksrc}/cmake
+	cp $XBPS_COMMONDIR/environment/configure/automake/config.guess ${wrksrc}/llvm/cmake
 }
 
 pre_configure() {
@@ -145,16 +97,19 @@ pre_configure() {
 
 	if [ "$CROSS_BUILD" ]; then
 		msg_normal "Building host tblgen\n"
-		mkdir -p build/HOST
-		cd build/HOST
+		mkdir -p build/HOST && pushd build/HOST
 		CC="$BUILD_CC" CXX="$BUILD_CXX" CFLAGS="$BUILD_CFLAGS" \
 			CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
-			cmake ../.. -DCMAKE_BUILD_TYPE=Release
+			cmake ../.. -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang
 		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 ../..
+		configure_args+=" -DLLVM_TABLEGEN=$PWD/bin/llvm-tblgen"
+		configure_args+=" -DCLANG_TABLEGEN=$PWD/bin/clang-tblgen"
+		popd
+	fi
+
+	if [ "$_lldb_enable" != "yes" ]; then
+		_projects=${_projects/lldb/}
 	fi
 
 	case "$XBPS_TARGET_MACHINE" in
@@ -169,7 +124,7 @@ pre_configure() {
 	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}"
+	configure_args+=" -DLLVM_ENABLE_PROJECTS=${_projects// /\;}"
 }
 
 do_install() {
@@ -178,9 +133,6 @@ do_install() {
 	cd build
 	cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P cmake_install.cmake
 
-	# Fix permissions of static libs
-	chmod -x ${DESTDIR}/usr/lib/*.a
-
 	# Required for multilib.
 	if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
 		for _header in llvm-config; do
@@ -298,8 +250,6 @@ lldb_package() {
 		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
 	}
 }
 
diff --git a/srcpkgs/llvm11/update b/srcpkgs/llvm11/update
index 3d09eaff373..e95cf26b358 100644
--- a/srcpkgs/llvm11/update
+++ b/srcpkgs/llvm11/update
@@ -1,2 +1,3 @@
-site=https://releases.llvm.org/
-pattern="'\K[\d\.]*(?=')"
+site="https://github.com/llvm/llvm-project/releases"
+pattern="llvmorg-\K(\d+.){2}\d+(-rc\d+)?"
+ignore="*-rc*"

  reply	other threads:[~2021-03-13  8:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13  8:20 [PR PATCH] " unspecd
2021-03-13  8:26 ` unspecd [this message]
2021-03-13 22:56 ` [PR PATCH] [Updated] " unspecd
2021-03-13 23:35 ` q66
2021-03-13 23:35 ` [PR PATCH] [Closed]: " q66
2021-03-14  2:28 ` unspecd
2021-05-06  8:39 ` Godnyx
2021-05-06 12:28 ` unspecd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210313082619.Ixs9KXUXmLabyTTV-IHiCQy1r1zaoiz6cSYn4WQbqZE@z \
    --to=unspecd@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).