Package Details: mold-git 2.33.0.r56.ged4cae93-1

Git Clone URL: https://aur.archlinux.org/mold-git.git (read-only, click to copy)
Package Base: mold-git
Description: A Modern Linker
Upstream URL: https://github.com/rui314/mold
Keywords: ld.mold linker mold
Licenses: MIT
Conflicts: mold
Provides: mold
Submitter: xyproto
Maintainer: bin (ptr1337)
Last Packager: ptr1337
Votes: 6
Popularity: 0.000001
First Submitted: 2021-02-23 11:05 (UTC)
Last Updated: 2024-08-25 18:36 (UTC)

Required by (78)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

bin commented on 2022-02-14 16:40 (UTC)

@octylFractal Right, the community package ought to cover it. I've added git to makedepends per your request; thanks for bringing it to my attention.

octylFractal commented on 2022-02-14 05:52 (UTC) (edited on 2022-02-14 06:08 (UTC) by octylFractal)

@bin nesk_aur is requesting a non-git package that is versioned, e.g. a "mold" package that would currently be at version 1.0.3, and not use the latest commits. Edit: I see now that community ships this already, so there's no point in making one in the AUR.

On another note, I would appreciate it if you added git to the makedepends of this package, as it is not part of base-devel.

bin commented on 2022-01-01 05:54 (UTC)

@nesk_aur This should work on the 1.0 and up git; what do you mean by a "separate package"?

bin commented on 2022-01-01 05:53 (UTC)

@SemenMartynov This should build on the latest now.

SemenMartynov commented on 2021-12-18 08:45 (UTC)

Please make update to the version 1.0.0 https://github.com/rui314/mold/tree/v1.0.0

nesk_aur commented on 2021-12-18 02:58 (UTC)

Will you create a separate stable package now that 1.0 is out please?

jeker commented on 2021-12-17 14:33 (UTC) (edited on 2021-12-17 14:33 (UTC) by jeker)

I'm currently using the following patch:

  • Set correct license
  • Use tbb library as a dependency
  • Install to /usr prefix (instead of /usr/local)
  • Remove obsolete symlinking
  • Quote paths in 'cd' to prevent globbing and word splitting

Possible further improvements:

  • Use a variable for additional make flags
diff --git a/PKGBUILD b/PKGBUILD
index 87e9946..697369f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,27 +4,24 @@ pkgrel=1
 pkgdesc="Fast linker"
 arch=(x86_64)
 url="https://github.com/rui314/mold"
-license=("unknown")
-depends=(xxhash mimalloc gcc-libs openssl zlib)
+license=("AGPL3")
+depends=(xxhash mimalloc tbb gcc-libs openssl zlib)
 makedepends=(clang cmake git)
 source=("mold::git+https://github.com/rui314/mold")
 sha256sums=("SKIP")
 reponame="mold"

 pkgver() {
-   cd $srcdir/$reponame
+   cd "$srcdir/$reponame"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
 }

 build() {
-   cd $reponame
-   make -C "${srcdir}/${reponame}" -j "$(nproc)" LTO=1 SYSTEM_MIMALLOC=1
+   cd "$srcdir/$reponame"
+   make PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1
 }

 package() {
-   cd $reponame
-   make -C "${srcdir}/${reponame}" LTO=1 SYSTEM_MIMALLOC=1 DESTDIR="${pkgdir}" install
-   ln -snf mold "${pkgdir}/usr/bin/ld.mold"
-   # Mold checks for the lib alongside itself, which is rather silly
-   cp "${pkgdir}/usr/lib/mold/mold-wrapper.so" "${pkgdir}/usr/bin"
+   cd "$srcdir/$reponame"
+   make PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 DESTDIR="${pkgdir}" install
 }

edub4rt commented on 2021-12-11 12:17 (UTC)

The build is failing with:

ln: failed to create symbolic link '/tmp/yaytmp-1000/mold-git/pkg/mold-git/usr/bin/ld.mold': No such file or directory

using make with PREFIX=/usr parameter should fix it

s0lst1ce commented on 2021-08-14 12:20 (UTC)

Looking at the PKGBUILD it seems to only copy mold to usr/bin when, at the very least, mold-wrapper.so should be copied as well for mold to be used.

somebody commented on 2021-06-12 01:30 (UTC)

actually, might be worth trying to copy build process from the readme