pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Used to update devel/lld



Module Name:	pkgsrc-wip
Committed By:	pin <voidpin%protonmail.com@localhost>
Pushed By:	pin
Date:		Wed Aug 3 13:08:16 2022 +0200
Changeset:	d43944c9cc90fcfae72dbfbdf3953824665522a0

Modified Files:
	Makefile
Added Files:
	lld/DESCR
	lld/Makefile
	lld/PLIST
	lld/buildlink3.mk
	lld/distinfo
	lld/options.mk
	lld/patches/patch-CMakeLists.txt
	lld/patches/patch-ELF_Config.h
	lld/patches/patch-ELF_Options.td

Log Message:
Used to update devel/lld

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d43944c9cc90fcfae72dbfbdf3953824665522a0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                         |  1 +
 lld/DESCR                        | 11 +++++++++
 lld/Makefile                     | 35 ++++++++++++++++++++++++++++
 lld/PLIST                        | 49 ++++++++++++++++++++++++++++++++++++++++
 lld/buildlink3.mk                | 14 ++++++++++++
 lld/distinfo                     |  8 +++++++
 lld/options.mk                   | 20 ++++++++++++++++
 lld/patches/patch-CMakeLists.txt | 16 +++++++++++++
 lld/patches/patch-ELF_Config.h   | 14 ++++++++++++
 lld/patches/patch-ELF_Options.td | 16 +++++++++++++
 10 files changed, 184 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 03055ebe75..a5749651a5 100644
--- a/Makefile
+++ b/Makefile
@@ -2267,6 +2267,7 @@ SUBDIR+=	litecoin
 SUBDIR+=	litehtml
 SUBDIR+=	lives
 SUBDIR+=	lizardfs
+SUBDIR+=	lld
 SUBDIR+=	llilc-git
 SUBDIR+=	llvm
 SUBDIR+=	llvm-dfbsd
diff --git a/lld/DESCR b/lld/DESCR
new file mode 100644
index 0000000000..4b5b6daa5b
--- /dev/null
+++ b/lld/DESCR
@@ -0,0 +1,11 @@
+LLD is a linker from the LLVM project that is a drop-in replacement for system
+linkers and runs much faster than them. It also provides features that are
+useful for toolchain developers.
+
+The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS) and
+WebAssembly in descending order of completeness. Internally, LLD consists of
+several different linkers. The ELF port is the one that will be described in
+this document. The PE/COFF port is complete, including Windows debug info (PDB)
+support. The WebAssembly port is still a work in progress (See WebAssembly lld
+port). The Mach-O port is built based on a different architecture than
+the others. For the details about Mach-O, please read ATOM-based lld.
diff --git a/lld/Makefile b/lld/Makefile
new file mode 100644
index 0000000000..6d37837ef3
--- /dev/null
+++ b/lld/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.17 2021/12/19 13:51:37 ryoon Exp $
+
+.include "../../wip/llvm/version.mk"
+
+DISTNAME=	lld-${LLVM_VERSION}.src
+PKGNAME=	${DISTNAME:S/.src//}
+CATEGORIES=	devel
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://lld.llvm.org/
+COMMENT=	The LLVM Linker
+LICENSE=	apache-2.0
+
+USE_LANGUAGES=		c c++14
+USE_CMAKE=		yes
+GCC_REQD+=		4.8
+
+CONFIGURE_DIRS=		${WRKDIR}/build
+CMAKE_ARG_PATH=		${WRKSRC}
+
+CMAKE_ARGS+=		-DCMAKE_BUILD_TYPE=Release
+CMAKE_ARGS+=		-DCMAKE_C_COMPILER=${CC:Q}
+CMAKE_ARGS+=		-DCMAKE_CXX_COMPILER=${CXX:Q}
+
+PYTHON_FOR_BUILD_ONLY=	yes
+
+post-extract:
+	${MKDIR} ${WRKDIR}/build
+
+.include "options.mk"
+.include "../../wip/llvm/buildlink3.mk"
+.include "../../wip/libunwind/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../mk/atomic64.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lld/PLIST b/lld/PLIST
new file mode 100644
index 0000000000..b830411dd9
--- /dev/null
+++ b/lld/PLIST
@@ -0,0 +1,49 @@
+@comment $NetBSD$
+bin/ld.lld
+bin/ld64.lld
+bin/lld
+bin/lld-link
+bin/wasm-ld
+include/lld/Common/Args.h
+include/lld/Common/Arrays.h
+include/lld/Common/CommonLinkerContext.h
+include/lld/Common/DWARF.h
+include/lld/Common/Driver.h
+include/lld/Common/ErrorHandler.h
+include/lld/Common/Filesystem.h
+include/lld/Common/LLVM.h
+include/lld/Common/Memory.h
+include/lld/Common/Reproduce.h
+include/lld/Common/Strings.h
+include/lld/Common/TargetOptionsCommandFlags.h
+include/lld/Common/Timer.h
+include/lld/Common/Version.h
+include/lld/Core/AbsoluteAtom.h
+include/lld/Core/ArchiveLibraryFile.h
+include/lld/Core/Atom.h
+include/lld/Core/DefinedAtom.h
+include/lld/Core/Error.h
+include/lld/Core/File.h
+include/lld/Core/Instrumentation.h
+include/lld/Core/LinkingContext.h
+include/lld/Core/Node.h
+include/lld/Core/Pass.h
+include/lld/Core/PassManager.h
+include/lld/Core/Reader.h
+include/lld/Core/Reference.h
+include/lld/Core/Resolver.h
+include/lld/Core/SharedLibraryAtom.h
+include/lld/Core/SharedLibraryFile.h
+include/lld/Core/Simple.h
+include/lld/Core/SymbolTable.h
+include/lld/Core/UndefinedAtom.h
+include/lld/Core/Writer.h
+lib/cmake/lld/LLDConfig.cmake
+lib/cmake/lld/LLDTargets-release.cmake
+lib/cmake/lld/LLDTargets.cmake
+lib/liblldCOFF.a
+lib/liblldCommon.a
+lib/liblldELF.a
+lib/liblldMachO.a
+lib/liblldMinGW.a
+lib/liblldWasm.a
diff --git a/lld/buildlink3.mk b/lld/buildlink3.mk
new file mode 100644
index 0000000000..a63cdbaeb0
--- /dev/null
+++ b/lld/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.3 2019/12/29 15:31:21 adam Exp $
+
+BUILDLINK_TREE+=	lld
+
+.if !defined(LLD_BUILDLINK3_MK)
+LLD_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.lld+=	lld>=9.0.1
+BUILDLINK_PKGSRCDIR.lld?=	../../devel/lld
+
+.include "../../wip/llvm/buildlink3.mk"
+.endif	# LLD_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-lld
diff --git a/lld/distinfo b/lld/distinfo
new file mode 100644
index 0000000000..70ca6fe080
--- /dev/null
+++ b/lld/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.16 2022/02/03 20:38:40 adam Exp $
+
+BLAKE2s (lld-14.0.6.src.tar.xz) = 2fc265b616bbdbaeecc8385fda204dbc28b1d871d98f4b3b3cd5183c4d6eefc8
+SHA512 (lld-14.0.6.src.tar.xz) = fad97b441f9642b73edd240af2c026259de0951d5ace42779e9e0fcf5e417252a1d744e2fc51e754a45016621ba0c70088177f88695af1c6ce290dd26873b094
+Size (lld-14.0.6.src.tar.xz) = 1366180 bytes
+SHA1 (patch-CMakeLists.txt) = 32163a5bcd7d9456065e48ef6e6f0e2c3380a820
+SHA1 (patch-ELF_Config.h) = c449bf971088da671df5da507347fe8dc8c9da82
+SHA1 (patch-ELF_Options.td) = 22a1f293681b86a9aac87624efcfeeb20a4ba51c
diff --git a/lld/options.mk b/lld/options.mk
new file mode 100644
index 0000000000..ceaf154539
--- /dev/null
+++ b/lld/options.mk
@@ -0,0 +1,20 @@
+# $NetBSD: options.mk,v 1.1 2019/02/01 16:30:00 mgorny Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.lld
+PKG_SUPPORTED_OPTIONS=	tests
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mtests)
+DISTFILES+=		llvm-${PKGVERSION_NOREV}.src${EXTRACT_SUFX}
+CMAKE_ARGS+=		-DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q}
+CMAKE_ARGS+=		-DLLVM_INCLUDE_TESTS=ON
+CMAKE_ARGS+=		-DLLVM_BUILD_TESTS=ON
+CMAKE_ARGS+=		-DLLVM_MAIN_SRC_DIR=${WRKDIR}/llvm-${PKGVERSION_NOREV}.src
+CMAKE_ARGS+=		-DLLVM_EXTERNAL_LIT=${WRKDIR}/llvm-${PKGVERSION_NOREV}.src/utils/lit/lit.py
+REPLACE_PYTHON+=	${WRKDIR}/llvm-${PKGVERSION_NOREV}.src/utils/lit/lit.py
+TEST_TARGET=		check-lld  # failing tests fixed in 8.0
+TEST_ENV+=		LD_LIBRARY_PATH=${WRKDIR}/build/lib
+.else
+CMAKE_ARGS+=		-DLLVM_INCLUDE_TESTS=OFF
+.endif
diff --git a/lld/patches/patch-CMakeLists.txt b/lld/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..476b6cd8c4
--- /dev/null
+++ b/lld/patches/patch-CMakeLists.txt
@@ -0,0 +1,16 @@
+$NetBSD: patch-CMakeLists.txt,v 1.3 2021/07/12 18:47:15 adam Exp $
+
+LLD 7.0.1 is incompatible with gtest version in pkgsrc.  Remove
+the condition that prevents it from building its own copy when system
+version is installed.
+
+--- CMakeLists.txt.orig	2021-04-06 16:38:18.000000000 +0000
++++ CMakeLists.txt
+@@ -76,7 +76,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE
+       endif()
+       set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
+       if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
+-          AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
+           AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
+         add_subdirectory(${UNITTEST_DIR} utils/unittest)
+       endif()
diff --git a/lld/patches/patch-ELF_Config.h b/lld/patches/patch-ELF_Config.h
new file mode 100644
index 0000000000..75a291d934
--- /dev/null
+++ b/lld/patches/patch-ELF_Config.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-ELF_Config.h,v 1.8 2021/07/12 18:47:15 adam Exp $
+
+Add dummy option for an AArch64 erratum.
+
+--- ELF/Config.h.orig	2020-10-07 10:10:48.000000000 +0000
++++ ELF/Config.h
+@@ -156,6 +156,7 @@ struct Configuration {
+   bool enableNewDtags;
+   bool executeOnly;
+   bool exportDynamic;
++  bool fixCortexA53Errata835769;
+   bool fixCortexA53Errata843419;
+   bool fixCortexA8;
+   bool formatBinary = false;
diff --git a/lld/patches/patch-ELF_Options.td b/lld/patches/patch-ELF_Options.td
new file mode 100644
index 0000000000..985bef8b76
--- /dev/null
+++ b/lld/patches/patch-ELF_Options.td
@@ -0,0 +1,16 @@
+$NetBSD: patch-ELF_Options.td,v 1.4 2019/11/03 12:10:29 kamil Exp $
+
+Add dummy option for an AArch64 erratum.
+
+--- ELF/Options.td.orig	2019-07-17 14:54:02.000000000 +0000
++++ ELF/Options.td
+@@ -168,6 +168,9 @@ defm filter: Eq<"filter", "Set DT_FILTER
+ 
+ defm fini: Eq<"fini", "Specify a finalizer function">, MetaVarName<"<symbol>">;
+ 
++def fix_cortex_a53_835769: F<"fix-cortex-a53-835769">,
++  HelpText<"Apply fixes for AArch64 Cortex-A53 erratum 835769">;
++
+ def fix_cortex_a53_843419: F<"fix-cortex-a53-843419">,
+   HelpText<"Apply fixes for AArch64 Cortex-A53 erratum 843419">;
+ 


Home | Main Index | Thread Index | Old Index