summaryrefslogtreecommitdiff
path: root/devel/llvm21/files
diff options
context:
space:
mode:
Diffstat (limited to 'devel/llvm21/files')
-rw-r--r--devel/llvm21/files/llvm-wrapper.sh.in11
-rw-r--r--devel/llvm21/files/patch-clang_tools_clang-format_clang-format-sublime.py11
-rw-r--r--devel/llvm21/files/patch-clang_tools_clang-format_clang-format.py11
-rw-r--r--devel/llvm21/files/patch-clang_tools_clang-format_git-clang-format29
-rw-r--r--devel/llvm21/files/patch-cmake_modules_AddSphinxTarget.cmake11
-rw-r--r--devel/llvm21/files/patch-compiler-rt_lib_profile_InstrProfilingPlatformLinux.c13
-rw-r--r--devel/llvm21/files/patch-fopenmp.diff14
-rw-r--r--devel/llvm21/files/patch-lldb_CMakeLists.txt12
-rw-r--r--devel/llvm21/files/xtoolchain.mk.in6
9 files changed, 118 insertions, 0 deletions
diff --git a/devel/llvm21/files/llvm-wrapper.sh.in b/devel/llvm21/files/llvm-wrapper.sh.in
new file mode 100644
index 000000000000..096e483c32a0
--- /dev/null
+++ b/devel/llvm21/files/llvm-wrapper.sh.in
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+LLVM_PREFIX="%%LLVM_PREFIX%%"
+LLVM_SUFFIX="%%LLVM_SUFFIX%%"
+
+tool=$0
+[ -L "$tool" ] && tool=$(/bin/realpath $tool)
+tool=${tool##*/}
+tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
+LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
+ exec "${tool}" "${@}"
diff --git a/devel/llvm21/files/patch-clang_tools_clang-format_clang-format-sublime.py b/devel/llvm21/files/patch-clang_tools_clang-format_clang-format-sublime.py
new file mode 100644
index 000000000000..3e928e4b74c3
--- /dev/null
+++ b/devel/llvm21/files/patch-clang_tools_clang-format_clang-format-sublime.py
@@ -0,0 +1,11 @@
+--- clang/tools/clang-format/clang-format-sublime.py.orig
++++ clang/tools/clang-format/clang-format-sublime.py
+@@ -18,7 +18,7 @@
+ import subprocess
+
+ # Change this to the full path if clang-format is not on the path.
+-binary = "clang-format"
++binary = "clang-format%%LLVM_SUFFIX%%"
+
+ # Change this to format according to other formatting styles. See the output of
+ # 'clang-format --help' for a list of supported styles. The default looks for
diff --git a/devel/llvm21/files/patch-clang_tools_clang-format_clang-format.py b/devel/llvm21/files/patch-clang_tools_clang-format_clang-format.py
new file mode 100644
index 000000000000..8ea9b8deeaa6
--- /dev/null
+++ b/devel/llvm21/files/patch-clang_tools_clang-format_clang-format.py
@@ -0,0 +1,11 @@
+--- clang/tools/clang-format/clang-format.py.orig
++++ clang/tools/clang-format/clang-format.py
+@@ -49,7 +49,7 @@
+
+ # set g:clang_format_path to the path to clang-format if it is not on the path
+ # Change this to the full path if clang-format is not on the path.
+-binary = "clang-format"
++binary = "clang-format%%LLVM_SUFFIX%%"
+ if vim.eval('exists("g:clang_format_path")') == "1":
+ binary = vim.eval("g:clang_format_path")
+
diff --git a/devel/llvm21/files/patch-clang_tools_clang-format_git-clang-format b/devel/llvm21/files/patch-clang_tools_clang-format_git-clang-format
new file mode 100644
index 000000000000..6210f16cbd5b
--- /dev/null
+++ b/devel/llvm21/files/patch-clang_tools_clang-format_git-clang-format
@@ -0,0 +1,29 @@
+--- clang/tools/clang-format/git-clang-format.orig
++++ clang/tools/clang-format/git-clang-format
+@@ -136,7 +136,7 @@
+ )
+ p.add_argument(
+ "--binary",
+- default=config.get("clangformat.binary", "clang-format"),
++ default=config.get("clangformat.binary", "clang-format%%LLVM_SUFFIX%%"),
+ help="path to clang-format",
+ ),
+ p.add_argument(
+@@ -539,7 +539,7 @@
+
+
+ def run_clang_format_and_save_to_tree(
+- changed_lines, revision=None, binary="clang-format", style=None
++ changed_lines, revision=None, binary="clang-format%%LLVM_SUFFIX%%", style=None
+ ):
+ """Run clang-format on each file and save the result to a git tree.
+
+@@ -622,7 +622,7 @@
+ filename,
+ line_ranges,
+ revision=None,
+- binary="clang-format",
++ binary="clang-format%%LLVM_SUFFIX%%",
+ style=None,
+ env=None,
+ ):
diff --git a/devel/llvm21/files/patch-cmake_modules_AddSphinxTarget.cmake b/devel/llvm21/files/patch-cmake_modules_AddSphinxTarget.cmake
new file mode 100644
index 000000000000..4adf3652e8ee
--- /dev/null
+++ b/devel/llvm21/files/patch-cmake_modules_AddSphinxTarget.cmake
@@ -0,0 +1,11 @@
+--- llvm/cmake/modules/AddSphinxTarget.cmake.orig
++++ llvm/cmake/modules/AddSphinxTarget.cmake
+@@ -39,6 +39,8 @@
+ endif()
+
+ add_custom_target(${SPHINX_TARGET_NAME}
++ COMMAND ${CMAKE_COMMAND}
++ -E make_directory ${SPHINX_BUILD_DIR}
+ COMMAND ${CMAKE_COMMAND} -E env ${ARG_ENV_VARS}
+ ${SPHINX_EXECUTABLE}
+ -b ${builder}
diff --git a/devel/llvm21/files/patch-compiler-rt_lib_profile_InstrProfilingPlatformLinux.c b/devel/llvm21/files/patch-compiler-rt_lib_profile_InstrProfilingPlatformLinux.c
new file mode 100644
index 000000000000..07ddc83e1d3f
--- /dev/null
+++ b/devel/llvm21/files/patch-compiler-rt_lib_profile_InstrProfilingPlatformLinux.c
@@ -0,0 +1,13 @@
+--- compiler-rt/lib/profile/InstrProfilingPlatformLinux.c.orig
++++ compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
+@@ -17,6 +17,10 @@
+ #include "InstrProfiling.h"
+ #include "InstrProfilingInternal.h"
+
++#if !defined(ElfW)
++#define ElfW(type) Elf_##type
++#endif
++
+ #define PROF_DATA_START INSTR_PROF_SECT_START(INSTR_PROF_DATA_COMMON)
+ #define PROF_DATA_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_DATA_COMMON)
+ #define PROF_NAME_START INSTR_PROF_SECT_START(INSTR_PROF_NAME_COMMON)
diff --git a/devel/llvm21/files/patch-fopenmp.diff b/devel/llvm21/files/patch-fopenmp.diff
new file mode 100644
index 000000000000..f521ac6e8d85
--- /dev/null
+++ b/devel/llvm21/files/patch-fopenmp.diff
@@ -0,0 +1,14 @@
+--- clang/lib/Driver/ToolChains/CommonArgs.cpp.orig 2017-05-10 17:18:56.000000000 +0000
++++ clang/lib/Driver/ToolChains/CommonArgs.cpp 2017-05-10 23:01:17.087686000 +0000
+@@ -441,7 +441,10 @@
+
+ switch (TC.getDriver().getOpenMPRuntime(Args)) {
+ case Driver::OMPRT_OMP:
+- CmdArgs.push_back("-lomp");
++ if (TC.getTriple().getOS() != llvm::Triple::FreeBSD || TC.isCrossCompiling() || !llvm::sys::fs::exists("%%LLVM_PREFIX%%/lib/libomp.so"))
++ CmdArgs.push_back("-lomp");
++ else
++ CmdArgs.push_back("%%LLVM_PREFIX%%/lib/libomp.so");
+ break;
+ case Driver::OMPRT_GOMP:
+ CmdArgs.push_back("-lgomp");
diff --git a/devel/llvm21/files/patch-lldb_CMakeLists.txt b/devel/llvm21/files/patch-lldb_CMakeLists.txt
new file mode 100644
index 000000000000..4061414dff4c
--- /dev/null
+++ b/devel/llvm21/files/patch-lldb_CMakeLists.txt
@@ -0,0 +1,12 @@
+Disable docs due to issues with auto-generated API docs
+
+--- lldb/CMakeLists.txt.orig
++++ lldb/CMakeLists.txt
+@@ -73,7 +73,6 @@
+
+ add_subdirectory(source)
+ add_subdirectory(tools)
+-add_subdirectory(docs)
+
+ if (LLDB_ENABLE_PYTHON)
+ if(LLDB_BUILD_FRAMEWORK)
diff --git a/devel/llvm21/files/xtoolchain.mk.in b/devel/llvm21/files/xtoolchain.mk.in
new file mode 100644
index 000000000000..48e6ad176d8f
--- /dev/null
+++ b/devel/llvm21/files/xtoolchain.mk.in
@@ -0,0 +1,6 @@
+XCC=%%LOCALBASE%%/bin/%%XCC%%
+XCXX=%%LOCALBASE%%/bin/%%XCXX%%
+XCPP=%%LOCALBASE%%/bin/%%XCPP%%
+XLD=%%LOCALBASE%%/bin/%%XLD%%
+CROSS_BINUTILS_PREFIX=/var/empty
+X_COMPILER_TYPE=%%X_COMPILER_TYPE%%