New package: llvm19-19.1.3
This commit is contained in:
parent
b46984a3a5
commit
8ec1c253c4
|
@ -987,14 +987,18 @@ libuchardet.so.0 uchardet-0.0.6_1
|
||||||
libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1
|
libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1
|
||||||
libyajl.so.2 yajl-2.0.1_1
|
libyajl.so.2 yajl-2.0.1_1
|
||||||
libconfuse.so.2 confuse-3.2.1_1
|
libconfuse.so.2 confuse-3.2.1_1
|
||||||
|
liblldb.so.19.1 liblldb19-19.1.0_1
|
||||||
liblldb.so.18.1 liblldb18-18.1.8_1
|
liblldb.so.18.1 liblldb18-18.1.8_1
|
||||||
liblldb.so.17 liblldb17-17.0.6_3
|
liblldb.so.17 liblldb17-17.0.6_3
|
||||||
|
libclang.so.19.1 libclang19-19.1.0_1
|
||||||
libclang.so.18.1 libclang18-18.1.8_1
|
libclang.so.18.1 libclang18-18.1.8_1
|
||||||
libclang.so.17 libclang17-17.0.6_1
|
libclang.so.17 libclang17-17.0.6_1
|
||||||
|
libclang-cpp.so.19.1 libclang-cpp19-19.1.0_1
|
||||||
libclang-cpp.so.18.1 libclang-cpp18-18.1.8_1
|
libclang-cpp.so.18.1 libclang-cpp18-18.1.8_1
|
||||||
libclang-cpp.so.17 libclang-cpp17-17.0.6_1
|
libclang-cpp.so.17 libclang-cpp17-17.0.6_1
|
||||||
libLLVM-17.so libllvm17-17.0.6_1
|
libLLVM-17.so libllvm17-17.0.6_1
|
||||||
libLLVM.so.18.1 libllvm18-18.1.8_1
|
libLLVM.so.18.1 libllvm18-18.1.8_1
|
||||||
|
libLLVM.so.19.1 libllvm19-19.1.0_1
|
||||||
libLLVMSPIRVLib.so.18.1 SPIRV-LLVM-Translator-18.1.2_1
|
libLLVMSPIRVLib.so.18.1 SPIRV-LLVM-Translator-18.1.2_1
|
||||||
libomp.so.5 libomp-17.0.6_1
|
libomp.so.5 libomp-17.0.6_1
|
||||||
libomptarget.so.18.1 libomp-18.1.8_1
|
libomptarget.so.18.1 libomp-18.1.8_1
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -1 +1 @@
|
||||||
llvm18
|
llvm19
|
|
@ -1 +1 @@
|
||||||
llvm18
|
llvm19
|
|
@ -1 +1 @@
|
||||||
llvm18
|
llvm19
|
|
@ -1 +1 @@
|
||||||
llvm18
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -1 +0,0 @@
|
||||||
llvm18
|
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -1 +1 @@
|
||||||
llvm18
|
llvm19
|
|
@ -1 +1 @@
|
||||||
llvm18
|
llvm19
|
|
@ -1 +0,0 @@
|
||||||
llvm18
|
|
|
@ -1 +0,0 @@
|
||||||
llvm18
|
|
|
@ -47,8 +47,9 @@ conflicts="llvm17>=0 llvm15>=0"
|
||||||
lib32disabled=yes
|
lib32disabled=yes
|
||||||
python_version=3
|
python_version=3
|
||||||
|
|
||||||
build_options="clang clang_tools_extra lld mlir libclc polly lldb flang bolt openmp lto graphviz"
|
build_options="clang clang_tools_extra lld mlir libclc polly lldb flang bolt
|
||||||
build_options_default="clang clang_tools_extra lld mlir libclc polly lldb openmp"
|
openmp libcxx libunwind lto graphviz"
|
||||||
|
build_options_default="clang clang_tools_extra lld mlir libclc polly lldb openmp libcxx"
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_WORDSIZE" = "64" ]; then
|
if [ "$XBPS_TARGET_WORDSIZE" = "64" ]; then
|
||||||
build_options_default+=" flang bolt"
|
build_options_default+=" flang bolt"
|
||||||
|
@ -128,13 +129,14 @@ if [ "$build_option_openmp" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# enable if runtime subpackages link to this version of llvm
|
# enable if runtime subpackages link to this version of llvm
|
||||||
if true; then
|
if [ "$build_option_libunwind" ]; then
|
||||||
subpackages+=" llvm-libunwind llvm-libunwind-devel "
|
subpackages+=" llvm-libunwind llvm-libunwind-devel "
|
||||||
_enabled_runtimes+=";libunwind"
|
_enabled_runtimes+=";libunwind"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$build_option_libcxx" ]; then
|
||||||
subpackages+=" libcxx libcxx-devel libcxxabi libcxxabi-devel "
|
subpackages+=" libcxx libcxx-devel libcxxabi libcxxabi-devel "
|
||||||
_enabled_runtimes+=";libcxxabi;libcxx"
|
_enabled_runtimes+=";libcxxabi;libcxx"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
configure_args+=" -DLLVM_ENABLE_RUNTIMES=${_enabled_runtimes}"
|
configure_args+=" -DLLVM_ENABLE_RUNTIMES=${_enabled_runtimes}"
|
||||||
|
@ -281,10 +283,21 @@ post_install() {
|
||||||
|
|
||||||
rm -rf ${DESTDIR}/usr/share/gdb
|
rm -rf ${DESTDIR}/usr/share/gdb
|
||||||
|
|
||||||
|
if [ "$build_option_libcxx" ]; then
|
||||||
# Install libcxxabi headers
|
# Install libcxxabi headers
|
||||||
vinstall ${wrksrc}/libcxxabi/include/__cxxabi_config.h 644 usr/include
|
vinstall ${wrksrc}/libcxxabi/include/__cxxabi_config.h 644 usr/include
|
||||||
vinstall ${wrksrc}/libcxxabi/include/cxxabi.h 644 usr/include
|
vinstall ${wrksrc}/libcxxabi/include/cxxabi.h 644 usr/include
|
||||||
|
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr \
|
||||||
|
-P ${wrksrc}/${build_wrksrc}/runtimes-doc/libcxx/docs/cmake_install.cmake
|
||||||
|
|
||||||
|
LIBCXX_DOCS=usr/share/doc/LLVM/libcxx
|
||||||
|
vmkdir ${LIBCXX_DOCS}
|
||||||
|
vcopy ${wrksrc}/${build_wrksrc}/runtimes-doc/libcxx/docs/html ${LIBCXX_DOCS}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$build_option_libunwind" ]; then
|
||||||
# Install libunwind headers
|
# Install libunwind headers
|
||||||
vinstall ${wrksrc}/libunwind/include/__libunwind_config.h 644 usr/include
|
vinstall ${wrksrc}/libunwind/include/__libunwind_config.h 644 usr/include
|
||||||
vinstall ${wrksrc}/libunwind/include/libunwind.h 644 usr/include
|
vinstall ${wrksrc}/libunwind/include/libunwind.h 644 usr/include
|
||||||
|
@ -292,20 +305,16 @@ post_install() {
|
||||||
vinstall ${wrksrc}/libunwind/include/mach-o/compact_unwind_encoding.h \
|
vinstall ${wrksrc}/libunwind/include/mach-o/compact_unwind_encoding.h \
|
||||||
644 usr/include/mach-o
|
644 usr/include/mach-o
|
||||||
|
|
||||||
# Install libcxx and libunwind docs
|
cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr \
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P ${wrksrc}/${build_wrksrc}/runtimes-doc/libcxx/docs/cmake_install.cmake
|
-P ${wrksrc}/${build_wrksrc}/runtimes-doc/libunwind/docs/cmake_install.cmake
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P ${wrksrc}/${build_wrksrc}/runtimes-doc/libunwind/docs/cmake_install.cmake
|
|
||||||
|
|
||||||
# Can this be disabled some other way?
|
|
||||||
rm -rf ${DESTDIR}/usr/lib64
|
|
||||||
|
|
||||||
LIBCXX_DOCS=usr/share/doc/LLVM/libcxx
|
|
||||||
vmkdir ${LIBCXX_DOCS}
|
|
||||||
vcopy ${wrksrc}/${build_wrksrc}/runtimes-doc/libcxx/docs/html ${LIBCXX_DOCS}
|
|
||||||
|
|
||||||
LIBUNWIND_DOCS=usr/share/doc/LLVM/libunwind
|
LIBUNWIND_DOCS=usr/share/doc/LLVM/libunwind
|
||||||
vmkdir ${LIBUNWIND_DOCS}
|
vmkdir ${LIBUNWIND_DOCS}
|
||||||
vcopy ${wrksrc}/${build_wrksrc}/runtimes-doc/libunwind/docs/html ${LIBUNWIND_DOCS}
|
vcopy ${wrksrc}/${build_wrksrc}/runtimes-doc/libunwind/docs/html ${LIBUNWIND_DOCS}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Can this be disabled some other way?
|
||||||
|
rm -rf ${DESTDIR}/usr/lib64
|
||||||
}
|
}
|
||||||
|
|
||||||
clang18_package() {
|
clang18_package() {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include <bits/wordsize.h>
|
||||||
|
|
||||||
|
#if __WORDSIZE == 32
|
||||||
|
#include "llvm-config-32.h"
|
||||||
|
#elif __WORDSIZE == 64
|
||||||
|
#include "llvm-config-64.h"
|
||||||
|
#else
|
||||||
|
#error "Unknown word size"
|
||||||
|
#endif
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
|
||||||
|
index 2e6d2dc6ce90..be2cf6cc1fee 100644
|
||||||
|
--- a/llvm/include/llvm/ADT/SmallVector.h
|
||||||
|
+++ b/llvm/include/llvm/ADT/SmallVector.h
|
||||||
|
@@ -1163,7 +1163,7 @@ template <typename T> struct CalculateSmallVectorDefaultInlinedElements {
|
||||||
|
// happens on a 32-bit host and then fails due to sizeof(T) *increasing* on a
|
||||||
|
// 64-bit host, is expected to be very rare.
|
||||||
|
static_assert(
|
||||||
|
- sizeof(T) <= 256,
|
||||||
|
+ sizeof(T) <= 288,
|
||||||
|
"You are trying to use a default number of inlined elements for "
|
||||||
|
"`SmallVector<T>` but `sizeof(T)` is really big! Please use an "
|
||||||
|
"explicit number of inlined elements with `SmallVector<T, N>` to make "
|
|
@ -0,0 +1,37 @@
|
||||||
|
From 2354350bcc890c13016d67f4c060b32cb1cd693c Mon Sep 17 00:00:00 2001
|
||||||
|
From: q66 <q66@chimera-linux.org>
|
||||||
|
Date: Sat, 4 Nov 2023 08:44:01 +0100
|
||||||
|
Subject: [PATCH 01/25] llvm: always set a larger stack size explicitly
|
||||||
|
|
||||||
|
---
|
||||||
|
llvm/lib/Support/Threading.cpp | 14 --------------
|
||||||
|
1 file changed, 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp
|
||||||
|
index 7cc7ba44c..b91b8f4bb 100644
|
||||||
|
--- a/llvm/lib/Support/Threading.cpp
|
||||||
|
+++ b/llvm/lib/Support/Threading.cpp
|
||||||
|
@@ -77,21 +77,7 @@ unsigned llvm::ThreadPoolStrategy::compute_thread_count() const {
|
||||||
|
// keyword.
|
||||||
|
#include "llvm/Support/thread.h"
|
||||||
|
|
||||||
|
-#if defined(__APPLE__)
|
||||||
|
- // Darwin's default stack size for threads except the main one is only 512KB,
|
||||||
|
- // which is not enough for some/many normal LLVM compilations. This implements
|
||||||
|
- // the same interface as std::thread but requests the same stack size as the
|
||||||
|
- // main thread (8MB) before creation.
|
||||||
|
const std::optional<unsigned> llvm::thread::DefaultStackSize = 8 * 1024 * 1024;
|
||||||
|
-#elif defined(_AIX)
|
||||||
|
- // On AIX, the default pthread stack size limit is ~192k for 64-bit programs.
|
||||||
|
- // This limit is easily reached when doing link-time thinLTO. AIX library
|
||||||
|
- // developers have used 4MB, so we'll do the same.
|
||||||
|
-const std::optional<unsigned> llvm::thread::DefaultStackSize = 4 * 1024 * 1024;
|
||||||
|
-#else
|
||||||
|
-const std::optional<unsigned> llvm::thread::DefaultStackSize;
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--
|
||||||
|
2.42.0
|
|
@ -0,0 +1,44 @@
|
||||||
|
From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||||
|
Date: Tue, 8 Sep 2015 22:14:57 +0200
|
||||||
|
Subject: [PATCH 2/7] fix unwind chain inclusion
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/Headers/unwind.h | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
|
||||||
|
index 303d792..44e10cc 100644
|
||||||
|
--- a/clang/lib/Headers/unwind.h
|
||||||
|
+++ b/clang/lib/Headers/unwind.h
|
||||||
|
@@ -9,9 +9,6 @@
|
||||||
|
|
||||||
|
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
|
||||||
|
|
||||||
|
-#ifndef __CLANG_UNWIND_H
|
||||||
|
-#define __CLANG_UNWIND_H
|
||||||
|
-
|
||||||
|
#if defined(__APPLE__) && __has_include_next(<unwind.h>)
|
||||||
|
/* Darwin (from 11.x on) provide an unwind.h. If that's available,
|
||||||
|
* use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
|
||||||
|
@@ -39,6 +36,9 @@
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
|
||||||
|
+#ifndef __CLANG_UNWIND_H
|
||||||
|
+#define __CLANG_UNWIND_H
|
||||||
|
+
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#endif /* __CLANG_UNWIND_H */
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#endif /* __CLANG_UNWIND_H */
|
||||||
|
--
|
||||||
|
2.5.1
|
|
@ -0,0 +1,13 @@
|
||||||
|
--- a/clang/lib/Driver/ToolChains/Linux.cpp
|
||||||
|
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
|
||||||
|
@@ -504,10 +504,6 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
|
||||||
|
Loader = "ld.so.1";
|
||||||
|
break;
|
||||||
|
case llvm::Triple::ppc64:
|
||||||
|
- LibDir = "lib64";
|
||||||
|
- Loader =
|
||||||
|
- (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
|
||||||
|
- break;
|
||||||
|
case llvm::Triple::ppc64le:
|
||||||
|
LibDir = "lib64";
|
||||||
|
Loader =
|
|
@ -0,0 +1,37 @@
|
||||||
|
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
|
||||||
|
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
|
||||||
|
@@ -74,6 +74,10 @@
|
||||||
|
# include <sys/utsname.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
+#if SANITIZER_LINUX && defined(__powerpc__)
|
||||||
|
+#include <asm/ptrace.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
# if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||||
|
# include <sys/personality.h>
|
||||||
|
# endif
|
||||||
|
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||||
|
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||||
|
@@ -94,7 +94,7 @@
|
||||||
|
# include <utime.h>
|
||||||
|
# include <sys/ptrace.h>
|
||||||
|
# if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
|
||||||
|
- defined(__hexagon__) || defined(__loongarch__) ||SANITIZER_RISCV64
|
||||||
|
+ defined(__hexagon__) || defined(__powerpc__) || defined(__loongarch__) ||SANITIZER_RISCV64
|
||||||
|
# include <asm/ptrace.h>
|
||||||
|
# ifdef __arm__
|
||||||
|
typedef struct user_fpregs elf_fpregset_t;
|
||||||
|
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
|
||||||
|
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
|
||||||
|
@@ -31,7 +31,7 @@
|
||||||
|
#include <sys/types.h> // for pid_t
|
||||||
|
#include <sys/uio.h> // for iovec
|
||||||
|
#include <elf.h> // for NT_PRSTATUS
|
||||||
|
-#if (defined(__aarch64__) || SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \
|
||||||
|
- !SANITIZER_ANDROID
|
||||||
|
+#if (defined(__aarch64__) || defined(__powerpc__) ||SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \
|
||||||
|
+ !SANITIZER_ANDROID
|
||||||
|
// GLIBC 2.20+ sys/user does not include asm/ptrace.h
|
||||||
|
# include <asm/ptrace.h>
|
||||||
|
#endif
|
|
@ -0,0 +1,18 @@
|
||||||
|
commit 9af31d021e83dce4e98f06d8e732f4afb481cd08
|
||||||
|
Author: Daniel Martinez <danielmartinez@cock.li>
|
||||||
|
Date: Sat Aug 3 18:04:04 2024 -0400
|
||||||
|
|
||||||
|
disable lldb docs as they depend on some sphinx packages we don't have
|
||||||
|
|
||||||
|
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
|
||||||
|
index 59cdc4593463..e7c2c38b50a9 100644
|
||||||
|
--- a/lldb/CMakeLists.txt
|
||||||
|
+++ b/lldb/CMakeLists.txt
|
||||||
|
@@ -124,7 +124,6 @@ add_subdirectory(utils/TableGen)
|
||||||
|
|
||||||
|
add_subdirectory(source)
|
||||||
|
add_subdirectory(tools)
|
||||||
|
-add_subdirectory(docs)
|
||||||
|
|
||||||
|
if (LLDB_ENABLE_PYTHON)
|
||||||
|
if(LLDB_BUILD_FRAMEWORK)
|
|
@ -0,0 +1,28 @@
|
||||||
|
commit 92984acc52fb95566d9387948c2655507328438b
|
||||||
|
Author: Daniel Martinez <danielmartinez@cock.li>
|
||||||
|
Date: Wed Jul 31 21:14:52 2024 -0400
|
||||||
|
|
||||||
|
Allow flang-new binary to be specified for omp modules
|
||||||
|
|
||||||
|
This allows the path of the flang-new binary to be specified as a
|
||||||
|
cmake configuration.
|
||||||
|
|
||||||
|
This is useful when cross compiling, as flang-new may exist
|
||||||
|
on the build machine, which should be used instead of the host.
|
||||||
|
|
||||||
|
For example, by passing "-DFLANG_NEW_NATIVE_EXE=/usr/bin/flang-new",
|
||||||
|
that binary will be used instead of just built host compiler.
|
||||||
|
|
||||||
|
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
|
||||||
|
index 42b1b86ebaad..41921aaeaeb2 100644
|
||||||
|
--- a/llvm/runtimes/CMakeLists.txt
|
||||||
|
+++ b/llvm/runtimes/CMakeLists.txt
|
||||||
|
@@ -498,7 +498,7 @@ if(build_runtimes)
|
||||||
|
if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
|
||||||
|
if (${LLVM_TOOL_FLANG_BUILD})
|
||||||
|
message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang-new")
|
||||||
|
- set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang-new")
|
||||||
|
+ set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang-new" CACHE INTERNAL "")
|
||||||
|
set(LIBOMP_MODULES_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/flang")
|
||||||
|
# TODO: This is a workaround until flang becomes a first-class project
|
||||||
|
# in llvm/CMakeList.txt. Until then, this line ensures that flang-new is
|
|
@ -0,0 +1,69 @@
|
||||||
|
commit 8a0c2301664e7178b2c48a8cfb2a10151bdde462
|
||||||
|
Author: Daniel Martinez <danielmartinez@cock.li>
|
||||||
|
Date: Wed Jul 31 14:28:29 2024 -0400
|
||||||
|
|
||||||
|
[flang][runtime] Use fallback bessel functions on musl
|
||||||
|
|
||||||
|
Fixes compilation on linux when using musl as the libc.
|
||||||
|
|
||||||
|
musl does not provide long double variants of the bessel functions.
|
||||||
|
|
||||||
|
diff --git a/flang/runtime/Float128Math/CMakeLists.txt b/flang/runtime/Float128Math/CMakeLists.txt
|
||||||
|
index a5f5bec1e7e4..b7d890df1f4a 100644
|
||||||
|
--- a/flang/runtime/Float128Math/CMakeLists.txt
|
||||||
|
+++ b/flang/runtime/Float128Math/CMakeLists.txt
|
||||||
|
@@ -108,6 +108,26 @@ elseif (HAVE_LDBL_MANT_DIG_113)
|
||||||
|
# We can use 'long double' versions from libc.
|
||||||
|
check_library_exists(m sinl "" FOUND_LIBM)
|
||||||
|
if (FOUND_LIBM)
|
||||||
|
+ check_cxx_source_compiles(
|
||||||
|
+ "#include <cmath>
|
||||||
|
+ int main() {
|
||||||
|
+ int n = 0;
|
||||||
|
+ long double x = 1;
|
||||||
|
+ long double Y0 = y0l(x);
|
||||||
|
+ long double Y1 = y1l(x);
|
||||||
|
+ long double Yn = ynl(n,x);
|
||||||
|
+ long double J0 = j0l(x);
|
||||||
|
+ long double J1 = j1l(x);
|
||||||
|
+ long double Jn = jnl(n,x);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ "
|
||||||
|
+ FOUND_LIBM_BESSEL)
|
||||||
|
+ if (FOUND_LIBM_BESSEL)
|
||||||
|
+ target_compile_definitions(FortranFloat128MathILib INTERFACE
|
||||||
|
+ HAS_LIBM_BESSEL
|
||||||
|
+ )
|
||||||
|
+ endif()
|
||||||
|
target_compile_definitions(FortranFloat128MathILib INTERFACE
|
||||||
|
HAS_LIBM
|
||||||
|
)
|
||||||
|
diff --git a/flang/runtime/Float128Math/math-entries.h b/flang/runtime/Float128Math/math-entries.h
|
||||||
|
index 13fdab264700..45ae40fdafa0 100644
|
||||||
|
--- a/flang/runtime/Float128Math/math-entries.h
|
||||||
|
+++ b/flang/runtime/Float128Math/math-entries.h
|
||||||
|
@@ -185,9 +185,11 @@ DEFINE_SIMPLE_ALIAS(Hypot, std::hypot)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Ilogb, std::ilogb)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Isinf, std::isinf)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Isnan, std::isnan)
|
||||||
|
+#ifdef HAS_LIBM_BESSEL
|
||||||
|
DEFINE_SIMPLE_ALIAS(J0, j0l)
|
||||||
|
DEFINE_SIMPLE_ALIAS(J1, j1l)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Jn, jnl)
|
||||||
|
+#endif
|
||||||
|
DEFINE_SIMPLE_ALIAS(Ldexp, std::ldexp)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Lgamma, std::lgamma)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Llround, std::llround)
|
||||||
|
@@ -204,9 +206,11 @@ DEFINE_SIMPLE_ALIAS(Tan, std::tan)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Tanh, std::tanh)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Tgamma, std::tgamma)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Trunc, std::trunc)
|
||||||
|
+#ifdef HAS_LIBM_BESSEL
|
||||||
|
DEFINE_SIMPLE_ALIAS(Y0, y0l)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Y1, y1l)
|
||||||
|
DEFINE_SIMPLE_ALIAS(Yn, ynl)
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
// Use numeric_limits to produce infinity of the right type.
|
||||||
|
#define F128_RT_INFINITY \
|
|
@ -0,0 +1,35 @@
|
||||||
|
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109180
|
||||||
|
Avoid the following undefined reference:
|
||||||
|
|
||||||
|
/usr/lib/gcc/armv7l-linux-gnueabihf/12.2.0/../../../../armv7l-linux-gnueabihf/bin/ld: projects/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o: in function `std::__1::__time_get_c_storage<char>::__x() const [clone .localalias]':
|
||||||
|
locale.cpp:(.text._ZNKSt3__120__time_get_c_storageIcE3__xEv+0xb4): undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
|
||||||
|
/usr/lib/gcc/armv7l-linux-gnueabihf/12.2.0/../../../../armv7l-linux-gnueabihf/bin/ld: projects/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o: in function `std::__1::__time_get_c_storage<char>::__X() const [clone .localalias]':
|
||||||
|
|
||||||
|
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
|
||||||
|
index b8ac536588d3..65e5a1365634 100644
|
||||||
|
--- a/libcxx/CMakeLists.txt
|
||||||
|
+++ b/libcxx/CMakeLists.txt
|
||||||
|
@@ -308,6 +308,8 @@ endif()
|
||||||
|
option(LIBCXX_HERMETIC_STATIC_LIBRARY
|
||||||
|
"Do not export any symbols from the static library." ${LIBCXX_HERMETIC_STATIC_LIBRARY_DEFAULT})
|
||||||
|
|
||||||
|
+option(LIBCXX_VOID_GCC_BUG_109180_WORKAROUND OFF)
|
||||||
|
+
|
||||||
|
#===============================================================================
|
||||||
|
# Check option configurations
|
||||||
|
#===============================================================================
|
||||||
|
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
|
||||||
|
index 35b466527096..5b0efa171616 100644
|
||||||
|
--- a/libcxx/src/CMakeLists.txt
|
||||||
|
+++ b/libcxx/src/CMakeLists.txt
|
||||||
|
@@ -155,6 +155,10 @@ if (LIBCXX_GENERATE_COVERAGE AND NOT LIBCXX_COVERAGE_LIBRARY)
|
||||||
|
endif()
|
||||||
|
add_library_flags_if(LIBCXX_COVERAGE_LIBRARY "${LIBCXX_COVERAGE_LIBRARY}")
|
||||||
|
|
||||||
|
+if (LIBCXX_VOID_GCC_BUG_109180_WORKAROUND)
|
||||||
|
+ set_source_files_properties(string.cpp PROPERTIES COMPILE_FLAGS -fno-inline)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
if (APPLE AND LLVM_USE_SANITIZER)
|
||||||
|
if (("${LLVM_USE_SANITIZER}" STREQUAL "Address") OR
|
||||||
|
("${LLVM_USE_SANITIZER}" STREQUAL "Address;Undefined") OR
|
|
@ -0,0 +1,26 @@
|
||||||
|
--- a/libcxx/include/locale
|
||||||
|
+++ b/libcxx/include/locale
|
||||||
|
@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
|
||||||
|
__libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
|
||||||
|
errno = 0;
|
||||||
|
char* __p2;
|
||||||
|
+#if defined(__linux__) && !defined(__GLIBC__)
|
||||||
|
+ long long __ll = strtoll(__a, &__p2, __base);
|
||||||
|
+#else
|
||||||
|
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
|
||||||
|
+#endif
|
||||||
|
__libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
|
||||||
|
if (__current_errno == 0)
|
||||||
|
errno = __save_errno;
|
||||||
|
@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
|
||||||
|
__libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
|
||||||
|
errno = 0;
|
||||||
|
char* __p2;
|
||||||
|
+#if defined(__linux__) && !defined(__GLIBC__)
|
||||||
|
+ unsigned long long __ll = strtoull(__a, &__p2, __base);
|
||||||
|
+#else
|
||||||
|
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
|
||||||
|
+#endif
|
||||||
|
__libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
|
||||||
|
if (__current_errno == 0)
|
||||||
|
errno = __save_errno;
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/libcxx/CMakeLists.txt
|
||||||
|
+++ b/libcxx/CMakeLists.txt
|
||||||
|
@@ -769,6 +769,8 @@ function(cxx_link_system_libraries target)
|
||||||
|
target_link_libraries(${target} PRIVATE atomic)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+#ssp target_link_libraries(${target} PRIVATE ssp_nonshared)
|
||||||
|
+
|
||||||
|
if (MINGW)
|
||||||
|
target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
|
||||||
|
endif()
|
|
@ -0,0 +1,25 @@
|
||||||
|
Also link to -ldl to prevent undefined references.
|
||||||
|
|
||||||
|
--- a/libcxxabi/src/CMakeLists.txt
|
||||||
|
+++ b/libcxxabi/src/CMakeLists.txt
|
||||||
|
@@ -73,6 +73,7 @@
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
|
||||||
|
+ add_library_flags_if(LIBCXXABI_HAS_C_LIB dl)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (LIBCXXABI_USE_LLVM_UNWINDER)
|
||||||
|
--- a/libcxx/CMakeLists.txt
|
||||||
|
+++ b/libcxx/CMakeLists.txt
|
||||||
|
@@ -745,6 +745,10 @@
|
||||||
|
if (LIBCXX_HAS_PTHREAD_LIB)
|
||||||
|
target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_PTHREAD_LIB)
|
||||||
|
endif()
|
||||||
|
+ if (LIBCXX_HAS_C_LIB)
|
||||||
|
+ target_link_libraries(${target} PRIVATE dl)
|
||||||
|
+ endif()
|
||||||
|
+
|
||||||
|
if (LIBCXX_HAS_RT_LIB)
|
||||||
|
target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_RT_LIB)
|
||||||
|
endif()
|
|
@ -0,0 +1,32 @@
|
||||||
|
From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||||
|
Date: Tue, 8 Sep 2015 22:03:02 +0200
|
||||||
|
Subject: [PATCH 3/3] musl
|
||||||
|
|
||||||
|
---
|
||||||
|
include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
|
||||||
|
lib/Support/DynamicLibrary.cpp | 2 +-
|
||||||
|
lib/Support/Unix/Signals.inc | 6 +++---
|
||||||
|
utils/unittest/googletest/src/gtest.cc | 1 +
|
||||||
|
5 files changed, 17 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
|
||||||
|
index 34a8a1e3..1214ece5 100644
|
||||||
|
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
|
||||||
|
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
|
||||||
|
@@ -18,6 +18,15 @@
|
||||||
|
#include "llvm/IR/PassManager.h"
|
||||||
|
#include "llvm/Pass.h"
|
||||||
|
|
||||||
|
+#undef fopen64
|
||||||
|
+#undef fseeko64
|
||||||
|
+#undef fstat64
|
||||||
|
+#undef fstatvfs64
|
||||||
|
+#undef ftello64
|
||||||
|
+#undef lstat64
|
||||||
|
+#undef stat64
|
||||||
|
+#undef tmpfile64
|
||||||
|
+
|
||||||
|
namespace llvm {
|
||||||
|
template <typename T> class ArrayRef;
|
||||||
|
class Triple;
|
|
@ -0,0 +1,18 @@
|
||||||
|
This allows us to override the optimization level as not all platforms can
|
||||||
|
deal with -O3.
|
||||||
|
|
||||||
|
--- a/llvm/CMakeLists.txt
|
||||||
|
+++ b/llvm/CMakeLists.txt
|
||||||
|
@@ -918,6 +918,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
|
||||||
|
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use")
|
||||||
|
+
|
||||||
|
+if (NOT VOID_CXX_OPT_FLAGS STREQUAL "")
|
||||||
|
+ llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}")
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
# Put this before tblgen. Else we have a circular dependence.
|
||||||
|
add_subdirectory(lib/Demangle)
|
||||||
|
add_subdirectory(lib/Support)
|
|
@ -0,0 +1,36 @@
|
||||||
|
From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Samuel Holland <samuel@sholland.org>
|
||||||
|
Date: Sun, 3 Nov 2019 10:57:27 -0600
|
||||||
|
Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified
|
||||||
|
|
||||||
|
---
|
||||||
|
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 2 +-
|
||||||
|
llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
|
||||||
|
index cce21f32..87ca5f9b 100644
|
||||||
|
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
|
||||||
|
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
|
||||||
|
@@ -520,7 +520,7 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
|
||||||
|
|
||||||
|
// Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
|
||||||
|
if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt() &&
|
||||||
|
- M->getPICLevel() == PICLevel::BigPIC)
|
||||||
|
+ M->getPICLevel() != PICLevel::SmallPIC)
|
||||||
|
TlsRef = MCBinaryExpr::createAdd(
|
||||||
|
TlsRef, MCConstantExpr::create(32768, OutContext), OutContext);
|
||||||
|
const MachineOperand &MO = MI->getOperand(2);
|
||||||
|
diff --git a/lib/Target/PowerPC/PPCMCInstLower.cpp b/lib/Target/PowerPC/PPCMCInstLower.cpp
|
||||||
|
index 5cc180d7..a5b02565 100644
|
||||||
|
--- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
|
||||||
|
+++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
|
||||||
|
@@ -117,7 +117,7 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
|
||||||
|
const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx);
|
||||||
|
// If -msecure-plt -fPIC, add 32768 to symbol.
|
||||||
|
if (Subtarget->isSecurePlt() && TM.isPositionIndependent() &&
|
||||||
|
- M->getPICLevel() == PICLevel::BigPIC &&
|
||||||
|
+ M->getPICLevel() != PICLevel::SmallPIC &&
|
||||||
|
MO.getTargetFlags() == PPCII::MO_PLT)
|
||||||
|
Expr =
|
||||||
|
MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx);
|
|
@ -0,0 +1,24 @@
|
||||||
|
Fix failures in AllocationTests/MappedMemoryTest.* on aarch64:
|
||||||
|
|
||||||
|
Failing Tests (8):
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3
|
||||||
|
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3
|
||||||
|
|
||||||
|
Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10
|
||||||
|
|
||||||
|
--- a/llvm/lib/Support/Unix/Memory.inc
|
||||||
|
+++ b/llvm/lib/Support/Unix/Memory.inc
|
||||||
|
@@ -58,7 +58,7 @@ static int getPosixProtectionFlags(unsigned Flags) {
|
||||||
|
return PROT_READ | PROT_WRITE | PROT_EXEC;
|
||||||
|
case llvm::sys::Memory::MF_EXEC:
|
||||||
|
-#if defined(__FreeBSD__) || defined(__powerpc__)
|
||||||
|
+#if defined(__FreeBSD__) || defined(__powerpc__) || (defined(__linux__) && defined(__aarch64__))
|
||||||
|
// On PowerPC, having an executable page that has no read permission
|
||||||
|
// can have unintended consequences. The function InvalidateInstruction-
|
||||||
|
// Cache uses instructions dcbf and icbi, both of which are treated by
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
||||||
|
site="https://github.com/llvm/llvm-project/releases"
|
||||||
|
pattern="llvmorg-\K(19)\.(\d+)\.+\d+(-rc\d+)?"
|
||||||
|
ignore="*-rc*"
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
|
@ -0,0 +1 @@
|
||||||
|
llvm19
|
Loading…
Reference in New Issue