Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: mimalloc-2.0.6
@ 2022-06-26  4:26 wangp
  2022-06-26  5:06 ` [PR PATCH] [Updated] " wangp
                   ` (41 more replies)
  0 siblings, 42 replies; 43+ messages in thread
From: wangp @ 2022-06-26  4:26 UTC (permalink / raw)
  To: ml

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

There is a new pull request by wangp against master on the void-packages repository

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New package: mimalloc-2.0.6
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc



Note:
- mold could make use of this package (once it is packaged), or mold could be built with its vendored copy of mimalloc.
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 1876 bytes --]

From e79ce4417613a7b847152e392228819b6f3f3c7c Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH] New package: mimalloc-2.0.6

---
 common/shlibs             |  1 +
 srcpkgs/mimalloc-devel    |  1 +
 srcpkgs/mimalloc/template | 25 +++++++++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 8231f48d36a3..acc3528fa77a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4164,3 +4164,4 @@ liblowdown.so lowdown-0.11.2_1
 libjaylink.so.0 libjaylink-0.2.0_1
 libnvidia-container.so.1 libnvidia-container-1.10.0_1
 libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..3daff3294bc3
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,25 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New package: mimalloc-2.0.6
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
@ 2022-06-26  5:06 ` wangp
  2022-09-11  2:48 ` wangp
                   ` (40 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-06-26  5:06 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New package: mimalloc-2.0.6
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc



Note:
- mold could make use of this package (once it is packaged), or mold could be built with its vendored copy of mimalloc.
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 1960 bytes --]

From 543a0c78d6618d715fa9c11c49a09eb09bb4e992 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH] New package: mimalloc-2.0.6

---
 common/shlibs             |  1 +
 srcpkgs/mimalloc-devel    |  1 +
 srcpkgs/mimalloc/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 8231f48d36a3..acc3528fa77a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4164,3 +4164,4 @@ liblowdown.so lowdown-0.11.2_1
 libjaylink.so.0 libjaylink-0.2.0_1
 libnvidia-container.so.1 libnvidia-container-1.10.0_1
 libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..6549dae035b7
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,29 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New package: mimalloc-2.0.6
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
  2022-06-26  5:06 ` [PR PATCH] [Updated] " wangp
