diff --git a/devel/llvm/Makefile b/devel/llvm/Makefile index 7b51fad7979..d8c96ee2183 100644 --- a/devel/llvm/Makefile +++ b/devel/llvm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.287 2021/11/22 18:29:08 jca Exp $ +# $OpenBSD: Makefile,v 1.288 2022/01/03 21:33:51 jca Exp $ # XXX If broken on an architecture, remove the arch from LLVM_ARCHS. ONLY_FOR_ARCHS = ${LLVM_ARCHS} @@ -11,23 +11,19 @@ COMMENT-python = Python bindings for Clang # XXX: Remember to bump MODCLANG_VERSION in lang/clang/clang.port.mk when # updating this port. -LLVM_V = 11.1.0 +LLVM_V = 13.0.0 DISTNAME = llvm-${LLVM_V}.src PKGNAME = llvm-${LLVM_V} PKGSPEC-main = llvm-=${LLVM_V} PKGNAME-python = py3-llvm-${LLVM_V} PKGNAME-lldb = lldb-${LLVM_V} -REVISION-main = 9 -REVISION-lldb = 1 -# XXX -main depends on python, is that right? -REVISION-python = 1 CATEGORIES = devel -SHARED_LIBS = clang 8.1 \ - clang-cpp 0.0 \ - lldb 2.0 \ - LTO 6.0 \ +SHARED_LIBS = clang 8.2 \ + clang-cpp 1.0 \ + lldb 3.0 \ + LTO 6.1 \ Remarks 0.0 # packager notes in http://llvm.org/docs/Packaging.html @@ -53,7 +49,9 @@ MODULES = devel/cmake \ MODPY_ADJ_FILES = tools/clang/tools/clang-format/git-clang-format \ tools/clang/tools/scan-view/bin/scan-view \ - tools/clang/utils/hmaptool/hmaptool + tools/clang/utils/hmaptool/hmaptool \ + tools/clang/tools/scan-build-py/bin/* \ + tools/clang/tools/scan-build-py/libexec/* TEST_DEPENDS = devel/dejagnu \ shells/bash @@ -91,7 +89,6 @@ CONFIGURE_ARGS = -DLLVM_ENABLE_FFI:Bool=False \ -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2:Bool=True \ -DLLVM_LINK_LLVM_DYLIB:Bool=True \ -DLLVM_BUILD_LLVM_DYLIB:Bool=True \ - -DEPYDOC_EXECUTABLE=EPYDOC_EXECUTABLE-NOTFOUND \ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \ -DCMAKE_DISABLE_FIND_PACKAGE_Backtrace:Bool=True \ -DLLDB_USE_SYSTEM_SIX=ON \ @@ -126,14 +123,24 @@ GCC_CONFIG = ${MACHINE_ARCH}-unknown-openbsd${OSREV} CLANG_INCLUDE_PATH = lib/clang/${LLVM_V}/include SUBST_VARS += CLANG_INCLUDE_PATH LLVM_V GCC_VER GCC_CONFIG +# hack to disable the use of -Bsymbolic-functions +.if ${PROPERTIES:Mlld} +OPENBSD_LD_IS_LLD = TRUE +.else +OPENBSD_LD_IS_LLD = FALSE +.endif +SUBST_VARS += OPENBSD_LD_IS_LLD + post-extract: mv ${WRKDIR}/clang-${LLVM_V}.src ${WRKSRC}/tools/clang mv ${WRKDIR}/lld-${LLVM_V}.src ${WRKSRC}/tools/lld mv ${WRKDIR}/lldb-${LLVM_V}.src ${WRKSRC}/tools/lldb pre-configure: - @${SUBST_CMD} ${WRKSRC}/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp \ - ${WRKSRC}/cmake/modules/LLVMProcessSources.cmake + @${SUBST_CMD} ${WRKSRC}/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp + @${SUBST_CMD} ${WRKSRC}/cmake/modules/LLVMProcessSources.cmake + @${SUBST_CMD} ${WRKSRC}/tools/clang/tools/clang-shlib/CMakeLists.txt + @${SUBST_CMD} ${WRKSRC}/tools/llvm-shlib/CMakeLists.txt -@ln -s ${MODPY_BIN} ${WRKDIR}/bin/python post-build: @@ -148,7 +155,10 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/tools/clang/bindings/python/clang/* \ ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/clang ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \ - ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/ + ${PREFIX}/lib/libear/ \ + ${PREFIX}/lib/libscanbuild/ \ + ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/ \ + ${PREFIX}/share/ ${INSTALL_DATA} ${WRKSRC}/docs/_build/man/* \ ${PREFIX}/man/man1 ${INSTALL_DATA} ${WRKSRC}/tools/clang/docs/_build/man/clang.1 \ diff --git a/devel/llvm/distinfo b/devel/llvm/distinfo index 1a2674648e5..d6a86871576 100644 --- a/devel/llvm/distinfo +++ b/devel/llvm/distinfo @@ -1,8 +1,8 @@ -SHA256 (clang-11.1.0.src.tar.xz) = CoKI8GXR9Xy22W2k0pZcvqMu3FcqqXLkZulU0XFIVYs= -SHA256 (lld-11.1.0.src.tar.xz) = AXp4jL4ezEqUmr8QdVhwUZCG0Fii6Z9DiCmu8k8MZs4= -SHA256 (lldb-11.1.0.src.tar.xz) = snNICrRtMuvWV1LpviKdqMeUDRWPoYX7IM/6VgJ4nu4= -SHA256 (llvm-11.1.0.src.tar.xz) = zoUI4xigGmPU6LMJCrLe08WYpQJYzEniYluRINTAPqU= -SIZE (clang-11.1.0.src.tar.xz) = 14850272 -SIZE (lld-11.1.0.src.tar.xz) = 1237068 -SIZE (lldb-11.1.0.src.tar.xz) = 9706580 -SIZE (llvm-11.1.0.src.tar.xz) = 38915280 +SHA256 (clang-13.0.0.src.tar.xz) = XWEcuwbPtmJr5G6y8j0AOyuA9AGCiY2qVLHE6LW54X4= +SHA256 (lld-13.0.0.src.tar.xz) = INGQC81k/2IEcpH27ba6L+0014JnX/aHE78ML8nmk4Y= +SHA256 (lldb-13.0.0.src.tar.xz) = JMZb1ewNfLw3uv3XUzsXgzUnCL9jOMQDpy9HiE5Abb0= +SHA256 (llvm-13.0.0.src.tar.xz) = QI0RcIZD6oJvUZ/3l2H838EtZBolECKe7EWecvgWMCA= +SIZE (clang-13.0.0.src.tar.xz) = 17846828 +SIZE (lld-13.0.0.src.tar.xz) = 1472476 +SIZE (lldb-13.0.0.src.tar.xz) = 9905788 +SIZE (llvm-13.0.0.src.tar.xz) = 45471992 diff --git a/devel/llvm/patches/patch-cmake_modules_GetLibraryName_cmake b/devel/llvm/patches/patch-cmake_modules_GetLibraryName_cmake new file mode 100644 index 00000000000..71a729dee0a --- /dev/null +++ b/devel/llvm/patches/patch-cmake_modules_GetLibraryName_cmake @@ -0,0 +1,16 @@ +$OpenBSD: patch-cmake_modules_GetLibraryName_cmake,v 1.1 2022/01/03 21:33:51 jca Exp $ + +Properly parse library suffixes on OpenBSD + +Index: cmake/modules/GetLibraryName.cmake +--- cmake/modules/GetLibraryName.cmake.orig ++++ cmake/modules/GetLibraryName.cmake +@@ -2,7 +2,7 @@ + function(get_library_name path name) + get_filename_component(path ${path} NAME) + set(prefixes ${CMAKE_FIND_LIBRARY_PREFIXES}) +- set(suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES}) ++ set(suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES} ".so.[0-9]+.[0-9]+") + list(FILTER prefixes EXCLUDE REGEX "^\\s*$") + list(FILTER suffixes EXCLUDE REGEX "^\\s*$") + if(prefixes) diff --git a/devel/llvm/patches/patch-include_llvm_BinaryFormat_Dwarf_def b/devel/llvm/patches/patch-include_llvm_BinaryFormat_Dwarf_def deleted file mode 100644 index ed755be13dd..00000000000 --- a/devel/llvm/patches/patch-include_llvm_BinaryFormat_Dwarf_def +++ /dev/null @@ -1,16 +0,0 @@ -$OpenBSD: patch-include_llvm_BinaryFormat_Dwarf_def,v 1.6 2021/05/13 23:54:24 jca Exp $ - -implement -msave-args in clang/llvm, like the sun did for gcc - -Index: include/llvm/BinaryFormat/Dwarf.def ---- include/llvm/BinaryFormat/Dwarf.def.orig -+++ include/llvm/BinaryFormat/Dwarf.def -@@ -393,6 +393,8 @@ HANDLE_DW_AT(0x2133, GNU_addr_base, 0, GNU) - HANDLE_DW_AT(0x2134, GNU_pubnames, 0, GNU) - HANDLE_DW_AT(0x2135, GNU_pubtypes, 0, GNU) - HANDLE_DW_AT(0x2136, GNU_discriminator, 0, GNU) -+// Sun Extension -+HANDLE_DW_AT(0x2224, SUN_amd64_parmdump, 0, GNU) - // Borland extensions. - HANDLE_DW_AT(0x3b11, BORLAND_property_read, 0, BORLAND) - HANDLE_DW_AT(0x3b12, BORLAND_property_write, 0, BORLAND) diff --git a/devel/llvm/patches/patch-include_llvm_CodeGen_AsmPrinter_h b/devel/llvm/patches/patch-include_llvm_CodeGen_AsmPrinter_h index 8b654f9004c..756dd753f60 100644 --- a/devel/llvm/patches/patch-include_llvm_CodeGen_AsmPrinter_h +++ b/devel/llvm/patches/patch-include_llvm_CodeGen_AsmPrinter_h @@ -1,11 +1,11 @@ -$OpenBSD: patch-include_llvm_CodeGen_AsmPrinter_h,v 1.7 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-include_llvm_CodeGen_AsmPrinter_h,v 1.8 2022/01/03 21:33:51 jca Exp $ Use int3 trap padding between functions instead of trapsleds with a leading jump. Index: include/llvm/CodeGen/AsmPrinter.h --- include/llvm/CodeGen/AsmPrinter.h.orig +++ include/llvm/CodeGen/AsmPrinter.h -@@ -375,6 +375,11 @@ class AsmPrinter : public MachineFunctionPass { (publi +@@ -434,6 +434,11 @@ class AsmPrinter : public MachineFunctionPass { (publi /// correctness. void emitAlignment(Align Alignment, const GlobalObject *GV = nullptr) const; @@ -17,7 +17,7 @@ Index: include/llvm/CodeGen/AsmPrinter.h /// Lower the specified LLVM Constant to an MCExpr. virtual const MCExpr *lowerConstant(const Constant *CV); -@@ -435,6 +440,11 @@ class AsmPrinter : public MachineFunctionPass { (publi +@@ -499,6 +504,11 @@ class AsmPrinter : public MachineFunctionPass { (publi virtual void emitInstruction(const MachineInstr *) { llvm_unreachable("EmitInstruction not implemented"); } diff --git a/devel/llvm/patches/patch-include_llvm_CodeGen_MachineFrameInfo_h b/devel/llvm/patches/patch-include_llvm_CodeGen_MachineFrameInfo_h index ea64778be16..4dcc5841ee5 100644 --- a/devel/llvm/patches/patch-include_llvm_CodeGen_MachineFrameInfo_h +++ b/devel/llvm/patches/patch-include_llvm_CodeGen_MachineFrameInfo_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-include_llvm_CodeGen_MachineFrameInfo_h,v 1.5 2020/08/05 06:49:48 jca Exp $ +$OpenBSD: patch-include_llvm_CodeGen_MachineFrameInfo_h,v 1.6 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -22,7 +22,7 @@ $OpenBSD: patch-include_llvm_CodeGen_MachineFrameInfo_h,v 1.5 2020/08/05 06:49:4 Index: include/llvm/CodeGen/MachineFrameInfo.h --- include/llvm/CodeGen/MachineFrameInfo.h.orig +++ include/llvm/CodeGen/MachineFrameInfo.h -@@ -273,6 +273,15 @@ class MachineFrameInfo { (private) +@@ -274,6 +274,15 @@ class MachineFrameInfo { (private) /// The frame index for the stack protector. int StackProtectorIdx = -1; @@ -38,7 +38,7 @@ Index: include/llvm/CodeGen/MachineFrameInfo.h /// The frame index for the function context. Used for SjLj exceptions. int FunctionContextIdx = -1; -@@ -353,6 +362,17 @@ class MachineFrameInfo { (private) +@@ -354,6 +363,17 @@ class MachineFrameInfo { (private) int getStackProtectorIndex() const { return StackProtectorIdx; } void setStackProtectorIndex(int I) { StackProtectorIdx = I; } bool hasStackProtectorIndex() const { return StackProtectorIdx != -1; } diff --git a/devel/llvm/patches/patch-include_llvm_CodeGen_Passes_h b/devel/llvm/patches/patch-include_llvm_CodeGen_Passes_h index d0e81cbd77d..78aa16ba001 100644 --- a/devel/llvm/patches/patch-include_llvm_CodeGen_Passes_h +++ b/devel/llvm/patches/patch-include_llvm_CodeGen_Passes_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-include_llvm_CodeGen_Passes_h,v 1.4 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-include_llvm_CodeGen_Passes_h,v 1.5 2022/01/03 21:33:51 jca Exp $ Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -21,7 +21,7 @@ remove these gadgets will continue through other mechanisms. Index: include/llvm/CodeGen/Passes.h --- include/llvm/CodeGen/Passes.h.orig +++ include/llvm/CodeGen/Passes.h -@@ -334,6 +334,9 @@ namespace llvm { +@@ -353,6 +353,9 @@ namespace llvm { /// FunctionPass *createStackProtectorPass(); diff --git a/devel/llvm/patches/patch-include_llvm_CodeGen_TargetFrameLowering_h b/devel/llvm/patches/patch-include_llvm_CodeGen_TargetFrameLowering_h index aacf344befa..8441f27dfb6 100644 --- a/devel/llvm/patches/patch-include_llvm_CodeGen_TargetFrameLowering_h +++ b/devel/llvm/patches/patch-include_llvm_CodeGen_TargetFrameLowering_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-include_llvm_CodeGen_TargetFrameLowering_h,v 1.6 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-include_llvm_CodeGen_TargetFrameLowering_h,v 1.7 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -27,10 +27,10 @@ Index: include/llvm/CodeGen/TargetFrameLowering.h #include "llvm/CodeGen/MachineBasicBlock.h" +#include "llvm/CodeGen/ReturnProtectorLowering.h" + #include "llvm/Support/TypeSize.h" #include - namespace llvm { -@@ -207,6 +208,10 @@ class TargetFrameLowering { (public) +@@ -209,6 +210,10 @@ class TargetFrameLowering { (public) MachineBasicBlock &MBB) const = 0; virtual void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const = 0; diff --git a/devel/llvm/patches/patch-include_llvm_InitializePasses_h b/devel/llvm/patches/patch-include_llvm_InitializePasses_h index 4315ee2eede..823fe11fab4 100644 --- a/devel/llvm/patches/patch-include_llvm_InitializePasses_h +++ b/devel/llvm/patches/patch-include_llvm_InitializePasses_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-include_llvm_InitializePasses_h,v 1.5 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-include_llvm_InitializePasses_h,v 1.6 2022/01/03 21:33:51 jca Exp $ Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -21,9 +21,9 @@ remove these gadgets will continue through other mechanisms. Index: include/llvm/InitializePasses.h --- include/llvm/InitializePasses.h.orig +++ include/llvm/InitializePasses.h -@@ -372,6 +372,7 @@ void initializeRegionViewerPass(PassRegistry&); - void initializeRegisterCoalescerPass(PassRegistry&); +@@ -387,6 +387,7 @@ void initializeRemoveRedundantDebugValuesPass(PassRegi void initializeRenameIndependentSubregsPass(PassRegistry&); + void initializeReplaceWithVeclibLegacyPass(PassRegistry &); void initializeResetMachineFunctionPass(PassRegistry&); +void initializeReturnProtectorPass(PassRegistry&); void initializeReversePostOrderFunctionAttrsLegacyPassPass(PassRegistry&); diff --git a/devel/llvm/patches/patch-lib_CodeGen_AsmPrinter_AsmPrinter_cpp b/devel/llvm/patches/patch-lib_CodeGen_AsmPrinter_AsmPrinter_cpp index 22cee4ac43b..8bcd85e777c 100644 --- a/devel/llvm/patches/patch-lib_CodeGen_AsmPrinter_AsmPrinter_cpp +++ b/devel/llvm/patches/patch-lib_CodeGen_AsmPrinter_AsmPrinter_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_CodeGen_AsmPrinter_AsmPrinter_cpp,v 1.12 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_CodeGen_AsmPrinter_AsmPrinter_cpp,v 1.13 2022/01/03 21:33:51 jca Exp $ - Use int3 trap padding between functions instead of trapsleds with a leading jump. - Emit trap alignment between basic blocks that are unreachable via @@ -8,7 +8,7 @@ $OpenBSD: patch-lib_CodeGen_AsmPrinter_AsmPrinter_cpp,v 1.12 2021/05/13 23:54:24 Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp.orig +++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp -@@ -687,7 +687,7 @@ void AsmPrinter::emitFunctionHeader() { +@@ -745,7 +745,7 @@ void AsmPrinter::emitFunctionHeader() { emitLinkage(&F, CurrentFnSym); if (MAI->hasFunctionAlignment()) @@ -17,7 +17,7 @@ Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp if (MAI->hasDotTypeDotSizeDirective()) OutStreamer->emitSymbolAttribute(CurrentFnSym, MCSA_ELF_TypeFunction); -@@ -2256,6 +2256,30 @@ void AsmPrinter::emitAlignment(Align Alignment, const +@@ -2462,6 +2462,30 @@ void AsmPrinter::emitAlignment(Align Alignment, const } //===----------------------------------------------------------------------===// @@ -48,7 +48,7 @@ Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp // Constant emission. //===----------------------------------------------------------------------===// -@@ -3020,10 +3044,17 @@ void AsmPrinter::emitBasicBlockStart(const MachineBasi +@@ -3246,10 +3270,17 @@ void AsmPrinter::emitBasicBlockStart(const MachineBasi } } @@ -66,5 +66,5 @@ Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp + emitTrapAlignment(Alignment); + } - // If the block has its address taken, emit any labels that were used to - // reference the block. It is possible that there is more than one label + // Switch to a new section if this basic block must begin a section. The + // entry block is always placed in the function section and is handled diff --git a/devel/llvm/patches/patch-lib_CodeGen_CMakeLists_txt b/devel/llvm/patches/patch-lib_CodeGen_CMakeLists_txt index 42faa726a16..b2384aa7d96 100644 --- a/devel/llvm/patches/patch-lib_CodeGen_CMakeLists_txt +++ b/devel/llvm/patches/patch-lib_CodeGen_CMakeLists_txt @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_CodeGen_CMakeLists_txt,v 1.6 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_CodeGen_CMakeLists_txt,v 1.7 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -22,12 +22,12 @@ $OpenBSD: patch-lib_CodeGen_CMakeLists_txt,v 1.6 2021/05/13 23:54:24 jca Exp $ Index: lib/CodeGen/CMakeLists.txt --- lib/CodeGen/CMakeLists.txt.orig +++ lib/CodeGen/CMakeLists.txt -@@ -142,6 +142,8 @@ add_llvm_component_library(LLVMCodeGen - RegUsageInfoCollector.cpp +@@ -153,6 +153,8 @@ add_llvm_component_library(LLVMCodeGen RegUsageInfoPropagate.cpp + ReplaceWithVeclib.cpp ResetMachineFunctionPass.cpp + ReturnProtectorLowering.cpp + ReturnProtectorPass.cpp SafeStack.cpp SafeStackLayout.cpp - ScalarizeMaskedMemIntrin.cpp + ScheduleDAG.cpp diff --git a/devel/llvm/patches/patch-lib_CodeGen_PrologEpilogInserter_cpp b/devel/llvm/patches/patch-lib_CodeGen_PrologEpilogInserter_cpp index 1885e6cc2bc..6068dd35783 100644 --- a/devel/llvm/patches/patch-lib_CodeGen_PrologEpilogInserter_cpp +++ b/devel/llvm/patches/patch-lib_CodeGen_PrologEpilogInserter_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_CodeGen_PrologEpilogInserter_cpp,v 1.6 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_CodeGen_PrologEpilogInserter_cpp,v 1.7 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -22,7 +22,7 @@ $OpenBSD: patch-lib_CodeGen_PrologEpilogInserter_cpp,v 1.6 2021/05/13 23:54:24 j Index: lib/CodeGen/PrologEpilogInserter.cpp --- lib/CodeGen/PrologEpilogInserter.cpp.orig +++ lib/CodeGen/PrologEpilogInserter.cpp -@@ -217,7 +217,11 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) { +@@ -213,7 +213,11 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) { const Function &F = MF.getFunction(); const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering(); @@ -34,7 +34,7 @@ Index: lib/CodeGen/PrologEpilogInserter.cpp RS = TRI->requiresRegisterScavenging(MF) ? new RegScavenger() : nullptr; FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging(MF); ORE = &getAnalysis().getORE(); -@@ -255,6 +259,10 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) { +@@ -251,6 +255,10 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) { if (!F.hasFnAttribute(Attribute::Naked)) insertPrologEpilogCode(MF); @@ -45,7 +45,7 @@ Index: lib/CodeGen/PrologEpilogInserter.cpp // Reinsert stashed debug values at the start of the entry blocks. for (auto &I : EntryDbgValues) I.first->insert(I.first->begin(), I.second.begin(), I.second.end()); -@@ -353,7 +361,9 @@ void PEI::calculateCallFrameInfo(MachineFunction &MF) +@@ -357,7 +365,9 @@ void PEI::calculateCallFrameInfo(MachineFunction &MF) /// Compute the sets of entry and return blocks for saving and restoring /// callee-saved registers, and placing prolog and epilog code. void PEI::calculateSaveRestoreBlocks(MachineFunction &MF) { @@ -56,7 +56,7 @@ Index: lib/CodeGen/PrologEpilogInserter.cpp // Even when we do not change any CSR, we still want to insert the // prologue and epilogue of the function. -@@ -369,7 +379,18 @@ void PEI::calculateSaveRestoreBlocks(MachineFunction & +@@ -373,7 +383,18 @@ void PEI::calculateSaveRestoreBlocks(MachineFunction & // epilogue. if (!RestoreBlock->succ_empty() || RestoreBlock->isReturnBlock()) RestoreBlocks.push_back(RestoreBlock); @@ -76,7 +76,7 @@ Index: lib/CodeGen/PrologEpilogInserter.cpp } // Save refs to entry and return blocks. -@@ -380,6 +401,9 @@ void PEI::calculateSaveRestoreBlocks(MachineFunction & +@@ -384,6 +405,9 @@ void PEI::calculateSaveRestoreBlocks(MachineFunction & if (MBB.isReturnBlock()) RestoreBlocks.push_back(&MBB); } @@ -86,7 +86,7 @@ Index: lib/CodeGen/PrologEpilogInserter.cpp } static void assignCalleeSavedSpillSlots(MachineFunction &F, -@@ -401,6 +425,10 @@ static void assignCalleeSavedSpillSlots(MachineFunctio +@@ -405,6 +429,10 @@ static void assignCalleeSavedSpillSlots(MachineFunctio const TargetFrameLowering *TFI = F.getSubtarget().getFrameLowering(); MachineFrameInfo &MFI = F.getFrameInfo(); @@ -94,6 +94,6 @@ Index: lib/CodeGen/PrologEpilogInserter.cpp + if (TFI->getReturnProtector()) + TFI->getReturnProtector()->saveReturnProtectorRegister(F, CSI); + - if (!TFI->assignCalleeSavedSpillSlots(F, RegInfo, CSI)) { + if (!TFI->assignCalleeSavedSpillSlots(F, RegInfo, CSI, MinCSFrameIndex, + MaxCSFrameIndex)) { // If target doesn't implement this, use generic code. - diff --git a/devel/llvm/patches/patch-lib_CodeGen_TargetPassConfig_cpp b/devel/llvm/patches/patch-lib_CodeGen_TargetPassConfig_cpp index 3741c6d695a..04f60b133ab 100644 --- a/devel/llvm/patches/patch-lib_CodeGen_TargetPassConfig_cpp +++ b/devel/llvm/patches/patch-lib_CodeGen_TargetPassConfig_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_CodeGen_TargetPassConfig_cpp,v 1.5 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_CodeGen_TargetPassConfig_cpp,v 1.6 2022/01/03 21:33:51 jca Exp $ Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -21,7 +21,7 @@ remove these gadgets will continue through other mechanisms. Index: lib/CodeGen/TargetPassConfig.cpp --- lib/CodeGen/TargetPassConfig.cpp.orig +++ lib/CodeGen/TargetPassConfig.cpp -@@ -773,6 +773,8 @@ void TargetPassConfig::addISelPrepare() { +@@ -950,6 +950,8 @@ void TargetPassConfig::addISelPrepare() { if (requiresCodeGenSCCOrder()) addPass(new DummyCGSCCPass); diff --git a/devel/llvm/patches/patch-lib_MC_MCELFStreamer_cpp b/devel/llvm/patches/patch-lib_MC_MCELFStreamer_cpp index 8e34b712f84..b0ad1d328a4 100644 --- a/devel/llvm/patches/patch-lib_MC_MCELFStreamer_cpp +++ b/devel/llvm/patches/patch-lib_MC_MCELFStreamer_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_MC_MCELFStreamer_cpp,v 1.8 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_MC_MCELFStreamer_cpp,v 1.9 2022/01/03 21:33:51 jca Exp $ getNonexecutableStackSection() may return nullptr. Index: lib/MC/MCELFStreamer.cpp --- lib/MC/MCELFStreamer.cpp.orig +++ lib/MC/MCELFStreamer.cpp -@@ -92,8 +92,11 @@ void MCELFStreamer::InitSections(bool NoExecStack) { +@@ -93,8 +93,11 @@ void MCELFStreamer::InitSections(bool NoExecStack) { SwitchSection(Ctx.getObjectFileInfo()->getTextSection()); emitCodeAlignment(4); diff --git a/devel/llvm/patches/patch-lib_MC_MCParser_AsmParser_cpp b/devel/llvm/patches/patch-lib_MC_MCParser_AsmParser_cpp index 72dbe761563..1e0d366ee36 100644 --- a/devel/llvm/patches/patch-lib_MC_MCParser_AsmParser_cpp +++ b/devel/llvm/patches/patch-lib_MC_MCParser_AsmParser_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_MC_MCParser_AsmParser_cpp,v 1.9 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_MC_MCParser_AsmParser_cpp,v 1.10 2022/01/03 21:33:51 jca Exp $ make clang include a FILE symbol for .(s|S) files @@ -11,7 +11,7 @@ a file directive. Index: lib/MC/MCParser/AsmParser.cpp --- lib/MC/MCParser/AsmParser.cpp.orig +++ lib/MC/MCParser/AsmParser.cpp -@@ -909,6 +909,10 @@ bool AsmParser::Run(bool NoInitialTextSection, bool No +@@ -975,6 +975,10 @@ bool AsmParser::Run(bool NoInitialTextSection, bool No (void)InsertResult; } @@ -19,6 +19,6 @@ Index: lib/MC/MCParser/AsmParser.cpp + if (!Filename.empty() && (Filename.compare(StringRef("-")) != 0)) + Out.emitFileDirective(Filename); + + getTargetParser().onBeginOfFile(); + // While we have input, parse each statement. - while (Lexer.isNot(AsmToken::Eof)) { - ParseStatementInfo Info(&AsmStrRewrites); diff --git a/devel/llvm/patches/patch-lib_Support_CMakeLists_txt b/devel/llvm/patches/patch-lib_Support_CMakeLists_txt deleted file mode 100644 index 54345f50547..00000000000 --- a/devel/llvm/patches/patch-lib_Support_CMakeLists_txt +++ /dev/null @@ -1,16 +0,0 @@ -$OpenBSD: patch-lib_Support_CMakeLists_txt,v 1.3 2021/05/13 23:54:24 jca Exp $ - -For upstream: -bogus dep on all headers in ${Backtrace_INCLUDE_DIRS} ie /usr/local/include. - -Index: lib/Support/CMakeLists.txt ---- lib/Support/CMakeLists.txt.orig -+++ lib/Support/CMakeLists.txt -@@ -193,7 +193,6 @@ add_llvm_component_library(LLVMSupport - Windows - ${LLVM_MAIN_INCLUDE_DIR}/llvm/ADT - ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support -- ${Backtrace_INCLUDE_DIRS} - LINK_LIBS ${system_libs} ${delayload_flags} ${Z3_LINK_FILES} - ) - diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64AsmPrinter_cpp b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64AsmPrinter_cpp index d665273fb56..5f1bbe1ed01 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64AsmPrinter_cpp +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64AsmPrinter_cpp @@ -1,13 +1,13 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64AsmPrinter_cpp,v 1.5 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64AsmPrinter_cpp,v 1.6 2022/01/03 21:33:51 jca Exp $ Add retguard for arm64. Index: lib/Target/AArch64/AArch64AsmPrinter.cpp --- lib/Target/AArch64/AArch64AsmPrinter.cpp.orig +++ lib/Target/AArch64/AArch64AsmPrinter.cpp -@@ -1350,6 +1350,19 @@ void AArch64AsmPrinter::emitInstruction(const MachineI +@@ -1488,6 +1488,19 @@ void AArch64AsmPrinter::emitInstruction(const MachineI case AArch64::SEH_EpilogEnd: - TS->EmitARM64WinCFIEpilogEnd(); + TS->emitARM64WinCFIEpilogEnd(); return; + + case AArch64::RETGUARD_JMP_TRAP: diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_cpp b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_cpp index d59c6b16725..7684cbce5c1 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_cpp +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_cpp @@ -1,19 +1,19 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64FrameLowering_cpp,v 1.6 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64FrameLowering_cpp,v 1.7 2022/01/03 21:33:51 jca Exp $ Add retguard for arm64. Index: lib/Target/AArch64/AArch64FrameLowering.cpp --- lib/Target/AArch64/AArch64FrameLowering.cpp.orig +++ lib/Target/AArch64/AArch64FrameLowering.cpp -@@ -116,6 +116,7 @@ +@@ -123,6 +123,7 @@ #include "AArch64InstrInfo.h" #include "AArch64MachineFunctionInfo.h" #include "AArch64RegisterInfo.h" +#include "AArch64ReturnProtectorLowering.h" - #include "AArch64StackOffset.h" #include "AArch64Subtarget.h" #include "AArch64TargetMachine.h" -@@ -2521,6 +2522,10 @@ void AArch64FrameLowering::determineCalleeSaves(Machin + #include "MCTargetDesc/AArch64AddressingModes.h" +@@ -2753,6 +2754,10 @@ void AArch64FrameLowering::determineCalleeSaves(Machin ? RegInfo->getBaseRegister() : (unsigned)AArch64::NoRegister; @@ -24,7 +24,7 @@ Index: lib/Target/AArch64/AArch64FrameLowering.cpp unsigned ExtraCSSpill = 0; // Figure out which callee-saved registers to save/restore. for (unsigned i = 0; CSRegs[i]; ++i) { -@@ -3251,4 +3256,8 @@ unsigned AArch64FrameLowering::getWinEHFuncletFrameSiz +@@ -3532,6 +3537,10 @@ unsigned AArch64FrameLowering::getWinEHFuncletFrameSiz // This is the amount of stack a funclet needs to allocate. return alignTo(CSSize + MF.getFrameInfo().getMaxCallFrameSize(), getStackAlign()); @@ -33,3 +33,5 @@ Index: lib/Target/AArch64/AArch64FrameLowering.cpp +const ReturnProtectorLowering *AArch64FrameLowering::getReturnProtector() const { + return &RPL; } + + namespace { diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_h b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_h index 98b9ee9583b..54fbdd07595 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_h +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64FrameLowering_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64FrameLowering_h,v 1.3 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64FrameLowering_h,v 1.4 2022/01/03 21:33:51 jca Exp $ Add retguard for arm64. @@ -10,7 +10,7 @@ Index: lib/Target/AArch64/AArch64FrameLowering.h #define LLVM_LIB_TARGET_AARCH64_AARCH64FRAMELOWERING_H +#include "AArch64ReturnProtectorLowering.h" - #include "AArch64StackOffset.h" + #include "llvm/Support/TypeSize.h" #include "llvm/CodeGen/TargetFrameLowering.h" @@ -22,9 +23,12 @@ class MCCFIInstruction; diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64ISelLowering_cpp b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64ISelLowering_cpp index 01f14843dfc..9ec33054483 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64ISelLowering_cpp +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64ISelLowering_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64ISelLowering_cpp,v 1.12 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64ISelLowering_cpp,v 1.13 2022/01/03 21:33:51 jca Exp $ Disable the Load Stack Guard for OpenBSD on AArch64. We don't use it on any other platform and it causes a segfault in combination with our @@ -7,7 +7,7 @@ IR Stack Guard. Index: lib/Target/AArch64/AArch64ISelLowering.cpp --- lib/Target/AArch64/AArch64ISelLowering.cpp.orig +++ lib/Target/AArch64/AArch64ISelLowering.cpp -@@ -14558,7 +14558,8 @@ void AArch64TargetLowering::ReplaceNodeResults( +@@ -17364,7 +17364,8 @@ void AArch64TargetLowering::ReplaceNodeResults( } bool AArch64TargetLowering::useLoadStackGuardNode() const { diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_cpp b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_cpp index b73b0703a7f..f3e07db4bdb 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_cpp +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64InstrInfo_cpp,v 1.1 2020/08/05 06:49:48 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64InstrInfo_cpp,v 1.2 2022/01/03 21:33:51 jca Exp $ XXX no comment Index: lib/Target/AArch64/AArch64InstrInfo.cpp --- lib/Target/AArch64/AArch64InstrInfo.cpp.orig +++ lib/Target/AArch64/AArch64InstrInfo.cpp -@@ -96,6 +96,9 @@ unsigned AArch64InstrInfo::getInstSizeInBytes(const Ma +@@ -97,6 +97,9 @@ unsigned AArch64InstrInfo::getInstSizeInBytes(const Ma default: // Anything not explicitly designated otherwise is a normal 4-byte insn. NumBytes = 4; diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_td b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_td index be490f4f77b..5a06160e8a8 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_td +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64InstrInfo_td @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64InstrInfo_td,v 1.5 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64InstrInfo_td,v 1.6 2022/01/03 21:33:51 jca Exp $ Add retguard for arm64. Index: lib/Target/AArch64/AArch64InstrInfo.td --- lib/Target/AArch64/AArch64InstrInfo.td.orig +++ lib/Target/AArch64/AArch64InstrInfo.td -@@ -678,6 +678,14 @@ def ADDlowTLS +@@ -721,6 +721,14 @@ def ADDlowTLS } // isReMaterializable, isCodeGenOnly diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64Subtarget_h b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64Subtarget_h index 3b3ca5480fc..f977f4618bd 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64Subtarget_h +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64Subtarget_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64Subtarget_h,v 1.8 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64Subtarget_h,v 1.9 2022/01/03 21:33:51 jca Exp $ Disable the Load Stack Guard for OpenBSD on AArch64. We don't use it on any other platform and it causes a segfault in combination with our @@ -7,7 +7,7 @@ IR Stack Guard. Index: lib/Target/AArch64/AArch64Subtarget.h --- lib/Target/AArch64/AArch64Subtarget.h.orig +++ lib/Target/AArch64/AArch64Subtarget.h -@@ -453,6 +453,7 @@ class AArch64Subtarget final : public AArch64GenSubtar +@@ -500,6 +500,7 @@ class AArch64Subtarget final : public AArch64GenSubtar bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); } bool isTargetIOS() const { return TargetTriple.isiOS(); } bool isTargetLinux() const { return TargetTriple.isOSLinux(); } diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64TargetMachine_cpp b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64TargetMachine_cpp index 01caaa20219..5bfeb048f9a 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_AArch64TargetMachine_cpp +++ b/devel/llvm/patches/patch-lib_Target_AArch64_AArch64TargetMachine_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_AArch64_AArch64TargetMachine_cpp,v 1.3 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_AArch64TargetMachine_cpp,v 1.4 2022/01/03 21:33:51 jca Exp $ Always disable GlobalISel on aarch64, fixes a crash when building on aarch64 without retguard, with a stack protector and without @@ -7,11 +7,11 @@ optimizations. Index: lib/Target/AArch64/AArch64TargetMachine.cpp --- lib/Target/AArch64/AArch64TargetMachine.cpp.orig +++ lib/Target/AArch64/AArch64TargetMachine.cpp -@@ -308,6 +308,7 @@ AArch64TargetMachine::AArch64TargetMachine(const Targe +@@ -332,6 +332,7 @@ AArch64TargetMachine::AArch64TargetMachine(const Targe // Enable GlobalISel at or below EnableGlobalISelAt0, unless this is // MachO/CodeModel::Large, which GlobalISel does not support. if (getOptLevel() <= EnableGlobalISelAtO && + !getTargetTriple().isOSOpenBSD() && TT.getArch() != Triple::aarch64_32 && + TT.getEnvironment() != Triple::GNUILP32 && !(getCodeModel() == CodeModel::Large && TT.isOSBinFormatMachO())) { - setGlobalISel(true); diff --git a/devel/llvm/patches/patch-lib_Target_AArch64_CMakeLists_txt b/devel/llvm/patches/patch-lib_Target_AArch64_CMakeLists_txt index a9d36f7071c..e3b0029ec9a 100644 --- a/devel/llvm/patches/patch-lib_Target_AArch64_CMakeLists_txt +++ b/devel/llvm/patches/patch-lib_Target_AArch64_CMakeLists_txt @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_AArch64_CMakeLists_txt,v 1.4 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_AArch64_CMakeLists_txt,v 1.5 2022/01/03 21:33:51 jca Exp $ Add retguard for arm64. Index: lib/Target/AArch64/CMakeLists.txt --- lib/Target/AArch64/CMakeLists.txt.orig +++ lib/Target/AArch64/CMakeLists.txt -@@ -59,6 +59,7 @@ add_llvm_target(AArch64CodeGen +@@ -70,6 +70,7 @@ add_llvm_target(AArch64CodeGen AArch64PromoteConstant.cpp AArch64PBQPRegAlloc.cpp AArch64RegisterInfo.cpp diff --git a/devel/llvm/patches/patch-lib_Target_Mips_CMakeLists_txt b/devel/llvm/patches/patch-lib_Target_Mips_CMakeLists_txt index def8d828ffb..de968132255 100644 --- a/devel/llvm/patches/patch-lib_Target_Mips_CMakeLists_txt +++ b/devel/llvm/patches/patch-lib_Target_Mips_CMakeLists_txt @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_Mips_CMakeLists_txt,v 1.3 2020/12/21 21:38:51 jca Exp $ +$OpenBSD: patch-lib_Target_Mips_CMakeLists_txt,v 1.4 2022/01/03 21:33:51 jca Exp $ - Adapt the -mfix-loongson2f-btb workaround from as(1) to LLVM/clang. - Add retguard for octeon/mips64. @@ -6,7 +6,7 @@ $OpenBSD: patch-lib_Target_Mips_CMakeLists_txt,v 1.3 2020/12/21 21:38:51 jca Exp Index: lib/Target/Mips/CMakeLists.txt --- lib/Target/Mips/CMakeLists.txt.orig +++ lib/Target/Mips/CMakeLists.txt -@@ -39,6 +39,7 @@ add_llvm_target(MipsCodeGen +@@ -41,6 +41,7 @@ add_llvm_target(MipsCodeGen MipsISelLowering.cpp MipsFrameLowering.cpp MipsLegalizerInfo.cpp @@ -14,7 +14,7 @@ Index: lib/Target/Mips/CMakeLists.txt MipsBranchExpansion.cpp MipsMCInstLower.cpp MipsMachineFunction.cpp -@@ -48,6 +49,7 @@ add_llvm_target(MipsCodeGen +@@ -50,6 +51,7 @@ add_llvm_target(MipsCodeGen MipsPreLegalizerCombiner.cpp MipsRegisterBankInfo.cpp MipsRegisterInfo.cpp diff --git a/devel/llvm/patches/patch-lib_Target_Mips_MCTargetDesc_MipsABIInfo_cpp b/devel/llvm/patches/patch-lib_Target_Mips_MCTargetDesc_MipsABIInfo_cpp index bc68c442761..f03d23f981f 100644 --- a/devel/llvm/patches/patch-lib_Target_Mips_MCTargetDesc_MipsABIInfo_cpp +++ b/devel/llvm/patches/patch-lib_Target_Mips_MCTargetDesc_MipsABIInfo_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_Mips_MCTargetDesc_MipsABIInfo_cpp,v 1.1 2020/12/21 21:38:51 jca Exp $ +$OpenBSD: patch-lib_Target_Mips_MCTargetDesc_MipsABIInfo_cpp,v 1.2 2022/01/03 21:33:51 jca Exp $ Adapt the -mfix-loongson2f-btb workaround from as(1) to LLVM/clang. Index: lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp --- lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp.orig +++ lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp -@@ -22,6 +22,11 @@ EmitJalrReloc("mips-jalr-reloc", cl::Hidden, +@@ -21,6 +21,11 @@ EmitJalrReloc("mips-jalr-reloc", cl::Hidden, cl::desc("MIPS: Emit R_{MICRO}MIPS_JALR relocation with jalr"), cl::init(true)); diff --git a/devel/llvm/patches/patch-lib_Target_Mips_MipsISelLowering_cpp b/devel/llvm/patches/patch-lib_Target_Mips_MipsISelLowering_cpp index 42eda535fb1..fb8e105988f 100644 --- a/devel/llvm/patches/patch-lib_Target_Mips_MipsISelLowering_cpp +++ b/devel/llvm/patches/patch-lib_Target_Mips_MipsISelLowering_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_Mips_MipsISelLowering_cpp,v 1.3 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_Mips_MipsISelLowering_cpp,v 1.4 2022/01/03 21:33:51 jca Exp $ - Implement the 'h' register constraint on mips64. This lets clang build pieces of software that use the constraint if the compiler claims @@ -12,7 +12,7 @@ $OpenBSD: patch-lib_Target_Mips_MipsISelLowering_cpp,v 1.3 2021/05/13 23:54:24 j Index: lib/Target/Mips/MipsISelLowering.cpp --- lib/Target/Mips/MipsISelLowering.cpp.orig +++ lib/Target/Mips/MipsISelLowering.cpp -@@ -3919,6 +3919,7 @@ MipsTargetLowering::getConstraintType(StringRef Constr +@@ -3925,6 +3925,7 @@ MipsTargetLowering::getConstraintType(StringRef Constr // backwards compatibility. // 'c' : A register suitable for use in an indirect // jump. This will always be $25 for -mabicalls. @@ -20,7 +20,7 @@ Index: lib/Target/Mips/MipsISelLowering.cpp // 'l' : The lo register. 1 word storage. // 'x' : The hilo register pair. Double word storage. if (Constraint.size() == 1) { -@@ -3928,6 +3929,7 @@ MipsTargetLowering::getConstraintType(StringRef Constr +@@ -3934,6 +3935,7 @@ MipsTargetLowering::getConstraintType(StringRef Constr case 'y': case 'f': case 'c': @@ -28,7 +28,7 @@ Index: lib/Target/Mips/MipsISelLowering.cpp case 'l': case 'x': return C_RegisterClass; -@@ -3973,6 +3975,7 @@ MipsTargetLowering::getSingleConstraintMatchWeight( +@@ -3979,6 +3981,7 @@ MipsTargetLowering::getSingleConstraintMatchWeight( weight = CW_Register; break; case 'c': // $25 for indirect jumps @@ -36,7 +36,7 @@ Index: lib/Target/Mips/MipsISelLowering.cpp case 'l': // lo register case 'x': // hilo register pair if (type->isIntegerTy()) -@@ -4147,6 +4150,11 @@ MipsTargetLowering::getRegForInlineAsmConstraint(const +@@ -4153,6 +4156,11 @@ MipsTargetLowering::getRegForInlineAsmConstraint(const return std::make_pair((unsigned)Mips::T9_64, &Mips::GPR64RegClass); // This will generate an error message return std::make_pair(0U, nullptr); diff --git a/devel/llvm/patches/patch-lib_Target_Mips_MipsTargetMachine_cpp b/devel/llvm/patches/patch-lib_Target_Mips_MipsTargetMachine_cpp index 79c87332027..519aff63943 100644 --- a/devel/llvm/patches/patch-lib_Target_Mips_MipsTargetMachine_cpp +++ b/devel/llvm/patches/patch-lib_Target_Mips_MipsTargetMachine_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_Mips_MipsTargetMachine_cpp,v 1.2 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_Mips_MipsTargetMachine_cpp,v 1.3 2022/01/03 21:33:51 jca Exp $ Adapt the -mfix-loongson2f-btb workaround from as(1) to LLVM/clang. @@ -14,7 +14,7 @@ Index: lib/Target/Mips/MipsTargetMachine.cpp extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTarget() { // Register the target. RegisterTargetMachine X(getTheMipsTarget()); -@@ -280,6 +282,9 @@ bool MipsPassConfig::addInstSelector() { +@@ -268,6 +270,9 @@ bool MipsPassConfig::addInstSelector() { void MipsPassConfig::addPreRegAlloc() { addPass(createMipsOptimizePICCallPass()); diff --git a/devel/llvm/patches/patch-lib_Target_PowerPC_CMakeLists_txt b/devel/llvm/patches/patch-lib_Target_PowerPC_CMakeLists_txt index 1d76cf090fe..34ac58effaf 100644 --- a/devel/llvm/patches/patch-lib_Target_PowerPC_CMakeLists_txt +++ b/devel/llvm/patches/patch-lib_Target_PowerPC_CMakeLists_txt @@ -1,15 +1,13 @@ -$OpenBSD: patch-lib_Target_PowerPC_CMakeLists_txt,v 1.2 2021/05/13 23:54:24 jca Exp $ - -Add RETGUARD implementation for powerpc and powerpc64. +$OpenBSD: patch-lib_Target_PowerPC_CMakeLists_txt,v 1.3 2022/01/03 21:33:51 jca Exp $ Index: lib/Target/PowerPC/CMakeLists.txt --- lib/Target/PowerPC/CMakeLists.txt.orig +++ lib/Target/PowerPC/CMakeLists.txt -@@ -36,6 +36,7 @@ add_llvm_target(PowerPCCodeGen +@@ -42,6 +42,7 @@ add_llvm_target(PowerPCCodeGen PPCMacroFusion.cpp PPCMIPeephole.cpp PPCRegisterInfo.cpp + PPCReturnProtectorLowering.cpp - PPCQPXLoadSplat.cpp PPCSubtarget.cpp PPCTargetMachine.cpp + PPCTargetObjectFile.cpp diff --git a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCAsmPrinter_cpp b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCAsmPrinter_cpp index a8e0b3e746c..e8635ea15fb 100644 --- a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCAsmPrinter_cpp +++ b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCAsmPrinter_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_PowerPC_PPCAsmPrinter_cpp,v 1.9 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_PowerPC_PPCAsmPrinter_cpp,v 1.10 2022/01/03 21:33:51 jca Exp $ Add RETGUARD implementation for powerpc and powerpc64. Index: lib/Target/PowerPC/PPCAsmPrinter.cpp --- lib/Target/PowerPC/PPCAsmPrinter.cpp.orig +++ lib/Target/PowerPC/PPCAsmPrinter.cpp -@@ -657,6 +657,85 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr +@@ -815,6 +815,85 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr return; } } diff --git a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_cpp b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_cpp index 31abc14c833..197fbfbf3e0 100644 --- a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_cpp +++ b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_PowerPC_PPCFrameLowering_cpp,v 1.4 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_PowerPC_PPCFrameLowering_cpp,v 1.5 2022/01/03 21:33:51 jca Exp $ Add RETGUARD implementation for powerpc and powerpc64. @@ -13,10 +13,10 @@ Index: lib/Target/PowerPC/PPCFrameLowering.cpp #include "PPCSubtarget.h" #include "PPCTargetMachine.h" #include "llvm/ADT/Statistic.h" -@@ -2626,4 +2627,8 @@ bool PPCFrameLowering::enableShrinkWrapping(const Mach +@@ -2696,4 +2697,8 @@ bool PPCFrameLowering::enableShrinkWrapping(const Mach + if (MF.getInfo()->shrinkWrapDisabled()) return false; - return (MF.getSubtarget().isSVR4ABI() && - MF.getSubtarget().isPPC64()); + return !MF.getSubtarget().is32BitELFABI(); +} + +const ReturnProtectorLowering *PPCFrameLowering::getReturnProtector() const { diff --git a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_h b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_h index d1ea6790e7b..824cad19e95 100644 --- a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_h +++ b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCFrameLowering_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_PowerPC_PPCFrameLowering_h,v 1.4 2021/05/13 23:54:24 jca Exp $ +$OpenBSD: patch-lib_Target_PowerPC_PPCFrameLowering_h,v 1.5 2022/01/03 21:33:51 jca Exp $ Add RETGUARD implementation for powerpc and powerpc64. @@ -13,7 +13,7 @@ Index: lib/Target/PowerPC/PPCFrameLowering.h #include "llvm/ADT/STLExtras.h" #include "llvm/CodeGen/TargetFrameLowering.h" #include "llvm/Target/TargetMachine.h" -@@ -169,6 +170,9 @@ class PPCFrameLowering: public TargetFrameLowering { ( +@@ -173,6 +174,9 @@ class PPCFrameLowering: public TargetFrameLowering { ( /// function prologue/epilogue. bool canUseAsPrologue(const MachineBasicBlock &MBB) const override; bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override; diff --git a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo_td b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo_td index 2667fd8eae9..3f23a0f190a 100644 --- a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo_td +++ b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo_td @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_PowerPC_PPCInstrInfo_td,v 1.4 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_PowerPC_PPCInstrInfo_td,v 1.5 2022/01/03 21:33:51 jca Exp $ Add RETGUARD implementation for powerpc and powerpc64. Index: lib/Target/PowerPC/PPCInstrInfo.td --- lib/Target/PowerPC/PPCInstrInfo.td.orig +++ lib/Target/PowerPC/PPCInstrInfo.td -@@ -1527,6 +1527,31 @@ let Defs = [LR] in +@@ -1690,6 +1690,31 @@ let Defs = [LR] in def MoveGOTtoLR : PPCEmitTimePseudo<(outs), (ins), "#MoveGOTtoLR", []>, PPC970_Unit_BRU; diff --git a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCTargetMachine_cpp b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCTargetMachine_cpp index 659c1a30829..463aeecb6d9 100644 --- a/devel/llvm/patches/patch-lib_Target_PowerPC_PPCTargetMachine_cpp +++ b/devel/llvm/patches/patch-lib_Target_PowerPC_PPCTargetMachine_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_PowerPC_PPCTargetMachine_cpp,v 1.3 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_PowerPC_PPCTargetMachine_cpp,v 1.4 2022/01/03 21:33:51 jca Exp $ Switch Powerpc64 Big Endian to ELFv2 on OpenBSD. Index: lib/Target/PowerPC/PPCTargetMachine.cpp --- lib/Target/PowerPC/PPCTargetMachine.cpp.orig +++ lib/Target/PowerPC/PPCTargetMachine.cpp -@@ -216,6 +216,8 @@ static PPCTargetMachine::PPCABI computeTargetABI(const +@@ -228,6 +228,8 @@ static PPCTargetMachine::PPCABI computeTargetABI(const case Triple::ppc64le: return PPCTargetMachine::PPC_ABI_ELFv2; case Triple::ppc64: diff --git a/devel/llvm/patches/patch-lib_Target_RISCV_RISCVISelLowering_cpp b/devel/llvm/patches/patch-lib_Target_RISCV_RISCVISelLowering_cpp index 85fc5a2ce64..87bf578f9a0 100644 --- a/devel/llvm/patches/patch-lib_Target_RISCV_RISCVISelLowering_cpp +++ b/devel/llvm/patches/patch-lib_Target_RISCV_RISCVISelLowering_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_RISCV_RISCVISelLowering_cpp,v 1.1 2021/05/22 20:27:35 jca Exp $ +$OpenBSD: patch-lib_Target_RISCV_RISCVISelLowering_cpp,v 1.2 2022/01/03 21:33:51 jca Exp $ - enable EmuTLS on RiscV. Index: lib/Target/RISCV/RISCVISelLowering.cpp --- lib/Target/RISCV/RISCVISelLowering.cpp.orig +++ lib/Target/RISCV/RISCVISelLowering.cpp -@@ -634,6 +634,10 @@ SDValue RISCVTargetLowering::getDynamicTLSAddr(GlobalA +@@ -2847,6 +2847,10 @@ SDValue RISCVTargetLowering::getDynamicTLSAddr(GlobalA SDValue RISCVTargetLowering::lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { diff --git a/devel/llvm/patches/patch-lib_Target_Sparc_SparcISelLowering_cpp b/devel/llvm/patches/patch-lib_Target_Sparc_SparcISelLowering_cpp index b3c56669838..a0b5456c32b 100644 --- a/devel/llvm/patches/patch-lib_Target_Sparc_SparcISelLowering_cpp +++ b/devel/llvm/patches/patch-lib_Target_Sparc_SparcISelLowering_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_Sparc_SparcISelLowering_cpp,v 1.8 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_Sparc_SparcISelLowering_cpp,v 1.9 2022/01/03 21:33:51 jca Exp $ - Make sure that we really don't emit quad-precision unless the "hard-quad-float" feature is available @@ -6,7 +6,7 @@ $OpenBSD: patch-lib_Target_Sparc_SparcISelLowering_cpp,v 1.8 2021/05/13 23:54:25 Index: lib/Target/Sparc/SparcISelLowering.cpp --- lib/Target/Sparc/SparcISelLowering.cpp.orig +++ lib/Target/Sparc/SparcISelLowering.cpp -@@ -3111,6 +3111,11 @@ SparcTargetLowering::EmitInstrWithCustomInserter(Machi +@@ -3116,6 +3116,11 @@ SparcTargetLowering::EmitInstrWithCustomInserter(Machi case SP::SELECT_CC_DFP_ICC: case SP::SELECT_CC_QFP_ICC: return expandSelectCC(MI, BB, SP::BCOND); diff --git a/devel/llvm/patches/patch-lib_Target_Sparc_SparcInstrInfo_td b/devel/llvm/patches/patch-lib_Target_Sparc_SparcInstrInfo_td index f5ff7b0d3a5..c2a977c8e3e 100644 --- a/devel/llvm/patches/patch-lib_Target_Sparc_SparcInstrInfo_td +++ b/devel/llvm/patches/patch-lib_Target_Sparc_SparcInstrInfo_td @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_Sparc_SparcInstrInfo_td,v 1.11 2020/08/05 06:49:48 jca Exp $ +$OpenBSD: patch-lib_Target_Sparc_SparcInstrInfo_td,v 1.12 2022/01/03 21:33:51 jca Exp $ Make sure that we really don't emit quad-precision unless the "hard-quad-float" feature is available @@ -6,7 +6,7 @@ Make sure that we really don't emit quad-precision unless the Index: lib/Target/Sparc/SparcInstrInfo.td --- lib/Target/Sparc/SparcInstrInfo.td.orig +++ lib/Target/Sparc/SparcInstrInfo.td -@@ -468,6 +468,27 @@ let Uses = [ICC], usesCustomInserter = 1 in { +@@ -487,6 +487,27 @@ let Uses = [ICC], usesCustomInserter = 1 in { [(set f128:$dst, (SPselecticc f128:$T, f128:$F, imm:$Cond))]>; } @@ -34,7 +34,7 @@ Index: lib/Target/Sparc/SparcInstrInfo.td let usesCustomInserter = 1, Uses = [FCC0] in { def SELECT_CC_Int_FCC -@@ -1391,12 +1412,12 @@ let Predicates = [HasV9], Constraints = "$f = $rd" in +@@ -1418,12 +1439,12 @@ let Predicates = [HasV9], Constraints = "$f = $rd" in (ins DFPRegs:$rs2, DFPRegs:$f, CCOp:$cond), "fmovd$cond %icc, $rs2, $rd", [(set f64:$rd, (SPselecticc f64:$rs2, f64:$f, imm:$cond))]>; @@ -49,7 +49,7 @@ Index: lib/Target/Sparc/SparcInstrInfo.td } let Uses = [FCC0], intcc = 0, opf_cc = 0b00 in { -@@ -1410,12 +1431,12 @@ let Predicates = [HasV9], Constraints = "$f = $rd" in +@@ -1437,12 +1458,12 @@ let Predicates = [HasV9], Constraints = "$f = $rd" in (ins DFPRegs:$rs2, DFPRegs:$f, CCOp:$cond), "fmovd$cond %fcc0, $rs2, $rd", [(set f64:$rd, (SPselectfcc f64:$rs2, f64:$f, imm:$cond))]>; @@ -64,7 +64,7 @@ Index: lib/Target/Sparc/SparcInstrInfo.td } } -@@ -1425,28 +1446,28 @@ let Predicates = [HasV9] in { +@@ -1452,28 +1473,28 @@ let Predicates = [HasV9] in { def FMOVD : F3_3u<2, 0b110100, 0b000000010, (outs DFPRegs:$rd), (ins DFPRegs:$rs2), "fmovd $rs2, $rd", []>; @@ -99,7 +99,7 @@ Index: lib/Target/Sparc/SparcInstrInfo.td } // Floating-point compare instruction with %fcc0-%fcc3. -@@ -1493,11 +1514,11 @@ let Predicates = [HasV9] in { +@@ -1520,11 +1541,11 @@ let Predicates = [HasV9] in { : F4_3<0b110101, 0b000010, (outs DFPRegs:$rd), (ins FCCRegs:$opf_cc, DFPRegs:$rs2, DFPRegs:$f, CCOp:$cond), "fmovd$cond $opf_cc, $rs2, $rd", []>; diff --git a/devel/llvm/patches/patch-lib_Target_X86_CMakeLists_txt b/devel/llvm/patches/patch-lib_Target_X86_CMakeLists_txt index dd74fed31db..a103a2555c3 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_CMakeLists_txt +++ b/devel/llvm/patches/patch-lib_Target_X86_CMakeLists_txt @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_CMakeLists_txt,v 1.6 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_CMakeLists_txt,v 1.7 2022/01/03 21:33:51 jca Exp $ - Add a clang pass that identifies potential ROP gadgets and replaces ROP friendly instructions with safe alternatives. This initial commit fixes @@ -10,7 +10,7 @@ $OpenBSD: patch-lib_Target_X86_CMakeLists_txt,v 1.6 2021/05/13 23:54:25 jca Exp Index: lib/Target/X86/CMakeLists.txt --- lib/Target/X86/CMakeLists.txt.orig +++ lib/Target/X86/CMakeLists.txt -@@ -34,6 +34,7 @@ set(sources +@@ -42,6 +42,7 @@ set(sources X86ExpandPseudo.cpp X86FastISel.cpp X86FixupBWInsts.cpp @@ -18,7 +18,7 @@ Index: lib/Target/X86/CMakeLists.txt X86FixupLEAs.cpp X86AvoidStoreForwardingBlocks.cpp X86FixupSetCC.cpp -@@ -62,6 +63,7 @@ set(sources +@@ -71,6 +72,7 @@ set(sources X86PartialReduction.cpp X86RegisterBankInfo.cpp X86RegisterInfo.cpp diff --git a/devel/llvm/patches/patch-lib_Target_X86_MCTargetDesc_X86AsmBackend_cpp b/devel/llvm/patches/patch-lib_Target_X86_MCTargetDesc_X86AsmBackend_cpp deleted file mode 100644 index 45aab9c3b1f..00000000000 --- a/devel/llvm/patches/patch-lib_Target_X86_MCTargetDesc_X86AsmBackend_cpp +++ /dev/null @@ -1,80 +0,0 @@ -$OpenBSD: patch-lib_Target_X86_MCTargetDesc_X86AsmBackend_cpp,v 1.9 2021/05/13 23:54:25 jca Exp $ - -trapsleds - -Index: lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp ---- lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp.orig -+++ lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp -@@ -1071,57 +1071,23 @@ void X86AsmBackend::finishLayout(MCAssembler const &As - /// bytes. - /// \return - true on success, false on failure - bool X86AsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const { -- static const char Nops[10][11] = { -- // nop -- "\x90", -- // xchg %ax,%ax -- "\x66\x90", -- // nopl (%[re]ax) -- "\x0f\x1f\x00", -- // nopl 0(%[re]ax) -- "\x0f\x1f\x40\x00", -- // nopl 0(%[re]ax,%[re]ax,1) -- "\x0f\x1f\x44\x00\x00", -- // nopw 0(%[re]ax,%[re]ax,1) -- "\x66\x0f\x1f\x44\x00\x00", -- // nopl 0L(%[re]ax) -- "\x0f\x1f\x80\x00\x00\x00\x00", -- // nopl 0L(%[re]ax,%[re]ax,1) -- "\x0f\x1f\x84\x00\x00\x00\x00\x00", -- // nopw 0L(%[re]ax,%[re]ax,1) -- "\x66\x0f\x1f\x84\x00\x00\x00\x00\x00", -- // nopw %cs:0L(%[re]ax,%[re]ax,1) -- "\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00", -- }; - -- // This CPU doesn't support long nops. If needed add more. -- // FIXME: We could generated something better than plain 0x90. -- if (!STI.hasFeature(X86::FeatureNOPL) && !STI.hasFeature(X86::Mode64Bit)) { -- for (uint64_t i = 0; i < Count; ++i) -- OS << '\x90'; -- return true; -- } -- -- // 15-bytes is the longest single NOP instruction, but 10-bytes is -- // commonly the longest that can be efficiently decoded. -- uint64_t MaxNopLength = 10; -- if (STI.getFeatureBits()[X86::FeatureFast7ByteNOP]) -- MaxNopLength = 7; -- else if (STI.getFeatureBits()[X86::FeatureFast15ByteNOP]) -- MaxNopLength = 15; -- else if (STI.getFeatureBits()[X86::FeatureFast11ByteNOP]) -- MaxNopLength = 11; -- -- // Emit as many MaxNopLength NOPs as needed, then emit a NOP of the remaining -- // length. -+ // Write 1 or 2 byte NOP sequences, or a longer trapsled, until -+ // we have written Count bytes - do { -- const uint8_t ThisNopLength = (uint8_t) std::min(Count, MaxNopLength); -- const uint8_t Prefixes = ThisNopLength <= 10 ? 0 : ThisNopLength - 10; -- for (uint8_t i = 0; i < Prefixes; i++) -- OS << '\x66'; -- const uint8_t Rest = ThisNopLength - Prefixes; -- if (Rest != 0) -- OS.write(Nops[Rest - 1], Rest); -+ const uint8_t ThisNopLength = (uint8_t) std::min(Count, (uint64_t)127); -+ switch (ThisNopLength) { -+ case 0: break; -+ case 1: OS << '\x90'; -+ break; -+ case 2: OS << '\x66'; -+ OS << '\x90'; -+ break; -+ default: OS << '\xEB'; -+ OS << (uint8_t)(ThisNopLength - 2); -+ for(uint8_t i = 2; i < ThisNopLength; ++i) -+ OS << '\xCC'; -+ } - Count -= ThisNopLength; - } while (Count != 0); - diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_cpp b/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_cpp index 77250aefded..f3eb0141ae7 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_cpp +++ b/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86FrameLowering_cpp,v 1.9 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86FrameLowering_cpp,v 1.10 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -31,7 +31,7 @@ Index: lib/Target/X86/X86FrameLowering.cpp #include "X86Subtarget.h" #include "X86TargetMachine.h" #include "llvm/ADT/SmallSet.h" -@@ -45,7 +46,7 @@ X86FrameLowering::X86FrameLowering(const X86Subtarget +@@ -46,7 +47,7 @@ X86FrameLowering::X86FrameLowering(const X86Subtarget MaybeAlign StackAlignOverride) : TargetFrameLowering(StackGrowsDown, StackAlignOverride.valueOrOne(), STI.is64Bit() ? -8 : -4), @@ -40,7 +40,7 @@ Index: lib/Target/X86/X86FrameLowering.cpp // Cache a bunch of frame-related predicates for this subtarget. SlotSize = TRI->getSlotSize(); Is64Bit = STI.is64Bit(); -@@ -53,6 +54,7 @@ X86FrameLowering::X86FrameLowering(const X86Subtarget +@@ -54,6 +55,7 @@ X86FrameLowering::X86FrameLowering(const X86Subtarget // standard x86_64 and NaCl use 64-bit frame/stack pointers, x32 - 32-bit. Uses64BitFramePtr = STI.isTarget64BitLP64() || STI.isTargetNaCl64(); StackPtr = TRI->getStackRegister(); @@ -48,7 +48,7 @@ Index: lib/Target/X86/X86FrameLowering.cpp } bool X86FrameLowering::hasReservedCallFrame(const MachineFunction &MF) const { -@@ -98,7 +100,8 @@ bool X86FrameLowering::hasFP(const MachineFunction &MF +@@ -99,7 +101,8 @@ bool X86FrameLowering::hasFP(const MachineFunction &MF MF.getInfo()->hasPreallocatedCall() || MF.callsUnwindInit() || MF.hasEHFunclets() || MF.callsEHReturn() || MFI.hasStackMap() || MFI.hasPatchPoint() || @@ -58,7 +58,7 @@ Index: lib/Target/X86/X86FrameLowering.cpp } static unsigned getSUBriOpcode(bool IsLP64, int64_t Imm) { -@@ -1243,6 +1246,24 @@ void X86FrameLowering::BuildStackAlignAND(MachineBasic +@@ -1213,6 +1216,24 @@ void X86FrameLowering::BuildStackAlignAND(MachineBasic } } @@ -83,9 +83,9 @@ Index: lib/Target/X86/X86FrameLowering.cpp bool X86FrameLowering::has128ByteRedZone(const MachineFunction& MF) const { // x86-64 (non Win64) has a 128 byte red zone which is guaranteed not to be // clobbered by any interrupt handler. -@@ -1517,6 +1538,43 @@ void X86FrameLowering::emitPrologue(MachineFunction &M - nullptr, DwarfFramePtr)); - } +@@ -1537,6 +1558,43 @@ void X86FrameLowering::emitPrologue(MachineFunction &M + .addReg(StackPtr) + .setMIFlag(MachineInstr::FrameSetup); + if (SaveArgs && !Fn.arg_empty()) { + ArrayRef GPRs = @@ -119,20 +119,21 @@ Index: lib/Target/X86/X86FrameLowering.cpp + SaveSize += SlotSize; + } + -+ //dlg StackSize -= SaveSize; ++ //dlg StackSize -= SaveSize; + //dlg MFI.setStackSize(StackSize); + X86FI->setSaveArgSize(SaveSize); + } + - if (NeedsWinFPO) { - // .cv_fpo_setframe $FramePtr - HasWinCFI = true; -@@ -2009,10 +2067,16 @@ void X86FrameLowering::emitEpilogue(MachineFunction &M - // AfterPop is the position to insert .cfi_restore. - MachineBasicBlock::iterator AfterPop = MBBI; - if (HasFP) { + if (NeedsDwarfCFI) { + // Mark effective beginning of when frame pointer becomes valid. + // Define the current CFA to use the EBP/RBP register. +@@ -2047,10 +2105,17 @@ void X86FrameLowering::emitEpilogue(MachineFunction &M + int Offset = 16 + mergeSPUpdates(MBB, MBBI, true); + emitSPUpdate(MBB, MBBI, DL, Offset, /*InEpilogue*/true); + } - // Pop EBP. - BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::POP64r : X86::POP32r), ++ + if (X86FI->getSaveArgSize()) { + // LEAVE is effectively mov rbp,rsp; pop rbp + BuildMI(MBB, MBBI, DL, TII.get(X86::LEAVE64)) @@ -143,20 +144,18 @@ Index: lib/Target/X86/X86FrameLowering.cpp MachineFramePtr) .setMIFlag(MachineInstr::FrameDestroy); + } - if (NeedsDwarfCFI) { - unsigned DwarfStackPtr = - TRI->getDwarfRegNum(Is64Bit ? X86::RSP : X86::ESP, true); -@@ -2037,7 +2101,8 @@ void X86FrameLowering::emitEpilogue(MachineFunction &M + // We need to reset FP to its untagged state on return. Bit 60 is currently + // used to show the presence of an extended frame. +@@ -2087,6 +2152,7 @@ void X86FrameLowering::emitEpilogue(MachineFunction &M if (Opc != X86::DBG_VALUE && !PI->isTerminator()) { if ((Opc != X86::POP32r || !PI->getFlag(MachineInstr::FrameDestroy)) && -- (Opc != X86::POP64r || !PI->getFlag(MachineInstr::FrameDestroy))) -+ (Opc != X86::POP64r || !PI->getFlag(MachineInstr::FrameDestroy)) && -+ (Opc != X86::LEAVE64 || !PI->getFlag(MachineInstr::FrameDestroy))) + (Opc != X86::POP64r || !PI->getFlag(MachineInstr::FrameDestroy)) && ++ (Opc != X86::LEAVE64 || !PI->getFlag(MachineInstr::FrameDestroy)) && + (Opc != X86::BTR64ri8 || !PI->getFlag(MachineInstr::FrameDestroy)) && + (Opc != X86::ADD64ri8 || !PI->getFlag(MachineInstr::FrameDestroy))) break; - FirstCSPop = PI; - } -@@ -2202,6 +2267,8 @@ int X86FrameLowering::getFrameIndexReference(const Mac +@@ -2266,6 +2332,8 @@ StackOffset X86FrameLowering::getFrameIndexReference(c "FPDelta isn't aligned per the Win64 ABI!"); } @@ -165,7 +164,7 @@ Index: lib/Target/X86/X86FrameLowering.cpp if (TRI->hasBasePointer(MF)) { assert(HasFP && "VLAs and dynamic stack realign, but no FP?!"); -@@ -3603,6 +3670,10 @@ void X86FrameLowering::processFunctionBeforeFrameFinal +@@ -3699,6 +3767,10 @@ void X86FrameLowering::adjustFrameForMsvcCxxEh(Machine addFrameReference(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64mi32)), UnwindHelpFI) .addImm(-2); diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_h b/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_h index b99996c3b15..0ff2dae8101 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_h +++ b/devel/llvm/patches/patch-lib_Target_X86_X86FrameLowering_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86FrameLowering_h,v 1.7 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86FrameLowering_h,v 1.8 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -29,9 +29,9 @@ Index: lib/Target/X86/X86FrameLowering.h +#include "X86ReturnProtectorLowering.h" #include "llvm/CodeGen/TargetFrameLowering.h" + #include "llvm/Support/TypeSize.h" - namespace llvm { -@@ -22,6 +23,7 @@ class MCCFIInstruction; +@@ -23,6 +24,7 @@ class MCCFIInstruction; class X86InstrInfo; class X86Subtarget; class X86RegisterInfo; @@ -39,7 +39,7 @@ Index: lib/Target/X86/X86FrameLowering.h class X86FrameLowering : public TargetFrameLowering { public: -@@ -32,7 +34,10 @@ class X86FrameLowering : public TargetFrameLowering { +@@ -33,7 +35,10 @@ class X86FrameLowering : public TargetFrameLowering { const X86Subtarget &STI; const X86InstrInfo &TII; const X86RegisterInfo *TRI; diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86IndirectThunks_cpp b/devel/llvm/patches/patch-lib_Target_X86_X86IndirectThunks_cpp index 91e9780c0fb..736a7092a8e 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86IndirectThunks_cpp +++ b/devel/llvm/patches/patch-lib_Target_X86_X86IndirectThunks_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_X86_X86IndirectThunks_cpp,v 1.1 2021/09/19 17:49:23 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86IndirectThunks_cpp,v 1.2 2022/01/03 21:33:51 jca Exp $ Add lfence after ret in retpoline thunk. Index: lib/Target/X86/X86IndirectThunks.cpp --- lib/Target/X86/X86IndirectThunks.cpp.orig +++ lib/Target/X86/X86IndirectThunks.cpp -@@ -250,6 +250,7 @@ void RetpolineThunkInserter::populateThunk(MachineFunc +@@ -249,6 +249,7 @@ void RetpolineThunkInserter::populateThunk(MachineFunc CallTarget->back().setPreInstrSymbol(MF, TargetSym); BuildMI(CallTarget, DebugLoc(), TII->get(RetOpc)); diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86InstrCompiler_td b/devel/llvm/patches/patch-lib_Target_X86_X86InstrCompiler_td index 12d5cc36f12..e0754291b27 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86InstrCompiler_td +++ b/devel/llvm/patches/patch-lib_Target_X86_X86InstrCompiler_td @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86InstrCompiler_td,v 1.5 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86InstrCompiler_td,v 1.6 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -22,7 +22,7 @@ $OpenBSD: patch-lib_Target_X86_X86InstrCompiler_td,v 1.5 2021/05/13 23:54:25 jca Index: lib/Target/X86/X86InstrCompiler.td --- lib/Target/X86/X86InstrCompiler.td.orig +++ lib/Target/X86/X86InstrCompiler.td -@@ -268,6 +268,25 @@ def MORESTACK_RET_RESTORE_R10 : I<0, Pseudo, (outs), ( +@@ -277,6 +277,25 @@ def MORESTACK_RET_RESTORE_R10 : I<0, Pseudo, (outs), ( } //===----------------------------------------------------------------------===// @@ -36,11 +36,11 @@ Index: lib/Target/X86/X86InstrCompiler.td +// used as a return value. When emitted as a split BB, the single byte +// register would sometimes be widened to 4 bytes, which would corrupt +// the return value (ie mov %ecx, %eax instead of mov %cl, %al). -+let isCodeGenOnly = 1, Uses = [EFLAGS] in { ++let isCodeGenOnly = 1, hasNoSchedulingInfo = 1, Uses = [EFLAGS] in { +def RETGUARD_JMP_TRAP: I<0, Pseudo, (outs), (ins), "", []>; +} + -+let isCodeGenOnly = 1 in { ++let isCodeGenOnly = 1, hasNoSchedulingInfo = 1 in { +def JMP_TRAP: I<0, Pseudo, (outs), (ins), "", []>; +} + diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86MCInstLower_cpp b/devel/llvm/patches/patch-lib_Target_X86_X86MCInstLower_cpp index e988cc0f4a5..cbc67b7ed33 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86MCInstLower_cpp +++ b/devel/llvm/patches/patch-lib_Target_X86_X86MCInstLower_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86MCInstLower_cpp,v 1.10 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86MCInstLower_cpp,v 1.11 2022/01/03 21:33:51 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -25,7 +25,7 @@ $OpenBSD: patch-lib_Target_X86_X86MCInstLower_cpp,v 1.10 2021/05/13 23:54:25 jca Index: lib/Target/X86/X86MCInstLower.cpp --- lib/Target/X86/X86MCInstLower.cpp.orig +++ lib/Target/X86/X86MCInstLower.cpp -@@ -2566,6 +2566,50 @@ void X86AsmPrinter::emitInstruction(const MachineInstr +@@ -2570,6 +2570,50 @@ void X86AsmPrinter::emitInstruction(const MachineInstr MCInstBuilder(X86::MOV64rr).addReg(X86::R10).addReg(X86::RAX)); return; @@ -76,7 +76,7 @@ Index: lib/Target/X86/X86MCInstLower.cpp case X86::SEH_PushReg: case X86::SEH_SaveReg: case X86::SEH_SaveXMM: -@@ -2615,4 +2659,10 @@ void X86AsmPrinter::emitInstruction(const MachineInstr +@@ -2628,4 +2672,10 @@ void X86AsmPrinter::emitInstruction(const MachineInstr } EmitAndCountInstruction(TmpInst); diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86MachineFunctionInfo_h b/devel/llvm/patches/patch-lib_Target_X86_X86MachineFunctionInfo_h index 429ef21cf91..491f9ad6597 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86MachineFunctionInfo_h +++ b/devel/llvm/patches/patch-lib_Target_X86_X86MachineFunctionInfo_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86MachineFunctionInfo_h,v 1.5 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86MachineFunctionInfo_h,v 1.6 2022/01/03 21:33:51 jca Exp $ implement -msave-args in clang/llvm, like the sun did for gcc @@ -15,7 +15,7 @@ Index: lib/Target/X86/X86MachineFunctionInfo.h /// BytesToPopOnReturn - Number of bytes function pops on return (in addition /// to the space used by the return address). /// Used on windows platform for stdcall & fastcall name decoration -@@ -138,6 +141,9 @@ class X86MachineFunctionInfo : public MachineFunctionI +@@ -145,6 +148,9 @@ class X86MachineFunctionInfo : public MachineFunctionI unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; } void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; } diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86RegisterInfo_td b/devel/llvm/patches/patch-lib_Target_X86_X86RegisterInfo_td index 43067a76eec..8572438c4ef 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86RegisterInfo_td +++ b/devel/llvm/patches/patch-lib_Target_X86_X86RegisterInfo_td @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86RegisterInfo_td,v 1.8 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86RegisterInfo_td,v 1.9 2022/01/03 21:33:52 jca Exp $ - The compiler is generally free to allocate general purpose registers in whatever order it chooses. Reasons for choosing one register before another @@ -23,7 +23,7 @@ $OpenBSD: patch-lib_Target_X86_X86RegisterInfo_td,v 1.8 2021/05/13 23:54:25 jca Index: lib/Target/X86/X86RegisterInfo.td --- lib/Target/X86/X86RegisterInfo.td.orig +++ lib/Target/X86/X86RegisterInfo.td -@@ -421,8 +421,8 @@ def GRH16 : RegisterClass<"X86", [i16], 16, +@@ -424,8 +424,8 @@ def GRH16 : RegisterClass<"X86", [i16], 16, R15WH)>; def GR32 : RegisterClass<"X86", [i32], 32, @@ -34,7 +34,7 @@ Index: lib/Target/X86/X86RegisterInfo.td // GR64 - 64-bit GPRs. This oddly includes RIP, which isn't accurate, since // RIP isn't really a register and it can't be used anywhere except in an -@@ -431,7 +431,7 @@ def GR32 : RegisterClass<"X86", [i32], 32, +@@ -434,7 +434,7 @@ def GR32 : RegisterClass<"X86", [i32], 32, // tests because of the inclusion of RIP in this register class. def GR64 : RegisterClass<"X86", [i64], 64, (add RAX, RCX, RDX, RSI, RDI, R8, R9, R10, R11, diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86Subtarget_h b/devel/llvm/patches/patch-lib_Target_X86_X86Subtarget_h index dbaac29c2c1..fec6a9ae400 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86Subtarget_h +++ b/devel/llvm/patches/patch-lib_Target_X86_X86Subtarget_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86Subtarget_h,v 1.9 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86Subtarget_h,v 1.10 2022/01/03 21:33:52 jca Exp $ - implement -msave-args in clang/llvm, like the sun did for gcc - Turn on -mretpoline by default in clang on amd64. @@ -6,9 +6,9 @@ $OpenBSD: patch-lib_Target_X86_X86Subtarget_h,v 1.9 2021/05/13 23:54:25 jca Exp Index: lib/Target/X86/X86Subtarget.h --- lib/Target/X86/X86Subtarget.h.orig +++ lib/Target/X86/X86Subtarget.h -@@ -459,6 +459,9 @@ class X86Subtarget final : public X86GenSubtargetInfo - /// entry to the function and which must be maintained by every function. - Align stackAlignment = Align(4); +@@ -481,6 +481,9 @@ class X86Subtarget final : public X86GenSubtargetInfo + + Align TileConfigAlignment = Align(4); + /// Whether function prologues should save register arguments on the stack. + bool SaveArgs = false; @@ -16,16 +16,16 @@ Index: lib/Target/X86/X86Subtarget.h /// Max. memset / memcpy size that is turned into rep/movs, rep/stos ops. /// // FIXME: this is a known good value for Yonah. How about others? -@@ -549,6 +552,8 @@ class X86Subtarget final : public X86GenSubtargetInfo - return &getInstrInfo()->getRegisterInfo(); - } +@@ -567,6 +570,8 @@ class X86Subtarget final : public X86GenSubtargetInfo + unsigned getTileConfigSize() const { return 64; } + Align getTileConfigAlignment() const { return TileConfigAlignment; } + bool getSaveArgs() const { return SaveArgs; } + /// Returns the minimum alignment known to hold of the /// stack frame on entry to the function and which must be maintained by every /// function for this subtarget. -@@ -809,6 +814,7 @@ class X86Subtarget final : public X86GenSubtargetInfo +@@ -832,6 +837,7 @@ class X86Subtarget final : public X86GenSubtargetInfo bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); } bool isTargetFreeBSD() const { return TargetTriple.isOSFreeBSD(); } diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86TargetMachine_cpp b/devel/llvm/patches/patch-lib_Target_X86_X86TargetMachine_cpp index 16eaa9a2af7..2048b263518 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86TargetMachine_cpp +++ b/devel/llvm/patches/patch-lib_Target_X86_X86TargetMachine_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86TargetMachine_cpp,v 1.9 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86TargetMachine_cpp,v 1.10 2022/01/03 21:33:52 jca Exp $ Add a clang pass that identifies potential ROP gadgets and replaces ROP friendly instructions with safe alternatives. This initial commit fixes @@ -9,7 +9,7 @@ this framework. Index: lib/Target/X86/X86TargetMachine.cpp --- lib/Target/X86/X86TargetMachine.cpp.orig +++ lib/Target/X86/X86TargetMachine.cpp -@@ -517,6 +517,7 @@ void X86PassConfig::addPreEmitPass() { +@@ -546,6 +546,7 @@ void X86PassConfig::addPreEmitPass() { addPass(createX86EvexToVexInsts()); addPass(createX86DiscriminateMemOpsPass()); addPass(createX86InsertPrefetchPass()); diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86_h b/devel/llvm/patches/patch-lib_Target_X86_X86_h index 19387ad815a..fdf3339a6de 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86_h +++ b/devel/llvm/patches/patch-lib_Target_X86_X86_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Target_X86_X86_h,v 1.4 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86_h,v 1.5 2022/01/03 21:33:52 jca Exp $ Add a clang pass that identifies potential ROP gadgets and replaces ROP friendly instructions with safe alternatives. This initial commit fixes @@ -9,7 +9,7 @@ this framework. Index: lib/Target/X86/X86.h --- lib/Target/X86/X86.h.orig +++ lib/Target/X86/X86.h -@@ -113,6 +113,10 @@ FunctionPass *createX86FixupBWInsts(); +@@ -122,6 +122,10 @@ FunctionPass *createX86FixupBWInsts(); /// to another, when profitable. FunctionPass *createX86DomainReassignmentPass(); diff --git a/devel/llvm/patches/patch-lib_Target_X86_X86_td b/devel/llvm/patches/patch-lib_Target_X86_X86_td index 14444013992..a734109d76a 100644 --- a/devel/llvm/patches/patch-lib_Target_X86_X86_td +++ b/devel/llvm/patches/patch-lib_Target_X86_X86_td @@ -1,11 +1,11 @@ -$OpenBSD: patch-lib_Target_X86_X86_td,v 1.6 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Target_X86_X86_td,v 1.7 2022/01/03 21:33:52 jca Exp $ implement -msave-args in clang/llvm, like the sun did for gcc Index: lib/Target/X86/X86.td --- lib/Target/X86/X86.td.orig +++ lib/Target/X86/X86.td -@@ -313,6 +313,9 @@ def FeatureLZCNTFalseDeps : SubtargetFeature<"false-de +@@ -321,6 +321,9 @@ def FeatureLZCNTFalseDeps : SubtargetFeature<"false-de "LZCNT/TZCNT have a false dependency on dest register">; def FeaturePCONFIG : SubtargetFeature<"pconfig", "HasPCONFIG", "true", "platform configuration instruction">; @@ -14,4 +14,4 @@ Index: lib/Target/X86/X86.td + "Save register arguments on the stack.">; // On recent X86 (port bound) processors, its preferable to combine to a single shuffle // using a variable mask over multiple fixed shuffles. - def FeatureFastVariableShuffle + def FeatureFastVariableCrossLaneShuffle diff --git a/devel/llvm/patches/patch-lib_Transforms_Scalar_LoopIdiomRecognize_cpp b/devel/llvm/patches/patch-lib_Transforms_Scalar_LoopIdiomRecognize_cpp index 4e694af19ce..cca33c97a80 100644 --- a/devel/llvm/patches/patch-lib_Transforms_Scalar_LoopIdiomRecognize_cpp +++ b/devel/llvm/patches/patch-lib_Transforms_Scalar_LoopIdiomRecognize_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-lib_Transforms_Scalar_LoopIdiomRecognize_cpp,v 1.7 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-lib_Transforms_Scalar_LoopIdiomRecognize_cpp,v 1.8 2022/01/03 21:33:52 jca Exp $ Disable loop idiom recognition for _libc_memset and _libc_memcpy. These are the internal names we use in libc for memset and memcpy and having the @@ -8,7 +8,7 @@ recursion. Index: lib/Transforms/Scalar/LoopIdiomRecognize.cpp --- lib/Transforms/Scalar/LoopIdiomRecognize.cpp.orig +++ lib/Transforms/Scalar/LoopIdiomRecognize.cpp -@@ -312,6 +312,8 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L) { +@@ -367,6 +367,8 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L) { StringRef Name = L->getHeader()->getParent()->getName(); if (Name == "memset" || Name == "memcpy") return false; diff --git a/devel/llvm/patches/patch-lib_Transforms_Scalar_SCCP_cpp b/devel/llvm/patches/patch-lib_Transforms_Scalar_SCCP_cpp deleted file mode 100644 index 56f5d7d9f18..00000000000 --- a/devel/llvm/patches/patch-lib_Transforms_Scalar_SCCP_cpp +++ /dev/null @@ -1,24 +0,0 @@ -$OpenBSD: patch-lib_Transforms_Scalar_SCCP_cpp,v 1.1 2021/05/13 23:54:25 jca Exp $ - -[SCCP] Avoid modifying AdditionalUsers while iterating over it -https://reviews.llvm.org/rG6abb92f2103a58d097620b4410054c5bb18c48ec - -Index: lib/Transforms/Scalar/SCCP.cpp ---- lib/Transforms/Scalar/SCCP.cpp.orig -+++ lib/Transforms/Scalar/SCCP.cpp -@@ -541,9 +541,14 @@ class SCCPSolver : public InstVisitor { (p - - auto Iter = AdditionalUsers.find(I); - if (Iter != AdditionalUsers.end()) { -+ // Copy additional users before notifying them of changes, because new -+ // users may be added, potentially invalidating the iterator. -+ SmallVector ToNotify; - for (User *U : Iter->second) - if (auto *UI = dyn_cast(U)) -- OperandChangedState(UI); -+ ToNotify.push_back(UI); -+ for (Instruction *UI : ToNotify) -+ OperandChangedState(UI); - } - } - void handleCallOverdefined(CallBase &CB); diff --git a/devel/llvm/patches/patch-lib_WindowsManifest_CMakeLists_txt b/devel/llvm/patches/patch-lib_WindowsManifest_CMakeLists_txt deleted file mode 100644 index 9610663fe8d..00000000000 --- a/devel/llvm/patches/patch-lib_WindowsManifest_CMakeLists_txt +++ /dev/null @@ -1,18 +0,0 @@ -$OpenBSD: patch-lib_WindowsManifest_CMakeLists_txt,v 1.2 2020/08/05 06:49:48 jca Exp $ - -For upstream: -bogus dep on all headers in ${Backtrace_INCLUDE_DIRS} ie /usr/local/include. - -Index: lib/WindowsManifest/CMakeLists.txt ---- lib/WindowsManifest/CMakeLists.txt.orig -+++ lib/WindowsManifest/CMakeLists.txt -@@ -2,8 +2,7 @@ add_llvm_component_library(LLVMWindowsManifest - WindowsManifestMerger.cpp - - ADDITIONAL_HEADER_DIRS -- ${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest -- ${Backtrace_INCLUDE_DIRS}) -+ ${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest) - - if(LIBXML2_LIBRARIES) - target_link_libraries(LLVMWindowsManifest PUBLIC ${LIBXML2_LIBRARIES}) diff --git a/devel/llvm/patches/patch-tools_clang_include_clang_Basic_CodeGenOptions_def b/devel/llvm/patches/patch-tools_clang_include_clang_Basic_CodeGenOptions_def index 3c12be7c9bc..dc7635aeebc 100644 --- a/devel/llvm/patches/patch-tools_clang_include_clang_Basic_CodeGenOptions_def +++ b/devel/llvm/patches/patch-tools_clang_include_clang_Basic_CodeGenOptions_def @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_include_clang_Basic_CodeGenOptions_def,v 1.7 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_include_clang_Basic_CodeGenOptions_def,v 1.8 2022/01/03 21:33:52 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -22,7 +22,7 @@ $OpenBSD: patch-tools_clang_include_clang_Basic_CodeGenOptions_def,v 1.7 2021/05 Index: tools/clang/include/clang/Basic/CodeGenOptions.def --- tools/clang/include/clang/Basic/CodeGenOptions.def.orig +++ tools/clang/include/clang/Basic/CodeGenOptions.def -@@ -312,6 +312,9 @@ VALUE_CODEGENOPT(SmallDataLimit, 32, 0) +@@ -340,6 +340,9 @@ VALUE_CODEGENOPT(SmallDataLimit, 32, 0) /// The lower bound for a buffer to be considered for stack protection. VALUE_CODEGENOPT(SSPBufferSize, 32, 0) @@ -30,5 +30,5 @@ Index: tools/clang/include/clang/Basic/CodeGenOptions.def +CODEGENOPT(ReturnProtector, 1, 0) + /// The kind of generated debug info. - ENUM_CODEGENOPT(DebugInfo, codegenoptions::DebugInfoKind, 3, codegenoptions::NoDebugInfo) + ENUM_CODEGENOPT(DebugInfo, codegenoptions::DebugInfoKind, 4, codegenoptions::NoDebugInfo) diff --git a/devel/llvm/patches/patch-tools_clang_include_clang_Basic_DiagnosticSemaKinds_td b/devel/llvm/patches/patch-tools_clang_include_clang_Basic_DiagnosticSemaKinds_td index 1fd626db905..f7147b721fe 100644 --- a/devel/llvm/patches/patch-tools_clang_include_clang_Basic_DiagnosticSemaKinds_td +++ b/devel/llvm/patches/patch-tools_clang_include_clang_Basic_DiagnosticSemaKinds_td @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_include_clang_Basic_DiagnosticSemaKinds_td,v 1.10 2021/09/19 17:49:23 jca Exp $ +$OpenBSD: patch-tools_clang_include_clang_Basic_DiagnosticSemaKinds_td,v 1.11 2022/01/03 21:33:52 jca Exp $ - Disable -Waddress-of-packed-member by default. @@ -14,25 +14,25 @@ base gcc does the same. Index: tools/clang/include/clang/Basic/DiagnosticSemaKinds.td --- tools/clang/include/clang/Basic/DiagnosticSemaKinds.td.orig +++ tools/clang/include/clang/Basic/DiagnosticSemaKinds.td -@@ -6440,7 +6440,7 @@ def warn_pointer_indirection_from_incompatible_type : +@@ -6768,7 +6768,7 @@ def warn_pointer_indirection_from_incompatible_type : InGroup, DefaultIgnore; def warn_taking_address_of_packed_member : Warning< "taking address of packed member %0 of class or structure %q1 may result in an unaligned pointer value">, - InGroup>; + InGroup>, DefaultIgnore; - - def err_objc_object_assignment : Error< - "cannot assign to class object (%0 invalid)">; -@@ -7607,7 +7607,7 @@ def ext_typecheck_convert_incompatible_pointer_sign : - "sending to parameter of different type}0,1" + def warn_param_mismatched_alignment : Warning< + "passing %0-byte aligned argument to %1-byte aligned parameter %2 of %3 may result in an unaligned pointer access">, + InGroup>; +@@ -7980,7 +7980,7 @@ def ext_typecheck_convert_incompatible_pointer_sign : "|%diff{casting $ to type $|casting between types}0,1}2" - " converts between pointers to integer types with different sign">, + " converts between pointers to integer types %select{with different sign|" + "where one is of the unique plain 'char' type and the other is not}3">, - InGroup>; + InGroup>, DefaultIgnore; - def err_typecheck_convert_incompatible_pointer_sign : Error< - "%select{%diff{assigning to $ from $|assigning to different types}0,1" - "|%diff{passing $ to parameter of type $|" -@@ -9103,6 +9103,9 @@ def err_os_log_argument_too_big : Error< + def err_typecheck_convert_incompatible_pointer_sign : + Error; + def ext_typecheck_convert_incompatible_pointer : ExtWarn< +@@ -9512,6 +9512,9 @@ def err_os_log_argument_too_big : Error< "os_log() argument %0 is too big (%1 bytes, max %2)">; def warn_os_log_format_narg : Error< "os_log() '%%n' format specifier is not allowed">, DefaultError; diff --git a/devel/llvm/patches/patch-tools_clang_include_clang_Driver_Options_td b/devel/llvm/patches/patch-tools_clang_include_clang_Driver_Options_td index 39c6032b190..e765b42b7cc 100644 --- a/devel/llvm/patches/patch-tools_clang_include_clang_Driver_Options_td +++ b/devel/llvm/patches/patch-tools_clang_include_clang_Driver_Options_td @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_include_clang_Driver_Options_td,v 1.28 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_include_clang_Driver_Options_td,v 1.29 2022/01/03 21:33:52 jca Exp $ - Add ret protector options as no-ops. - Improve the X86FixupGadgets pass @@ -9,7 +9,7 @@ $OpenBSD: patch-tools_clang_include_clang_Driver_Options_td,v 1.28 2021/05/13 23 Index: tools/clang/include/clang/Driver/Options.td --- tools/clang/include/clang/Driver/Options.td.orig +++ tools/clang/include/clang/Driver/Options.td -@@ -1799,6 +1799,16 @@ def ftrivial_auto_var_init : Joined<["-"], "ftrivial-a +@@ -2528,6 +2528,16 @@ def ftrivial_auto_var_init : Joined<["-"], "ftrivial-a def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">, Flags<[CC1Option, CoreOption]>, HelpText<"Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark">; @@ -24,9 +24,9 @@ Index: tools/clang/include/clang/Driver/Options.td +def ffixup_gadgets : Flag<["-"], "ffixup-gadgets">, Group, Flags<[CoreOption]>, + HelpText<"Replace ROP friendly instructions with safe alternatives (x86 only)">; def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group, - Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">; - def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group, Flags<[CoreOption]>, -@@ -2548,6 +2558,8 @@ def mno_check_zero_division : Flag<["-"], "mno-check-z + Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">, + MarshallingInfoInt>; +@@ -3493,6 +3503,8 @@ def mno_check_zero_division : Flag<["-"], "mno-check-z Group; def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">, Group; @@ -35,16 +35,16 @@ Index: tools/clang/include/clang/Driver/Options.td def mbranch_likely : Flag<["-"], "mbranch-likely">, Group, IgnoredGCCCompat; def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group, -@@ -2760,7 +2772,7 @@ def pthreads : Flag<["-"], "pthreads">; - def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>, - HelpText<"Support POSIX threads in generated code">; - def no_pthread : Flag<["-"], "no-pthread">, Flags<[CC1Option]>; +@@ -3721,7 +3733,7 @@ defm pthread : BoolOption<"", "pthread", + LangOpts<"POSIXThreads">, DefaultFalse, + PosFlag, + NegFlag, BothFlags<[CC1Option]>>; -def p : Flag<["-"], "p">; +def p : Flag<["-"], "p">, Alias; - def pie : Flag<["-"], "pie">; - def static_pie : Flag<["-"], "static-pie">; + def pie : Flag<["-"], "pie">, Group; + def static_pie : Flag<["-"], "static-pie">, Group; def read__only__relocs : Separate<["-"], "read_only_relocs">; -@@ -3243,6 +3255,8 @@ def mshstk : Flag<["-"], "mshstk">, Group, Group, Group; def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group; def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group; diff --git a/devel/llvm/patches/patch-tools_clang_include_clang_Sema_Sema_h b/devel/llvm/patches/patch-tools_clang_include_clang_Sema_Sema_h index bc9ca91ad2a..971b2336277 100644 --- a/devel/llvm/patches/patch-tools_clang_include_clang_Sema_Sema_h +++ b/devel/llvm/patches/patch-tools_clang_include_clang_Sema_Sema_h @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_clang_include_clang_Sema_Sema_h,v 1.7 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_include_clang_Sema_Sema_h,v 1.8 2022/01/03 21:33:52 jca Exp $ Teach Clang about syslog format attribute Index: tools/clang/include/clang/Sema/Sema.h --- tools/clang/include/clang/Sema/Sema.h.orig +++ tools/clang/include/clang/Sema/Sema.h -@@ -12226,6 +12226,7 @@ class Sema final { (public) +@@ -12648,6 +12648,7 @@ class Sema final { (public) FST_FreeBSDKPrintf, FST_OSTrace, FST_OSLog, diff --git a/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_RISCV_cpp b/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_RISCV_cpp deleted file mode 100644 index da1c4ae7b21..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_RISCV_cpp +++ /dev/null @@ -1,23 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Basic_Targets_RISCV_cpp,v 1.1 2021/06/27 16:10:23 jca Exp $ - -[RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines. - -Index: tools/clang/lib/Basic/Targets/RISCV.cpp ---- tools/clang/lib/Basic/Targets/RISCV.cpp.orig -+++ tools/clang/lib/Basic/Targets/RISCV.cpp -@@ -115,8 +115,14 @@ void RISCVTargetInfo::getTargetDefines(const LangOptio - Builder.defineMacro("__riscv_muldiv"); - } - -- if (HasA) -+ if (HasA) { - Builder.defineMacro("__riscv_atomic"); -+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); -+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); -+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); -+ if (Is64Bit) -+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); -+ } - - if (HasF || HasD) { - Builder.defineMacro("__riscv_flen", HasD ? "64" : "32"); diff --git a/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_X86_cpp b/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_X86_cpp index 27505a03871..6072da3aca7 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_X86_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_X86_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_clang_lib_Basic_Targets_X86_cpp,v 1.6 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Basic_Targets_X86_cpp,v 1.7 2022/01/03 21:33:52 jca Exp $ implement -msave-args in clang/llvm, like the sun did for gcc Index: tools/clang/lib/Basic/Targets/X86.cpp --- tools/clang/lib/Basic/Targets/X86.cpp.orig +++ tools/clang/lib/Basic/Targets/X86.cpp -@@ -296,6 +296,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vectorisIntegerType() && getContext().getTypeSize(Ty) == 64; -- bool isInt = -- Ty->isIntegerType() || Ty->isPointerType() || Ty->isAggregateType(); -+ bool isInt = !Ty->isFloatingType(); - bool isF64 = Ty->isFloatingType() && getContext().getTypeSize(Ty) == 64; - - // All aggregates are passed indirectly? That doesn't seem consistent - // with the argument-lowering code. -- bool isIndirect = Ty->isAggregateType(); -+ bool isIndirect = isAggregateTypeForABI(Ty); - - CGBuilderTy &Builder = CGF.Builder; - diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_RISCV_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_RISCV_cpp index 1df254c3452..b5d263d1b9f 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_RISCV_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_RISCV_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Arch_RISCV_cpp,v 1.1 2021/05/22 20:27:35 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Arch_RISCV_cpp,v 1.2 2022/01/03 21:33:52 jca Exp $ - ld.lld doesn't properly support R_RISCV_RELAX relocations, switch the default to -no-relax Index: tools/clang/lib/Driver/ToolChains/Arch/RISCV.cpp --- tools/clang/lib/Driver/ToolChains/Arch/RISCV.cpp.orig +++ tools/clang/lib/Driver/ToolChains/Arch/RISCV.cpp -@@ -536,11 +536,19 @@ void riscv::getRISCVTargetFeatures(const Driver &D, co +@@ -556,11 +556,19 @@ void riscv::getRISCVTargetFeatures(const Driver &D, co if (Args.hasArg(options::OPT_ffixed_x31)) Features.push_back("+reserve-x31"); diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_X86_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_X86_cpp index 4c1c8f12302..c2bd887d5ec 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_X86_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Arch_X86_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Arch_X86_cpp,v 1.6 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Arch_X86_cpp,v 1.7 2022/01/03 21:33:52 jca Exp $ - Turn on -mretpoline by default in clang on amd64. Index: tools/clang/lib/Driver/ToolChains/Arch/X86.cpp --- tools/clang/lib/Driver/ToolChains/Arch/X86.cpp.orig +++ tools/clang/lib/Driver/ToolChains/Arch/X86.cpp -@@ -148,6 +148,12 @@ void x86::getX86TargetFeatures(const Driver &D, const +@@ -149,6 +149,12 @@ void x86::getX86TargetFeatures(const Driver &D, const // consider deprecating this and instead warn if the user requests external // retpoline thunks and *doesn't* request some form of retpolines. auto SpectreOpt = clang::driver::options::ID::OPT_INVALID; diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Clang_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Clang_cpp index 8550b77d481..877af6501f1 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Clang_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Clang_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Clang_cpp,v 1.21 2021/05/17 21:46:34 tb Exp $ +$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Clang_cpp,v 1.22 2022/01/03 21:33:52 jca Exp $ - Switch Powerpc64 Big Endian to ELFv2 on OpenBSD. - Adapt the -mfix-loongson2f-btb workaround from as(1) to LLVM/clang. @@ -35,7 +35,7 @@ $OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Clang_cpp,v 1.21 2021/05/17 21 Index: tools/clang/lib/Driver/ToolChains/Clang.cpp --- tools/clang/lib/Driver/ToolChains/Clang.cpp.orig +++ tools/clang/lib/Driver/ToolChains/Clang.cpp -@@ -2328,6 +2328,11 @@ static void CollectArgsForIntegratedAssembler(Compilat +@@ -2489,6 +2489,11 @@ static void CollectArgsForIntegratedAssembler(Compilat CmdArgs.push_back("-soft-float"); continue; } @@ -47,7 +47,7 @@ Index: tools/clang/lib/Driver/ToolChains/Clang.cpp MipsTargetFeature = llvm::StringSwitch(Value) .Case("-mips1", "+mips1") -@@ -4570,9 +4575,12 @@ void Clang::ConstructJob(Compilation &C, const JobActi +@@ -4943,9 +4948,12 @@ void Clang::ConstructJob(Compilation &C, const JobActi OFastEnabled ? options::OPT_Ofast : options::OPT_fstrict_aliasing; // We turn strict aliasing off by default if we're in CL mode, since MSVC // doesn't do any TBAA. @@ -62,7 +62,7 @@ Index: tools/clang/lib/Driver/ToolChains/Clang.cpp CmdArgs.push_back("-relaxed-aliasing"); if (!Args.hasFlag(options::OPT_fstruct_path_tbaa, options::OPT_fno_struct_path_tbaa)) -@@ -5342,7 +5350,8 @@ void Clang::ConstructJob(Compilation &C, const JobActi +@@ -5868,7 +5876,8 @@ void Clang::ConstructJob(Compilation &C, const JobActi options::OPT_fno_strict_overflow)) { if (A->getOption().matches(options::OPT_fno_strict_overflow)) CmdArgs.push_back("-fwrapv"); @@ -72,14 +72,11 @@ Index: tools/clang/lib/Driver/ToolChains/Clang.cpp if (Arg *A = Args.getLastArg(options::OPT_freroll_loops, options::OPT_fno_reroll_loops)) -@@ -5359,10 +5368,51 @@ void Clang::ConstructJob(Compilation &C, const JobActi +@@ -5888,7 +5897,48 @@ void Clang::ConstructJob(Compilation &C, const JobActi options::OPT_mno_speculative_load_hardening, false)) CmdArgs.push_back(Args.MakeArgString("-mspeculative-load-hardening")); -- RenderSSPOptions(TC, Args, CmdArgs, KernelOrKext); - RenderSCPOptions(TC, Args, CmdArgs); - RenderTrivialAutoVarInitOptions(D, TC, Args, CmdArgs); - +- RenderSSPOptions(D, TC, Args, CmdArgs, KernelOrKext); + // -ret-protector + unsigned RetProtector = 1; + if (Arg *A = Args.getLastArg(options::OPT_fno_ret_protector, @@ -109,7 +106,7 @@ Index: tools/clang/lib/Driver/ToolChains/Clang.cpp + options::OPT__param); // ssp-buffer-size + } else { + // If we're not using retguard, then do the usual stack protector -+ RenderSSPOptions(TC, Args, CmdArgs, KernelOrKext); ++ RenderSSPOptions(D, TC, Args, CmdArgs, KernelOrKext); + } + + // -fixup-gadgets @@ -122,10 +119,10 @@ Index: tools/clang/lib/Driver/ToolChains/Clang.cpp + CmdArgs.push_back(Args.MakeArgString(Twine("-x86-fixup-gadgets=true"))); + } + - // Translate -mstackrealign - if (Args.hasFlag(options::OPT_mstackrealign, options::OPT_mno_stackrealign, - false)) -@@ -5857,6 +5907,18 @@ void Clang::ConstructJob(Compilation &C, const JobActi + RenderSCPOptions(TC, Args, CmdArgs); + RenderTrivialAutoVarInitOptions(D, TC, Args, CmdArgs); + +@@ -6445,6 +6495,18 @@ void Clang::ConstructJob(Compilation &C, const JobActi options::OPT_fno_rewrite_imports, false); if (RewriteImports) CmdArgs.push_back("-frewrite-imports"); diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Gnu_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Gnu_cpp index 248b16c7c37..3c48891e60d 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Gnu_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_Gnu_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Gnu_cpp,v 1.10 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_Gnu_cpp,v 1.11 2022/01/03 21:33:52 jca Exp $ - Disable IAS for OpenBSD SPARC. Index: tools/clang/lib/Driver/ToolChains/Gnu.cpp --- tools/clang/lib/Driver/ToolChains/Gnu.cpp.orig +++ tools/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2711,7 +2711,7 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const +@@ -2763,7 +2763,7 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const case llvm::Triple::sparc: case llvm::Triple::sparcel: case llvm::Triple::sparcv9: diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_cpp index 2d97e9e4ca1..e244c874ee1 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_OpenBSD_cpp,v 1.19 2021/09/19 17:49:23 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_OpenBSD_cpp,v 1.20 2022/01/03 21:33:52 jca Exp $ - Add support for building against libestdc++ from ports-gcc. - Allow the compiler driver to link the libclang_rt.profile library. @@ -7,7 +7,7 @@ $OpenBSD: patch-tools_clang_lib_Driver_ToolChains_OpenBSD_cpp,v 1.19 2021/09/19 Index: tools/clang/lib/Driver/ToolChains/OpenBSD.cpp --- tools/clang/lib/Driver/ToolChains/OpenBSD.cpp.orig +++ tools/clang/lib/Driver/ToolChains/OpenBSD.cpp -@@ -12,6 +12,8 @@ +@@ -12,10 +12,13 @@ #include "CommonArgs.h" #include "clang/Config/config.h" #include "clang/Driver/Compilation.h" @@ -16,7 +16,12 @@ Index: tools/clang/lib/Driver/ToolChains/OpenBSD.cpp #include "clang/Driver/Options.h" #include "clang/Driver/SanitizerArgs.h" #include "llvm/Option/ArgList.h" -@@ -191,7 +193,13 @@ void openbsd::Linker::ConstructJob(Compilation &C, con + #include "llvm/Support/Path.h" ++#include "llvm/Support/VirtualFileSystem.h" + + using namespace clang::driver; + using namespace clang::driver::tools; +@@ -197,7 +200,13 @@ void openbsd::Linker::ConstructJob(Compilation &C, con } // FIXME: For some reason GCC passes -lgcc before adding // the default system libraries. Just mimic this for now. @@ -31,7 +36,7 @@ Index: tools/clang/lib/Driver/ToolChains/OpenBSD.cpp if (Args.hasArg(options::OPT_pthread)) { if (!Args.hasArg(options::OPT_shared) && Args.hasArg(options::OPT_pg)) -@@ -207,7 +215,10 @@ void openbsd::Linker::ConstructJob(Compilation &C, con +@@ -213,7 +222,10 @@ void openbsd::Linker::ConstructJob(Compilation &C, con CmdArgs.push_back("-lc"); } @@ -43,27 +48,25 @@ Index: tools/clang/lib/Driver/ToolChains/OpenBSD.cpp } if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { -@@ -220,6 +231,8 @@ void openbsd::Linker::ConstructJob(Compilation &C, con - CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtend))); - } - -+ ToolChain.addProfileRTLibs(Args, CmdArgs); -+ - const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath()); - C.addCommand(std::make_unique( - JA, *this, ResponseFileSupport::AtFileCurCP(), Exec, CmdArgs, Inputs)); -@@ -288,20 +301,21 @@ void OpenBSD::addLibCxxIncludePaths(const llvm::opt::A - getDriver().SysRoot + "/usr/include/c++/v1"); - } - --void OpenBSD::AddCXXStdlibLibArgs(const ArgList &Args, -- ArgStringList &CmdArgs) const { -- bool Profiling = Args.hasArg(options::OPT_pg); +@@ -301,17 +313,34 @@ void OpenBSD::AddCXXStdlibLibArgs(const ArgList &Args, + ArgStringList &CmdArgs) const { + bool Profiling = Args.hasArg(options::OPT_pg); - CmdArgs.push_back(Profiling ? "-lc++_p" : "-lc++"); - CmdArgs.push_back(Profiling ? "-lc++abi_p" : "-lc++abi"); --} -- +- CmdArgs.push_back(Profiling ? "-lpthread_p" : "-lpthread"); ++ switch (GetCXXStdlibType(Args)) { ++ case ToolChain::CST_Libcxx: ++ CmdArgs.push_back(Profiling ? "-lc++_p" : "-lc++"); ++ CmdArgs.push_back(Profiling ? "-lc++abi_p" : "-lc++abi"); ++ CmdArgs.push_back(Profiling ? "-lpthread_p" : "-lpthread"); ++ break; ++ case ToolChain::CST_Libstdcxx: ++ CmdArgs.push_back("-lestdc++"); ++ break; ++ } + } + std::string OpenBSD::getCompilerRT(const ArgList &Args, StringRef Component, FileType Type) const { @@ -77,14 +80,16 @@ Index: tools/clang/lib/Driver/ToolChains/OpenBSD.cpp + } else { + SmallString<128> P(getDriver().ResourceDir); + std::string CRTBasename = -+ getCompilerRTBasename(Args, Component, Type, /*AddArch=*/false); ++ buildCompilerRTBasename(Args, Component, Type, /*AddArch=*/false); + llvm::sys::path::append(P, "lib", CRTBasename); -+ return std::string(P.str()); ++ if (getVFS().exists(P)) ++ return std::string(P.str()); ++ return ToolChain::getCompilerRT(Args, Component, Type); + } } Tool *OpenBSD::buildAssembler() const { -@@ -311,3 +325,70 @@ Tool *OpenBSD::buildAssembler() const { +@@ -321,3 +350,54 @@ Tool *OpenBSD::buildAssembler() const { Tool *OpenBSD::buildLinker() const { return new tools::openbsd::Linker(*this); } bool OpenBSD::HasNativeLLVMSupport() const { return true; } @@ -139,19 +144,3 @@ Index: tools/clang/lib/Driver/ToolChains/OpenBSD.cpp + break; + } +} -+ -+void OpenBSD::AddCXXStdlibLibArgs(const ArgList &Args, -+ ArgStringList &CmdArgs) const { -+ bool Profiling = Args.hasArg(options::OPT_pg); -+ -+ switch (GetCXXStdlibType(Args)) { -+ case ToolChain::CST_Libcxx: -+ CmdArgs.push_back(Profiling ? "-lc++_p" : "-lc++"); -+ CmdArgs.push_back(Profiling ? "-lc++abi_p" : "-lc++abi"); -+ CmdArgs.push_back(Profiling ? "-lpthread_p" : "-lpthread"); -+ break; -+ case ToolChain::CST_Libstdcxx: -+ CmdArgs.push_back("-lestdc++"); -+ break; -+ } -+} diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_h b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_h index b69fd25baf7..f69fcb1993b 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_h +++ b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_OpenBSD_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_OpenBSD_h,v 1.9 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_OpenBSD_h,v 1.10 2022/01/03 21:33:52 jca Exp $ - Add support for building against libestdc++ from ports-gcc. - Make clang emit the proper path to our libcompiler_rt.a when asked to. @@ -6,7 +6,7 @@ $OpenBSD: patch-tools_clang_lib_Driver_ToolChains_OpenBSD_h,v 1.9 2021/05/13 23: Index: tools/clang/lib/Driver/ToolChains/OpenBSD.h --- tools/clang/lib/Driver/ToolChains/OpenBSD.h.orig +++ tools/clang/lib/Driver/ToolChains/OpenBSD.h -@@ -76,6 +76,11 @@ class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic +@@ -77,6 +77,11 @@ class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; diff --git a/devel/llvm/patches/patch-tools_clang_lib_Frontend_CompilerInvocation_cpp b/devel/llvm/patches/patch-tools_clang_lib_Frontend_CompilerInvocation_cpp index 12040616aa4..901b9c183a9 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Frontend_CompilerInvocation_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Frontend_CompilerInvocation_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_lib_Frontend_CompilerInvocation_cpp,v 1.10 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Frontend_CompilerInvocation_cpp,v 1.11 2022/01/03 21:33:52 jca Exp $ - Add RETGUARD to clang for amd64. This security mechanism uses per-function random cookies to protect access to function return instructions, with the @@ -21,12 +21,23 @@ $OpenBSD: patch-tools_clang_lib_Frontend_CompilerInvocation_cpp,v 1.10 2021/05/1 Index: tools/clang/lib/Frontend/CompilerInvocation.cpp --- tools/clang/lib/Frontend/CompilerInvocation.cpp.orig +++ tools/clang/lib/Frontend/CompilerInvocation.cpp -@@ -1250,6 +1250,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, Arg - Opts.StackAlignment = StackAlignment; +@@ -1470,6 +1470,10 @@ void CompilerInvocation::GenerateCodeGenArgs( + F.Filename, SA); } -+ Opts.ReturnProtector = Args.hasArg(OPT_ret_protector); ++ if (Opts.ReturnProtector) { ++ GenerateArg(Args, OPT_ret_protector, SA); ++ } + - if (Arg *A = Args.getLastArg(OPT_mstack_probe_size)) { - StringRef Val = A->getValue(); - unsigned StackProbeSize = Opts.StackProbeSize; + // TODO: Consider removing marshalling annotations from f[no_]emulated_tls. + // That would make it easy to generate the option only **once** if it was + // explicitly set to non-default value. +@@ -1805,6 +1809,8 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptio + } + Opts.LinkBitcodeFiles.push_back(F); + } ++ ++ Opts.ReturnProtector = Args.hasArg(OPT_ret_protector); + + if (Args.getLastArg(OPT_femulated_tls) || + Args.getLastArg(OPT_fno_emulated_tls)) { diff --git a/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaChecking_cpp b/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaChecking_cpp index 5722ccf83a5..d2ed8ee3c9d 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaChecking_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaChecking_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_clang_lib_Sema_SemaChecking_cpp,v 1.10 2021/09/19 17:49:23 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Sema_SemaChecking_cpp,v 1.11 2022/01/03 21:33:52 jca Exp $ - Teach Clang about syslog format attribute - Enable the kprintf format attribute @@ -10,7 +10,7 @@ $OpenBSD: patch-tools_clang_lib_Sema_SemaChecking_cpp,v 1.10 2021/09/19 17:49:23 Index: tools/clang/lib/Sema/SemaChecking.cpp --- tools/clang/lib/Sema/SemaChecking.cpp.orig +++ tools/clang/lib/Sema/SemaChecking.cpp -@@ -7095,7 +7095,7 @@ checkFormatStringExpr(Sema &S, const Expr *E, ArrayRef +@@ -7847,7 +7847,7 @@ checkFormatStringExpr(Sema &S, const Expr *E, ArrayRef Sema::FormatStringType Sema::GetFormatStringType(const FormatAttr *Format) { return llvm::StringSwitch(Format->getType()->getName()) .Case("scanf", FST_Scanf) @@ -19,7 +19,7 @@ Index: tools/clang/lib/Sema/SemaChecking.cpp .Cases("NSString", "CFString", FST_NSString) .Case("strftime", FST_Strftime) .Case("strfmon", FST_Strfmon) -@@ -7192,6 +7192,7 @@ bool Sema::CheckFormatArguments(ArrayRef +@@ -7944,6 +7944,7 @@ bool Sema::CheckFormatArguments(ArrayRef case FST_Kprintf: case FST_FreeBSDKPrintf: case FST_Printf: @@ -27,7 +27,7 @@ Index: tools/clang/lib/Sema/SemaChecking.cpp Diag(FormatLoc, diag::note_format_security_fixit) << FixItHint::CreateInsertion(FormatLoc, "\"%s\", "); break; -@@ -8017,19 +8018,34 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyz +@@ -8769,19 +8770,34 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyz // Claim the second argument. CoveredArgs.set(argIndex + 1); @@ -71,7 +71,7 @@ Index: tools/clang/lib/Sema/SemaChecking.cpp // Type check the second argument (char * for both %b and %D) Ex = getDataArg(argIndex + 1); const analyze_printf::ArgType &AT2 = ArgType::CStrTy; -@@ -8067,6 +8083,15 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyz +@@ -8819,6 +8835,15 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyz return true; } @@ -87,7 +87,7 @@ Index: tools/clang/lib/Sema/SemaChecking.cpp // Only scalars are allowed for os_trace. if (FSType == Sema::FST_OSTrace && (CS.getKind() == ConversionSpecifier::PArg || -@@ -8810,8 +8835,9 @@ static void CheckFormatString(Sema &S, const FormatStr +@@ -9565,8 +9590,9 @@ static void CheckFormatString(Sema &S, const FormatStr } if (Type == Sema::FST_Printf || Type == Sema::FST_NSString || @@ -99,7 +99,7 @@ Index: tools/clang/lib/Sema/SemaChecking.cpp CheckPrintfHandler H( S, FExpr, OrigFormatExpr, Type, firstDataArg, numDataArgs, (Type == Sema::FST_NSString || Type == Sema::FST_OSTrace), Str, -@@ -8821,7 +8847,7 @@ static void CheckFormatString(Sema &S, const FormatStr +@@ -9576,7 +9602,7 @@ static void CheckFormatString(Sema &S, const FormatStr if (!analyze_format_string::ParsePrintfString(H, Str, Str + StrLen, S.getLangOpts(), S.Context.getTargetInfo(), diff --git a/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaDeclAttr_cpp b/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaDeclAttr_cpp index cb12abd70b0..df44b1aef77 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaDeclAttr_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Sema_SemaDeclAttr_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_clang_lib_Sema_SemaDeclAttr_cpp,v 1.12 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_clang_lib_Sema_SemaDeclAttr_cpp,v 1.13 2022/01/03 21:33:52 jca Exp $ Teach Clang about syslog format attribute Index: tools/clang/lib/Sema/SemaDeclAttr.cpp --- tools/clang/lib/Sema/SemaDeclAttr.cpp.orig +++ tools/clang/lib/Sema/SemaDeclAttr.cpp -@@ -3267,6 +3267,7 @@ static FormatAttrKind getFormatAttrKind(StringRef Form +@@ -3411,6 +3411,7 @@ static FormatAttrKind getFormatAttrKind(StringRef Form .Case("freebsd_kprintf", SupportedFormat) // FreeBSD. .Case("os_trace", SupportedFormat) .Case("os_log", SupportedFormat) diff --git a/devel/llvm/patches/patch-tools_clang_tools_clang-shlib_CMakeLists_txt b/devel/llvm/patches/patch-tools_clang_tools_clang-shlib_CMakeLists_txt new file mode 100644 index 00000000000..cf0b7868f3e --- /dev/null +++ b/devel/llvm/patches/patch-tools_clang_tools_clang-shlib_CMakeLists_txt @@ -0,0 +1,15 @@ +$OpenBSD: patch-tools_clang_tools_clang-shlib_CMakeLists_txt,v 1.1 2022/01/03 21:33:52 jca Exp $ + +-Bsymbolic-functions is not supported by our ld.bfd version. + +Index: tools/clang/tools/clang-shlib/CMakeLists.txt +--- tools/clang/tools/clang-shlib/CMakeLists.txt.orig ++++ tools/clang/tools/clang-shlib/CMakeLists.txt +@@ -50,6 +50,6 @@ add_clang_library(clang-cpp + ${_DEPS}) + # Optimize function calls for default visibility definitions to avoid PLT and + # reduce dynamic relocations. +-if (NOT APPLE AND NOT MINGW) ++if (NOT APPLE AND NOT MINGW AND ${OPENBSD_LD_IS_LLD}) + target_link_options(clang-cpp PRIVATE LINKER:-Bsymbolic-functions) + endif() diff --git a/devel/llvm/patches/patch-tools_clang_tools_scan-build_libexec_ccc-analyzer b/devel/llvm/patches/patch-tools_clang_tools_scan-build_libexec_ccc-analyzer index 7e4313f7e42..17db64673e2 100644 --- a/devel/llvm/patches/patch-tools_clang_tools_scan-build_libexec_ccc-analyzer +++ b/devel/llvm/patches/patch-tools_clang_tools_scan-build_libexec_ccc-analyzer @@ -1,13 +1,13 @@ -$OpenBSD: patch-tools_clang_tools_scan-build_libexec_ccc-analyzer,v 1.1 2021/05/17 21:45:09 tb Exp $ +$OpenBSD: patch-tools_clang_tools_scan-build_libexec_ccc-analyzer,v 1.2 2022/01/03 21:33:52 jca Exp $ Our default compilers are cc/c++. Index: tools/clang/tools/scan-build/libexec/ccc-analyzer --- tools/clang/tools/scan-build/libexec/ccc-analyzer.orig +++ tools/clang/tools/scan-build/libexec/ccc-analyzer -@@ -81,8 +81,8 @@ if (`uname -a` =~ m/Darwin/) { - $UseXCRUN = 1; - } +@@ -84,8 +84,8 @@ if (`uname -a` =~ m/Darwin/) { + $DefaultCCompiler = 'cc'; + $DefaultCXXCompiler = 'c++'; } else { - $DefaultCCompiler = 'gcc'; - $DefaultCXXCompiler = 'g++'; diff --git a/devel/llvm/patches/patch-tools_lld_CMakeLists_txt b/devel/llvm/patches/patch-tools_lld_CMakeLists_txt new file mode 100644 index 00000000000..dad52dd17bf --- /dev/null +++ b/devel/llvm/patches/patch-tools_lld_CMakeLists_txt @@ -0,0 +1,16 @@ +$OpenBSD: patch-tools_lld_CMakeLists_txt,v 1.3 2022/01/03 21:33:52 jca Exp $ + +Don't build MachO2 support in lld. This code reaches into libunwind +internals. + +Index: tools/lld/CMakeLists.txt +--- tools/lld/CMakeLists.txt.orig ++++ tools/lld/CMakeLists.txt +@@ -206,7 +206,6 @@ endif() + add_subdirectory(docs) + add_subdirectory(COFF) + add_subdirectory(ELF) +-add_subdirectory(MachO) + add_subdirectory(MinGW) + add_subdirectory(wasm) + diff --git a/devel/llvm/patches/patch-tools_lld_ELF_Arch_PPC_cpp b/devel/llvm/patches/patch-tools_lld_ELF_Arch_PPC_cpp deleted file mode 100644 index 7f127c5405d..00000000000 --- a/devel/llvm/patches/patch-tools_lld_ELF_Arch_PPC_cpp +++ /dev/null @@ -1,23 +0,0 @@ -$OpenBSD: patch-tools_lld_ELF_Arch_PPC_cpp,v 1.2 2021/05/13 23:54:25 jca Exp $ - -Add R_PPC_ADDR24 to lld. - -Index: tools/lld/ELF/Arch/PPC.cpp ---- tools/lld/ELF/Arch/PPC.cpp.orig -+++ tools/lld/ELF/Arch/PPC.cpp -@@ -223,6 +223,7 @@ RelExpr PPC::getRelExpr(RelType type, const Symbol &s, - case R_PPC_ADDR16_HA: - case R_PPC_ADDR16_HI: - case R_PPC_ADDR16_LO: -+ case R_PPC_ADDR24: - case R_PPC_ADDR32: - return R_ABS; - case R_PPC_DTPREL16: -@@ -347,6 +348,7 @@ void PPC::relocate(uint8_t *loc, const Relocation &rel - break; - } - case R_PPC_REL24: -+ case R_PPC_ADDR24: - case R_PPC_LOCAL24PC: - case R_PPC_PLTREL24: { - uint32_t mask = 0x03FFFFFC; diff --git a/devel/llvm/patches/patch-tools_lld_ELF_Config_h b/devel/llvm/patches/patch-tools_lld_ELF_Config_h index 77411ad5047..a36a764b0a5 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_Config_h +++ b/devel/llvm/patches/patch-tools_lld_ELF_Config_h @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_lld_ELF_Config_h,v 1.9 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_Config_h,v 1.10 2022/01/03 21:33:52 jca Exp $ - XXX no comment Index: tools/lld/ELF/Config.h --- tools/lld/ELF/Config.h.orig +++ tools/lld/ELF/Config.h -@@ -249,8 +249,13 @@ struct Configuration { +@@ -266,8 +266,13 @@ struct Configuration { ELFKind ekind = ELFNoneKind; uint16_t emachine = llvm::ELF::EM_NONE; llvm::Optional imageBase; diff --git a/devel/llvm/patches/patch-tools_lld_ELF_DriverUtils_cpp b/devel/llvm/patches/patch-tools_lld_ELF_DriverUtils_cpp index f6ca6f74d6c..6bb77273eef 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_DriverUtils_cpp +++ b/devel/llvm/patches/patch-tools_lld_ELF_DriverUtils_cpp @@ -1,11 +1,11 @@ -$OpenBSD: patch-tools_lld_ELF_DriverUtils_cpp,v 1.11 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_DriverUtils_cpp,v 1.12 2022/01/03 21:33:52 jca Exp $ Handle the OpenBSD-style major/minor shared library version scheme. Index: tools/lld/ELF/DriverUtils.cpp --- tools/lld/ELF/DriverUtils.cpp.orig +++ tools/lld/ELF/DriverUtils.cpp -@@ -227,9 +227,36 @@ Optional elf::findFromSearchPaths(StringR +@@ -234,9 +234,36 @@ Optional elf::findFromSearchPaths(StringR // search paths. Optional elf::searchLibraryBaseName(StringRef name) { for (StringRef dir : config->searchPaths) { diff --git a/devel/llvm/patches/patch-tools_lld_ELF_Driver_cpp b/devel/llvm/patches/patch-tools_lld_ELF_Driver_cpp index 6b8129d0bdb..c9fc850c578 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_Driver_cpp +++ b/devel/llvm/patches/patch-tools_lld_ELF_Driver_cpp @@ -1,22 +1,31 @@ -$OpenBSD: patch-tools_lld_ELF_Driver_cpp,v 1.16 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_Driver_cpp,v 1.17 2022/01/03 21:33:52 jca Exp $ + +- enable retpoline by default +- allow-shlib-undefined by default +- anable PIE by default. -- Enable PIE by default. -- XXX retpoline, EM_SPARCV9, ??? Index: tools/lld/ELF/Driver.cpp --- tools/lld/ELF/Driver.cpp.orig +++ tools/lld/ELF/Driver.cpp -@@ -439,7 +439,8 @@ static bool isKnownZFlag(StringRef s) { - s == "nocombreloc" || s == "nocopyreloc" || s == "nodefaultlib" || - s == "nodelete" || s == "nodlopen" || s == "noexecstack" || - s == "nognustack" || s == "nokeep-text-section-prefix" || -- s == "norelro" || s == "noseparate-code" || s == "notext" || -+ s == "norelro" || s == "noretpolineplt" || -+ s == "noseparate-code" || s == "notext" || +@@ -455,6 +455,7 @@ static bool isKnownZFlag(StringRef s) { + s == "nodefaultlib" || s == "nodelete" || s == "nodlopen" || + s == "noexecstack" || s == "nognustack" || + s == "nokeep-text-section-prefix" || s == "norelro" || ++ s == "noretpolineplt" || + s == "noseparate-code" || s == "nostart-stop-gc" || s == "notext" || s == "now" || s == "origin" || s == "pac-plt" || s == "rel" || s == "rela" || s == "relro" || s == "retpolineplt" || - s == "rodynamic" || s == "shstk" || s == "text" || s == "undefs" || -@@ -948,7 +949,8 @@ static void readConfigs(opt::InputArgList &args) { +@@ -598,7 +599,7 @@ static void setUnresolvedSymbolPolicy(opt::InputArgLis + : UnresolvedPolicy::Warn; + // -shared implies -unresolved-symbols=ignore-all because missing + // symbols are likely to be resolved at runtime. +- bool diagRegular = !config->shared, diagShlib = !config->shared; ++ bool diagRegular = !config->shared, diagShlib = false; + + for (const opt::Arg *arg : args) { + switch (arg->getOption().getID()) { +@@ -1064,7 +1065,8 @@ static void readConfigs(opt::InputArgList &args) { config->ignoreDataAddressEquality = args.hasArg(OPT_ignore_data_address_equality); config->ignoreFunctionAddressEquality = @@ -26,7 +35,7 @@ Index: tools/lld/ELF/Driver.cpp config->init = args.getLastArgValue(OPT_init, "_init"); config->ltoAAPipeline = args.getLastArgValue(OPT_lto_aa_pipeline); config->ltoCSProfileGenerate = args.hasArg(OPT_lto_cs_profile_generate); -@@ -986,7 +988,12 @@ static void readConfigs(opt::InputArgList &args) { +@@ -1118,7 +1120,12 @@ static void readConfigs(opt::InputArgList &args) { config->optimize = args::getInteger(args, OPT_O, 1); config->orphanHandling = getOrphanHandling(args); config->outputFile = args.getLastArgValue(OPT_o); @@ -39,7 +48,7 @@ Index: tools/lld/ELF/Driver.cpp config->printIcfSections = args.hasFlag(OPT_print_icf_sections, OPT_no_print_icf_sections, false); config->printGcSections = -@@ -1061,7 +1068,11 @@ static void readConfigs(opt::InputArgList &args) { +@@ -1188,7 +1195,11 @@ static void readConfigs(opt::InputArgList &args) { config->zOrigin = hasZOption(args, "origin"); config->zPacPlt = hasZOption(args, "pac-plt"); config->zRelro = getZFlag(args, "relro", "norelro", true); @@ -52,7 +61,7 @@ Index: tools/lld/ELF/Driver.cpp config->zRodynamic = hasZOption(args, "rodynamic"); config->zSeparate = getZSeparate(args); config->zShstk = hasZOption(args, "shstk"); -@@ -1421,7 +1432,7 @@ void LinkerDriver::inferMachineType() { +@@ -1596,7 +1607,7 @@ void LinkerDriver::inferMachineType() { } // Parse -z max-page-size=. The default value is defined by @@ -61,7 +70,7 @@ Index: tools/lld/ELF/Driver.cpp static uint64_t getMaxPageSize(opt::InputArgList &args) { uint64_t val = args::getZOptionValue(args, OPT_z, "max-page-size", target->defaultMaxPageSize); -@@ -1436,7 +1447,7 @@ static uint64_t getMaxPageSize(opt::InputArgList &args +@@ -1611,7 +1622,7 @@ static uint64_t getMaxPageSize(opt::InputArgList &args } // Parse -z common-page-size=. The default value is defined by @@ -70,7 +79,7 @@ Index: tools/lld/ELF/Driver.cpp static uint64_t getCommonPageSize(opt::InputArgList &args) { uint64_t val = args::getZOptionValue(args, OPT_z, "common-page-size", target->defaultCommonPageSize); -@@ -1453,6 +1464,16 @@ static uint64_t getCommonPageSize(opt::InputArgList &a +@@ -1628,6 +1639,16 @@ static uint64_t getCommonPageSize(opt::InputArgList &a return val; } @@ -87,7 +96,7 @@ Index: tools/lld/ELF/Driver.cpp // Parses -image-base option. static Optional getImageBase(opt::InputArgList &args) { // Because we are using "Config->maxPageSize" here, this function has to be -@@ -2088,6 +2109,11 @@ template void LinkerDriver::link(opt::Inp +@@ -2414,6 +2435,11 @@ template void LinkerDriver::link(opt::Inp // optimizations such as DATA_SEGMENT_ALIGN in linker scripts. LLD's use of it // is limited to writing trap instructions on the last executable segment. config->commonPageSize = getCommonPageSize(args); diff --git a/devel/llvm/patches/patch-tools_lld_ELF_InputSection_cpp b/devel/llvm/patches/patch-tools_lld_ELF_InputSection_cpp deleted file mode 100644 index 281856e0e6d..00000000000 --- a/devel/llvm/patches/patch-tools_lld_ELF_InputSection_cpp +++ /dev/null @@ -1,19 +0,0 @@ -$OpenBSD: patch-tools_lld_ELF_InputSection_cpp,v 1.7 2021/08/14 02:46:18 jca Exp $ - -[ELF] Allow R_386_GOTOFF from .debug_info. - -Index: tools/lld/ELF/InputSection.cpp ---- tools/lld/ELF/InputSection.cpp.orig -+++ tools/lld/ELF/InputSection.cpp -@@ -891,7 +891,10 @@ void InputSection::relocateNonAlloc(uint8_t *buf, Arra - continue; - } - -- if (expr != R_ABS && expr != R_DTPREL && expr != R_RISCV_ADD) { -+ // R_ABS/R_DTPREL and some other relocations can be used from non-SHF_ALLOC -+ // sections. -+ if (expr != R_ABS && expr != R_DTPREL && expr != R_GOTPLTREL && -+ expr != R_RISCV_ADD) { - std::string msg = getLocation(offset) + - ": has non-ABS relocation " + toString(type) + - " against symbol '" + toString(sym) + "'"; diff --git a/devel/llvm/patches/patch-tools_lld_ELF_LinkerScript_cpp b/devel/llvm/patches/patch-tools_lld_ELF_LinkerScript_cpp index dac045a4dbc..cc7492e968f 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_LinkerScript_cpp +++ b/devel/llvm/patches/patch-tools_lld_ELF_LinkerScript_cpp @@ -1,19 +1,19 @@ -$OpenBSD: patch-tools_lld_ELF_LinkerScript_cpp,v 1.7 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_LinkerScript_cpp,v 1.8 2022/01/03 21:33:52 jca Exp $ - XXX no comment Index: tools/lld/ELF/LinkerScript.cpp --- tools/lld/ELF/LinkerScript.cpp.orig +++ tools/lld/ELF/LinkerScript.cpp -@@ -873,7 +873,6 @@ void LinkerScript::assignOffsets(OutputSection *sec) { - expandMemoryRegion(ctx->memRegion, dot - ctx->memRegion->curPos, - ctx->memRegion->name, sec->name); +@@ -954,7 +954,6 @@ void LinkerScript::assignOffsets(OutputSection *sec) { + ctx->memRegion->name, sec->name); + } - switchTo(sec); // ctx->lmaOffset is LMA minus VMA. If LMA is explicitly specified via AT() or // AT>, recompute ctx->lmaOffset; otherwise, if both previous/current LMA -@@ -887,6 +886,8 @@ void LinkerScript::assignOffsets(OutputSection *sec) { +@@ -968,6 +967,8 @@ void LinkerScript::assignOffsets(OutputSection *sec) { ctx->lmaOffset = alignTo(mr->curPos, sec->alignment) - dot; else if (!sameMemRegion || !prevLMARegionIsDefault) ctx->lmaOffset = 0; diff --git a/devel/llvm/patches/patch-tools_lld_ELF_Options_td b/devel/llvm/patches/patch-tools_lld_ELF_Options_td index d48a6a70448..92d559c9bb2 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_Options_td +++ b/devel/llvm/patches/patch-tools_lld_ELF_Options_td @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_lld_ELF_Options_td,v 1.7 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_Options_td,v 1.8 2022/01/03 21:33:52 jca Exp $ - [ELF] Add -nopie alias for -no-pie - defm ignore_function_address_equality: TODO (document it) @@ -6,7 +6,7 @@ $OpenBSD: patch-tools_lld_ELF_Options_td,v 1.7 2021/05/13 23:54:25 jca Exp $ Index: tools/lld/ELF/Options.td --- tools/lld/ELF/Options.td.orig +++ tools/lld/ELF/Options.td -@@ -232,8 +232,9 @@ def icf_safe: F<"icf=safe">, HelpText<"Enable safe ide +@@ -248,8 +248,9 @@ def icf_safe: F<"icf=safe">, HelpText<"Enable safe ide def icf_none: F<"icf=none">, HelpText<"Disable identical code folding (default)">; @@ -18,7 +18,7 @@ Index: tools/lld/ELF/Options.td def ignore_data_address_equality: F<"ignore-data-address-equality">, HelpText<"lld can break the address equality of data">; -@@ -489,6 +490,7 @@ def: Separate<["-"], "F">, Alias, HelpText<"Al +@@ -520,6 +521,7 @@ def: Separate<["-"], "F">, Alias, HelpText<"Al def: Separate<["-"], "b">, Alias, HelpText<"Alias for --format">; def: JoinedOrSeparate<["-"], "l">, Alias, HelpText<"Alias for --library">; def: JoinedOrSeparate<["-"], "L">, Alias, HelpText<"Alias for --library-path">; diff --git a/devel/llvm/patches/patch-tools_lld_ELF_Symbols_cpp b/devel/llvm/patches/patch-tools_lld_ELF_Symbols_cpp index 7df7b32c001..a8bd7980317 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_Symbols_cpp +++ b/devel/llvm/patches/patch-tools_lld_ELF_Symbols_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_lld_ELF_Symbols_cpp,v 1.4 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_Symbols_cpp,v 1.5 2022/01/03 21:33:52 jca Exp $ Generate __data_start symbol that marks the start of .data when __data_start is referenced from code being linked. @@ -6,7 +6,7 @@ is referenced from code being linked. Index: tools/lld/ELF/Symbols.cpp --- tools/lld/ELF/Symbols.cpp.orig +++ tools/lld/ELF/Symbols.cpp -@@ -50,6 +50,7 @@ std::string lld::toELFString(const Archive::Symbol &b) +@@ -48,6 +48,7 @@ std::string lld::toELFString(const Archive::Symbol &b) } Defined *ElfSym::bss; diff --git a/devel/llvm/patches/patch-tools_lld_ELF_Symbols_h b/devel/llvm/patches/patch-tools_lld_ELF_Symbols_h index 83c0f0fcf8d..8c9b66a7761 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_Symbols_h +++ b/devel/llvm/patches/patch-tools_lld_ELF_Symbols_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_lld_ELF_Symbols_h,v 1.6 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_Symbols_h,v 1.7 2022/01/03 21:33:52 jca Exp $ Generate __data_start symbol that marks the start of .data when __data_start is referenced from code being linked. @@ -6,7 +6,7 @@ is referenced from code being linked. Index: tools/lld/ELF/Symbols.h --- tools/lld/ELF/Symbols.h.orig +++ tools/lld/ELF/Symbols.h -@@ -425,6 +425,9 @@ struct ElfSym { +@@ -436,6 +436,9 @@ struct ElfSym { // __bss_start static Defined *bss; diff --git a/devel/llvm/patches/patch-tools_lld_ELF_SyntheticSections_cpp b/devel/llvm/patches/patch-tools_lld_ELF_SyntheticSections_cpp deleted file mode 100644 index 86335f8d9e5..00000000000 --- a/devel/llvm/patches/patch-tools_lld_ELF_SyntheticSections_cpp +++ /dev/null @@ -1,17 +0,0 @@ -$OpenBSD: patch-tools_lld_ELF_SyntheticSections_cpp,v 1.17 2021/05/13 23:54:25 jca Exp $ - -- Always allocate GOT header entries on powerpc. -- Do not reserve PowerPC GOT header entries when creating a relocatable object file. - -Index: tools/lld/ELF/SyntheticSections.cpp ---- tools/lld/ELF/SyntheticSections.cpp.orig -+++ tools/lld/ELF/SyntheticSections.cpp -@@ -607,6 +607,8 @@ GotSection::GotSection() - // ElfSym::globalOffsetTable. - if (ElfSym::globalOffsetTable && !target->gotBaseSymInGotPlt) - numEntries += target->gotHeaderEntriesNum; -+ else if (config->emachine == EM_PPC && !config->relocatable) -+ numEntries += target->gotHeaderEntriesNum; - } - - void GotSection::addEntry(Symbol &sym) { diff --git a/devel/llvm/patches/patch-tools_lld_ELF_Writer_cpp b/devel/llvm/patches/patch-tools_lld_ELF_Writer_cpp index b1f768a5d54..5c9b0457f5e 100644 --- a/devel/llvm/patches/patch-tools_lld_ELF_Writer_cpp +++ b/devel/llvm/patches/patch-tools_lld_ELF_Writer_cpp @@ -1,4 +1,4 @@ -$OpenBSD: patch-tools_lld_ELF_Writer_cpp,v 1.15 2021/05/13 23:54:25 jca Exp $ +$OpenBSD: patch-tools_lld_ELF_Writer_cpp,v 1.16 2022/01/03 21:33:52 jca Exp $ - Merge '.openbsd.randomdata.*' sections into a single '.openbsd.randomdata' section when linking, as we do when using ld from binutils. @@ -10,7 +10,7 @@ $OpenBSD: patch-tools_lld_ELF_Writer_cpp,v 1.15 2021/05/13 23:54:25 jca Exp $ Index: tools/lld/ELF/Writer.cpp --- tools/lld/ELF/Writer.cpp.orig +++ tools/lld/ELF/Writer.cpp -@@ -140,7 +140,8 @@ StringRef elf::getOutputSectionName(const InputSection +@@ -145,7 +145,8 @@ StringRef elf::getOutputSectionName(const InputSection for (StringRef v : {".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.rel.ro.", ".bss.", ".init_array.", ".fini_array.", ".ctors.", ".dtors.", ".tbss.", @@ -20,7 +20,7 @@ Index: tools/lld/ELF/Writer.cpp if (isSectionPrefix(v, s->name)) return v.drop_back(); -@@ -319,6 +320,7 @@ void elf::addReservedSymbols() { +@@ -324,6 +325,7 @@ void elf::addReservedSymbols() { }; ElfSym::bss = add("__bss_start", 0); @@ -28,7 +28,7 @@ Index: tools/lld/ELF/Writer.cpp ElfSym::end1 = add("end", -1); ElfSym::end2 = add("_end", -1); ElfSym::etext1 = add("etext", -1); -@@ -870,7 +872,11 @@ static bool isRelroSection(const OutputSection *sec) { +@@ -883,7 +885,11 @@ static bool isRelroSection(const OutputSection *sec) { // However, if "-z now" is given, the lazy symbol resolution is // disabled, which enables us to put it into RELRO. if (sec == in.gotPlt->getParent()) @@ -40,7 +40,7 @@ Index: tools/lld/ELF/Writer.cpp // .dynamic section contains data for the dynamic linker, and // there's no need to write to it at runtime, so it's better to put -@@ -1180,6 +1186,9 @@ template void Writer::setReservedSy +@@ -1193,6 +1199,9 @@ template void Writer::setReservedSy if (ElfSym::bss) ElfSym::bss->section = findSection(".bss"); @@ -50,7 +50,7 @@ Index: tools/lld/ELF/Writer.cpp // Setup MIPS _gp_disp/__gnu_local_gp symbols which should // be equal to the _gp symbol's value. if (ElfSym::mipsGp) { -@@ -2499,6 +2508,31 @@ template void Writer::fixSectionAli +@@ -2576,6 +2585,31 @@ template void Writer::fixSectionAli }; } }; diff --git a/devel/llvm/patches/patch-tools_lld_tools_lld_CMakeLists_txt b/devel/llvm/patches/patch-tools_lld_tools_lld_CMakeLists_txt new file mode 100644 index 00000000000..2a4b1332207 --- /dev/null +++ b/devel/llvm/patches/patch-tools_lld_tools_lld_CMakeLists_txt @@ -0,0 +1,16 @@ +$OpenBSD: patch-tools_lld_tools_lld_CMakeLists_txt,v 1.1 2022/01/03 21:33:52 jca Exp $ + +Don't build MachO2 support in lld. This code reaches into libunwind +internals. + +Index: tools/lld/tools/lld/CMakeLists.txt +--- tools/lld/tools/lld/CMakeLists.txt.orig ++++ tools/lld/tools/lld/CMakeLists.txt +@@ -15,7 +15,6 @@ target_link_libraries(lld + lldCOFF + lldDriver + lldELF +- lldMachO2 + lldMinGW + lldWasm + ) diff --git a/devel/llvm/patches/patch-tools_lld_tools_lld_lld_cpp b/devel/llvm/patches/patch-tools_lld_tools_lld_lld_cpp new file mode 100644 index 00000000000..748eb5a2bbf --- /dev/null +++ b/devel/llvm/patches/patch-tools_lld_tools_lld_lld_cpp @@ -0,0 +1,21 @@ +$OpenBSD: patch-tools_lld_tools_lld_lld_cpp,v 1.1 2022/01/03 21:33:52 jca Exp $ + +Don't build MachO2 support in lld. This code reaches into libunwind +internals. + +Index: tools/lld/tools/lld/lld.cpp +--- tools/lld/tools/lld/lld.cpp.orig ++++ tools/lld/tools/lld/lld.cpp +@@ -148,10 +148,12 @@ static int lldMain(int argc, const char **argv, llvm:: + return !elf::link(args, exitEarly, stdoutOS, stderrOS); + case WinLink: + return !coff::link(args, exitEarly, stdoutOS, stderrOS); ++#if 0 + case Darwin: + return !macho::link(args, exitEarly, stdoutOS, stderrOS); + case DarwinOld: + return !mach_o::link(args, exitEarly, stdoutOS, stderrOS); ++#endif + case Wasm: + return !lld::wasm::link(args, exitEarly, stdoutOS, stderrOS); + default: diff --git a/devel/llvm/patches/patch-tools_llvm-shlib_CMakeLists_txt b/devel/llvm/patches/patch-tools_llvm-shlib_CMakeLists_txt new file mode 100644 index 00000000000..bb1f39c61a1 --- /dev/null +++ b/devel/llvm/patches/patch-tools_llvm-shlib_CMakeLists_txt @@ -0,0 +1,16 @@ +$OpenBSD: patch-tools_llvm-shlib_CMakeLists_txt,v 1.4 2022/01/03 21:33:52 jca Exp $ + +-Bsymbolic-functions is not supported by our ld.bfd version. + +Index: tools/llvm-shlib/CMakeLists.txt +--- tools/llvm-shlib/CMakeLists.txt.orig ++++ tools/llvm-shlib/CMakeLists.txt +@@ -50,7 +50,7 @@ if(LLVM_BUILD_LLVM_DYLIB) + # Solaris ld does not accept global: *; so there is no way to version *all* global symbols + set(LIB_NAMES -Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map ${LIB_NAMES}) + endif() +- if (NOT MINGW) ++ if (NOT MINGW AND ${OPENBSD_LD_IS_LLD}) + # Optimize function calls for default visibility definitions to avoid PLT and + # reduce dynamic relocations. + # Note: for -fno-pic default, the address of a function may be different from diff --git a/devel/llvm/pkg/PLIST-lldb b/devel/llvm/pkg/PLIST-lldb index 0ec180b4f94..8165c08aa0e 100644 --- a/devel/llvm/pkg/PLIST-lldb +++ b/devel/llvm/pkg/PLIST-lldb @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST-lldb,v 1.8 2021/05/13 23:54:25 jca Exp $ +@comment $OpenBSD: PLIST-lldb,v 1.9 2022/01/03 21:33:52 jca Exp $ @conflict ${MODPY_PY_PREFIX}llvm-<6.0.1p3 @conflict llvm-<10.0.0p0 @bin bin/lldb @@ -64,7 +64,6 @@ include/lldb/API/SBThread.h include/lldb/API/SBThreadCollection.h include/lldb/API/SBThreadPlan.h include/lldb/API/SBTrace.h -include/lldb/API/SBTraceOptions.h include/lldb/API/SBType.h include/lldb/API/SBTypeCategory.h include/lldb/API/SBTypeEnumMember.h @@ -99,7 +98,8 @@ include/lldb/Breakpoint/BreakpointSite.h include/lldb/Breakpoint/BreakpointSiteList.h include/lldb/Breakpoint/Stoppoint.h include/lldb/Breakpoint/StoppointCallbackContext.h -include/lldb/Breakpoint/StoppointLocation.h +include/lldb/Breakpoint/StoppointHitCounter.h +include/lldb/Breakpoint/StoppointSite.h include/lldb/Breakpoint/Watchpoint.h include/lldb/Breakpoint/WatchpointList.h include/lldb/Breakpoint/WatchpointOptions.h @@ -108,10 +108,10 @@ include/lldb/Core/Address.h include/lldb/Core/AddressRange.h include/lldb/Core/AddressResolver.h include/lldb/Core/AddressResolverFileLine.h -include/lldb/Core/AddressResolverName.h include/lldb/Core/Architecture.h include/lldb/Core/Communication.h include/lldb/Core/Debugger.h +include/lldb/Core/Declaration.h include/lldb/Core/Disassembler.h include/lldb/Core/DumpDataExtractor.h include/lldb/Core/DumpRegisterValue.h @@ -133,9 +133,11 @@ include/lldb/Core/ModuleSpec.h include/lldb/Core/Opcode.h include/lldb/Core/PluginInterface.h include/lldb/Core/PluginManager.h +include/lldb/Core/Progress.h include/lldb/Core/RichManglingContext.h include/lldb/Core/SearchFilter.h include/lldb/Core/Section.h +include/lldb/Core/SourceLocationSpec.h include/lldb/Core/SourceManager.h include/lldb/Core/StreamAsynchronousIO.h include/lldb/Core/StreamBuffer.h @@ -159,6 +161,7 @@ include/lldb/Core/ValueObjectList.h include/lldb/Core/ValueObjectMemory.h include/lldb/Core/ValueObjectRegister.h include/lldb/Core/ValueObjectSyntheticFilter.h +include/lldb/Core/ValueObjectUpdater.h include/lldb/Core/ValueObjectVariable.h include/lldb/Core/dwarf.h include/lldb/DataFormatters/ @@ -255,6 +258,7 @@ include/lldb/Host/freebsd/ include/lldb/Host/freebsd/HostInfoFreeBSD.h include/lldb/Host/linux/ include/lldb/Host/linux/AbstractSocket.h +include/lldb/Host/linux/Host.h include/lldb/Host/linux/HostInfoLinux.h include/lldb/Host/linux/Ptrace.h include/lldb/Host/linux/Support.h @@ -286,7 +290,6 @@ include/lldb/Host/windows/LockFileWindows.h include/lldb/Host/windows/PipeWindows.h include/lldb/Host/windows/PosixApi.h include/lldb/Host/windows/ProcessLauncherWindows.h -include/lldb/Host/windows/editlinewin.h include/lldb/Host/windows/windows.h include/lldb/Initialization/ include/lldb/Initialization/SystemInitializer.h @@ -299,7 +302,6 @@ include/lldb/Interpreter/CommandHistory.h include/lldb/Interpreter/CommandInterpreter.h include/lldb/Interpreter/CommandObject.h include/lldb/Interpreter/CommandObjectMultiword.h -include/lldb/Interpreter/CommandObjectRegexCommand.h include/lldb/Interpreter/CommandOptionValidators.h include/lldb/Interpreter/CommandReturnObject.h include/lldb/Interpreter/OptionArgParser.h @@ -324,6 +326,7 @@ include/lldb/Interpreter/OptionValueBoolean.h include/lldb/Interpreter/OptionValueChar.h include/lldb/Interpreter/OptionValueDictionary.h include/lldb/Interpreter/OptionValueEnumeration.h +include/lldb/Interpreter/OptionValueFileColonLine.h include/lldb/Interpreter/OptionValueFileSpec.h include/lldb/Interpreter/OptionValueFileSpecList.h include/lldb/Interpreter/OptionValueFormat.h @@ -340,6 +343,7 @@ include/lldb/Interpreter/OptionValues.h include/lldb/Interpreter/Options.h include/lldb/Interpreter/Property.h include/lldb/Interpreter/ScriptInterpreter.h +include/lldb/Interpreter/ScriptedProcessInterface.h include/lldb/Symbol/ include/lldb/Symbol/ArmUnwindInfo.h include/lldb/Symbol/Block.h @@ -352,7 +356,6 @@ include/lldb/Symbol/CompilerType.h include/lldb/Symbol/DWARFCallFrameInfo.h include/lldb/Symbol/DebugMacros.h include/lldb/Symbol/DeclVendor.h -include/lldb/Symbol/Declaration.h include/lldb/Symbol/FuncUnwinders.h include/lldb/Symbol/Function.h include/lldb/Symbol/LineEntry.h @@ -392,12 +395,15 @@ include/lldb/Target/LanguageRuntime.h include/lldb/Target/Memory.h include/lldb/Target/MemoryHistory.h include/lldb/Target/MemoryRegionInfo.h +include/lldb/Target/MemoryTagManager.h include/lldb/Target/ModuleCache.h include/lldb/Target/OperatingSystem.h include/lldb/Target/PathMappingList.h include/lldb/Target/Platform.h +include/lldb/Target/PostMortemProcess.h include/lldb/Target/Process.h include/lldb/Target/ProcessStructReader.h +include/lldb/Target/ProcessTrace.h include/lldb/Target/Queue.h include/lldb/Target/QueueItem.h include/lldb/Target/QueueList.h @@ -406,6 +412,7 @@ include/lldb/Target/RegisterContext.h include/lldb/Target/RegisterContextUnwind.h include/lldb/Target/RegisterNumber.h include/lldb/Target/RemoteAwarePlatform.h +include/lldb/Target/Runtime.h include/lldb/Target/SectionLoadHistory.h include/lldb/Target/SectionLoadList.h include/lldb/Target/StackFrame.h @@ -440,6 +447,10 @@ include/lldb/Target/ThreadPlanStepThrough.h include/lldb/Target/ThreadPlanStepUntil.h include/lldb/Target/ThreadPlanTracer.h include/lldb/Target/ThreadSpec.h +include/lldb/Target/Trace.h +include/lldb/Target/TraceCursor.h +include/lldb/Target/TraceExporter.h +include/lldb/Target/TraceInstructionDumper.h include/lldb/Target/UnixSignals.h include/lldb/Target/Unwind.h include/lldb/Target/UnwindAssembly.h @@ -450,6 +461,7 @@ include/lldb/Utility/ArchSpec.h include/lldb/Utility/Args.h include/lldb/Utility/Baton.h include/lldb/Utility/Broadcaster.h +include/lldb/Utility/Cloneable.h include/lldb/Utility/CompletionRequest.h include/lldb/Utility/Connection.h include/lldb/Utility/ConstString.h @@ -471,6 +483,7 @@ include/lldb/Utility/Listener.h include/lldb/Utility/Log.h include/lldb/Utility/Logging.h include/lldb/Utility/NameMatches.h +include/lldb/Utility/OptionDefinition.h include/lldb/Utility/Predicate.h include/lldb/Utility/ProcessInfo.h include/lldb/Utility/RangeMap.h @@ -478,6 +491,7 @@ include/lldb/Utility/RegisterValue.h include/lldb/Utility/RegularExpression.h include/lldb/Utility/Reproducer.h include/lldb/Utility/ReproducerInstrumentation.h +include/lldb/Utility/ReproducerProvider.h include/lldb/Utility/Scalar.h include/lldb/Utility/SelectHelper.h include/lldb/Utility/SharedCluster.h @@ -495,8 +509,10 @@ include/lldb/Utility/StructuredData.h include/lldb/Utility/TildeExpressionResolver.h include/lldb/Utility/Timeout.h include/lldb/Utility/Timer.h -include/lldb/Utility/TraceOptions.h +include/lldb/Utility/TraceGDBRemotePackets.h +include/lldb/Utility/TraceIntelPTGDBRemotePackets.h include/lldb/Utility/UUID.h +include/lldb/Utility/UnimplementedError.h include/lldb/Utility/UriParser.h include/lldb/Utility/UserID.h include/lldb/Utility/UserIDResolver.h @@ -546,6 +562,12 @@ lib/python${MODPY_VERSION}/site-packages/lldb/formatters/cpp/libcxx.py lib/python${MODPY_VERSION}/site-packages/lldb/formatters/metrics.py lib/python${MODPY_VERSION}/site-packages/lldb/formatters/synth.py lib/python${MODPY_VERSION}/site-packages/lldb/lldb-argdumper +lib/python${MODPY_VERSION}/site-packages/lldb/plugins/ +lib/python${MODPY_VERSION}/site-packages/lldb/plugins/__init__.py +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/lldb/plugins/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/lldb/plugins/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/lldb/plugins/${MODPY_PYCACHE}scripted_process.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/lldb/plugins/scripted_process.py lib/python${MODPY_VERSION}/site-packages/lldb/utils/ lib/python${MODPY_VERSION}/site-packages/lldb/utils/__init__.py ${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/lldb/utils/${MODPY_PYCACHE}/ diff --git a/devel/llvm/pkg/PLIST-main b/devel/llvm/pkg/PLIST-main index 773a026742b..94e974960f6 100644 --- a/devel/llvm/pkg/PLIST-main +++ b/devel/llvm/pkg/PLIST-main @@ -1,11 +1,12 @@ -@comment $OpenBSD: PLIST-main,v 1.21 2021/05/13 23:54:25 jca Exp $ +@comment $OpenBSD: PLIST-main,v 1.22 2022/01/03 21:33:52 jca Exp $ @conflict lldb-<10.0.0p0 @pkgpath devel/llvm +bin/analyze-build @bin bin/bugpoint @bin bin/c-index-test bin/clang bin/clang++ -@bin bin/clang-11 +@bin bin/clang-13 @bin bin/clang-check bin/clang-cl bin/clang-cpp @@ -15,13 +16,19 @@ bin/clang-cpp @bin bin/clang-offload-wrapper @bin bin/clang-refactor @bin bin/clang-rename +@bin bin/clang-repl @bin bin/clang-scan-deps @bin bin/diagtool @bin bin/dsymutil bin/git-clang-format bin/hmaptool +bin/intercept-build bin/ld.lld -bin/ld64.lld +@comment disabled along with liblldMachO2 +@comment the symlink names dont seem to match the parsing done in lld.cpp anyway +@comment bin/ld64.lld +@comment bin/ld64.lld.darwinnew +bin/ld64.lld.darwinold @bin bin/llc @bin bin/lld bin/lld-link @@ -30,6 +37,7 @@ bin/llvm-addr2line @bin bin/llvm-ar @bin bin/llvm-as @bin bin/llvm-bcanalyzer +bin/llvm-bitcode-strip @bin bin/llvm-c-test @bin bin/llvm-cat @bin bin/llvm-cfi-verify @@ -44,7 +52,6 @@ bin/llvm-addr2line bin/llvm-dlltool @bin bin/llvm-dwarfdump @bin bin/llvm-dwp -@bin bin/llvm-elfabi @bin bin/llvm-exegesis @bin bin/llvm-extract @bin bin/llvm-gsymutil @@ -52,6 +59,7 @@ bin/llvm-dlltool bin/llvm-install-name-tool @bin bin/llvm-jitlink bin/llvm-lib +@bin bin/llvm-libtool-darwin @bin bin/llvm-link @bin bin/llvm-lipo @bin bin/llvm-lto @@ -65,32 +73,37 @@ bin/llvm-lib @bin bin/llvm-objcopy @bin bin/llvm-objdump @bin bin/llvm-opt-report +bin/llvm-otool @bin bin/llvm-pdbutil @bin bin/llvm-profdata +@bin bin/llvm-profgen bin/llvm-ranlib @bin bin/llvm-rc bin/llvm-readelf @bin bin/llvm-readobj @bin bin/llvm-reduce @bin bin/llvm-rtdyld +@bin bin/llvm-sim @bin bin/llvm-size @bin bin/llvm-split @bin bin/llvm-stress @bin bin/llvm-strings bin/llvm-strip @bin bin/llvm-symbolizer +@bin bin/llvm-tapi-diff @bin bin/llvm-tblgen @bin bin/llvm-undname +bin/llvm-windres @bin bin/llvm-xray -@bin bin/obj2yaml @bin bin/opt @bin bin/sancov @bin bin/sanstats bin/scan-build +bin/scan-build-py bin/scan-view +@bin bin/split-file @bin bin/verify-uselistorder bin/wasm-ld -@bin bin/yaml2obj include/clang/ include/clang-c/ include/clang-c/BuildSystem.h @@ -102,6 +115,10 @@ include/clang-c/ExternC.h include/clang-c/FatalErrorHandler.h include/clang-c/Index.h include/clang-c/Platform.h +include/clang-c/Rewrite.h +include/clang/APINotes/ +include/clang/APINotes/APINotesYAMLCompiler.h +include/clang/APINotes/Types.h include/clang/ARCMigrate/ include/clang/ARCMigrate/ARCMT.h include/clang/ARCMigrate/ARCMTActions.h @@ -195,6 +212,7 @@ include/clang/AST/ExternalASTMerger.h include/clang/AST/ExternalASTSource.h include/clang/AST/FormatString.h include/clang/AST/GlobalDecl.h +include/clang/AST/IgnoreExpr.h include/clang/AST/JSONNodeDumper.h include/clang/AST/LambdaCapture.h include/clang/AST/LexicallyOrderedRecursiveASTVisitor.h @@ -257,6 +275,7 @@ include/clang/ASTMatchers/GtestMatchers.h include/clang/Analysis/ include/clang/Analysis/Analyses/ include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h +include/clang/Analysis/Analyses/CalledOnceCheck.h include/clang/Analysis/Analyses/Consumed.h include/clang/Analysis/Analyses/Dominators.h include/clang/Analysis/Analyses/ExprMutationAnalyzer.h @@ -287,6 +306,8 @@ include/clang/Analysis/DomainSpecific/ObjCNoReturn.h include/clang/Analysis/FlowSensitive/ include/clang/Analysis/FlowSensitive/DataflowValues.h include/clang/Analysis/FlowSensitive/DataflowWorklist.h +include/clang/Analysis/IssueHash.h +include/clang/Analysis/MacroExpansionContext.h include/clang/Analysis/PathDiagnostic.h include/clang/Analysis/ProgramPoint.h include/clang/Analysis/RetainSummaryManager.h @@ -316,11 +337,11 @@ include/clang/Basic/BuiltinsBPF.def include/clang/Basic/BuiltinsHexagon.def include/clang/Basic/BuiltinsHexagonDep.def include/clang/Basic/BuiltinsHexagonMapCustomDep.def -include/clang/Basic/BuiltinsLe64.def include/clang/Basic/BuiltinsMips.def include/clang/Basic/BuiltinsNEON.def include/clang/Basic/BuiltinsNVPTX.def include/clang/Basic/BuiltinsPPC.def +include/clang/Basic/BuiltinsRISCV.def include/clang/Basic/BuiltinsSVE.def include/clang/Basic/BuiltinsSystemZ.def include/clang/Basic/BuiltinsWebAssembly.def @@ -333,6 +354,7 @@ include/clang/Basic/CodeGenOptions.def include/clang/Basic/CodeGenOptions.h include/clang/Basic/CommentOptions.h include/clang/Basic/Cuda.h +include/clang/Basic/DarwinSDKInfo.h include/clang/Basic/DebugInfoOptions.h include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticAST.h @@ -365,14 +387,15 @@ include/clang/Basic/DiagnosticSema.h include/clang/Basic/DiagnosticSemaKinds.inc include/clang/Basic/DiagnosticSerialization.h include/clang/Basic/DiagnosticSerializationKinds.inc +include/clang/Basic/DirectoryEntry.h include/clang/Basic/ExceptionSpecificationType.h include/clang/Basic/ExpressionTraits.h include/clang/Basic/FPOptions.def include/clang/Basic/Features.def +include/clang/Basic/FileEntry.h include/clang/Basic/FileManager.h include/clang/Basic/FileSystemOptions.h include/clang/Basic/FileSystemStatCache.h -include/clang/Basic/FixedPoint.h include/clang/Basic/IdentifierTable.h include/clang/Basic/JsonSupport.h include/clang/Basic/LLVM.h @@ -385,6 +408,7 @@ include/clang/Basic/Linkage.h include/clang/Basic/MSP430Target.def include/clang/Basic/MacroBuilder.h include/clang/Basic/Module.h +include/clang/Basic/NoSanitizeList.h include/clang/Basic/ObjCRuntime.h include/clang/Basic/OpenCLExtensionTypes.def include/clang/Basic/OpenCLExtensions.def @@ -395,11 +419,13 @@ include/clang/Basic/OpenMPKinds.h include/clang/Basic/OperatorKinds.def include/clang/Basic/OperatorKinds.h include/clang/Basic/OperatorPrecedence.h +include/clang/Basic/PPCTypes.def include/clang/Basic/PartialDiagnostic.h include/clang/Basic/PlistSupport.h include/clang/Basic/PragmaKinds.h include/clang/Basic/PrettyStackTrace.h -include/clang/Basic/SanitizerBlacklist.h +include/clang/Basic/ProfileList.h +include/clang/Basic/RISCVVTypes.def include/clang/Basic/SanitizerSpecialCaseList.h include/clang/Basic/Sanitizers.def include/clang/Basic/Sanitizers.h @@ -410,10 +436,13 @@ include/clang/Basic/Specifiers.h include/clang/Basic/Stack.h include/clang/Basic/SyncScope.h include/clang/Basic/TargetBuiltins.h +include/clang/Basic/TargetCXXABI.def include/clang/Basic/TargetCXXABI.h +include/clang/Basic/TargetID.h include/clang/Basic/TargetInfo.h include/clang/Basic/TargetOptions.h include/clang/Basic/TemplateKinds.h +include/clang/Basic/Thunk.h include/clang/Basic/TokenKinds.def include/clang/Basic/TokenKinds.h include/clang/Basic/TypeTraits.h @@ -437,6 +466,8 @@ include/clang/Basic/arm_sve_builtin_cg.inc include/clang/Basic/arm_sve_builtins.inc include/clang/Basic/arm_sve_sema_rangechecks.inc include/clang/Basic/arm_sve_typeflags.inc +include/clang/Basic/riscv_vector_builtin_cg.inc +include/clang/Basic/riscv_vector_builtins.inc include/clang/CodeGen/ include/clang/CodeGen/BackendUtil.h include/clang/CodeGen/CGFunctionInfo.h @@ -457,10 +488,10 @@ include/clang/DirectoryWatcher/DirectoryWatcher.h include/clang/Driver/ include/clang/Driver/Action.h include/clang/Driver/Compilation.h -include/clang/Driver/DarwinSDKInfo.h include/clang/Driver/Distro.h include/clang/Driver/Driver.h include/clang/Driver/DriverDiagnostic.h +include/clang/Driver/InputInfo.h include/clang/Driver/Job.h include/clang/Driver/Multilib.h include/clang/Driver/OptionUtils.h @@ -521,6 +552,11 @@ include/clang/Index/IndexSymbol.h include/clang/Index/IndexingAction.h include/clang/Index/IndexingOptions.h include/clang/Index/USRGeneration.h +include/clang/IndexSerialization/ +include/clang/IndexSerialization/SerializablePathCollection.h +include/clang/Interpreter/ +include/clang/Interpreter/Interpreter.h +include/clang/Interpreter/PartialTranslationUnit.h include/clang/Lex/ include/clang/Lex/CodeCompletionHandler.h include/clang/Lex/DependencyDirectivesSourceMinimizer.h @@ -647,7 +683,6 @@ include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h include/clang/StaticAnalyzer/Core/Checker.h include/clang/StaticAnalyzer/Core/CheckerManager.h include/clang/StaticAnalyzer/Core/CheckerRegistryData.h -include/clang/StaticAnalyzer/Core/IssueHash.h include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h include/clang/StaticAnalyzer/Core/PathSensitive/ include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h @@ -660,7 +695,7 @@ include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h include/clang/StaticAnalyzer/Core/PathSensitive/DynamicCastInfo.h -include/clang/StaticAnalyzer/Core/PathSensitive/DynamicSize.h +include/clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h include/clang/StaticAnalyzer/Core/PathSensitive/DynamicType.h include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h @@ -709,7 +744,6 @@ include/clang/Tooling/CompilationDatabase.h include/clang/Tooling/CompilationDatabasePluginRegistry.h include/clang/Tooling/Core/ include/clang/Tooling/Core/Diagnostic.h -include/clang/Tooling/Core/Lookup.h include/clang/Tooling/Core/Replacement.h include/clang/Tooling/DependencyScanning/ include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h @@ -725,6 +759,8 @@ include/clang/Tooling/Inclusions/ include/clang/Tooling/Inclusions/HeaderIncludes.h include/clang/Tooling/Inclusions/IncludeStyle.h include/clang/Tooling/JSONCompilationDatabase.h +include/clang/Tooling/NodeIntrospection.h +include/clang/Tooling/NodeIntrospection.inc include/clang/Tooling/Refactoring/ include/clang/Tooling/Refactoring.h include/clang/Tooling/Refactoring/ASTSelection.h @@ -732,6 +768,7 @@ include/clang/Tooling/Refactoring/AtomicChange.h include/clang/Tooling/Refactoring/Extract/ include/clang/Tooling/Refactoring/Extract/Extract.h include/clang/Tooling/Refactoring/Extract/SourceExtraction.h +include/clang/Tooling/Refactoring/Lookup.h include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h include/clang/Tooling/Refactoring/RefactoringAction.h include/clang/Tooling/Refactoring/RefactoringActionRule.h @@ -757,7 +794,9 @@ include/clang/Tooling/StandaloneExecution.h include/clang/Tooling/Syntax/ include/clang/Tooling/Syntax/BuildTree.h include/clang/Tooling/Syntax/Mutations.h +include/clang/Tooling/Syntax/NodeClasses.inc include/clang/Tooling/Syntax/Nodes.h +include/clang/Tooling/Syntax/Nodes.inc include/clang/Tooling/Syntax/Tokens.h include/clang/Tooling/Syntax/Tree.h include/clang/Tooling/ToolExecutorPluginRegistry.h @@ -774,6 +813,7 @@ include/clang/Tooling/Transformer/Transformer.h include/lld/ include/lld/Common/ include/lld/Common/Args.h +include/lld/Common/Arrays.h include/lld/Common/DWARF.h include/lld/Common/Driver.h include/lld/Common/ErrorHandler.h @@ -826,11 +866,11 @@ include/llvm-c/ExecutionEngine.h include/llvm-c/ExternC.h include/llvm-c/IRReader.h include/llvm-c/Initialization.h -include/llvm-c/LinkTimeOptimizer.h +include/llvm-c/LLJIT.h include/llvm-c/Linker.h include/llvm-c/Object.h include/llvm-c/Orc.h -include/llvm-c/OrcBindings.h +include/llvm-c/OrcEE.h include/llvm-c/Remarks.h include/llvm-c/Support.h include/llvm-c/Target.h @@ -840,6 +880,7 @@ include/llvm-c/Transforms/AggressiveInstCombine.h include/llvm-c/Transforms/Coroutines.h include/llvm-c/Transforms/IPO.h include/llvm-c/Transforms/InstCombine.h +include/llvm-c/Transforms/PassBuilder.h include/llvm-c/Transforms/PassManagerBuilder.h include/llvm-c/Transforms/Scalar.h include/llvm-c/Transforms/Utils.h @@ -847,6 +888,7 @@ include/llvm-c/Transforms/Vectorize.h include/llvm-c/Types.h include/llvm-c/lto.h include/llvm/ADT/ +include/llvm/ADT/APFixedPoint.h include/llvm/ADT/APFloat.h include/llvm/ADT/APInt.h include/llvm/ADT/APSInt.h @@ -894,6 +936,7 @@ include/llvm/ADT/PriorityQueue.h include/llvm/ADT/PriorityWorklist.h include/llvm/ADT/SCCIterator.h include/llvm/ADT/STLExtras.h +include/llvm/ADT/STLForwardCompat.h include/llvm/ADT/ScopeExit.h include/llvm/ADT/ScopedHashTable.h include/llvm/ADT/Sequence.h @@ -955,8 +998,11 @@ include/llvm/Analysis/CaptureTracking.h include/llvm/Analysis/CmpInstAnalysis.h include/llvm/Analysis/CodeMetrics.h include/llvm/Analysis/ConstantFolding.h +include/llvm/Analysis/ConstraintSystem.h include/llvm/Analysis/DDG.h +include/llvm/Analysis/DDGPrinter.h include/llvm/Analysis/DOTGraphTraitsPass.h +include/llvm/Analysis/Delinearization.h include/llvm/Analysis/DemandedBits.h include/llvm/Analysis/DependenceAnalysis.h include/llvm/Analysis/DependenceGraphBuilder.h @@ -966,18 +1012,20 @@ include/llvm/Analysis/DomTreeUpdater.h include/llvm/Analysis/DominanceFrontier.h include/llvm/Analysis/DominanceFrontierImpl.h include/llvm/Analysis/EHPersonalities.h +include/llvm/Analysis/FunctionPropertiesAnalysis.h include/llvm/Analysis/GlobalsModRef.h include/llvm/Analysis/GuardUtils.h include/llvm/Analysis/HeatUtils.h +include/llvm/Analysis/IRSimilarityIdentifier.h include/llvm/Analysis/IVDescriptors.h include/llvm/Analysis/IVUsers.h include/llvm/Analysis/IndirectCallPromotionAnalysis.h include/llvm/Analysis/IndirectCallVisitor.h include/llvm/Analysis/InlineAdvisor.h include/llvm/Analysis/InlineCost.h -include/llvm/Analysis/InlineFeaturesAnalysis.h include/llvm/Analysis/InlineModelFeatureMaps.h include/llvm/Analysis/InlineSizeEstimatorAnalysis.h +include/llvm/Analysis/InstCount.h include/llvm/Analysis/InstructionPrecedenceTracking.h include/llvm/Analysis/InstructionSimplify.h include/llvm/Analysis/Interval.h @@ -1002,17 +1050,21 @@ include/llvm/Analysis/LoopPass.h include/llvm/Analysis/LoopUnrollAnalyzer.h include/llvm/Analysis/MLInlineAdvisor.h include/llvm/Analysis/MLModelRunner.h +include/llvm/Analysis/MemDerefPrinter.h include/llvm/Analysis/MemoryBuiltins.h include/llvm/Analysis/MemoryDependenceAnalysis.h include/llvm/Analysis/MemoryLocation.h include/llvm/Analysis/MemorySSA.h include/llvm/Analysis/MemorySSAUpdater.h +include/llvm/Analysis/ModuleDebugInfoPrinter.h include/llvm/Analysis/ModuleSummaryAnalysis.h include/llvm/Analysis/MustExecute.h include/llvm/Analysis/ObjCARCAliasAnalysis.h include/llvm/Analysis/ObjCARCAnalysisUtils.h include/llvm/Analysis/ObjCARCInstKind.h +include/llvm/Analysis/ObjCARCUtil.h include/llvm/Analysis/OptimizationRemarkEmitter.h +include/llvm/Analysis/OverflowInstAnalysis.h include/llvm/Analysis/PHITransAddr.h include/llvm/Analysis/Passes.h include/llvm/Analysis/PhiValues.h @@ -1024,6 +1076,7 @@ include/llvm/Analysis/RegionInfoImpl.h include/llvm/Analysis/RegionIterator.h include/llvm/Analysis/RegionPass.h include/llvm/Analysis/RegionPrinter.h +include/llvm/Analysis/ReplayInlineAdvisor.h include/llvm/Analysis/ScalarEvolution.h include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h include/llvm/Analysis/ScalarEvolutionDivision.h @@ -1044,6 +1097,7 @@ include/llvm/Analysis/Trace.h include/llvm/Analysis/TypeBasedAliasAnalysis.h include/llvm/Analysis/TypeMetadataUtils.h include/llvm/Analysis/Utils/ +include/llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h include/llvm/Analysis/Utils/Local.h include/llvm/Analysis/Utils/TFUtils.h include/llvm/Analysis/ValueLattice.h @@ -1052,6 +1106,9 @@ include/llvm/Analysis/ValueTracking.h include/llvm/Analysis/VecFuncs.def include/llvm/Analysis/VectorUtils.h include/llvm/AsmParser/ +include/llvm/AsmParser/LLLexer.h +include/llvm/AsmParser/LLParser.h +include/llvm/AsmParser/LLToken.h include/llvm/AsmParser/Parser.h include/llvm/AsmParser/SlotMapping.h include/llvm/BinaryFormat/ @@ -1068,8 +1125,10 @@ include/llvm/BinaryFormat/ELFRelocs/ARC.def include/llvm/BinaryFormat/ELFRelocs/ARM.def include/llvm/BinaryFormat/ELFRelocs/AVR.def include/llvm/BinaryFormat/ELFRelocs/BPF.def +include/llvm/BinaryFormat/ELFRelocs/CSKY.def include/llvm/BinaryFormat/ELFRelocs/Hexagon.def include/llvm/BinaryFormat/ELFRelocs/Lanai.def +include/llvm/BinaryFormat/ELFRelocs/M68k.def include/llvm/BinaryFormat/ELFRelocs/MSP430.def include/llvm/BinaryFormat/ELFRelocs/Mips.def include/llvm/BinaryFormat/ELFRelocs/PowerPC.def @@ -1092,9 +1151,12 @@ include/llvm/BinaryFormat/MsgPackReader.h include/llvm/BinaryFormat/MsgPackWriter.h include/llvm/BinaryFormat/Wasm.h include/llvm/BinaryFormat/WasmRelocs.def +include/llvm/BinaryFormat/WasmTraits.h include/llvm/BinaryFormat/XCOFF.h include/llvm/Bitcode/ include/llvm/Bitcode/BitcodeAnalyzer.h +include/llvm/Bitcode/BitcodeCommon.h +include/llvm/Bitcode/BitcodeConvenience.h include/llvm/Bitcode/BitcodeReader.h include/llvm/Bitcode/BitcodeWriter.h include/llvm/Bitcode/BitcodeWriterPass.h @@ -1110,11 +1172,12 @@ include/llvm/CodeGen/AntiDepBreaker.h include/llvm/CodeGen/AsmPrinter.h include/llvm/CodeGen/AsmPrinterHandler.h include/llvm/CodeGen/AtomicExpandUtils.h +include/llvm/CodeGen/BasicBlockSectionUtils.h include/llvm/CodeGen/BasicTTIImpl.h -include/llvm/CodeGen/BuiltinGCs.h include/llvm/CodeGen/CSEConfigBase.h include/llvm/CodeGen/CalcSpillWeights.h include/llvm/CodeGen/CallingConvLower.h +include/llvm/CodeGen/CodeGenPassBuilder.h include/llvm/CodeGen/CommandFlags.h include/llvm/CodeGen/CostTable.h include/llvm/CodeGen/DAGCombine.h @@ -1127,12 +1190,12 @@ include/llvm/CodeGen/DwarfStringPoolEntry.h include/llvm/CodeGen/EdgeBundles.h include/llvm/CodeGen/ExecutionDomainFix.h include/llvm/CodeGen/ExpandReductions.h +include/llvm/CodeGen/ExpandVectorPredication.h include/llvm/CodeGen/FastISel.h include/llvm/CodeGen/FaultMaps.h include/llvm/CodeGen/FunctionLoweringInfo.h include/llvm/CodeGen/GCMetadata.h include/llvm/CodeGen/GCMetadataPrinter.h -include/llvm/CodeGen/GCStrategy.h include/llvm/CodeGen/GlobalISel/ include/llvm/CodeGen/GlobalISel/CSEInfo.h include/llvm/CodeGen/GlobalISel/CSEMIRBuilder.h @@ -1140,15 +1203,16 @@ include/llvm/CodeGen/GlobalISel/CallLowering.h include/llvm/CodeGen/GlobalISel/Combiner.h include/llvm/CodeGen/GlobalISel/CombinerHelper.h include/llvm/CodeGen/GlobalISel/CombinerInfo.h -include/llvm/CodeGen/GlobalISel/ConstantFoldingMIRBuilder.h include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h include/llvm/CodeGen/GlobalISel/GISelKnownBits.h include/llvm/CodeGen/GlobalISel/GISelWorkList.h +include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h include/llvm/CodeGen/GlobalISel/IRTranslator.h include/llvm/CodeGen/GlobalISel/InlineAsmLowering.h include/llvm/CodeGen/GlobalISel/InstructionSelect.h include/llvm/CodeGen/GlobalISel/InstructionSelector.h include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h +include/llvm/CodeGen/GlobalISel/LegacyLegalizerInfo.h include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h include/llvm/CodeGen/GlobalISel/Legalizer.h include/llvm/CodeGen/GlobalISel/LegalizerHelper.h @@ -1183,6 +1247,7 @@ include/llvm/CodeGen/LiveVariables.h include/llvm/CodeGen/LoopTraversal.h include/llvm/CodeGen/LowLevelType.h include/llvm/CodeGen/MBFIWrapper.h +include/llvm/CodeGen/MIRFSDiscriminator.h include/llvm/CodeGen/MIRFormatter.h include/llvm/CodeGen/MIRParser/ include/llvm/CodeGen/MIRParser/MIParser.h @@ -1210,9 +1275,12 @@ include/llvm/CodeGen/MachineLoopUtils.h include/llvm/CodeGen/MachineMemOperand.h include/llvm/CodeGen/MachineModuleInfo.h include/llvm/CodeGen/MachineModuleInfoImpls.h +include/llvm/CodeGen/MachineModuleSlotTracker.h include/llvm/CodeGen/MachineOperand.h include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h include/llvm/CodeGen/MachineOutliner.h +include/llvm/CodeGen/MachinePassManager.h +include/llvm/CodeGen/MachinePassRegistry.def include/llvm/CodeGen/MachinePassRegistry.h include/llvm/CodeGen/MachinePipeliner.h include/llvm/CodeGen/MachinePostDominators.h @@ -1221,9 +1289,11 @@ include/llvm/CodeGen/MachineRegisterInfo.h include/llvm/CodeGen/MachineSSAUpdater.h include/llvm/CodeGen/MachineScheduler.h include/llvm/CodeGen/MachineSizeOpts.h +include/llvm/CodeGen/MachineStableHash.h include/llvm/CodeGen/MachineTraceMetrics.h include/llvm/CodeGen/MacroFusion.h include/llvm/CodeGen/ModuloSchedule.h +include/llvm/CodeGen/MultiHazardRecognizer.h include/llvm/CodeGen/NonRelocatableStringpool.h include/llvm/CodeGen/PBQP/ include/llvm/CodeGen/PBQP/CostAllocator.h @@ -1240,6 +1310,7 @@ include/llvm/CodeGen/RDFGraph.h include/llvm/CodeGen/RDFLiveness.h include/llvm/CodeGen/RDFRegisters.h include/llvm/CodeGen/ReachingDefAnalysis.h +include/llvm/CodeGen/RegAllocCommon.h include/llvm/CodeGen/RegAllocPBQP.h include/llvm/CodeGen/RegAllocRegistry.h include/llvm/CodeGen/Register.h @@ -1247,6 +1318,7 @@ include/llvm/CodeGen/RegisterClassInfo.h include/llvm/CodeGen/RegisterPressure.h include/llvm/CodeGen/RegisterScavenging.h include/llvm/CodeGen/RegisterUsageInfo.h +include/llvm/CodeGen/ReplaceWithVeclib.h include/llvm/CodeGen/ResourcePriorityQueue.h include/llvm/CodeGen/ReturnProtectorLowering.h include/llvm/CodeGen/RuntimeLibcalls.h @@ -1265,6 +1337,7 @@ include/llvm/CodeGen/SelectionDAGNodes.h include/llvm/CodeGen/SelectionDAGTargetInfo.h include/llvm/CodeGen/SlotIndexes.h include/llvm/CodeGen/Spiller.h +include/llvm/CodeGen/StableHashing.h include/llvm/CodeGen/StackMaps.h include/llvm/CodeGen/StackProtector.h include/llvm/CodeGen/SwiftErrorValueTracking.h @@ -1280,6 +1353,7 @@ include/llvm/CodeGen/TargetPassConfig.h include/llvm/CodeGen/TargetRegisterInfo.h include/llvm/CodeGen/TargetSchedule.h include/llvm/CodeGen/TargetSubtargetInfo.h +include/llvm/CodeGen/TileShapeInfo.h include/llvm/CodeGen/UnreachableBlockElim.h include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td @@ -1298,6 +1372,10 @@ include/llvm/DWARFLinker/DWARFLinker.h include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h include/llvm/DWARFLinker/DWARFLinkerDeclContext.h include/llvm/DWARFLinker/DWARFStreamer.h +include/llvm/DWP/ +include/llvm/DWP/DWP.h +include/llvm/DWP/DWPError.h +include/llvm/DWP/DWPStringPool.h include/llvm/DebugInfo/ include/llvm/DebugInfo/CodeView/ include/llvm/DebugInfo/CodeView/AppendingTypeTableBuilder.h @@ -1472,9 +1550,11 @@ include/llvm/DebugInfo/PDB/Native/NativeEnumGlobals.h include/llvm/DebugInfo/PDB/Native/NativeEnumInjectedSources.h include/llvm/DebugInfo/PDB/Native/NativeEnumLineNumbers.h include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h +include/llvm/DebugInfo/PDB/Native/NativeEnumSymbols.h include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h include/llvm/DebugInfo/PDB/Native/NativeFunctionSymbol.h +include/llvm/DebugInfo/PDB/Native/NativeInlineSiteSymbol.h include/llvm/DebugInfo/PDB/Native/NativeLineNumber.h include/llvm/DebugInfo/PDB/Native/NativePublicSymbol.h include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h @@ -1560,12 +1640,16 @@ include/llvm/ExecutionEngine/JITEventListener.h include/llvm/ExecutionEngine/JITLink/ include/llvm/ExecutionEngine/JITLink/EHFrameSupport.h include/llvm/ExecutionEngine/JITLink/ELF.h +include/llvm/ExecutionEngine/JITLink/ELF_riscv.h include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h include/llvm/ExecutionEngine/JITLink/JITLink.h +include/llvm/ExecutionEngine/JITLink/JITLinkDylib.h include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h include/llvm/ExecutionEngine/JITLink/MachO.h include/llvm/ExecutionEngine/JITLink/MachO_arm64.h include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h +include/llvm/ExecutionEngine/JITLink/riscv.h +include/llvm/ExecutionEngine/JITLink/x86_64.h include/llvm/ExecutionEngine/JITSymbol.h include/llvm/ExecutionEngine/MCJIT.h include/llvm/ExecutionEngine/OProfileWrapper.h @@ -1574,38 +1658,50 @@ include/llvm/ExecutionEngine/Orc/ include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h include/llvm/ExecutionEngine/Orc/CompileUtils.h include/llvm/ExecutionEngine/Orc/Core.h +include/llvm/ExecutionEngine/Orc/DebugObjectManagerPlugin.h include/llvm/ExecutionEngine/Orc/DebugUtils.h +include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h +include/llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h +include/llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h +include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h include/llvm/ExecutionEngine/Orc/ExecutionUtils.h -include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h +include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h include/llvm/ExecutionEngine/Orc/IRCompileLayer.h include/llvm/ExecutionEngine/Orc/IRTransformLayer.h include/llvm/ExecutionEngine/Orc/IndirectionUtils.h include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h include/llvm/ExecutionEngine/Orc/LLJIT.h -include/llvm/ExecutionEngine/Orc/LambdaResolver.h +include/llvm/ExecutionEngine/Orc/LLVMSPSSerializers.h include/llvm/ExecutionEngine/Orc/Layer.h -include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h include/llvm/ExecutionEngine/Orc/LazyReexports.h -include/llvm/ExecutionEngine/Orc/Legacy.h include/llvm/ExecutionEngine/Orc/MachOPlatform.h include/llvm/ExecutionEngine/Orc/Mangling.h -include/llvm/ExecutionEngine/Orc/NullResolver.h include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h include/llvm/ExecutionEngine/Orc/OrcABISupport.h -include/llvm/ExecutionEngine/Orc/OrcError.h +include/llvm/ExecutionEngine/Orc/OrcRPCExecutorProcessControl.h include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h -include/llvm/ExecutionEngine/Orc/RPC/ -include/llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h -include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h -include/llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h -include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h +include/llvm/ExecutionEngine/Orc/Shared/ +include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h +include/llvm/ExecutionEngine/Orc/Shared/FDRawByteChannel.h +include/llvm/ExecutionEngine/Orc/Shared/OrcError.h +include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h +include/llvm/ExecutionEngine/Orc/Shared/RawByteChannel.h +include/llvm/ExecutionEngine/Orc/Shared/Serialization.h +include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h +include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h +include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h include/llvm/ExecutionEngine/Orc/Speculation.h include/llvm/ExecutionEngine/Orc/SymbolStringPool.h +include/llvm/ExecutionEngine/Orc/TargetProcess/ +include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h +include/llvm/ExecutionEngine/Orc/TargetProcess/OrcRPCTPCServer.h +include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h +include/llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h include/llvm/ExecutionEngine/OrcMCJITReplacement.h include/llvm/ExecutionEngine/OrcV1Deprecation.h @@ -1613,16 +1709,18 @@ include/llvm/ExecutionEngine/RTDyldMemoryManager.h include/llvm/ExecutionEngine/RuntimeDyld.h include/llvm/ExecutionEngine/RuntimeDyldChecker.h include/llvm/ExecutionEngine/SectionMemoryManager.h +include/llvm/FileCheck/ +include/llvm/FileCheck/FileCheck.h include/llvm/Frontend/ include/llvm/Frontend/Directive/ include/llvm/Frontend/Directive/DirectiveBase.td include/llvm/Frontend/OpenACC/ -include/llvm/Frontend/OpenACC/ACC.cpp.inc include/llvm/Frontend/OpenACC/ACC.h.inc +include/llvm/Frontend/OpenACC/ACC.inc include/llvm/Frontend/OpenACC/ACC.td include/llvm/Frontend/OpenMP/ -include/llvm/Frontend/OpenMP/OMP.cpp.inc include/llvm/Frontend/OpenMP/OMP.h.inc +include/llvm/Frontend/OpenMP/OMP.inc include/llvm/Frontend/OpenMP/OMP.td include/llvm/Frontend/OpenMP/OMPConstants.h include/llvm/Frontend/OpenMP/OMPContext.h @@ -1640,11 +1738,13 @@ include/llvm/IR/ include/llvm/IR/AbstractCallSite.h include/llvm/IR/Argument.h include/llvm/IR/AssemblyAnnotationWriter.h +include/llvm/IR/Assumptions.h include/llvm/IR/Attributes.h include/llvm/IR/Attributes.inc include/llvm/IR/Attributes.td include/llvm/IR/AutoUpgrade.h include/llvm/IR/BasicBlock.h +include/llvm/IR/BuiltinGCs.h include/llvm/IR/CFG.h include/llvm/IR/CallingConv.h include/llvm/IR/Comdat.h @@ -1667,7 +1767,9 @@ include/llvm/IR/DiagnosticPrinter.h include/llvm/IR/Dominators.h include/llvm/IR/FPEnv.h include/llvm/IR/FixedMetadataKinds.def +include/llvm/IR/FixedPointBuilder.h include/llvm/IR/Function.h +include/llvm/IR/GCStrategy.h include/llvm/IR/GVMaterializer.h include/llvm/IR/GetElementPtrTypeIterator.h include/llvm/IR/GlobalAlias.h @@ -1713,6 +1815,9 @@ include/llvm/IR/IntrinsicsRISCV.h include/llvm/IR/IntrinsicsRISCV.td include/llvm/IR/IntrinsicsS390.h include/llvm/IR/IntrinsicsSystemZ.td +include/llvm/IR/IntrinsicsVE.h +include/llvm/IR/IntrinsicsVE.td +include/llvm/IR/IntrinsicsVEVL.gen.td include/llvm/IR/IntrinsicsWebAssembly.h include/llvm/IR/IntrinsicsWebAssembly.td include/llvm/IR/IntrinsicsX86.h @@ -1744,10 +1849,14 @@ include/llvm/IR/PassManagerInternal.h include/llvm/IR/PassTimingInfo.h include/llvm/IR/PatternMatch.h include/llvm/IR/PredIteratorCache.h +include/llvm/IR/PrintPasses.h include/llvm/IR/ProfileSummary.h +include/llvm/IR/PseudoProbe.h +include/llvm/IR/ReplaceConstant.h include/llvm/IR/RuntimeLibcalls.def include/llvm/IR/SafepointIRVerifier.h include/llvm/IR/Statepoint.h +include/llvm/IR/StructuralHash.h include/llvm/IR/SymbolTableListTraits.h include/llvm/IR/TrackingMDRef.h include/llvm/IR/Type.h @@ -1765,6 +1874,10 @@ include/llvm/IR/Verifier.h include/llvm/IRReader/ include/llvm/IRReader/IRReader.h include/llvm/InitializePasses.h +include/llvm/InterfaceStub/ +include/llvm/InterfaceStub/ELFObjHandler.h +include/llvm/InterfaceStub/IFSHandler.h +include/llvm/InterfaceStub/IFSStub.h include/llvm/LTO/ include/llvm/LTO/Caching.h include/llvm/LTO/Config.h @@ -1835,12 +1948,14 @@ include/llvm/MC/MCParser/MCAsmParserExtension.h include/llvm/MC/MCParser/MCAsmParserUtils.h include/llvm/MC/MCParser/MCParsedAsmOperand.h include/llvm/MC/MCParser/MCTargetAsmParser.h +include/llvm/MC/MCPseudoProbe.h include/llvm/MC/MCRegister.h include/llvm/MC/MCRegisterInfo.h include/llvm/MC/MCSchedule.h include/llvm/MC/MCSection.h include/llvm/MC/MCSectionCOFF.h include/llvm/MC/MCSectionELF.h +include/llvm/MC/MCSectionGOFF.h include/llvm/MC/MCSectionMachO.h include/llvm/MC/MCSectionWasm.h include/llvm/MC/MCSectionXCOFF.h @@ -1849,6 +1964,7 @@ include/llvm/MC/MCSubtargetInfo.h include/llvm/MC/MCSymbol.h include/llvm/MC/MCSymbolCOFF.h include/llvm/MC/MCSymbolELF.h +include/llvm/MC/MCSymbolGOFF.h include/llvm/MC/MCSymbolMachO.h include/llvm/MC/MCSymbolWasm.h include/llvm/MC/MCSymbolXCOFF.h @@ -1870,6 +1986,7 @@ include/llvm/MC/SubtargetFeature.h include/llvm/MCA/ include/llvm/MCA/CodeEmitter.h include/llvm/MCA/Context.h +include/llvm/MCA/CustomBehaviour.h include/llvm/MCA/HWEventListener.h include/llvm/MCA/HardwareUnits/ include/llvm/MCA/HardwareUnits/HardwareUnit.h @@ -1886,6 +2003,7 @@ include/llvm/MCA/Stages/ include/llvm/MCA/Stages/DispatchStage.h include/llvm/MCA/Stages/EntryStage.h include/llvm/MCA/Stages/ExecuteStage.h +include/llvm/MCA/Stages/InOrderIssueStage.h include/llvm/MCA/Stages/InstructionTables.h include/llvm/MCA/Stages/MicroOpQueueStage.h include/llvm/MCA/Stages/RetireStage.h @@ -1904,10 +2022,12 @@ include/llvm/Object/ELF.h include/llvm/Object/ELFObjectFile.h include/llvm/Object/ELFTypes.h include/llvm/Object/Error.h +include/llvm/Object/FaultMapParser.h include/llvm/Object/IRObjectFile.h include/llvm/Object/IRSymtab.h include/llvm/Object/MachO.h include/llvm/Object/MachOUniversal.h +include/llvm/Object/MachOUniversalWriter.h include/llvm/Object/Minidump.h include/llvm/Object/ModuleSymbolTable.h include/llvm/Object/ObjectFile.h @@ -1918,11 +2038,11 @@ include/llvm/Object/SymbolicFile.h include/llvm/Object/TapiFile.h include/llvm/Object/TapiUniversal.h include/llvm/Object/Wasm.h -include/llvm/Object/WasmTraits.h include/llvm/Object/WindowsMachineFlag.h include/llvm/Object/WindowsResource.h include/llvm/Object/XCOFFObjectFile.h include/llvm/ObjectYAML/ +include/llvm/ObjectYAML/ArchiveYAML.h include/llvm/ObjectYAML/COFFYAML.h include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h include/llvm/ObjectYAML/CodeViewYAMLSymbols.h @@ -1972,6 +2092,7 @@ include/llvm/Remarks/ include/llvm/Remarks/BitstreamRemarkContainer.h include/llvm/Remarks/BitstreamRemarkParser.h include/llvm/Remarks/BitstreamRemarkSerializer.h +include/llvm/Remarks/HotnessThresholdParser.h include/llvm/Remarks/Remark.h include/llvm/Remarks/RemarkFormat.h include/llvm/Remarks/RemarkLinker.h @@ -1998,7 +2119,9 @@ include/llvm/Support/AllocatorBase.h include/llvm/Support/ArrayRecycler.h include/llvm/Support/Atomic.h include/llvm/Support/AtomicOrdering.h +include/llvm/Support/AutoConvert.h include/llvm/Support/Automaton.h +include/llvm/Support/BCD.h include/llvm/Support/Base64.h include/llvm/Support/BinaryByteStream.h include/llvm/Support/BinaryItemStream.h @@ -2034,6 +2157,7 @@ include/llvm/Support/DataExtractor.h include/llvm/Support/DataTypes.h include/llvm/Support/Debug.h include/llvm/Support/DebugCounter.h +include/llvm/Support/Discriminator.h include/llvm/Support/DynamicLibrary.h include/llvm/Support/ELFAttributeParser.h include/llvm/Support/ELFAttributes.h @@ -2044,12 +2168,14 @@ include/llvm/Support/Errno.h include/llvm/Support/Error.h include/llvm/Support/ErrorHandling.h include/llvm/Support/ErrorOr.h +include/llvm/Support/ExitCodes.h include/llvm/Support/ExtensibleRTTI.h include/llvm/Support/Extension.def -include/llvm/Support/FileCheck.h include/llvm/Support/FileCollector.h include/llvm/Support/FileOutputBuffer.h +include/llvm/Support/FileSystem/ include/llvm/Support/FileSystem.h +include/llvm/Support/FileSystem/UniqueID.h include/llvm/Support/FileUtilities.h include/llvm/Support/Format.h include/llvm/Support/FormatAdapters.h @@ -2065,6 +2191,7 @@ include/llvm/Support/GlobPattern.h include/llvm/Support/GraphWriter.h include/llvm/Support/Host.h include/llvm/Support/InitLLVM.h +include/llvm/Support/InstructionCost.h include/llvm/Support/ItaniumManglingCanonicalizer.h include/llvm/Support/JSON.h include/llvm/Support/KnownBits.h @@ -2082,6 +2209,7 @@ include/llvm/Support/MathExtras.h include/llvm/Support/MemAlloc.h include/llvm/Support/Memory.h include/llvm/Support/MemoryBuffer.h +include/llvm/Support/MemoryBufferRef.h include/llvm/Support/MipsABIFlags.h include/llvm/Support/Mutex.h include/llvm/Support/NativeFormatting.h @@ -2106,6 +2234,7 @@ include/llvm/Support/Regex.h include/llvm/Support/Registry.h include/llvm/Support/ReverseIteration.h include/llvm/Support/SHA1.h +include/llvm/Support/SHA256.h include/llvm/Support/SMLoc.h include/llvm/Support/SMTAPI.h include/llvm/Support/SaveAndRestore.h @@ -2166,6 +2295,7 @@ include/llvm/Support/type_traits.h include/llvm/Support/xxhash.h include/llvm/TableGen/ include/llvm/TableGen/Automaton.td +include/llvm/TableGen/DirectiveEmitter.h include/llvm/TableGen/Error.h include/llvm/TableGen/Main.h include/llvm/TableGen/Record.h @@ -2175,6 +2305,7 @@ include/llvm/TableGen/StringMatcher.h include/llvm/TableGen/StringToOffsetTable.h include/llvm/TableGen/TableGenBackend.h include/llvm/Target/ +include/llvm/Target/CGPassBuilderOption.h include/llvm/Target/CodeGenCWrappers.h include/llvm/Target/GenericOpcodes.td include/llvm/Target/GlobalISel/ @@ -2199,20 +2330,16 @@ include/llvm/Testing/Support/Annotations.h include/llvm/Testing/Support/Error.h include/llvm/Testing/Support/SupportHelpers.h include/llvm/TextAPI/ -include/llvm/TextAPI/ELF/ -include/llvm/TextAPI/ELF/ELFStub.h -include/llvm/TextAPI/ELF/TBEHandler.h -include/llvm/TextAPI/MachO/ -include/llvm/TextAPI/MachO/Architecture.def -include/llvm/TextAPI/MachO/Architecture.h -include/llvm/TextAPI/MachO/ArchitectureSet.h -include/llvm/TextAPI/MachO/InterfaceFile.h -include/llvm/TextAPI/MachO/PackedVersion.h -include/llvm/TextAPI/MachO/Platform.h -include/llvm/TextAPI/MachO/Symbol.h -include/llvm/TextAPI/MachO/Target.h -include/llvm/TextAPI/MachO/TextAPIReader.h -include/llvm/TextAPI/MachO/TextAPIWriter.h +include/llvm/TextAPI/Architecture.def +include/llvm/TextAPI/Architecture.h +include/llvm/TextAPI/ArchitectureSet.h +include/llvm/TextAPI/InterfaceFile.h +include/llvm/TextAPI/PackedVersion.h +include/llvm/TextAPI/Platform.h +include/llvm/TextAPI/Symbol.h +include/llvm/TextAPI/Target.h +include/llvm/TextAPI/TextAPIReader.h +include/llvm/TextAPI/TextAPIWriter.h include/llvm/ToolDrivers/ include/llvm/ToolDrivers/llvm-dlltool/ include/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h @@ -2231,8 +2358,10 @@ include/llvm/Transforms/Coroutines/CoroSplit.h include/llvm/Transforms/IPO/ include/llvm/Transforms/IPO.h include/llvm/Transforms/IPO/AlwaysInliner.h +include/llvm/Transforms/IPO/Annotation2Metadata.h include/llvm/Transforms/IPO/ArgumentPromotion.h include/llvm/Transforms/IPO/Attributor.h +include/llvm/Transforms/IPO/BlockExtractor.h include/llvm/Transforms/IPO/CalledValuePropagation.h include/llvm/Transforms/IPO/ConstantMerge.h include/llvm/Transforms/IPO/CrossDSOCFI.h @@ -2245,34 +2374,44 @@ include/llvm/Transforms/IPO/GlobalDCE.h include/llvm/Transforms/IPO/GlobalOpt.h include/llvm/Transforms/IPO/GlobalSplit.h include/llvm/Transforms/IPO/HotColdSplitting.h +include/llvm/Transforms/IPO/IROutliner.h include/llvm/Transforms/IPO/InferFunctionAttrs.h include/llvm/Transforms/IPO/Inliner.h include/llvm/Transforms/IPO/Internalize.h +include/llvm/Transforms/IPO/LoopExtractor.h include/llvm/Transforms/IPO/LowerTypeTests.h include/llvm/Transforms/IPO/MergeFunctions.h include/llvm/Transforms/IPO/OpenMPOpt.h include/llvm/Transforms/IPO/PartialInlining.h include/llvm/Transforms/IPO/PassManagerBuilder.h +include/llvm/Transforms/IPO/ProfiledCallGraph.h include/llvm/Transforms/IPO/SCCP.h +include/llvm/Transforms/IPO/SampleContextTracker.h include/llvm/Transforms/IPO/SampleProfile.h +include/llvm/Transforms/IPO/SampleProfileProbe.h include/llvm/Transforms/IPO/StripDeadPrototypes.h +include/llvm/Transforms/IPO/StripSymbols.h include/llvm/Transforms/IPO/SyntheticCountsPropagation.h include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h include/llvm/Transforms/IPO/WholeProgramDevirt.h include/llvm/Transforms/InstCombine/ include/llvm/Transforms/InstCombine/InstCombine.h include/llvm/Transforms/InstCombine/InstCombineWorklist.h +include/llvm/Transforms/InstCombine/InstCombiner.h include/llvm/Transforms/Instrumentation/ include/llvm/Transforms/Instrumentation.h include/llvm/Transforms/Instrumentation/AddressSanitizer.h include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h +include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h include/llvm/Transforms/Instrumentation/BoundsChecking.h include/llvm/Transforms/Instrumentation/CGProfile.h include/llvm/Transforms/Instrumentation/ControlHeightReduction.h +include/llvm/Transforms/Instrumentation/DataFlowSanitizer.h include/llvm/Transforms/Instrumentation/GCOVProfiler.h include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h include/llvm/Transforms/Instrumentation/InstrOrderFile.h include/llvm/Transforms/Instrumentation/InstrProfiling.h +include/llvm/Transforms/Instrumentation/MemProfiler.h include/llvm/Transforms/Instrumentation/MemorySanitizer.h include/llvm/Transforms/Instrumentation/PGOInstrumentation.h include/llvm/Transforms/Instrumentation/PoisonChecking.h @@ -2283,11 +2422,14 @@ include/llvm/Transforms/Scalar/ include/llvm/Transforms/Scalar.h include/llvm/Transforms/Scalar/ADCE.h include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h +include/llvm/Transforms/Scalar/AnnotationRemarks.h include/llvm/Transforms/Scalar/BDCE.h include/llvm/Transforms/Scalar/CallSiteSplitting.h include/llvm/Transforms/Scalar/ConstantHoisting.h +include/llvm/Transforms/Scalar/ConstraintElimination.h include/llvm/Transforms/Scalar/CorrelatedValuePropagation.h include/llvm/Transforms/Scalar/DCE.h +include/llvm/Transforms/Scalar/DFAJumpThreading.h include/llvm/Transforms/Scalar/DeadStoreElimination.h include/llvm/Transforms/Scalar/DivRemPairs.h include/llvm/Transforms/Scalar/EarlyCSE.h @@ -2298,25 +2440,31 @@ include/llvm/Transforms/Scalar/GuardWidening.h include/llvm/Transforms/Scalar/IVUsersPrinter.h include/llvm/Transforms/Scalar/IndVarSimplify.h include/llvm/Transforms/Scalar/InductiveRangeCheckElimination.h +include/llvm/Transforms/Scalar/InferAddressSpaces.h include/llvm/Transforms/Scalar/InstSimplifyPass.h include/llvm/Transforms/Scalar/JumpThreading.h include/llvm/Transforms/Scalar/LICM.h include/llvm/Transforms/Scalar/LoopAccessAnalysisPrinter.h +include/llvm/Transforms/Scalar/LoopBoundSplit.h include/llvm/Transforms/Scalar/LoopDataPrefetch.h include/llvm/Transforms/Scalar/LoopDeletion.h include/llvm/Transforms/Scalar/LoopDistribute.h +include/llvm/Transforms/Scalar/LoopFlatten.h include/llvm/Transforms/Scalar/LoopFuse.h include/llvm/Transforms/Scalar/LoopIdiomRecognize.h include/llvm/Transforms/Scalar/LoopInstSimplify.h +include/llvm/Transforms/Scalar/LoopInterchange.h include/llvm/Transforms/Scalar/LoopLoadElimination.h include/llvm/Transforms/Scalar/LoopPassManager.h include/llvm/Transforms/Scalar/LoopPredication.h +include/llvm/Transforms/Scalar/LoopReroll.h include/llvm/Transforms/Scalar/LoopRotation.h include/llvm/Transforms/Scalar/LoopSimplifyCFG.h include/llvm/Transforms/Scalar/LoopSink.h include/llvm/Transforms/Scalar/LoopStrengthReduce.h include/llvm/Transforms/Scalar/LoopUnrollAndJamPass.h include/llvm/Transforms/Scalar/LoopUnrollPass.h +include/llvm/Transforms/Scalar/LoopVersioningLICM.h include/llvm/Transforms/Scalar/LowerAtomic.h include/llvm/Transforms/Scalar/LowerConstantIntrinsics.h include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h @@ -2331,15 +2479,19 @@ include/llvm/Transforms/Scalar/NaryReassociate.h include/llvm/Transforms/Scalar/NewGVN.h include/llvm/Transforms/Scalar/PartiallyInlineLibCalls.h include/llvm/Transforms/Scalar/Reassociate.h +include/llvm/Transforms/Scalar/Reg2Mem.h include/llvm/Transforms/Scalar/RewriteStatepointsForGC.h include/llvm/Transforms/Scalar/SCCP.h include/llvm/Transforms/Scalar/SROA.h +include/llvm/Transforms/Scalar/ScalarizeMaskedMemIntrin.h include/llvm/Transforms/Scalar/Scalarizer.h +include/llvm/Transforms/Scalar/SeparateConstOffsetFromGEP.h include/llvm/Transforms/Scalar/SimpleLoopUnswitch.h include/llvm/Transforms/Scalar/SimplifyCFG.h include/llvm/Transforms/Scalar/Sink.h -include/llvm/Transforms/Scalar/SpeculateAroundPHIs.h include/llvm/Transforms/Scalar/SpeculativeExecution.h +include/llvm/Transforms/Scalar/StraightLineStrengthReduce.h +include/llvm/Transforms/Scalar/StructurizeCFG.h include/llvm/Transforms/Scalar/TailRecursionElimination.h include/llvm/Transforms/Scalar/WarnMissedTransforms.h include/llvm/Transforms/Utils/ @@ -2364,40 +2516,53 @@ include/llvm/Transforms/Utils/Debugify.h include/llvm/Transforms/Utils/EntryExitInstrumenter.h include/llvm/Transforms/Utils/EscapeEnumerator.h include/llvm/Transforms/Utils/Evaluator.h +include/llvm/Transforms/Utils/FixIrreducible.h include/llvm/Transforms/Utils/FunctionComparator.h include/llvm/Transforms/Utils/FunctionImportUtils.h include/llvm/Transforms/Utils/GlobalStatus.h include/llvm/Transforms/Utils/GuardUtils.h -include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h +include/llvm/Transforms/Utils/HelloWorld.h include/llvm/Transforms/Utils/InjectTLIMappings.h +include/llvm/Transforms/Utils/InstructionNamer.h include/llvm/Transforms/Utils/IntegerDivision.h include/llvm/Transforms/Utils/LCSSA.h include/llvm/Transforms/Utils/LibCallsShrinkWrap.h include/llvm/Transforms/Utils/Local.h +include/llvm/Transforms/Utils/LoopPeel.h include/llvm/Transforms/Utils/LoopRotationUtils.h include/llvm/Transforms/Utils/LoopSimplify.h include/llvm/Transforms/Utils/LoopUtils.h include/llvm/Transforms/Utils/LoopVersioning.h include/llvm/Transforms/Utils/LowerInvoke.h include/llvm/Transforms/Utils/LowerMemIntrinsics.h +include/llvm/Transforms/Utils/LowerSwitch.h +include/llvm/Transforms/Utils/MatrixUtils.h include/llvm/Transforms/Utils/Mem2Reg.h -include/llvm/Transforms/Utils/MisExpect.h +include/llvm/Transforms/Utils/MemoryOpRemark.h +include/llvm/Transforms/Utils/MetaRenamer.h include/llvm/Transforms/Utils/ModuleUtils.h include/llvm/Transforms/Utils/NameAnonGlobals.h include/llvm/Transforms/Utils/PredicateInfo.h include/llvm/Transforms/Utils/PromoteMemToReg.h +include/llvm/Transforms/Utils/RelLookupTableConverter.h +include/llvm/Transforms/Utils/SCCPSolver.h include/llvm/Transforms/Utils/SSAUpdater.h include/llvm/Transforms/Utils/SSAUpdaterBulk.h include/llvm/Transforms/Utils/SSAUpdaterImpl.h +include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h +include/llvm/Transforms/Utils/SampleProfileLoaderBaseUtil.h include/llvm/Transforms/Utils/SanitizerStats.h include/llvm/Transforms/Utils/ScalarEvolutionExpander.h +include/llvm/Transforms/Utils/SimplifyCFGOptions.h include/llvm/Transforms/Utils/SimplifyIndVar.h include/llvm/Transforms/Utils/SimplifyLibCalls.h include/llvm/Transforms/Utils/SizeOpts.h include/llvm/Transforms/Utils/SplitModule.h +include/llvm/Transforms/Utils/StripGCRelocates.h +include/llvm/Transforms/Utils/StripNonLineTableDebugInfo.h include/llvm/Transforms/Utils/SymbolRewriter.h include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h -include/llvm/Transforms/Utils/UniqueInternalLinkageNames.h +include/llvm/Transforms/Utils/UnifyLoopExits.h include/llvm/Transforms/Utils/UnrollLoop.h include/llvm/Transforms/Utils/VNCoercion.h include/llvm/Transforms/Utils/ValueMapper.h @@ -2444,6 +2609,7 @@ ${CLANG_INCLUDE_PATH}/__clang_cuda_libdevice_declares.h ${CLANG_INCLUDE_PATH}/__clang_cuda_math.h ${CLANG_INCLUDE_PATH}/__clang_cuda_math_forward_declares.h ${CLANG_INCLUDE_PATH}/__clang_cuda_runtime_wrapper.h +${CLANG_INCLUDE_PATH}/__clang_hip_cmath.h ${CLANG_INCLUDE_PATH}/__clang_hip_libdevice_declares.h ${CLANG_INCLUDE_PATH}/__clang_hip_math.h ${CLANG_INCLUDE_PATH}/__clang_hip_runtime_wrapper.h @@ -2492,8 +2658,10 @@ ${CLANG_INCLUDE_PATH}/avx512vp2intersectintrin.h ${CLANG_INCLUDE_PATH}/avx512vpopcntdqintrin.h ${CLANG_INCLUDE_PATH}/avx512vpopcntdqvlintrin.h ${CLANG_INCLUDE_PATH}/avxintrin.h +${CLANG_INCLUDE_PATH}/avxvnniintrin.h ${CLANG_INCLUDE_PATH}/bmi2intrin.h ${CLANG_INCLUDE_PATH}/bmiintrin.h +${CLANG_INCLUDE_PATH}/builtins.h ${CLANG_INCLUDE_PATH}/cet.h ${CLANG_INCLUDE_PATH}/cetintrin.h ${CLANG_INCLUDE_PATH}/cldemoteintrin.h @@ -2513,14 +2681,20 @@ ${CLANG_INCLUDE_PATH}/fma4intrin.h ${CLANG_INCLUDE_PATH}/fmaintrin.h ${CLANG_INCLUDE_PATH}/fxsrintrin.h ${CLANG_INCLUDE_PATH}/gfniintrin.h +${CLANG_INCLUDE_PATH}/hexagon_circ_brev_intrinsics.h +${CLANG_INCLUDE_PATH}/hexagon_protos.h +${CLANG_INCLUDE_PATH}/hexagon_types.h +${CLANG_INCLUDE_PATH}/hresetintrin.h ${CLANG_INCLUDE_PATH}/htmintrin.h ${CLANG_INCLUDE_PATH}/htmxlintrin.h +${CLANG_INCLUDE_PATH}/hvx_hexagon_protos.h ${CLANG_INCLUDE_PATH}/ia32intrin.h ${CLANG_INCLUDE_PATH}/immintrin.h ${CLANG_INCLUDE_PATH}/intrin.h ${CLANG_INCLUDE_PATH}/inttypes.h ${CLANG_INCLUDE_PATH}/invpcidintrin.h ${CLANG_INCLUDE_PATH}/iso646.h +${CLANG_INCLUDE_PATH}/keylockerintrin.h ${CLANG_INCLUDE_PATH}/limits.h ${CLANG_INCLUDE_PATH}/lwpintrin.h ${CLANG_INCLUDE_PATH}/lzcntintrin.h @@ -2539,6 +2713,7 @@ ${CLANG_INCLUDE_PATH}/openmp_wrappers/__clang_openmp_device_functions.h ${CLANG_INCLUDE_PATH}/openmp_wrappers/cmath ${CLANG_INCLUDE_PATH}/openmp_wrappers/complex ${CLANG_INCLUDE_PATH}/openmp_wrappers/complex.h +${CLANG_INCLUDE_PATH}/openmp_wrappers/complex_cmath.h ${CLANG_INCLUDE_PATH}/openmp_wrappers/math.h ${CLANG_INCLUDE_PATH}/openmp_wrappers/new ${CLANG_INCLUDE_PATH}/pconfigintrin.h @@ -2556,6 +2731,7 @@ ${CLANG_INCLUDE_PATH}/ppc_wrappers/xmmintrin.h ${CLANG_INCLUDE_PATH}/prfchwintrin.h ${CLANG_INCLUDE_PATH}/ptwriteintrin.h ${CLANG_INCLUDE_PATH}/rdseedintrin.h +${CLANG_INCLUDE_PATH}/riscv_vector.h ${CLANG_INCLUDE_PATH}/rtmintrin.h ${CLANG_INCLUDE_PATH}/s390intrin.h ${CLANG_INCLUDE_PATH}/serializeintrin.h @@ -2573,6 +2749,7 @@ ${CLANG_INCLUDE_PATH}/tbmintrin.h ${CLANG_INCLUDE_PATH}/tgmath.h ${CLANG_INCLUDE_PATH}/tmmintrin.h ${CLANG_INCLUDE_PATH}/tsxldtrkintrin.h +${CLANG_INCLUDE_PATH}/uintrintrin.h ${CLANG_INCLUDE_PATH}/unwind.h ${CLANG_INCLUDE_PATH}/vadefs.h ${CLANG_INCLUDE_PATH}/vaesintrin.h @@ -2583,6 +2760,7 @@ ${CLANG_INCLUDE_PATH}/waitpkgintrin.h ${CLANG_INCLUDE_PATH}/wasm_simd128.h ${CLANG_INCLUDE_PATH}/wbnoinvdintrin.h ${CLANG_INCLUDE_PATH}/wmmintrin.h +${CLANG_INCLUDE_PATH}/x86gprintrin.h ${CLANG_INCLUDE_PATH}/x86intrin.h ${CLANG_INCLUDE_PATH}/xmmintrin.h ${CLANG_INCLUDE_PATH}/xopintrin.h @@ -2593,6 +2771,7 @@ ${CLANG_INCLUDE_PATH}/xsavesintrin.h ${CLANG_INCLUDE_PATH}/xtestintrin.h lib/cmake/ lib/cmake/clang/ +lib/cmake/clang/AddClang.cmake lib/cmake/clang/ClangConfig.cmake lib/cmake/clang/ClangTargets${MODCMAKE_BUILD_SUFFIX} lib/cmake/clang/ClangTargets.cmake @@ -2607,7 +2786,6 @@ lib/cmake/llvm/AddOCaml.cmake lib/cmake/llvm/AddSphinxTarget.cmake lib/cmake/llvm/CheckAtomic.cmake lib/cmake/llvm/CheckCompilerVersion.cmake -lib/cmake/llvm/CheckLinkerFlag.cmake lib/cmake/llvm/ChooseMSVCCRT.cmake lib/cmake/llvm/CrossCompile.cmake lib/cmake/llvm/DetermineGCCCompatible.cmake @@ -2617,9 +2795,13 @@ lib/cmake/llvm/FindOCaml.cmake lib/cmake/llvm/FindSphinx.cmake lib/cmake/llvm/FindZ3.cmake lib/cmake/llvm/GenerateVersionFromVCS.cmake +lib/cmake/llvm/GetErrcMessages.cmake +lib/cmake/llvm/GetLibraryName.cmake lib/cmake/llvm/HandleLLVMOptions.cmake lib/cmake/llvm/HandleLLVMStdlib.cmake +lib/cmake/llvm/LLVM-Build.cmake lib/cmake/llvm/LLVM-Config.cmake +lib/cmake/llvm/LLVMCheckLinkerFlag.cmake lib/cmake/llvm/LLVMConfig.cmake lib/cmake/llvm/LLVMConfigExtensions.cmake lib/cmake/llvm/LLVMConfigVersion.cmake @@ -2634,7 +2816,7 @@ lib/cmake/llvm/TensorFlowCompile.cmake lib/cmake/llvm/UseLibtool.cmake lib/cmake/llvm/VersionFromVCS.cmake @so lib/libLLVM-${LLVM_V}.so -@so lib/libLLVM-11.so +@so lib/libLLVM-13.so @so lib/libLLVM.so @static-lib lib/libLLVMAArch64AsmParser.a @static-lib lib/libLLVMAArch64CodeGen.a @@ -2673,11 +2855,13 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMBitWriter.a @static-lib lib/libLLVMBitstreamReader.a @static-lib lib/libLLVMCFGuard.a +@static-lib lib/libLLVMCFIVerify.a @static-lib lib/libLLVMCodeGen.a @static-lib lib/libLLVMCore.a @static-lib lib/libLLVMCoroutines.a @static-lib lib/libLLVMCoverage.a @static-lib lib/libLLVMDWARFLinker.a +@static-lib lib/libLLVMDWP.a @static-lib lib/libLLVMDebugInfoCodeView.a @static-lib lib/libLLVMDebugInfoDWARF.a @static-lib lib/libLLVMDebugInfoGSYM.a @@ -2686,7 +2870,13 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMDemangle.a @static-lib lib/libLLVMDlltoolDriver.a @static-lib lib/libLLVMExecutionEngine.a +@static-lib lib/libLLVMExegesis.a +@static-lib lib/libLLVMExegesisAArch64.a +@static-lib lib/libLLVMExegesisMips.a +@static-lib lib/libLLVMExegesisPowerPC.a +@static-lib lib/libLLVMExegesisX86.a @static-lib lib/libLLVMExtensions.a +@static-lib lib/libLLVMFileCheck.a @static-lib lib/libLLVMFrontendOpenACC.a @static-lib lib/libLLVMFrontendOpenMP.a @static-lib lib/libLLVMFuzzMutate.a @@ -2699,6 +2889,7 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMIRReader.a @static-lib lib/libLLVMInstCombine.a @static-lib lib/libLLVMInstrumentation.a +@static-lib lib/libLLVMInterfaceStub.a @static-lib lib/libLLVMInterpreter.a @static-lib lib/libLLVMJITLink.a @static-lib lib/libLLVMLTO.a @@ -2712,6 +2903,7 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMLinker.a @static-lib lib/libLLVMMC.a @static-lib lib/libLLVMMCA.a +@static-lib lib/libLLVMMCACustomBehaviourAMDGPU.a @static-lib lib/libLLVMMCDisassembler.a @static-lib lib/libLLVMMCJIT.a @static-lib lib/libLLVMMCParser.a @@ -2733,8 +2925,9 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMObject.a @static-lib lib/libLLVMObjectYAML.a @static-lib lib/libLLVMOption.a -@static-lib lib/libLLVMOrcError.a @static-lib lib/libLLVMOrcJIT.a +@static-lib lib/libLLVMOrcShared.a +@static-lib lib/libLLVMOrcTargetProcess.a @static-lib lib/libLLVMPasses.a @static-lib lib/libLLVMPowerPCAsmParser.a @static-lib lib/libLLVMPowerPCCodeGen.a @@ -2747,7 +2940,6 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMRISCVDesc.a @static-lib lib/libLLVMRISCVDisassembler.a @static-lib lib/libLLVMRISCVInfo.a -@static-lib lib/libLLVMRISCVUtils.a @static-lib lib/libLLVMRemarks.a @static-lib lib/libLLVMRuntimeDyld.a @static-lib lib/libLLVMScalarOpts.a @@ -2765,6 +2957,7 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMSystemZDisassembler.a @static-lib lib/libLLVMSystemZInfo.a @static-lib lib/libLLVMTableGen.a +@static-lib lib/libLLVMTableGenGlobalISel.a @static-lib lib/libLLVMTarget.a @static-lib lib/libLLVMTextAPI.a @static-lib lib/libLLVMTransformUtils.a @@ -2774,6 +2967,7 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libLLVMWebAssemblyDesc.a @static-lib lib/libLLVMWebAssemblyDisassembler.a @static-lib lib/libLLVMWebAssemblyInfo.a +@static-lib lib/libLLVMWebAssemblyUtils.a @static-lib lib/libLLVMWindowsManifest.a @static-lib lib/libLLVMX86AsmParser.a @static-lib lib/libLLVMX86CodeGen.a @@ -2790,6 +2984,7 @@ lib/cmake/llvm/VersionFromVCS.cmake @lib lib/libRemarks.so.${LIBRemarks_VERSION} @lib lib/libclang-cpp.so.${LIBclang-cpp_VERSION} @lib lib/libclang.so.${LIBclang_VERSION} +@static-lib lib/libclangAPINotes.a @static-lib lib/libclangARCMigrate.a @static-lib lib/libclangAST.a @static-lib lib/libclangASTMatchers.a @@ -2808,6 +3003,8 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libclangHandleCXX.a @static-lib lib/libclangHandleLLVM.a @static-lib lib/libclangIndex.a +@static-lib lib/libclangIndexSerialization.a +@static-lib lib/libclangInterpreter.a @static-lib lib/libclangLex.a @static-lib lib/libclangParse.a @static-lib lib/libclangRewrite.a @@ -2825,29 +3022,61 @@ lib/cmake/llvm/VersionFromVCS.cmake @static-lib lib/libclangToolingRefactoring.a @static-lib lib/libclangToolingSyntax.a @static-lib lib/libclangTransformer.a +lib/libear/ +lib/libear/__init__.py +${MODPY_COMMENT}lib/libear/${MODPY_PYCACHE}/ +lib/libear/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/libear/config.h.in +lib/libear/ear.c @static-lib lib/liblldCOFF.a @static-lib lib/liblldCommon.a @static-lib lib/liblldCore.a @static-lib lib/liblldDriver.a @static-lib lib/liblldELF.a @static-lib lib/liblldMachO.a -@static-lib lib/liblldMachO2.a @static-lib lib/liblldMinGW.a @static-lib lib/liblldReaderWriter.a @static-lib lib/liblldWasm.a @static-lib lib/liblldYAML.a +lib/libscanbuild/ +lib/libscanbuild/__init__.py +${MODPY_COMMENT}lib/libscanbuild/${MODPY_PYCACHE}/ +lib/libscanbuild/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/${MODPY_PYCACHE}analyze.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/${MODPY_PYCACHE}arguments.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/${MODPY_PYCACHE}clang.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/${MODPY_PYCACHE}compilation.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/${MODPY_PYCACHE}intercept.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/${MODPY_PYCACHE}report.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/${MODPY_PYCACHE}shell.${MODPY_PYC_MAGIC_TAG}pyc +lib/libscanbuild/analyze.py +lib/libscanbuild/arguments.py +lib/libscanbuild/clang.py +lib/libscanbuild/compilation.py +lib/libscanbuild/intercept.py +lib/libscanbuild/report.py +lib/libscanbuild/resources/ +lib/libscanbuild/resources/scanview.css +lib/libscanbuild/resources/selectable.js +lib/libscanbuild/resources/sorttable.js +lib/libscanbuild/shell.py +libexec/analyze-c++ +libexec/analyze-cc libexec/c++-analyzer libexec/ccc-analyzer +libexec/intercept-c++ +libexec/intercept-cc @man man/man1/bugpoint.1 +@man man/man1/clang-tblgen.1 @man man/man1/clang.1 @man man/man1/dsymutil.1 @man man/man1/llc.1 +@man man/man1/lldb-tblgen.1 @man man/man1/lli.1 @man man/man1/llvm-addr2line.1 @man man/man1/llvm-ar.1 @man man/man1/llvm-as.1 @man man/man1/llvm-bcanalyzer.1 -@man man/man1/llvm-build.1 @man man/man1/llvm-config.1 @man man/man1/llvm-cov.1 @man man/man1/llvm-cxxfilt.1 @@ -2857,7 +3086,9 @@ libexec/ccc-analyzer @man man/man1/llvm-dwarfdump.1 @man man/man1/llvm-exegesis.1 @man man/man1/llvm-extract.1 +@man man/man1/llvm-install-name-tool.1 @man man/man1/llvm-lib.1 +@man man/man1/llvm-libtool-darwin.1 @man man/man1/llvm-link.1 @man man/man1/llvm-lipo.1 @man man/man1/llvm-locstats.1 @@ -2865,8 +3096,10 @@ libexec/ccc-analyzer @man man/man1/llvm-nm.1 @man man/man1/llvm-objcopy.1 @man man/man1/llvm-objdump.1 +@man man/man1/llvm-otool.1 @man man/man1/llvm-pdbutil.1 @man man/man1/llvm-profdata.1 +@man man/man1/llvm-profgen.1 @man man/man1/llvm-ranlib.1 @man man/man1/llvm-readelf.1 @man man/man1/llvm-readobj.1 @@ -2875,10 +3108,17 @@ libexec/ccc-analyzer @man man/man1/llvm-strings.1 @man man/man1/llvm-strip.1 @man man/man1/llvm-symbolizer.1 +@man man/man1/llvm-tblgen.1 +@man man/man1/mlir-tblgen.1 @man man/man1/opt.1 @man man/man1/scan-build.1 @man man/man1/tblgen.1 share/clang/ +${MODPY_COMMENT}share/clang/${MODPY_PYCACHE}/ +share/clang/${MODPY_PYCACHE}clang-format-diff.${MODPY_PYC_MAGIC_TAG}pyc +share/clang/${MODPY_PYCACHE}clang-format-sublime.${MODPY_PYC_MAGIC_TAG}pyc +share/clang/${MODPY_PYCACHE}clang-format.${MODPY_PYC_MAGIC_TAG}pyc +share/clang/${MODPY_PYCACHE}clang-rename.${MODPY_PYC_MAGIC_TAG}pyc share/clang/bash-autocomplete.sh share/clang/clang-format-bbedit.applescript share/clang/clang-format-diff.py @@ -2889,6 +3129,12 @@ share/clang/clang-rename.el share/clang/clang-rename.py share/doc/pkg-readmes/${PKGSTEM} share/opt-viewer/ +${MODPY_COMMENT}share/opt-viewer/${MODPY_PYCACHE}/ +share/opt-viewer/${MODPY_PYCACHE}opt-diff.${MODPY_PYC_MAGIC_TAG}pyc +share/opt-viewer/${MODPY_PYCACHE}opt-stats.${MODPY_PYC_MAGIC_TAG}pyc +share/opt-viewer/${MODPY_PYCACHE}opt-viewer.${MODPY_PYC_MAGIC_TAG}pyc +share/opt-viewer/${MODPY_PYCACHE}optpmap.${MODPY_PYC_MAGIC_TAG}pyc +share/opt-viewer/${MODPY_PYCACHE}optrecord.${MODPY_PYC_MAGIC_TAG}pyc share/opt-viewer/opt-diff.py share/opt-viewer/opt-stats.py share/opt-viewer/opt-viewer.py @@ -2899,9 +3145,11 @@ share/scan-build/ share/scan-build/scanview.css share/scan-build/sorttable.js share/scan-view/ -share/scan-view/FileRadar.scpt -share/scan-view/GetRadarVersion.scpt share/scan-view/Reporter.py share/scan-view/ScanView.py +${MODPY_COMMENT}share/scan-view/${MODPY_PYCACHE}/ +share/scan-view/${MODPY_PYCACHE}Reporter.${MODPY_PYC_MAGIC_TAG}pyc +share/scan-view/${MODPY_PYCACHE}ScanView.${MODPY_PYC_MAGIC_TAG}pyc +share/scan-view/${MODPY_PYCACHE}startfile.${MODPY_PYC_MAGIC_TAG}pyc share/scan-view/bugcatcher.ico share/scan-view/startfile.py diff --git a/lang/clang/clang.port.mk b/lang/clang/clang.port.mk index 9f42ed15f19..7f9ebef6a7a 100644 --- a/lang/clang/clang.port.mk +++ b/lang/clang/clang.port.mk @@ -1,6 +1,6 @@ -# $OpenBSD: clang.port.mk,v 1.36 2021/05/13 23:54:25 jca Exp $ +# $OpenBSD: clang.port.mk,v 1.37 2022/01/03 21:33:52 jca Exp $ -MODCLANG_VERSION= 11.1.0 +MODCLANG_VERSION= 13.0.0 MODCLANG_ARCHS ?= ${LLVM_ARCHS} MODCLANG_LANGS ?=