devel/mold: New port: A Modern Linker
mold is a faster drop-in replacement for existing Unix linkers. It is several times faster than LLVM lld linker, the second-fastest open-source linker which I originally created a few years ago. mold is created for increasing developer productivity by reducing build time especially in rapid debug-edit-rebuild cycles. WWW: https://github.com/rui314/mold
This commit is contained in:
parent
f0507682f6
commit
169f8a47c9
5 changed files with 78 additions and 0 deletions
|
@ -1582,6 +1582,7 @@
|
|||
SUBDIR += mm
|
||||
SUBDIR += mm-common
|
||||
SUBDIR += modd
|
||||
SUBDIR += mold
|
||||
SUBDIR += mongo-c-driver
|
||||
SUBDIR += mono-addins
|
||||
SUBDIR += monotone
|
||||
|
|
39
devel/mold/Makefile
Normal file
39
devel/mold/Makefile
Normal file
|
@ -0,0 +1,39 @@
|
|||
PORTNAME= mold
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.0.3
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= ashish@FreeBSD.org
|
||||
COMMENT= Modern Linker
|
||||
|
||||
LICENSE= AGPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
NOT_FOR_ARCHS= armhf armv7 i386
|
||||
|
||||
LIB_DEPENDS= libtbb.so:devel/onetbb \
|
||||
libmimalloc.so:devel/mimalloc
|
||||
|
||||
USES= gmake ssl
|
||||
MAKE_ENV+= SYSTEM_TBB=1
|
||||
MAKE_ENV+= SYSTEM_MIMALLOC=1
|
||||
MAKE_ENV+= STRIP_CMD=${STRIP_CMD}
|
||||
CXXFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
MAKE_FLAGS+= "CXXFLAGS=${CXXFLAGS}"
|
||||
MAKE_FLAGS+= "LDFLAGS=${LDFLAGS}"
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= rui314
|
||||
PLIST_FILES= bin/ld.mold \
|
||||
bin/ld64.mold \
|
||||
bin/mold \
|
||||
lib/mold/mold-wrapper.so \
|
||||
libexec/mold/ld \
|
||||
share/man/man1/mold.1.gz
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
|
||||
${WRKSRC}/Makefile
|
||||
|
||||
.include <bsd.port.mk>
|
3
devel/mold/distinfo
Normal file
3
devel/mold/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1644335355
|
||||
SHA256 (rui314-mold-v1.0.3_GH0.tar.gz) = 488c12058b4c7c77bff94c6f919e40b2f12c304214e2e0d7d4833c21167837c0
|
||||
SIZE (rui314-mold-v1.0.3_GH0.tar.gz) = 4501162
|
28
devel/mold/files/patch-Makefile
Normal file
28
devel/mold/files/patch-Makefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- Makefile.orig 2022-02-08 16:00:48 UTC
|
||||
+++ Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
-PREFIX = /usr/local
|
||||
+PREFIX = %%PREFIX%%
|
||||
BINDIR = $(PREFIX)/bin
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
LIBEXECDIR = $(PREFIX)/libexec
|
||||
@@ -18,7 +18,7 @@ endif
|
||||
|
||||
# If you want to keep symbols in the installed binary, run make with
|
||||
# `STRIP=true` to run /bin/true instead of the strip command.
|
||||
-STRIP = strip
|
||||
+STRIP = $(STRIP_CMD)
|
||||
|
||||
SRCS=$(wildcard *.cc elf/*.cc macho/*.cc)
|
||||
HEADERS=$(wildcard *.h elf/*.h macho/*.h)
|
||||
@@ -99,8 +99,8 @@ endif
|
||||
|
||||
# Use pkg-config to know where libcrypto resides.
|
||||
ifneq ($(OS), Darwin)
|
||||
- MOLD_CXXFLAGS += $(shell pkg-config --cflags-only-I openssl)
|
||||
- MOLD_LDFLAGS += $(shell pkg-config --libs-only-L openssl) -lcrypto
|
||||
+ MOLD_CXXFLAGS += -I${OPENSSLINC}
|
||||
+ MOLD_LDFLAGS += -L${OPENSSLLIB} -lcrypto
|
||||
endif
|
||||
|
||||
# '-latomic' flag is needed building on riscv64 system
|
7
devel/mold/pkg-descr
Normal file
7
devel/mold/pkg-descr
Normal file
|
@ -0,0 +1,7 @@
|
|||
mold is a faster drop-in replacement for existing Unix linkers. It
|
||||
is several times faster than LLVM lld linker, the second-fastest
|
||||
open-source linker which I originally created a few years ago.
|
||||
mold is created for increasing developer productivity by reducing
|
||||
build time especially in rapid debug-edit-rebuild cycles.
|
||||
|
||||
WWW: https://github.com/rui314/mold
|
Loading…
Reference in a new issue