@ 2022-09-11  2:48 ` wangp
  2022-09-11  5:01 ` New packages: mimalloc-2.0.6, mold-1.4.2 wangp
                   ` (39 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-11  2:48 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New package: mimalloc-2.0.6
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc



Note:
- mold could make use of this package (once it is packaged), or mold could be built with its vendored copy of mimalloc.
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 3202 bytes --]

From f4d2d2bffe44be343d6a381722b185214c8e90ea Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs             |  1 +
 srcpkgs/mimalloc-devel    |  1 +
 srcpkgs/mimalloc/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index de889fceaf6c..92c07ba817e1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4161,3 +4161,4 @@ libsyncthingconnector.so.1.2.3 syncthingtray-1.2.3_1
 libglibutil.so.1 libglibutil-1.0.64_1
 libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..6549dae035b7
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,29 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From 56e448bd53bbe08a058f7c6ffe3378ce0b9c36a7 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 10 Sep 2022 18:14:26 +1000
Subject: [PATCH 2/2] New package: mold-1.4.2

Closes: #34820
---
 srcpkgs/mold/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..962157619f9d
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,23 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.4.2
+revision=1
+build_style=cmake
+configure_args="-DMOLD_USE_SYSTEM_MIMALLOC=ON"
+makedepends="mimalloc-devel openssl-devel zlib-devel"
+checkdepends="perl tar"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=47e6c48d20f49e5b47dfb8197dd9ffcb11a8833d614f7a03bd29741c658a69cd
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
  2022-06-26  5:06 ` [PR PATCH] [Updated] " wangp
  2022-09-11  2:48 ` wangp
@ 2022-09-11  5:01 ` wangp
  2022-09-16 15:30 ` icp1994
                   ` (38 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-11  5:01 UTC (permalink / raw)
  To: ml

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

New comment by wangp on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1242887130

Comment:
I included mold in this PR because it depends on mimalloc.

Regarding the CI failures for mold on i686:
- we might need to set `MACHINE=i686` in the environment, otherwise the test scripts use the value of `uname -m` which is `x86_64` in the cross-compilation environment.
- the i686 `mold` binary doesn't run in the cross-compilation environment because `/lib/ld-linux.so.2` is missing

As a test, if I move the binary out of the way and replace it with the following script then most of the tests will pass. What is the proper way to fix it?
```sh
#!/bin/sh
export LD_LIBRARY_PATH=/usr/i686-pc-linux-gnu/usr/lib
exec /usr/i686-pc-linux-gnu/usr/lib/ld-linux.so.2 ./mold-i686 "$@"
```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (2 preceding siblings ...)
  2022-09-11  5:01 ` New packages: mimalloc-2.0.6, mold-1.4.2 wangp
@ 2022-09-16 15:30 ` icp1994
  2022-09-16 16:38 ` icp1994
                   ` (37 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: icp1994 @ 2022-09-16 15:30 UTC (permalink / raw)
  To: ml

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

New comment by icp1994 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1249506740

Comment:
Does including `make_build_args="MACHINE=${XBPS_TARGET_MACHINE#-musl}"` help?

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (3 preceding siblings ...)
  2022-09-16 15:30 ` icp1994
@ 2022-09-16 16:38 ` icp1994
  2022-09-17  4:28 ` [PR PATCH] [Updated] " wangp
                   ` (36 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: icp1994 @ 2022-09-16 16:38 UTC (permalink / raw)
  To: ml

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

New comment by icp1994 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1249506740

Comment:
Does including `make_check_pre="env MACHINE=${XBPS_TARGET_MACHINE#-musl}"` help?

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (4 preceding siblings ...)
  2022-09-16 16:38 ` icp1994
@ 2022-09-17  4:28 ` wangp
  2022-09-17  4:29 ` wangp
                   ` (35 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-17  4:28 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.4.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 3803 bytes --]

From f4d2d2bffe44be343d6a381722b185214c8e90ea Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs             |  1 +
 srcpkgs/mimalloc-devel    |  1 +
 srcpkgs/mimalloc/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index de889fceaf6c..92c07ba817e1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4161,3 +4161,4 @@ libsyncthingconnector.so.1.2.3 syncthingtray-1.2.3_1
 libglibutil.so.1 libglibutil-1.0.64_1
 libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..6549dae035b7
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,29 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From 8e3b6659580abf3a7d4ab670427dd6607fe65b7e Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 17 Sep 2022 14:19:26 +1000
Subject: [PATCH 2/2] New package: mold-1.4.2

Closes: #34820
---
 srcpkgs/mold/template | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..a860fbdc823c
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,43 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.4.2
+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"
+checkdepends="perl tar which libdwarf"
+# One test requires llvm-readelf which is in llvm12, just ignore it.
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=47e6c48d20f49e5b47dfb8197dd9ffcb11a8833d614f7a03bd29741c658a69cd
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+post_extract() {
+	# Delete this test for now. It tries "which clang" but that fails if
+	# clang is a symlink to ccache.
+	rm test/elf/run-clang.sh
+}
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE#-musl}
+	if [ "$CROSS_BUILD" ]; then
+		# Leave these unset for native builds as setting them will
+		# skip some tests.
+		export TEST_CC=${CC}
+		export TEST_CXX=${CXX}
+		export TEST_GCC=${CC}
+		export TEST_GXX=${CXX}
+	fi
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (5 preceding siblings ...)
  2022-09-17  4:28 ` [PR PATCH] [Updated] " wangp
@ 2022-09-17  4:29 ` wangp
  2022-09-17  4:40 ` wangp
                   ` (34 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-17  4:29 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.4.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 3789 bytes --]

From 931f039f8084e5bf59222034a2e31bec640c765f Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs             |  1 +
 srcpkgs/mimalloc-devel    |  1 +
 srcpkgs/mimalloc/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..bdf93d14934a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
 libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..6549dae035b7
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,29 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From f01a1a05e2327abab287dbb38cddd2736ee0839a Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 17 Sep 2022 14:19:26 +1000
Subject: [PATCH 2/2] New package: mold-1.4.2

Closes: #34820
---
 srcpkgs/mold/template | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..a860fbdc823c
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,43 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.4.2
+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"
+checkdepends="perl tar which libdwarf"
+# One test requires llvm-readelf which is in llvm12, just ignore it.
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=47e6c48d20f49e5b47dfb8197dd9ffcb11a8833d614f7a03bd29741c658a69cd
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+post_extract() {
+	# Delete this test for now. It tries "which clang" but that fails if
+	# clang is a symlink to ccache.
+	rm test/elf/run-clang.sh
+}
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE#-musl}
+	if [ "$CROSS_BUILD" ]; then
+		# Leave these unset for native builds as setting them will
+		# skip some tests.
+		export TEST_CC=${CC}
+		export TEST_CXX=${CXX}
+		export TEST_GCC=${CC}
+		export TEST_GXX=${CXX}
+	fi
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (6 preceding siblings ...)
  2022-09-17  4:29 ` wangp
@ 2022-09-17  4:40 ` wangp
  2022-09-18  2:21 ` [PR PATCH] [Updated] " wangp
                   ` (33 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-17  4:40 UTC (permalink / raw)
  To: ml

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

New comment by wangp on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1249998527

Comment:
Thanks for the suggestion. I've set `MACHINE` in `pre_check` along with some other variables.

Well, everything is passing now. It's still mysterious to me why the i686 build failed before.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (7 preceding siblings ...)
  2022-09-17  4:40 ` wangp
@ 2022-09-18  2:21 ` wangp
  2022-09-18  2:22 ` wangp
                   ` (32 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-18  2:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.4.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 3566 bytes --]

From 931f039f8084e5bf59222034a2e31bec640c765f Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs             |  1 +
 srcpkgs/mimalloc-devel    |  1 +
 srcpkgs/mimalloc/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..bdf93d14934a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
 libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..6549dae035b7
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,29 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From 2443b380639cc803842be1bf86bd077d202c7869 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 17 Sep 2022 14:19:26 +1000
Subject: [PATCH 2/2] New package: mold-1.4.2

Closes: #34820
---
 srcpkgs/mold/template | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..af282456b54d
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,35 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.4.2
+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"
+checkdepends="perl tar which libdwarf"
+# One more test requires llvm-readelf which is in llvm12, just ignore it.
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=47e6c48d20f49e5b47dfb8197dd9ffcb11a8833d614f7a03bd29741c658a69cd
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+post_extract() {
+	# Delete this test for now. It tries "which clang" but that fails if
+	# clang is a symlink to ccache.
+	rm test/elf/run-clang.sh
+}
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE#-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (8 preceding siblings ...)
  2022-09-18  2:21 ` [PR PATCH] [Updated] " wangp
@ 2022-09-18  2:22 ` wangp
  2022-09-18  8:45 ` [PR PATCH] [Updated] " wangp
                   ` (31 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-18  2:22 UTC (permalink / raw)
  To: ml

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

New comment by wangp on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1249998527

Comment:
Thanks for the suggestion. I've set `MACHINE` in `pre_check` ~along with some other variables.~

Well, everything is passing now. It's still mysterious to me why the i686 build failed before.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (9 preceding siblings ...)
  2022-09-18  2:22 ` wangp
@ 2022-09-18  8:45 ` wangp
  2022-09-19 16:18 ` [PR REVIEW] " cinerea0
                   ` (30 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-18  8:45 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.4.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 3566 bytes --]

From e28046cdf93a8f4ce62e7ab18d1e4e5ba6633476 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs             |  1 +
 srcpkgs/mimalloc-devel    |  1 +
 srcpkgs/mimalloc/template | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 7e779a6a28bd..5c70ea01e98d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
 libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..6549dae035b7
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,29 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From a684290aba9d5ea7b77a39fa04a9aa0f1bb1ef4b Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 17 Sep 2022 14:19:26 +1000
Subject: [PATCH 2/2] New package: mold-1.4.2

Closes: #34820
---
 srcpkgs/mold/template | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..af282456b54d
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,35 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.4.2
+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"
+checkdepends="perl tar which libdwarf"
+# One more test requires llvm-readelf which is in llvm12, just ignore it.
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=47e6c48d20f49e5b47dfb8197dd9ffcb11a8833d614f7a03bd29741c658a69cd
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+post_extract() {
+	# Delete this test for now. It tries "which clang" but that fails if
+	# clang is a symlink to ccache.
+	rm test/elf/run-clang.sh
+}
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE#-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR REVIEW] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (11 preceding siblings ...)
  2022-09-19 16:18 ` [PR REVIEW] " cinerea0
@ 2022-09-19 16:18 ` cinerea0
  2022-09-22  0:57 ` wangp
                   ` (28 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: cinerea0 @ 2022-09-19 16:18 UTC (permalink / raw)
  To: ml

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

New review comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#discussion_r974432185

Comment:
```suggestion
build_style=cmake
configure_args="$(vopt_bool secure MI_SECURE)"
```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR REVIEW] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (10 preceding siblings ...)
  2022-09-18  8:45 ` [PR PATCH] [Updated] " wangp
@ 2022-09-19 16:18 ` cinerea0
  2022-09-19 16:18 ` cinerea0
                   ` (29 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: cinerea0 @ 2022-09-19 16:18 UTC (permalink / raw)
  To: ml

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

New review comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#discussion_r974433385

Comment:
```suggestion

# Package build options
build_options="secure"
build_options_default="secure"
```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (12 preceding siblings ...)
  2022-09-19 16:18 ` cinerea0
@ 2022-09-22  0:57 ` wangp
  2022-10-01  1:31 ` [PR PATCH] [Updated] " wangp
                   ` (27 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-09-22  0:57 UTC (permalink / raw)
  To: ml

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

New comment by wangp on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1254376906

Comment:
Interesting suggestion. I will add the build option, but I would like other people's opinions if it should be the default.

I'm mainly packaging mimalloc to use with mold. Here is a benchmark of mold on my machine.
Benchmark # 1 uses mold with mimalloc in non-secure mode.
Benchmark # 2 uses mold with mimalloc in secure mode.
```
Benchmark #1: ../../link-test.sh
  Time (mean ± σ):     255.3 ms ±   1.5 ms    [User: 22.2 ms, System: 7.4 ms]
  Range (min … max):   252.9 ms … 257.7 ms    20 runs
 
Benchmark #2: LD_LIBRARY_PATH=/tmp/mimalloc-secure/usr/lib ../../link-test.sh
  Time (mean ± σ):     265.1 ms ±   1.7 ms    [User: 26.8 ms, System: 8.1 ms]
  Range (min … max):   261.7 ms … 267.6 ms    20 runs
 
Summary
  '../../link-test.sh' ran
    1.04 ± 0.01 times faster than 'LD_LIBRARY_PATH=/tmp/mimalloc-secure/usr/lib ../../link-test.sh', -3.7%
```
In relative terms, a 3-4% slowdown is significant, but in absolute terms, 10 ms is not something that I would notice. So I think I would be okay with making secure mode the default, even if I don't see the need for it in a linker.

(For interest, the same link command using GNU ld takes 1.9 s.)

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (13 preceding siblings ...)
  2022-09-22  0:57 ` wangp
@ 2022-10-01  1:31 ` wangp
  2022-10-01  1:33 ` wangp
                   ` (26 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-01  1:31 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.4.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 4578 bytes --]

From 158c626039c7f3d0cbb70a629b5f87084e846f76 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 34 +++++++++++++++++++
 4 files changed, 54 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 669c4eb19fec..83f1c3c59747 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
 libmujs.so.1.2.0 mujs-1.2.0_2
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..35ac9ab5efb1
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,34 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+build_options_default=""
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From d20a78b7d23b46c7c382bdfb2d57a0e9be7a2cf1 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 1 Oct 2022 11:13:02 +1000
Subject: [PATCH 2/2] New package: mold-1.5.1

Closes: #34820
---
 srcpkgs/mold/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..957b8ea5e13d
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,29 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.5.1
+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"
+# One more test requires llvm-readelf from llvm12, just ignore it.
+checkdepends="tar libdwarf"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=ec94aa74758f1bc199a732af95c6304ec98292b87f2f4548ce8436a7c5b054a1
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE#-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.4.2
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (14 preceding siblings ...)
  2022-10-01  1:31 ` [PR PATCH] [Updated] " wangp
@ 2022-10-01  1:33 ` wangp
  2022-10-01  2:41 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1 wangp
                   ` (25 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-01  1:33 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.4.2
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 4552 bytes --]

From 6d018c45574cdd7f286f2c864bb3d8c4be2cf519 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 669c4eb19fec..83f1c3c59747 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
 libmujs.so.1.2.0 mujs-1.2.0_2
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..4e6c2f16a0e8
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From 57d07c2385510b5f048619c87455f26129baa57a Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 1 Oct 2022 11:13:02 +1000
Subject: [PATCH 2/2] New package: mold-1.5.1

Closes: #34820
---
 srcpkgs/mold/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..957b8ea5e13d
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,29 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.5.1
+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"
+# One more test requires llvm-readelf from llvm12, just ignore it.
+checkdepends="tar libdwarf"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=ec94aa74758f1bc199a732af95c6304ec98292b87f2f4548ce8436a7c5b054a1
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE#-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (15 preceding siblings ...)
  2022-10-01  1:33 ` wangp
@ 2022-10-01  2:41 ` wangp
  2022-10-01  7:33 ` wangp
                   ` (24 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-01  2:41 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.5.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 4552 bytes --]

From 6d018c45574cdd7f286f2c864bb3d8c4be2cf519 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 669c4eb19fec..83f1c3c59747 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
 libmujs.so.1.2.0 mujs-1.2.0_2
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..4e6c2f16a0e8
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From cfd6e6a712f54466a47b4db8d55bafca9752c2d2 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 1 Oct 2022 11:13:02 +1000
Subject: [PATCH 2/2] New package: mold-1.5.1

Closes: #34820
---
 srcpkgs/mold/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..2f9a301014e4
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,29 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.5.1
+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"
+# One more test requires llvm-readelf from llvm12, just ignore it.
+checkdepends="tar libdwarf"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=ec94aa74758f1bc199a732af95c6304ec98292b87f2f4548ce8436a7c5b054a1
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE%-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (16 preceding siblings ...)
  2022-10-01  2:41 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1 wangp
@ 2022-10-01  7:33 ` wangp
  2022-10-01  7:33 ` wangp
                   ` (23 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-01  7:33 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.5.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5564 bytes --]

From 6d018c45574cdd7f286f2c864bb3d8c4be2cf519 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/3] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 669c4eb19fec..83f1c3c59747 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
 libmujs.so.1.2.0 mujs-1.2.0_2
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..4e6c2f16a0e8
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From cfd6e6a712f54466a47b4db8d55bafca9752c2d2 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 1 Oct 2022 11:13:02 +1000
Subject: [PATCH 2/3] New package: mold-1.5.1

Closes: #34820
---
 srcpkgs/mold/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..2f9a301014e4
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,29 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.5.1
+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"
+# One more test requires llvm-readelf from llvm12, just ignore it.
+checkdepends="tar libdwarf"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=ec94aa74758f1bc199a732af95c6304ec98292b87f2f4548ce8436a7c5b054a1
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE%-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 8dc0c9740ea0b8e8830c392a8130e94b2760e2ac Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 1 Oct 2022 13:04:21 +1000
Subject: [PATCH 3/3] [WIP] mold: add zstd, remove redundant license

---
 srcpkgs/mold/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
index 2f9a301014e4..aad3cd5be866 100644
--- a/srcpkgs/mold/template
+++ b/srcpkgs/mold/template
@@ -5,7 +5,7 @@ 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"
+makedepends="mimalloc-devel openssl-devel zlib-devel libzstd-devel"
 # One more test requires llvm-readelf from llvm12, just ignore it.
 checkdepends="tar libdwarf"
 short_desc="Faster drop-in replacement for existing Unix linkers"
@@ -26,4 +26,5 @@ pre_check() {
 
 post_install() {
 	vlicense LICENSE
+	rm -v ${DESTDIR}/usr/share/doc/mold/LICENSE
 }

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (17 preceding siblings ...)
  2022-10-01  7:33 ` wangp
@ 2022-10-01  7:33 ` wangp
  2022-10-22  1:50 ` wangp
                   ` (22 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-01  7:33 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.5.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 4613 bytes --]

From 6d018c45574cdd7f286f2c864bb3d8c4be2cf519 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 669c4eb19fec..83f1c3c59747 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,4 @@ libgbinder.so.1 libgbinder-1.1.20_1
 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1
 libmujs.so.1.2.0 mujs-1.2.0_2
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..4e6c2f16a0e8
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From 78efc95cf39a93372f7bc47c1178d4c8ff90ef55 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 1 Oct 2022 11:13:02 +1000
Subject: [PATCH 2/2] New package: mold-1.5.1

Closes: #34820
---
 srcpkgs/mold/template | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..aad3cd5be866
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,30 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.5.1
+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"
+# One more test requires llvm-readelf from llvm12, just ignore it.
+checkdepends="tar libdwarf"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=ec94aa74758f1bc199a732af95c6304ec98292b87f2f4548ce8436a7c5b054a1
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE%-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+	rm -v ${DESTDIR}/usr/share/doc/mold/LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (18 preceding siblings ...)
  2022-10-01  7:33 ` wangp
@ 2022-10-22  1:50 ` wangp
  2022-10-23  1:41 ` wangp
                   ` (21 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-22  1:50 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.5.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 4690 bytes --]

From cf768a4937f54a32fb3180b2053daf2211f044ee Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 9712cbc1262f..d5039eb15e86 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4190,3 +4190,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..4e6c2f16a0e8
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From ea90e117ddd979a976dac301d342e6ba8855c43f Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 22 Oct 2022 12:48:07 +1100
Subject: [PATCH 2/2] New package: mold-1.6.0

Closes: #34820
---
 srcpkgs/mold/template | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..42405e90baf8
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,30 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.6.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"
+# One more test requires llvm-readelf from llvm12, just ignore it.
+checkdepends="tar libdwarf"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=59cd3ea1a2a5fb50d0d97faddd8bff4c7e71054a576c00a87b17f56ecbd88729
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+pre_check() {
+	export MACHINE=${XBPS_TARGET_MACHINE%-musl}
+}
+
+post_install() {
+	vlicense LICENSE
+	rm -v ${DESTDIR}/usr/share/doc/mold/LICENSE
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (19 preceding siblings ...)
  2022-10-22  1:50 ` wangp
@ 2022-10-23  1:41 ` wangp
  2022-10-23  2:21 ` wangp
                   ` (20 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-23  1:41 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.5.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5606 bytes --]

From cf768a4937f54a32fb3180b2053daf2211f044ee Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 9712cbc1262f..d5039eb15e86 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4190,3 +4190,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..4e6c2f16a0e8
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From 8b612a0e1eb4e50a64f062ee6f38d8be344439b2 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 23 Oct 2022 12:39:16 +1100
Subject: [PATCH 2/2] New package: mold-1.6.0

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..f6868e0b4c81
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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")
++else
++  HOST=$(canonical_name $(uname -m))
++fi
+ 
+ if [ -n "$TRIPLE" ]; then
+   MACHINE=$(canonical_name $(echo $TRIPLE | sed 's/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..c1e4759dd771
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.6.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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=59cd3ea1a2a5fb50d0d97faddd8bff4c7e71054a576c00a87b17f56ecbd88729
+
+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
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (20 preceding siblings ...)
  2022-10-23  1:41 ` wangp
@ 2022-10-23  2:21 ` wangp
  2022-10-24 14:24 ` New packages: mimalloc-2.0.6, mold-1.6.0 sug0
                   ` (19 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-10-23  2:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.5.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5614 bytes --]

From cf768a4937f54a32fb3180b2053daf2211f044ee Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 26 Jun 2022 11:35:52 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.0.6

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 18 ++++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 9712cbc1262f..d5039eb15e86 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4190,3 +4190,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..1aeb71d85887
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,18 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8127e0965c..377aee9e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -251,11 +251,7 @@ else()
+   set(mi_install_cmakedir   "${CMAKE_INSTALL_LIBDIR}/cmake/mimalloc-${mi_version}") # for cmake package info
+ endif()
+ 
+-if(MI_SECURE)
+-  set(mi_basename "mimalloc-secure")
+-else()
+-  set(mi_basename "mimalloc")
+-endif()
++set(mi_basename "mimalloc")
+ 
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..4e6c2f16a0e8
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.6
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From dfbae04b2a9b4b59c7a2710f52b1fbc524262e33 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 23 Oct 2022 12:39:16 +1100
Subject: [PATCH 2/2] New package: mold-1.6.0

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..c1e4759dd771
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.6.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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=59cd3ea1a2a5fb50d0d97faddd8bff4c7e71054a576c00a87b17f56ecbd88729
+
+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
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.6, mold-1.6.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (21 preceding siblings ...)
  2022-10-23  2:21 ` wangp
@ 2022-10-24 14:24 ` sug0
  2022-12-02  7:23 ` [PR PATCH] [Updated] " wangp
                   ` (18 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: sug0 @ 2022-10-24 14:24 UTC (permalink / raw)
  To: ml

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

New comment by sug0 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1289117960

Comment:
tested this in my local system. it's working as expected, so, lgtm!

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.6.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (22 preceding siblings ...)
  2022-10-24 14:24 ` New packages: mimalloc-2.0.6, mold-1.6.0 sug0
@ 2022-12-02  7:23 ` wangp
  2023-01-08  0:42 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.7, mold-1.7.1 wangp
                   ` (17 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2022-12-02  7:23 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.6, mold-1.6.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5327 bytes --]

From 23f5e01993465ca503f36aacc2ac564d9404c8d7 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Fri, 2 Dec 2022 18:22:05 +1100
Subject: [PATCH 1/2] New package: mimalloc-2.0.7

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 14 ++++++++
 srcpkgs/mimalloc/template                     | 33 +++++++++++++++++++
 4 files changed, 49 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index fc5bb4dda7e6..14eed6135052 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4205,3 +4205,4 @@ libtraceevent.so.1 libtraceevent-1.6.2_1
 libtracefs.so.1 libtracefs-1.4.2_1
 libtracecmd.so.1 libtracecmd-3.1.2_1
 libkshark.so.2 libkshark-2.1.1_1
+libmimalloc.so.2 mimalloc-2.0.6_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..66b63526f6c7
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,14 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2550f0d..9dff9e9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -292,7 +292,7 @@ endif()
+ 
+ set(mi_basename "mimalloc")
+ if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
++  set(mi_basename "${mi_basename}")
+ endif()
+ if(MI_VALGRIND)
+   set(mi_basename "${mi_basename}-valgrind")
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..ede55895d128
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,33 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.7
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=f23aac6c73594e417af50cb38f1efed88ef1dc14a490f0eff07c7f7b079810a4
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+	}
+}

From 9e1f0f0abf18b71c225bdb9402fd8fdc0290f2bc Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Fri, 2 Dec 2022 18:22:11 +1100
Subject: [PATCH 2/2] New package: mold-1.7.1

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..a0b7dac4dbb7
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.7.1
+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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=fa2558664db79a1e20f09162578632fa856b3cde966fbcb23084c352b827dfa9
+
+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
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.7, mold-1.7.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (23 preceding siblings ...)
  2022-12-02  7:23 ` [PR PATCH] [Updated] " wangp
@ 2023-01-08  0:42 ` wangp
  2023-01-08  5:58 ` New packages: mimalloc-2.0.9, mold-1.9.0 icp1994
                   ` (16 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2023-01-08  0:42 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.7, mold-1.7.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5324 bytes --]

From 1679beb022105ce5717391980584cbb8ca7afd49 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 8 Jan 2023 11:21:49 +1100
Subject: [PATCH 1/2] New package: mimalloc-2.0.9

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 14 ++++++++
 srcpkgs/mimalloc/template                     | 34 +++++++++++++++++++
 4 files changed, 50 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 349c183cdb38..66ba8b4f35c6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4220,3 +4220,4 @@ libdspy-1.so.1 d-spy-1.4.0_1
 libpanel-1.so.1 libpanel-1.0.1_1
 libqrtr.so.1 qrtr-ns-1.0_1
 libbpf.so.1 libbpf-1.0.0_1
+libmimalloc.so.2 mimalloc-2.0.9_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..66b63526f6c7
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,14 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2550f0d..9dff9e9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -292,7 +292,7 @@ endif()
+ 
+ set(mi_basename "mimalloc")
+ if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
++  set(mi_basename "${mi_basename}")
+ endif()
+ if(MI_VALGRIND)
+   set(mi_basename "${mi_basename}-valgrind")
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..8bfdf05f857a
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,34 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.9
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/pkgconfig
+	}
+}

From 18db059d43d9e6600175cbd3a9fb6b579b634b2a Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 8 Jan 2023 11:22:08 +1100
Subject: [PATCH 2/2] New package: mold-1.9.0

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..e3572d210111
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.9.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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=faf381ba268e714bec7f872de0dd6ea9187ae20b4e12c434a67ac92854701280
+
+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
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (24 preceding siblings ...)
  2023-01-08  0:42 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.7, mold-1.7.1 wangp
@ 2023-01-08  5:58 ` icp1994
  2023-01-08 17:54 ` [PR REVIEW] " classabbyamp
                   ` (15 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: icp1994 @ 2023-01-08  5:58 UTC (permalink / raw)
  To: ml

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

New comment by icp1994 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1374718178

Comment:
FWIW, [Alpine](https://git.alpinelinux.org/aports/tree/community/mold/APKBUILD?id=fb05fcfb8efb7b6bcb05c10114612dc0becc88a4) disables the failing tests. It should be okay for us to disable them on musl too.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR REVIEW] New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (25 preceding siblings ...)
  2023-01-08  5:58 ` New packages: mimalloc-2.0.9, mold-1.9.0 icp1994
@ 2023-01-08 17:54 ` classabbyamp
  2023-01-09  1:00 ` nekopsykose
                   ` (14 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: classabbyamp @ 2023-01-08 17:54 UTC (permalink / raw)
  To: ml

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

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#discussion_r1064180221

Comment:
```suggestion
distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
```


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (26 preceding siblings ...)
  2023-01-08 17:54 ` [PR REVIEW] " classabbyamp
@ 2023-01-09  1:00 ` nekopsykose
  2023-01-09  4:54 ` nekopsykose
                   ` (13 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nekopsykose @ 2023-01-09  1:00 UTC (permalink / raw)
  To: ml

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

New comment by nekopsykose on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1374986806

Comment:
> FWIW, [Alpine](https://git.alpinelinux.org/aports/tree/community/mold/APKBUILD?id=fb05fcfb8efb7b6bcb05c10114612dc0becc88a4) disables the failing tests. It should be okay for us to disable them on musl too.  

the segfaulting ones are real failures, though not much uses emit-relocs in practice afaik. reported as an issue regardless

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (27 preceding siblings ...)
  2023-01-09  1:00 ` nekopsykose
@ 2023-01-09  4:54 ` nekopsykose
  2023-01-21  5:01 ` [PR PATCH] [Updated] " wangp
                   ` (12 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nekopsykose @ 2023-01-09  4:54 UTC (permalink / raw)
  To: ml

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

New comment by nekopsykose on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1375105315

Comment:
https://github.com/rui314/mold/commit/e17d7daee8fc9ccdf54bf52c156d9cae448fdd0f  
https://github.com/rui314/mold/commit/915cd23b2fd142f6618d6a31506016b1f9280b8e  

test fixes

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (28 preceding siblings ...)
  2023-01-09  4:54 ` nekopsykose
@ 2023-01-21  5:01 ` wangp
  2023-03-02 22:22 ` subnut
                   ` (11 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2023-01-21  5:01 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.9, mold-1.9.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5426 bytes --]

From 67847cba6e4e642a0b4bc281b244488c4d1900f0 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 8 Jan 2023 11:21:49 +1100
Subject: [PATCH 1/2] New package: mimalloc-2.0.9

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 14 ++++++++
 srcpkgs/mimalloc/template                     | 34 +++++++++++++++++++
 4 files changed, 50 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 85c08f13a05f..1069900e124b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4224,3 +4224,4 @@ libIlmThread-3_1.so.30 libopenexr-3.1.5_1
 libOpenEXR-3_1.so.30 libopenexr-3.1.5_1
 libOpenEXRCore-3_1.so.30 libopenexr-3.1.5_1
 libOpenEXRUtil-3_1.so.30 libopenexr-3.1.5_1
+libmimalloc.so.2 mimalloc-2.0.9_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..66b63526f6c7
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,14 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2550f0d..9dff9e9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -292,7 +292,7 @@ endif()
+ 
+ set(mi_basename "mimalloc")
+ if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
++  set(mi_basename "${mi_basename}")
+ endif()
+ if(MI_VALGRIND)
+   set(mi_basename "${mi_basename}-valgrind")
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..af96d562697b
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,34 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.9
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
+checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/pkgconfig
+	}
+}

From 7069bf89f64ef92ef256b48daf4051718868e94e Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 21 Jan 2023 15:53:18 +1100
Subject: [PATCH 2/2] New package: mold-1.10.0

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..14b72a5eab9a
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.10.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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
+checksum=bcf59e21cebf2b7e7346ccfd1803865e411b8a35b5a2cb581936c4ace3d2bac8
+
+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
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (29 preceding siblings ...)
  2023-01-21  5:01 ` [PR PATCH] [Updated] " wangp
@ 2023-03-02 22:22 ` subnut
  2023-03-02 23:02 ` [PR REVIEW] " subnut
                   ` (10 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: subnut @ 2023-03-02 22:22 UTC (permalink / raw)
  To: ml

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

New comment by subnut on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1452636930

Comment:
mold 1.10.1 has been released


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR REVIEW] New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (30 preceding siblings ...)
  2023-03-02 22:22 ` subnut
@ 2023-03-02 23:02 ` subnut
  2023-03-02 23:05 ` subnut
                   ` (9 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: subnut @ 2023-03-02 23:02 UTC (permalink / raw)
  To: ml

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

New review comment by subnut on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#discussion_r1123832193

Comment:
```diff
+build_options_default="secure"
```

`MI_SECURE` should be `ON` by default, IMO.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR REVIEW] New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (31 preceding siblings ...)
  2023-03-02 23:02 ` [PR REVIEW] " subnut
@ 2023-03-02 23:05 ` subnut
  2023-03-04  0:55 ` [PR PATCH] [Updated] " wangp
                   ` (8 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: subnut @ 2023-03-02 23:05 UTC (permalink / raw)
  To: ml

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

New review comment by subnut on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#discussion_r1123835086

Comment:
```suggestion
-if(MI_SECURE)
-  set(mi_basename "${mi_basename}-secure")
-endif()
```
This conditional doesn't make any sense. Please remove it completely.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (32 preceding siblings ...)
  2023-03-02 23:05 ` subnut
@ 2023-03-04  0:55 ` wangp
  2023-03-04  0:57 ` [PR REVIEW] " wangp
                   ` (7 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2023-03-04  0:55 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.9, mold-1.9.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5437 bytes --]

From 9d3cc048243533687334bfb2ecbdbca9cd2877fb Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 8 Jan 2023 11:21:49 +1100
Subject: [PATCH 1/2] New package: mimalloc-2.0.9

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 15 ++++++++
 srcpkgs/mimalloc/template                     | 34 +++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index 0f9c75af44bc..f4636d51ae31 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4238,3 +4238,4 @@ libdate-tz.so.3 chrono-date-3.0.1_1
 libayatana-ido3-0.4.so.0 ayatana-ido-0.9.2_1
 libayatana-indicator3.so.7 libayatana-indicator-0.9.3_1
 libayatana-appindicator3.so.1 libayatana-appindicator-0.5.91_1
+libmimalloc.so.2 mimalloc-2.0.9_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..ec0d0679f93c
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,15 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74c1f29..dfce140 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -311,9 +311,6 @@ else()
+ endif()
+ 
+ set(mi_basename "mimalloc")
+-if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
+-endif()
+ if(MI_VALGRIND)
+   set(mi_basename "${mi_basename}-valgrind")
+ endif()
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..af96d562697b
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,34 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.9
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
+checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/pkgconfig
+	}
+}

From f2f4cb49196fd2a9a7f454dbad4ee600a2d97045 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 21 Jan 2023 15:53:18 +1100
Subject: [PATCH 2/2] New package: mold-1.10.1

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..1098f159e5e2
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.10.1
+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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
+checksum=19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787
+
+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
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR REVIEW] New packages: mimalloc-2.0.9, mold-1.9.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (33 preceding siblings ...)
  2023-03-04  0:55 ` [PR PATCH] [Updated] " wangp
@ 2023-03-04  0:57 ` wangp
  2023-03-27 18:37 ` New packages: mimalloc-2.0.9, mold-1.10.1 cinerea0
                   ` (6 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2023-03-04  0:57 UTC (permalink / raw)
  To: ml

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

New review comment by wangp on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#discussion_r1125181777

Comment:
Done.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.0.9, mold-1.10.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (34 preceding siblings ...)
  2023-03-04  0:57 ` [PR REVIEW] " wangp
@ 2023-03-27 18:37 ` cinerea0
  2023-04-02  1:04 ` [PR PATCH] [Updated] " wangp
                   ` (5 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: cinerea0 @ 2023-03-27 18:37 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1485678594

Comment:
mold 1.11.0 has been released.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.10.1
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (35 preceding siblings ...)
  2023-03-27 18:37 ` New packages: mimalloc-2.0.9, mold-1.10.1 cinerea0
@ 2023-04-02  1:04 ` wangp
  2023-06-20  7:36 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.11.0 wangp
                   ` (4 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2023-04-02  1:04 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.9, mold-1.10.1
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 6477 bytes --]

From 0de68fa14c2b97a5c67e7215e956c3740acd69c1 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 8 Jan 2023 11:21:49 +1100
Subject: [PATCH 1/3] New package: mimalloc-2.0.9

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 15 ++++++++
 srcpkgs/mimalloc/template                     | 34 +++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index ddd0a3266a36..8d496dcc9ee5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4240,3 +4240,4 @@ libdate-tz.so.3 chrono-date-3.0.1_1
 libayatana-ido3-0.4.so.0 ayatana-ido-0.9.2_1
 libayatana-indicator3.so.7 libayatana-indicator-0.9.3_1
 libayatana-appindicator3.so.1 libayatana-appindicator-0.5.91_1
+libmimalloc.so.2 mimalloc-2.0.9_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..ec0d0679f93c
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,15 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74c1f29..dfce140 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -311,9 +311,6 @@ else()
+ endif()
+ 
+ set(mi_basename "mimalloc")
+-if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
+-endif()
+ if(MI_VALGRIND)
+   set(mi_basename "${mi_basename}-valgrind")
+ endif()
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..af96d562697b
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,34 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.9
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
+checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/pkgconfig
+	}
+}

From 55a97bddf60e709d819b79888548411db04a9f2b Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 21 Jan 2023 15:53:18 +1100
Subject: [PATCH 2/3] New package: mold-1.10.1

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..1098f159e5e2
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.10.1
+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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
+checksum=19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787
+
+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
+}

From fba3f65827a011c4584e6ec31ab4aed2daab481f Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 2 Apr 2023 10:59:12 +1000
Subject: [PATCH 3/3] mold: update to 1.11.0.

---
 srcpkgs/mold/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
index 1098f159e5e2..1621c52dae7e 100644
--- a/srcpkgs/mold/template
+++ b/srcpkgs/mold/template
@@ -1,6 +1,6 @@
 # Template file for 'mold'
 pkgname=mold
-version=1.10.1
+version=1.11.0
 revision=1
 build_style=cmake
 configure_args="-DMOLD_USE_SYSTEM_MIMALLOC=ON
@@ -14,7 +14,7 @@ maintainer="Peter Wang <novalazy@gmail.com>"
 license="AGPL-3.0-only"
 homepage="https://github.com/rui314/mold"
 distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
-checksum=19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787
+checksum=99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.11.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (36 preceding siblings ...)
  2023-04-02  1:04 ` [PR PATCH] [Updated] " wangp
@ 2023-06-20  7:36 ` wangp
  2023-07-27 16:01 ` New packages: mimalloc-2.1.2, mold-1.11.0 sug0
                   ` (3 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2023-06-20  7:36 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.9, mold-1.11.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 9736 bytes --]

From 80cbf7c5d257b6647663ee09ab7fe34ed8980c55 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 8 Jan 2023 11:21:49 +1100
Subject: [PATCH 1/4] New package: mimalloc-2.0.9

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 15 ++++++++
 srcpkgs/mimalloc/template                     | 34 +++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index c293ac460c08..eaaf31223279 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4272,3 +4272,4 @@ libplayerctl.so.2 playerctl-2.4.1_1
 libwireplumber-0.4.so.0 wireplumber-0.4.14_1
 libjodycode.so.2 libjodycode-2.0.1_1
 libgsoapssl++-2.8.124.so gsoap-2.8.124_1
+libmimalloc.so.2 mimalloc-2.0.9_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..ec0d0679f93c
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,15 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74c1f29..dfce140 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -311,9 +311,6 @@ else()
+ endif()
+ 
+ set(mi_basename "mimalloc")
+-if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
+-endif()
+ if(MI_VALGRIND)
+   set(mi_basename "${mi_basename}-valgrind")
+ endif()
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..af96d562697b
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,34 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.9
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
+checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/pkgconfig
+	}
+}

From b163f9caee681218c28246179401a3a5079322e1 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 21 Jan 2023 15:53:18 +1100
Subject: [PATCH 2/4] New package: mold-1.10.1

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..1098f159e5e2
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.10.1
+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="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
+checksum=19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787
+
+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
+}

From 4b1bdad9c5970c9177ada4fecfba0ed18203ff1f Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 2 Apr 2023 10:59:12 +1000
Subject: [PATCH 3/4] mold: update to 1.11.0.

---
 srcpkgs/mold/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
index 1098f159e5e2..1621c52dae7e 100644
--- a/srcpkgs/mold/template
+++ b/srcpkgs/mold/template
@@ -1,6 +1,6 @@
 # Template file for 'mold'
 pkgname=mold
-version=1.10.1
+version=1.11.0
 revision=1
 build_style=cmake
 configure_args="-DMOLD_USE_SYSTEM_MIMALLOC=ON
@@ -14,7 +14,7 @@ maintainer="Peter Wang <novalazy@gmail.com>"
 license="AGPL-3.0-only"
 homepage="https://github.com/rui314/mold"
 distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
-checksum=19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787
+checksum=99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"

From 697ba0a75f05de87561967f0a0e8288f24c1ab8b Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Tue, 20 Jun 2023 17:24:39 +1000
Subject: [PATCH 4/4] mimalloc: update to 2.1.2.

Thanks to paper42.
---
 .../mimalloc/patches/secure-basename.patch    | 15 --------------
 .../mimalloc/patches/unify-library-name.patch | 20 +++++++++++++++++++
 srcpkgs/mimalloc/template                     |  8 +++++---
 3 files changed, 25 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/patches/unify-library-name.patch

diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
deleted file mode 100644
index ec0d0679f93c..000000000000
--- a/srcpkgs/mimalloc/patches/secure-basename.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-# Set basename to always be 'mimalloc' for compatibility
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 74c1f29..dfce140 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -311,9 +311,6 @@ else()
- endif()
- 
- set(mi_basename "mimalloc")
--if(MI_SECURE)
--  set(mi_basename "${mi_basename}-secure")
--endif()
- if(MI_VALGRIND)
-   set(mi_basename "${mi_basename}-valgrind")
- endif()
diff --git a/srcpkgs/mimalloc/patches/unify-library-name.patch b/srcpkgs/mimalloc/patches/unify-library-name.patch
new file mode 100644
index 000000000000..c8cddbef17b8
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/unify-library-name.patch
@@ -0,0 +1,20 @@
+make sure the library name is the same no matter whether is't built as
+secure or not
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -343,15 +343,6 @@ else()
+ endif()
+ 
+ set(mi_basename "mimalloc")
+-if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
+-endif()
+-if(MI_TRACK_VALGRIND)
+-  set(mi_basename "${mi_basename}-valgrind")
+-endif()
+-if(MI_TRACK_ASAN)
+-  set(mi_basename "${mi_basename}-asan")
+-endif()
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
+   set(mi_basename "${mi_basename}-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
index af96d562697b..1c8872823b15 100644
--- a/srcpkgs/mimalloc/template
+++ b/srcpkgs/mimalloc/template
@@ -1,6 +1,6 @@
 # Template file for 'mimalloc'
 pkgname=mimalloc
-version=2.0.9
+version=2.1.2
 revision=1
 build_style=cmake
 configure_args="$(vopt_bool secure MI_SECURE)"
@@ -9,9 +9,10 @@ maintainer="Peter Wang <novalazy@gmail.com>"
 license="MIT"
 homepage="https://github.com/microsoft/mimalloc"
 distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
-checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+checksum=2b1bff6f717f9725c70bf8d79e4786da13de8a270059e4ba0bdd262ae7be46eb
 
 build_options="secure"
+build_options_default="secure"
 desc_option_secure="Build mimalloc in secure mode"
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
@@ -28,7 +29,8 @@ mimalloc-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/libmimalloc.so
+		vmove usr/lib/mimalloc-${version%.*}
 		vmove usr/lib/pkgconfig
 	}
 }

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.1.2, mold-1.11.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (37 preceding siblings ...)
  2023-06-20  7:36 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.11.0 wangp
@ 2023-07-27 16:01 ` sug0
  2023-07-29 14:30 ` leahneukirchen
                   ` (2 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: sug0 @ 2023-07-27 16:01 UTC (permalink / raw)
  To: ml

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

New comment by sug0 on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1653911779

Comment:
hey, 2.0.0 is out! :tada: 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: New packages: mimalloc-2.1.2, mold-1.11.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (38 preceding siblings ...)
  2023-07-27 16:01 ` New packages: mimalloc-2.1.2, mold-1.11.0 sug0
@ 2023-07-29 14:30 ` leahneukirchen
  2023-07-31  8:51 ` [PR PATCH] [Updated] " wangp
  2023-07-31 15:29 ` [PR PATCH] [Merged]: " leahneukirchen
  41 siblings, 0 replies; 43+ messages in thread
From: leahneukirchen @ 2023-07-29 14:30 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/37688#issuecomment-1656743051

Comment:
Please squash and rebase, then :+1: 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] New packages: mimalloc-2.1.2, mold-1.11.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (39 preceding siblings ...)
  2023-07-29 14:30 ` leahneukirchen
@ 2023-07-31  8:51 ` wangp
  2023-07-31 15:29 ` [PR PATCH] [Merged]: " leahneukirchen
  41 siblings, 0 replies; 43+ messages in thread
From: wangp @ 2023-07-31  8:51 UTC (permalink / raw)
  To: ml

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.1.2, mold-1.11.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mimalloc-2.0.6-37688.patch --]
[-- Type: text/x-diff, Size: 5754 bytes --]

From c07b11ca8a3211b5a666172f2ef8f0698ca0bb66 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Mon, 31 Jul 2023 18:34:56 +1000
Subject: [PATCH 1/2] New package: mimalloc-2.1.2

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/unify-library-name.patch | 20 +++++++++++
 srcpkgs/mimalloc/template                     | 36 +++++++++++++++++++
 4 files changed, 58 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/unify-library-name.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index c71817b11b51f..a521ea1b66ae1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4323,3 +4323,4 @@ libjxl_threads.so.0.8 libjxl-0.8.2_1
 libtext-engine-0.1.so.0 text-engine-0.1.1_1
 libvmaf.so.1 vmaf-2.3.1_1
 liblc3.so.1 liblc3-1.0.3_1
+libmimalloc.so.2 mimalloc-2.1.2_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 0000000000000..9af584a917a5f
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/unify-library-name.patch b/srcpkgs/mimalloc/patches/unify-library-name.patch
new file mode 100644
index 0000000000000..586edbd1426df
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/unify-library-name.patch
@@ -0,0 +1,20 @@
+make sure the library name is the same no matter whether is built as
+secure or not
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -343,15 +343,6 @@ else()
+ endif()
+ 
+ set(mi_basename "mimalloc")
+-if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
+-endif()
+-if(MI_TRACK_VALGRIND)
+-  set(mi_basename "${mi_basename}-valgrind")
+-endif()
+-if(MI_TRACK_ASAN)
+-  set(mi_basename "${mi_basename}-asan")
+-endif()
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
+   set(mi_basename "${mi_basename}-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 0000000000000..1c8872823b158
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,36 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.1.2
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
+checksum=2b1bff6f717f9725c70bf8d79e4786da13de8a270059e4ba0bdd262ae7be46eb
+
+build_options="secure"
+build_options_default="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/libmimalloc.so
+		vmove usr/lib/mimalloc-${version%.*}
+		vmove usr/lib/pkgconfig
+	}
+}

From b2c14756d9622e9f4d9ffbd88bf585cb6c7aa98e Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Mon, 31 Jul 2023 18:35:01 +1000
Subject: [PATCH 2/2] New package: mold-2.0.0

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 0000000000000..a76b7fc236b67
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -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/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 0000000000000..fee5ede1e6ab9
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -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
+}

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Merged]: New packages: mimalloc-2.1.2, mold-1.11.0
  2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
                   ` (40 preceding siblings ...)
  2023-07-31  8:51 ` [PR PATCH] [Updated] " wangp
@ 2023-07-31 15:29 ` leahneukirchen
  41 siblings, 0 replies; 43+ messages in thread
From: leahneukirchen @ 2023-07-31 15:29 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

New packages: mimalloc-2.1.2, mold-1.11.0
https://github.com/void-linux/void-packages/pull/37688

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (crossbuilds):
  - x86_64-musl
  - i686-glibc
  - aarch64-glibc
  - aarch64-musl
  - armv7l-glibc
  - armv7l-musl
  - armv6l-glibc
  - armv6l-musl

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2023-07-31 15:29 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
2022-06-26  5:06 ` [PR PATCH] [Updated] " wangp
2022-09-11  2:48 ` wangp
2022-09-11  5:01 ` New packages: mimalloc-2.0.6, mold-1.4.2 wangp
2022-09-16 15:30 ` icp1994
2022-09-16 16:38 ` icp1994
2022-09-17  4:28 ` [PR PATCH] [Updated] " wangp
2022-09-17  4:29 ` wangp
2022-09-17  4:40 ` wangp
2022-09-18  2:21 ` [PR PATCH] [Updated] " wangp
2022-09-18  2:22 ` wangp
2022-09-18  8:45 ` [PR PATCH] [Updated] " wangp
2022-09-19 16:18 ` [PR REVIEW] " cinerea0
2022-09-19 16:18 ` cinerea0
2022-09-22  0:57 ` wangp
2022-10-01  1:31 ` [PR PATCH] [Updated] " wangp
2022-10-01  1:33 ` wangp
2022-10-01  2:41 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1 wangp
2022-10-01  7:33 ` wangp
2022-10-01  7:33 ` wangp
2022-10-22  1:50 ` wangp
2022-10-23  1:41 ` wangp
2022-10-23  2:21 ` wangp
2022-10-24 14:24 ` New packages: mimalloc-2.0.6, mold-1.6.0 sug0
2022-12-02  7:23 ` [PR PATCH] [Updated] " wangp
2023-01-08  0:42 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.7, mold-1.7.1 wangp
2023-01-08  5:58 ` New packages: mimalloc-2.0.9, mold-1.9.0 icp1994
2023-01-08 17:54 ` [PR REVIEW] " classabbyamp
2023-01-09  1:00 ` nekopsykose
2023-01-09  4:54 ` nekopsykose
2023-01-21  5:01 ` [PR PATCH] [Updated] " wangp
2023-03-02 22:22 ` subnut
2023-03-02 23:02 ` [PR REVIEW] " subnut
2023-03-02 23:05 ` subnut
2023-03-04  0:55 ` [PR PATCH] [Updated] " wangp
2023-03-04  0:57 ` [PR REVIEW] " wangp
2023-03-27 18:37 ` New packages: mimalloc-2.0.9, mold-1.10.1 cinerea0
2023-04-02  1:04 ` [PR PATCH] [Updated] " wangp
2023-06-20  7:36 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.11.0 wangp
2023-07-27 16:01 ` New packages: mimalloc-2.1.2, mold-1.11.0 sug0
2023-07-29 14:30 ` leahneukirchen
2023-07-31  8:51 ` [PR PATCH] [Updated] " wangp
2023-07-31 15:29 ` [PR PATCH] [Merged]: " leahneukirchen

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).