mold: initial package 1.5.1

This commit is contained in:
SupervisedThinking 2022-09-29 14:51:33 +02:00
parent d6fe335e23
commit 0d5fd365fb
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,23 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="mold"
PKG_VERSION="1.5.1"
PKG_SHA256="ec94aa74758f1bc199a732af95c6304ec98292b87f2f4548ce8436a7c5b054a1"
PKG_LICENSE="AGPL-3.0-or-later"
PKG_SITE="https://github.com/rui314/mold"
PKG_URL="https://github.com/rui314/mold/archive/refs/tags/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="cmake:host zlib:host zstd:host openssl:host tbb:host mimalloc:host"
PKG_LONGDESC="mold is a faster drop-in replacement for existing Unix linkers"
PKG_CMAKE_OPTS_HOST="-DCMAKE_INSTALL_LIBDIR="${TOOLCHAIN}/${TARGET_NAME}/lib"
-DCMAKE_INSTALL_BINDIR="${TARGET_NAME}/bin" \
-DCMAKE_INSTALL_LIBEXECDIR="${TARGET_NAME}" \
-DMOLD_LTO=ON \
-DMOLD_MOSTLY_STATIC=ON \
-DMOLD_USE_SYSTEM_MIMALLOC=ON \
-DMOLD_USE_SYSTEM_TBB=ON"
post_makeinstall_host() {
ln -sf ${TOOLCHAIN}/${TARGET_NAME}/bin/mold ${TARGET_PREFIX}ld.mold
}

View File

@ -0,0 +1,24 @@
From f7f2ef6182d058f7c58401d9278aa3136cb996f5 Mon Sep 17 00:00:00 2001
From: SupervisedThinking <supervisedthinking@gmail.com>
Date: Thu, 29 Sep 2022 11:49:57 +0200
Subject: [PATCH] CMakeLists: allow custom mold binary install path
- https://cmake.org/cmake/help/latest/command/install.html
- ${CMAKE_INSTALL_BINDIR} defaults to bin if not set
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7136cf2b..4542f915 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -287,7 +287,7 @@ if(BUILD_TESTING)
endif()
if(NOT CMAKE_SKIP_INSTALL_RULES)
- install(TARGETS mold RUNTIME DESTINATION bin)
+ install(TARGETS mold RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES docs/mold.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
install(CODE "