From: Logarithmus <Logarithmus@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [ci skip] New package: mold-0.1.1
Date: Tue, 29 Jun 2021 23:07:33 +0200 [thread overview]
Message-ID: <20210629210733.Rjvyk8rs0xk095iTPXpoAwp6eU8L5WyEhG8uuXJRWec@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31707@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1974 bytes --]
There is an updated pull request by Logarithmus against master on the void-packages repository
https://github.com/Logarithmus/void-packages mold
https://github.com/void-linux/void-packages/pull/31707
[ci skip] New package: mold-0.1.1
[ci skip]
<!-- Mark items with [x] where applicable -->
Blocked on https://github.com/void-linux/void-packages/pull/31706
The package fails to build due to this error:
```
/usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/10.2/crtbegin.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
```
Any hints on fixing it?
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/31707.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mold-31707.patch --]
[-- Type: text/x-diff, Size: 4248 bytes --]
From f848cf4ceb735224e516e46b9745078d9113b5e9 Mon Sep 17 00:00:00 2001
From: Artur Sinila <freesoftware@logarithmus.dev>
Date: Tue, 29 Jun 2021 03:31:54 +0300
Subject: [PATCH] New package: mold-0.1.1
---
srcpkgs/mold/patches/00-system-mimalloc.patch | 67 +++++++++++++++++++
srcpkgs/mold/template | 31 +++++++++
2 files changed, 98 insertions(+)
create mode 100644 srcpkgs/mold/patches/00-system-mimalloc.patch
create mode 100644 srcpkgs/mold/template
diff --git a/srcpkgs/mold/patches/00-system-mimalloc.patch b/srcpkgs/mold/patches/00-system-mimalloc.patch
new file mode 100644
index 000000000000..e173631a1415
--- /dev/null
+++ b/srcpkgs/mold/patches/00-system-mimalloc.patch
@@ -0,0 +1,67 @@
+diff --git b/Makefile a/Makefile
+index cd5effb..fbdaf1a 100644
+--- b/Makefile
++++ a/Makefile
+@@ -9,7 +9,7 @@ CPPFLAGS = -g -Imimalloc/include -pthread -std=c++20 \
+ -DMOLD_VERSION=\"0.1.1\" \
+ -DGIT_HASH=\"$(GIT_HASH)\" \
+ $(EXTRA_CPPFLAGS)
+-LDFLAGS = $(EXTRA_LDFLAGS)
++LDFLAGS += $(EXTRA_LDFLAGS)
+ LIBS = -Wl,-as-needed -lcrypto -pthread -ltbb -lz -lxxhash -ldl
+ OBJS = main.o object_file.o input_sections.o output_chunks.o \
+ mapfile.o perf.o linker_script.o archive_file.o output_file.o \
+@@ -40,7 +40,11 @@ else
+ # By default, we want to use mimalloc as a memory allocator.
+ # Since replacing the standard malloc is not compatible with ASAN,
+ # we do that only when ASAN is not enabled.
+- LDFLAGS += -Wl,-whole-archive $(MIMALLOC_LIB) -Wl,-no-whole-archive
++ ifndef SYSTEM_MIMALLOC
++ LIBS += -Wl,-whole-archive $(MIMALLOC_LIB) -Wl,-no-whole-archive
++ else
++ LIBS += -lmimalloc
++ endif
+ endif
+
+ ifeq ($(TSAN), 1)
+@@ -50,7 +54,7 @@ endif
+
+ all: mold mold-wrapper.so
+
+-mold: $(OBJS) $(MIMALLOC_LIB)
+- $(CXX) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
++mold: $(OBJS)
++ $(CXX) $(CXXFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
+
+ mold-wrapper.so: mold-wrapper.c Makefile
+@@ -71,20 +75,21 @@ test tests check: all
+ for i in test/*.sh; do $$i || exit 1; done
+
+ install: all
+- install -m 755 mold $(PREFIX)/bin
++ install -m 755 mold $(DESTDIR)$(PREFIX)/bin
+ strip $(PREFIX)/bin/mold
+
+- install -m 755 -d $(PREFIX)/lib/mold
+- install -m 644 mold-wrapper.so $(PREFIX)/lib/mold
+- strip $(PREFIX)/lib/mold/mold-wrapper.so
++ install -m 755 -d $(DESTDIR)$(PREFIX)/lib/mold
++ install -m 644 mold-wrapper.so $(DESTDIR)$(PREFIX)/lib/mold
++ strip $(DESTDIR)$(PREFIX)/lib/mold/mold-wrapper.so
+
+- install -m 644 docs/mold.1 $(PREFIX)/share/man/man1
+- rm -f $(PREFIX)/share/man/man1/mold.1.gz
+- gzip -9 $(PREFIX)/share/man/man1/mold.1
++ install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1
++ install -m 644 docs/mold.1 $(DESTDIR)$(PREFIX)/share/man/man1
++ rm -f $(DESTDIR)$(PREFIX)/share/man/man1/mold.1.gz
++ gzip -9 $(DESTDIR)$(PREFIX)/share/man/man1/mold.1
+
+ uninstall:
+- rm -rf $(PREFIX)/bin/mold $(PREFIX)/share/man/man1/mold.1.gz \
+- $(PREFIX)/lib/mold
++ rm -rf $(DESTDIR)$(PREFIX)/bin/mold $(DESTDIR)$(PREFIX)/share/man/man1/mold.1.gz \
++ $(DESTDIR)$(PREFIX)/lib/mold
+
+ clean:
+ rm -f *.o *~ mold mold-wrapper.so
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..633105b05e13
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,31 @@
+# Template file for 'mold'
+pkgname=mold
+version=0.1.1
+revision=1
+build_style=gnu-makefile
+make_build_args="SYSTEM_MIMALLOC=1"
+hostmakedepends="clang"
+makedepends="mimalloc-devel openssl-devel xxHash-devel tbb-devel"
+short_desc="High performance drop-in replacement for existing Unix linkers"
+maintainer="Artur Sinila <freesoftware@logarithmus.dev>"
+license="AGPL-3.0-or-later"
+homepage="https://github.com/rui314/mold"
+changelog="https://github.com/rui314/mold/releases"
+distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
+checksum=43b18575334bc50ea4d4876806b4e15b3550fd92ff933a9de7b3c76d47f28684
+
+pre_build() {
+ # gcc 10.2 doesn't fully support C++20
+ export CXX=clang++
+ # "non-PIE executable found in PIE build" without these lines
+ CXXFLAGS+=" -fPIC"
+ LDFLAGS+=" -pie"
+}
+
+pre_install() {
+ vmkdir usr/bin
+}
+
+post_install() {
+ vlicense LICENSE
+}
next prev parent reply other threads:[~2021-06-29 21:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 0:38 [PR PATCH] " Logarithmus
2021-06-29 21:07 ` Logarithmus [this message]
2021-06-30 14:11 ` [PR PATCH] [Updated] [ci skip] " Logarithmus
2021-06-30 14:46 ` Logarithmus
2021-06-30 14:47 ` Logarithmus
2021-06-30 17:22 ` [ci skip] New package: mold-0.9.1 Chocimier
2021-07-01 0:29 ` Logarithmus
2021-07-01 0:32 ` [PR PATCH] [Updated] " Logarithmus
2021-07-01 11:00 ` [PR PATCH] [Closed]: " Logarithmus
2021-07-01 11:11 ` Logarithmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210629210733.Rjvyk8rs0xk095iTPXpoAwp6eU8L5WyEhG8uuXJRWec@z \
--to=logarithmus@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).