From nobody Tue Feb 08 19:20:07 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3851219A4F39; Tue, 8 Feb 2022 19:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JtXs36Fndz4dFD; Tue, 8 Feb 2022 19:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644348008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFCddz5hwVZWLhl2edYupNTUukmlIDLYMTp2Y8OmL04=; b=s2hcKDH2akUB65dAhlvGtPjPspU47KFtd9ZdD5BN5LlsVZSTuJ5dt1mno95ty9bMucbe1G eCcZFpnzLaig0SGlvvXY9+gIM8YDBlOEVzx94VoXPhssLYwBG1pbzyYuFlcE5Cqlm/ZSLd 4Hf4/zX/qx0Sc/NetDIZKVkOkw/fsy4f3niDvoQ6AX6Auufwi8FtmzaWyxUqUFSb9hDkmB szX7NzrbXFAYfzFxpbs8+3RyHlVTR7IXsjxuhQdg0pP1+IKG6XJewyELhRsEGAF6KIlyG/ YlJHch1DTZg2INtO0FZnM1BageoBpZOqlh26V47w66IlETynfprNgpfwq4mTHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 947211EEE7; Tue, 8 Feb 2022 19:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 218JK7P8045642; Tue, 8 Feb 2022 19:20:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 218JK7Yl045638; Tue, 8 Feb 2022 19:20:07 GMT (envelope-from git) Date: Tue, 8 Feb 2022 19:20:07 GMT Message-Id: <202202081920.218JK7Yl045638@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ashish SHUKLA Subject: git: 169f8a47c955 - main - devel/mold: New port: A Modern Linker List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ashish X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 169f8a47c95518b2001f322c63ffaee2011292c0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644348008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFCddz5hwVZWLhl2edYupNTUukmlIDLYMTp2Y8OmL04=; b=tSAPhcSAtczQTe9NEApBap3kmCr4G1xMnCsMtCnl12LfeQps7W/X3zSP9I6dkdj72jIaj1 Gz/8Ec7uWpkPWVzR6VjKQQUFZW1EbLd635o0kBLn1UtatqtSZLiwg7KSvgdW692gu0ewEe PdREdbdNz8BVpWd84RLTamQQFbRZ9QWYFyHFdsfgVC3F712hnvcAvvHuiBi5kctrPpB2vU BRHWd/syPmZDtlbJ/KLK3r1uMgOSes1w856gc3k6ilCcEnk4XQkvBrNQUh/Vfk3mTAkgCP nS1cfDHLKEGFUnVT2OenMDKqt3hXzyNkSu1ZitUF1UoBHq5Ad3AGPTE0+sv/rQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644348008; a=rsa-sha256; cv=none; b=nZjihrryzrzjsQ4I0YkR2TbYpLMGcO3EudEUOJwTjGFKyYmIQXAPBsrvUjQZSETZ7oj/8b Q4U9muqwG0QnegL3Aq1m8ZFGDTxgykwcy3u/p9U4r1o1vPNEdm14pbf3vx6zIUVqaYZMXr N40UvrqYRnWFYitb+WehM6ihGZLfr7qPiKxWtLgvTH7f4kySVgbeQ2U35G6gCu3NghcqM6 1xsHRB0dP+s0dmPc+ro9ODMHJ6tJULQrek5mo73g5Zjb9TRQw0Ohg9OZvy1qnlzo8UF6pY a0qvXrS0l0BY0EW9iHRU7ZpwK/OfThKhU+HL8Ff8MNX8gaGkg32atARuKlNJSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ashish: URL: https://cgit.FreeBSD.org/ports/commit/?id=169f8a47c95518b2001f322c63ffaee2011292c0 commit 169f8a47c95518b2001f322c63ffaee2011292c0 Author: Ashish SHUKLA AuthorDate: 2022-02-08 17:30:54 +0000 Commit: Ashish SHUKLA CommitDate: 2022-02-08 19:19:34 +0000 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 --- devel/Makefile | 1 + devel/mold/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ devel/mold/distinfo | 3 +++ devel/mold/files/patch-Makefile | 28 ++++++++++++++++++++++++++++ devel/mold/pkg-descr | 7 +++++++ 5 files changed, 78 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 066ea28b57b3..70da30fcc9de 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1582,6 +1582,7 @@ SUBDIR += mm SUBDIR += mm-common SUBDIR += modd + SUBDIR += mold SUBDIR += mongo-c-driver SUBDIR += mono-addins SUBDIR += monotone diff --git a/devel/mold/Makefile b/devel/mold/Makefile new file mode 100644 index 000000000000..c74543a046bc --- /dev/null +++ b/devel/mold/Makefile @@ -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 diff --git a/devel/mold/distinfo b/devel/mold/distinfo new file mode 100644 index 000000000000..b435216c3d8b --- /dev/null +++ b/devel/mold/distinfo @@ -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 diff --git a/devel/mold/files/patch-Makefile b/devel/mold/files/patch-Makefile new file mode 100644 index 000000000000..dbe3a8d94b87 --- /dev/null +++ b/devel/mold/files/patch-Makefile @@ -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 diff --git a/devel/mold/pkg-descr b/devel/mold/pkg-descr new file mode 100644 index 000000000000..2fe2c051957c --- /dev/null +++ b/devel/mold/pkg-descr @@ -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