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: 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
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=i686in the environment, otherwise the test scripts use the value ofuname -mwhich isx86_64in the cross-compilation environment. - the i686
moldbinary doesn't run in the cross-compilation environment because/lib/ld-linux.so.2is 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?
#!/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 "$@"
Does including make_check_pre="env MACHINE=${XBPS_TARGET_MACHINE#-musl}" help?
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.
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.)
tested this in my local system. it's working as expected, so, lgtm!
FWIW, Alpine disables the failing tests. It should be okay for us to disable them on musl too.
FWIW, Alpine 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
https://github.com/rui314/mold/commit/e17d7daee8fc9ccdf54bf52c156d9cae448fdd0f
https://github.com/rui314/mold/commit/915cd23b2fd142f6618d6a31506016b1f9280b8e
test fixes
mold 1.10.1 has been released
mold 1.11.0 has been released.
hey, 2.0.0 is out! :tada:
Please squash and rebase, then :+1: