pkgsrc/devel/lldb/Makefile

92 lines
2.5 KiB
Makefile
Raw Normal View History

2019-10-24 13:52:20 +02:00
# $NetBSD: Makefile,v 1.24 2019/10/24 11:52:21 tnn Exp $
lld: updated to 9.0.0 9.0.0: Non-comprehensive list of changes in this release ELF Improvements ld.lld now has typo suggestions for flags: $ ld.lld --call-shared now prints unknown argument '--call-shared', did you mean '--call_shared'. --allow-shlib-undefined and --no-allow-shlib-undefined options are added. --no-allow-shlib-undefined is the default for executables. -nmagic and -omagic options are fully supported. Segment layout has changed. PT_GNU_RELRO, which was previously placed in the middle of readable/writable PT_LOAD segments, is now placed at the beginning of them. This change permits lld-produced ELF files to be read correctly by GNU strip older than 2.31, which has a bug to discard a PT_GNU_RELRO in the former layout. -z common-page-size is supported. Diagnostics messages have improved. A new flag --vs-diagnostics alters the format of diagnostic output to enable source hyperlinks in Microsoft Visual Studio IDE. Linker script compatibility with GNU BFD linker has generally improved. The clang --dependent-library form of autolinking is supported. This feature is added to implement the Windows-style autolinking for Unix. On Unix, in order to use a library, you usually have to include a header file provided by the library and then explicitly link the library with the linker -l option. On Windows, header files usually contain pragmas that list needed libraries. Compilers copy that information to object files, so that linkers can automatically link needed libraries. --dependent-library is added for implementing that Windows semantics on Unix. AArch64 BTI and PAC are supported. lld now supports replacing JAL with JALX instructions in case of MIPS-microMIPS cross-mode jumps. lld now creates LA25 thunks for MIPS R6 code. Put MIPS-specific .reginfo, .MIPS.options, and .MIPS.abiflags sections into corresponding PT_MIPS_REGINFO, PT_MIPS_OPTIONS, and PT_MIPS_ABIFLAGS segments. The quality of RISC-V and PowerPC ports have greatly improved. Many applications can now be linked by lld. PowerPC64 is now almost production ready. The Linux kernel for arm32_7, arm64, ppc64le and x86_64 can now be linked by lld. x86-64 TLSDESC is supported. DF_STATIC_TLS flag is set for i386 and x86-64 when needed. The experimental partitioning feature is added to allow a program to be split into multiple pieces. The feature allows you to semi-automatically split a single program into multiple ELF files called “partitions”. Since all partitions share the same memory address space and don’t use PLT/GOT, split programs run as fast as regular programs. With the mechanism, you can start a program only with a “main” partition and load remaining partitions on-demand. For example, you can split a web browser into a main partition and a PDF reader sub-partition and load the PDF reader partition only when a user tries to open a PDF file. See the documentation for more information. If “-” is given as an output filename, lld writes the final result to the standard output. Previously, it created a file “-” in the current directory. -z ifunc-noplt option is added to reduce IFunc function call overhead in a freestanding environment such as the OS kernel. Functions resolved by the IFunc mechanism are usually dispatched via PLT and thus slower than regular functions because of the cost of indirection. With -z ifunc-noplt, you can eliminate it by doing text relocations at load-time. You need a special loader to utilize this feature. This feature is added for the FreeBSD kernel but can be used by any operating systems. --undefined-glob option is added. The new option is an extension to --undefined to take a glob pattern instead of a single symbol name. COFF Improvements Like the ELF driver, lld-link now has typo suggestions for flags. lld-link now correctly reports duplicate symbol errors for object files that were compiled with /Gy. lld-link now correctly reports duplicate symbol errors when several resource (.res) input files define resources with the same type, name and language. This can be demoted to a warning using /force:multipleres. lld-link now rejects more than one resource object input files, matching link.exe. Previously, lld-link would silently ignore all but one. If you hit this: Don’t pass resource object files to the linker, instead pass res files to the linker directly. Don’t put resource files in static libraries, pass them on the command line. Having more than two /natvis: now works correctly; it used to not work for larger binaries before. Undefined symbols are now printed only in demangled form. Pass /demangle:no to see raw symbol names instead. Several speed and memory usage improvements. lld-link now supports resource object files created by GNU windres and MS cvtres, not only llvm-cvtres. The generated thunks for delayimports now share the majority of code among thunks, significantly reducing the overhead of using delayimport. IMAGE_REL_ARM{,64}_REL32 relocations are supported. Range extension thunks for AArch64 are now supported, so lld can create large executables for Windows/ARM64. The following flags have been added: /functionpadmin WebAssembly Improvements Imports from custom module names are supported. Symbols that are in llvm.used are now exported by default. Initial support for PIC and dynamic linking has landed. wasm-ld now add __start_/__stop_ symbols for data sections. wasm-ld now doesn’t report an error on archives without a symbol index. The following flags have been added: --emit-relocs MinGW Improvements lld now correctly links crtend.o as the last object file, handling terminators for the sections such as .eh_frame properly, fixing DWARF exception handling with libgcc and gcc’s crtend.o. lld now also handles DWARF unwind info generated by GCC, when linking with libgcc. PDB output can be requested without manually specifying the PDB file name, with the new option -pdb= with an empty value to the option. (The old existing syntax -pdb <filename> was more cumbersome to use with an empty parameter value.) --no-insert-timestamp option is added as an alias to /timestamp:0. Many more GNU ld options are now supported, which e.g. allows the lld MinGW frontend to be called by GCC. The following options are added: --exclude-all-symbols, --appcontainer, --undefined
2019-10-19 16:01:36 +02:00
DISTNAME= lldb-9.0.0.src
2019-10-24 13:52:20 +02:00
PKGREVISION= 1
PKGNAME= ${DISTNAME:S/.src//}
CATEGORIES= lang devel
lld: updated to 9.0.0 9.0.0: Non-comprehensive list of changes in this release ELF Improvements ld.lld now has typo suggestions for flags: $ ld.lld --call-shared now prints unknown argument '--call-shared', did you mean '--call_shared'. --allow-shlib-undefined and --no-allow-shlib-undefined options are added. --no-allow-shlib-undefined is the default for executables. -nmagic and -omagic options are fully supported. Segment layout has changed. PT_GNU_RELRO, which was previously placed in the middle of readable/writable PT_LOAD segments, is now placed at the beginning of them. This change permits lld-produced ELF files to be read correctly by GNU strip older than 2.31, which has a bug to discard a PT_GNU_RELRO in the former layout. -z common-page-size is supported. Diagnostics messages have improved. A new flag --vs-diagnostics alters the format of diagnostic output to enable source hyperlinks in Microsoft Visual Studio IDE. Linker script compatibility with GNU BFD linker has generally improved. The clang --dependent-library form of autolinking is supported. This feature is added to implement the Windows-style autolinking for Unix. On Unix, in order to use a library, you usually have to include a header file provided by the library and then explicitly link the library with the linker -l option. On Windows, header files usually contain pragmas that list needed libraries. Compilers copy that information to object files, so that linkers can automatically link needed libraries. --dependent-library is added for implementing that Windows semantics on Unix. AArch64 BTI and PAC are supported. lld now supports replacing JAL with JALX instructions in case of MIPS-microMIPS cross-mode jumps. lld now creates LA25 thunks for MIPS R6 code. Put MIPS-specific .reginfo, .MIPS.options, and .MIPS.abiflags sections into corresponding PT_MIPS_REGINFO, PT_MIPS_OPTIONS, and PT_MIPS_ABIFLAGS segments. The quality of RISC-V and PowerPC ports have greatly improved. Many applications can now be linked by lld. PowerPC64 is now almost production ready. The Linux kernel for arm32_7, arm64, ppc64le and x86_64 can now be linked by lld. x86-64 TLSDESC is supported. DF_STATIC_TLS flag is set for i386 and x86-64 when needed. The experimental partitioning feature is added to allow a program to be split into multiple pieces. The feature allows you to semi-automatically split a single program into multiple ELF files called “partitions”. Since all partitions share the same memory address space and don’t use PLT/GOT, split programs run as fast as regular programs. With the mechanism, you can start a program only with a “main” partition and load remaining partitions on-demand. For example, you can split a web browser into a main partition and a PDF reader sub-partition and load the PDF reader partition only when a user tries to open a PDF file. See the documentation for more information. If “-” is given as an output filename, lld writes the final result to the standard output. Previously, it created a file “-” in the current directory. -z ifunc-noplt option is added to reduce IFunc function call overhead in a freestanding environment such as the OS kernel. Functions resolved by the IFunc mechanism are usually dispatched via PLT and thus slower than regular functions because of the cost of indirection. With -z ifunc-noplt, you can eliminate it by doing text relocations at load-time. You need a special loader to utilize this feature. This feature is added for the FreeBSD kernel but can be used by any operating systems. --undefined-glob option is added. The new option is an extension to --undefined to take a glob pattern instead of a single symbol name. COFF Improvements Like the ELF driver, lld-link now has typo suggestions for flags. lld-link now correctly reports duplicate symbol errors for object files that were compiled with /Gy. lld-link now correctly reports duplicate symbol errors when several resource (.res) input files define resources with the same type, name and language. This can be demoted to a warning using /force:multipleres. lld-link now rejects more than one resource object input files, matching link.exe. Previously, lld-link would silently ignore all but one. If you hit this: Don’t pass resource object files to the linker, instead pass res files to the linker directly. Don’t put resource files in static libraries, pass them on the command line. Having more than two /natvis: now works correctly; it used to not work for larger binaries before. Undefined symbols are now printed only in demangled form. Pass /demangle:no to see raw symbol names instead. Several speed and memory usage improvements. lld-link now supports resource object files created by GNU windres and MS cvtres, not only llvm-cvtres. The generated thunks for delayimports now share the majority of code among thunks, significantly reducing the overhead of using delayimport. IMAGE_REL_ARM{,64}_REL32 relocations are supported. Range extension thunks for AArch64 are now supported, so lld can create large executables for Windows/ARM64. The following flags have been added: /functionpadmin WebAssembly Improvements Imports from custom module names are supported. Symbols that are in llvm.used are now exported by default. Initial support for PIC and dynamic linking has landed. wasm-ld now add __start_/__stop_ symbols for data sections. wasm-ld now doesn’t report an error on archives without a symbol index. The following flags have been added: --emit-relocs MinGW Improvements lld now correctly links crtend.o as the last object file, handling terminators for the sections such as .eh_frame properly, fixing DWARF exception handling with libgcc and gcc’s crtend.o. lld now also handles DWARF unwind info generated by GCC, when linking with libgcc. PDB output can be requested without manually specifying the PDB file name, with the new option -pdb= with an empty value to the option. (The old existing syntax -pdb <filename> was more cumbersome to use with an empty parameter value.) --no-insert-timestamp option is added as an alias to /timestamp:0. Many more GNU ld options are now supported, which e.g. allows the lld MinGW frontend to be called by GCC. The following options are added: --exclude-all-symbols, --appcontainer, --undefined
2019-10-19 16:01:36 +02:00
MASTER_SITES= http://releases.llvm.org/${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tar.xz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://lldb.org/
COMMENT= Next generation, high-performance debugger
2019-10-24 13:52:20 +02:00
LICENSE= apache-2.0
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
DEPENDS+= llvm-${PKGVERSION_NOREV}{,nb*}:../../lang/llvm
DEPENDS+= clang-${PKGVERSION_NOREV}{,nb*}:../../lang/clang
DEPENDS+= swig3>=3.0:../../devel/swig3
DEPENDS+= ${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
CONFIGURE_DIRS= ${WRKDIR}/build
CMAKE_ARG_PATH= ${WRKSRC}
USE_CMAKE= yes
USE_LANGUAGES= c c++11
GCC_REQD+= 4.8
PY_PATCHPLIST= yes
CMAKE_ARGS+= -DLLVM_CONFIG=${LLVM_CONFIG_PATH}
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
2017-05-06 00:56:37 +02:00
CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CC:Q}
CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CXX:Q}
CMAKE_ARGS+= -DHAVE_CXX_ATOMICS64_WITHOUT_LIB=ON
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
CMAKE_ARGS+= -DLLDB_CODESIGN_IDENTITY=""
2017-05-06 00:56:37 +02:00
CMAKE_ARGS+= -DLLDB_USE_SYSTEM_SIX:BOOL=TRUE
CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm
2017-05-06 00:56:37 +02:00
REPLACE_PERL+= *.pl
REPLACE_PERL+= */*.pl
REPLACE_PERL+= */*/*.pl
REPLACE_PERL+= */*/*/*.pl
REPLACE_PERL+= */*/*/*/*.pl
REPLACE_PERL+= */*/*/*/*/*.pl
REPLACE_PERL+= scripts/sed-sources
2017-05-06 00:56:37 +02:00
REPLACE_PYTHON+= *.py
REPLACE_PYTHON+= */*.py
REPLACE_PYTHON+= */*/*.py
REPLACE_PYTHON+= */*/*/*.py
REPLACE_PYTHON+= */*/*/*/*.py
REPLACE_PYTHON+= */*/*/*/*/*.py
REPLACE_PYTHON+= */*/*/*/*/*/*.py
REPLACE_PYTHON+= */*/*/*/*/*/*/*.py
REPLACE_PYTHON+= scripts/shush
TEST_TARGET= check-lldb
#TEST_TARGET= check-lldb-unit # doesn't work in standalone build
#TEST_TARGET= check-lldb-single # check-lldb -j1
#TEST_TARGET= check-lldb-expr # unknown
TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/lib
.include "../../mk/bsd.prefs.mk"
PLIST_VARS+= posix
Changes 3.9.1: The LLVMContext gains a new runtime check (see LLVMContext::discardValueNames()) that can be set to discard Value names (other than GlobalValue). This is intended to be used in release builds by clients that are interested in saving CPU/memory as much as possible. There is no longer a “global context” available in LLVM, except for the C API. The autoconf build system has been removed in favor of CMake. LLVM 3.9 requires CMake 3.4.3 or later to build. For information about using CMake please see the documentation on Building LLVM with CMake. For information about the CMake language there is also a CMake Primer document available. C API functions LLVMParseBitcode, LLVMParseBitcodeInContext, LLVMGetBitcodeModuleInContext and LLVMGetBitcodeModule having been removed. LLVMGetTargetMachineData has been removed (use LLVMGetDataLayout instead). The C API function LLVMLinkModules has been removed. The C API function LLVMAddTargetData has been removed. The C API function LLVMGetDataLayout is deprecated in favor of LLVMGetDataLayoutStr. The C API enum LLVMAttribute and associated API is deprecated in favor of the new LLVMAttributeRef API. The deprecated functions are LLVMAddFunctionAttr, LLVMAddTargetDependentFunctionAttr, LLVMRemoveFunctionAttr, LLVMGetFunctionAttr, LLVMAddAttribute, LLVMRemoveAttribute, LLVMGetAttribute, LLVMAddInstrAttribute, LLVMRemoveInstrAttribute and LLVMSetInstrParamAlignment. TargetFrameLowering::eliminateCallFramePseudoInstr now returns an iterator to the next instruction instead of void. Targets that previously did MBB.erase(I); return; now probably want return MBB.erase(I);. SelectionDAGISel::Select now returns void. Out-of-tree targets will need to be updated to replace the argument node and remove any dead nodes in cases where they currently return an SDNode * from this interface. Added the MemorySSA analysis, which hopes to replace MemoryDependenceAnalysis. It should provide higher-quality results than MemDep, and be algorithmically faster than MemDep. Currently, GVNHoist (which is off by default) makes use of MemorySSA. The minimum density for lowering switches with jump tables has been reduced from 40% to 10% for functions which are not marked optsize (that is, compiled with -Os).
2017-01-05 12:54:32 +01:00
.if ${OPSYS} != "Darwin"
PLIST.posix= yes
Changes 3.9.1: The LLVMContext gains a new runtime check (see LLVMContext::discardValueNames()) that can be set to discard Value names (other than GlobalValue). This is intended to be used in release builds by clients that are interested in saving CPU/memory as much as possible. There is no longer a “global context” available in LLVM, except for the C API. The autoconf build system has been removed in favor of CMake. LLVM 3.9 requires CMake 3.4.3 or later to build. For information about using CMake please see the documentation on Building LLVM with CMake. For information about the CMake language there is also a CMake Primer document available. C API functions LLVMParseBitcode, LLVMParseBitcodeInContext, LLVMGetBitcodeModuleInContext and LLVMGetBitcodeModule having been removed. LLVMGetTargetMachineData has been removed (use LLVMGetDataLayout instead). The C API function LLVMLinkModules has been removed. The C API function LLVMAddTargetData has been removed. The C API function LLVMGetDataLayout is deprecated in favor of LLVMGetDataLayoutStr. The C API enum LLVMAttribute and associated API is deprecated in favor of the new LLVMAttributeRef API. The deprecated functions are LLVMAddFunctionAttr, LLVMAddTargetDependentFunctionAttr, LLVMRemoveFunctionAttr, LLVMGetFunctionAttr, LLVMAddAttribute, LLVMRemoveAttribute, LLVMGetAttribute, LLVMAddInstrAttribute, LLVMRemoveInstrAttribute and LLVMSetInstrParamAlignment. TargetFrameLowering::eliminateCallFramePseudoInstr now returns an iterator to the next instruction instead of void. Targets that previously did MBB.erase(I); return; now probably want return MBB.erase(I);. SelectionDAGISel::Select now returns void. Out-of-tree targets will need to be updated to replace the argument node and remove any dead nodes in cases where they currently return an SDNode * from this interface. Added the MemorySSA analysis, which hopes to replace MemoryDependenceAnalysis. It should provide higher-quality results than MemDep, and be algorithmically faster than MemDep. Currently, GVNHoist (which is off by default) makes use of MemorySSA. The minimum density for lowering switches with jump tables has been reduced from 40% to 10% for functions which are not marked optsize (that is, compiled with -Os).
2017-01-05 12:54:32 +01:00
.endif
.if ${OPSYS} == "NetBSD"
. if exists(/usr/include/panel.h)
CMAKE_ARGS+= -DLLDB_DISABLE_CURSES:BOOL=FALSE
. else
CMAKE_ARGS+= -DLLDB_DISABLE_CURSES:BOOL=TRUE
. endif
.endif
post-extract:
${MKDIR} ${WRKDIR}/build
#.include "../../devel/googletest/buildlink3.mk" # check-lldb-unit
.include "../../devel/libatomic_ops/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/clang/buildlink3.mk"
.include "../../lang/llvm/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
.include "../../lang/python/tool.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"