parent
260e5f0433
commit
a7663b0e94
2 changed files with 46 additions and 0 deletions
19
srcpkgs/mold/patches/test-target-machine.patch
Normal file
19
srcpkgs/mold/patches/test-target-machine.patch
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
Allow tests to run when targeting i686 on a host where uname -m returns x86_64.
|
||||||
|
|
||||||
|
diff --git a/test/elf/common.inc b/test/elf/common.inc
|
||||||
|
index 1366db94..c67e35e5 100644
|
||||||
|
--- a/test/elf/common.inc
|
||||||
|
+++ b/test/elf/common.inc
|
||||||
|
@@ -13,7 +13,11 @@ canonical_name() {
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
-HOST=$(canonical_name $(uname -m))
|
||||||
|
+if [ -n "$XBPS_TARGET_MACHINE" ]; then
|
||||||
|
+ HOST=$(canonical_name "${XBPS_TARGET_MACHINE%-musl}")
|
||||||
|
+else
|
||||||
|
+ HOST=$(canonical_name $(uname -m))
|
||||||
|
+fi
|
||||||
|
|
||||||
|
if [ -n "$TRIPLE" ]; then
|
||||||
|
MACHINE=$(canonical_name $(echo $TRIPLE | sed 's/-.*//'))
|
27
srcpkgs/mold/template
Normal file
27
srcpkgs/mold/template
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Template file for 'mold'
|
||||||
|
pkgname=mold
|
||||||
|
version=2.0.0
|
||||||
|
revision=1
|
||||||
|
build_style=cmake
|
||||||
|
configure_args="-DMOLD_USE_SYSTEM_MIMALLOC=ON
|
||||||
|
-Dmimalloc_DIR=${XBPS_CROSS_BASE}/cmake/mimalloc-2.0"
|
||||||
|
makedepends="mimalloc-devel openssl-devel zlib-devel libzstd-devel"
|
||||||
|
# It's probably not worth pulling in clang/llvm to run the few tests that
|
||||||
|
# depend on them.
|
||||||
|
checkdepends="tar zstd libdwarf gdb"
|
||||||
|
short_desc="Faster drop-in replacement for existing Unix linkers"
|
||||||
|
maintainer="Peter Wang <novalazy@gmail.com>"
|
||||||
|
license="MIT"
|
||||||
|
homepage="https://github.com/rui314/mold"
|
||||||
|
distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
|
||||||
|
checksum=2ae8a22db09cbff626df74c945079fa29c1e5f60bbe02502dcf69191cf43527b
|
||||||
|
|
||||||
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||||
|
makedepends+=" libatomic-devel"
|
||||||
|
configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
|
||||||
|
fi
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vlicense LICENSE
|
||||||
|
rm -v ${DESTDIR}/usr/share/doc/mold/LICENSE
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue