Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153630083
D43718.id133810.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D43718.id133810.diff
View Options
Index: devel/mold/Makefile
===================================================================
--- devel/mold/Makefile
+++ devel/mold/Makefile
@@ -1,7 +1,7 @@
PORTNAME= mold
-DISTVERSIONPREFIX= v
-DISTVERSION= 1.2.1
-PORTREVISION= 6
+DISTVERSION= g20240203
+GH_TAGNAME= c9651d9
+PORTREVISION= 0
CATEGORIES= devel
MAINTAINER= ashish@FreeBSD.org
@@ -11,33 +11,48 @@
LICENSE= AGPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
-# see https://github.com/rui314/mold/issues/456
-BROKEN= broken with FreeBSD strip
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}"
+USES= cmake:noninja ssl localbase:ldflags
USE_GITHUB= yes
GH_ACCOUNT= rui314
+
+CMAKE_OFF= MOLD_USE_MOLD \
+ MOLD_USE_TSAN \
+ MOLD_MOSTLY_STATIC \
+ BUILD_TESTING \
+ MOLD_LTO
+
+CXXFLAGS+= -I${LOCALBASE}/include
+
+OPTIONS_DEFINE= TBB ASAN SYSZSTD
+TBB_DESC= Use Intel Threading Building Blocks from ports
+TBB_CMAKE_BOOL= MOLD_USE_SYSTEM_TBB
+TBB_LIB_DEPENDS=libtbb.so:devel/onetbb
+
+ASAN_DESC= Enable Address Sanitizer
+ASAN_CMAKE_BOOL=MOLD_USE_ASAN
+
+SYSZSTD_DESC= Use zstd from ports
+SYSZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd
+
+OPTIONS_SINGLE= MALLOC
+OPTIONS_SINGLE_MALLOC= SYSMALLOC MIMA MIMA_PORTS
+OPTIONS_DEFAULT=TBB SYSZSTD SYSMALLOC
+SYSMALLOC_CMAKE_ON= -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_SYSTEM_MIMALLOC=OFF
+SYSMALLOC_DESC= Use system default malloc
+MIMA_CMAKE_ON= -DMOLD_USE_MIMALLOC=ON -DMOLD_USE_SYSTEM_MIMALLOC=OFF
+MIMA_DESC= Use bundled mimalloc
+MIMA_PORTS_CMAKE_ON= -DMOLD_USE_MIMALLOC=ON -DMOLD_USE_SYSTEM_MIMALLOC=ON
+MIMA_PORTS_DESC=Use mimalloc from devel/mimalloc
+MIMA_PORTS_LIB_DEPENDS= libmimalloc.so:devel/mimalloc
+
PLIST_FILES= bin/ld.mold \
- bin/ld64.mold \
bin/mold \
lib/mold/mold-wrapper.so \
libexec/mold/ld \
+ share/man/man1/ld.mold.1.gz \
share/man/man1/mold.1.gz
-post-patch:
- ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
- ${WRKSRC}/Makefile
-
.include <bsd.port.mk>
Index: devel/mold/distinfo
===================================================================
--- devel/mold/distinfo
+++ devel/mold/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1651457801
-SHA256 (rui314-mold-v1.2.1_GH0.tar.gz) = 41868663ff18afee3fa35e5e3fdf3d9575eb2e4ff49967b8f42f479c61c1ec34
-SIZE (rui314-mold-v1.2.1_GH0.tar.gz) = 4669615
+TIMESTAMP = 1706985156
+SHA256 (rui314-mold-g20240203-c9651d9_GH0.tar.gz) = ce2048fabd1fad7a75dda48d4942c621d11ea427ca25ad2e0eaa75bd73655f67
+SIZE (rui314-mold-g20240203-c9651d9_GH0.tar.gz) = 9987620
Index: devel/mold/files/patch-Makefile
===================================================================
--- devel/mold/files/patch-Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
---- Makefile.orig 2022-04-28 09:51:29 UTC
-+++ Makefile
-@@ -4,7 +4,7 @@
-
- VERSION = 1.2.1
-
--PREFIX = /usr/local
-+PREFIX = %%PREFIX%%
- BINDIR = $(PREFIX)/bin
- LIBDIR = $(PREFIX)/lib
- LIBEXECDIR = $(PREFIX)/libexec
-@@ -27,7 +27,7 @@ PKG_CONFIG = pkg-config
-
- # 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)
- OBJS = $(SRCS:%.cc=out/%.o)
-@@ -103,8 +103,8 @@ ifneq ($(OS), Darwin)
- endif
-
- ifeq ($(NEEDS_LIBCRYPTO), 1)
-- 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
-@@ -205,11 +205,7 @@ install: all
-
- $(INSTALL) -d $D$(LIBEXECDIR)/mold
-
--# We want to make a symblink with a relative path, so that users can
--# move the entire directory to other place without breaking the reference.
--# GNU ln supports `--relative` to do that, but that's not supported by
--# non-GNU systems. So we use Python to compute a relative path.
-- ln -sf `python3 -c "import os.path; print(os.path.relpath('$(BINDIR)/mold', '$(LIBEXECDIR)/mold'))"` $D$(LIBEXECDIR)/mold/ld
-+ ln -sf ../../bin/mold $D$(LIBEXECDIR)/mold/ld
-
- $(INSTALL) -d $D$(MANDIR)/man1
- $(INSTALL_DATA) docs/mold.1 $D$(MANDIR)/man1
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 23, 11:51 AM (19 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32025315
Default Alt Text
D43718.id133810.diff (4 KB)
Attached To
Mode
D43718: Update mold to 2.4.0
Attached
Detach File
Event Timeline
Log In to Comment