diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2024-04-03 16:30:41 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2024-04-04 12:02:20 +0200 |
commit | 67e7ba44cf7cf845cbb7f0f41e423ed3b9f1d7c6 (patch) | |
tree | 1c82294aa701d02ad6d579e44093000085cdc5ba /etc | |
parent | 2e5ad353049d211eeb4b736a27f26a96ac2919b9 (diff) | |
download | bootstrappable-toolchain-67e7ba44cf7cf845cbb7f0f41e423ed3b9f1d7c6.tar.gz |
Add clang 18.1.1
Diffstat (limited to 'etc')
-rw-r--r-- | etc/patches/TARGETS | 1 | ||||
-rw-r--r-- | etc/patches/clang-18/libcxx-musl-support.patch | 57 | ||||
-rw-r--r-- | etc/repos.json | 33 |
3 files changed, 90 insertions, 1 deletions
diff --git a/etc/patches/TARGETS b/etc/patches/TARGETS index f3c6084..ca310cf 100644 --- a/etc/patches/TARGETS +++ b/etc/patches/TARGETS @@ -5,4 +5,5 @@ {"type": "install", "deps": [["TREE", null, "musl-cross-make-fe915821"]]} , "clang-16": {"type": "install", "deps": [["TREE", null, "clang-16"]]} , "clang-17": {"type": "install", "deps": [["TREE", null, "clang-17"]]} +, "clang-18": {"type": "install", "deps": [["TREE", null, "clang-18"]]} } diff --git a/etc/patches/clang-18/libcxx-musl-support.patch b/etc/patches/clang-18/libcxx-musl-support.patch new file mode 100644 index 0000000..b118127 --- /dev/null +++ b/etc/patches/clang-18/libcxx-musl-support.patch @@ -0,0 +1,57 @@ +From cfceef12ffa2963ffc32a0e2797dfc7e5ff7a2ac Mon Sep 17 00:00:00 2001 +From: Oliver Reiche <oliver.reiche@huawei.com> +Date: Wed, 3 Apr 2024 16:23:52 +0200 +Subject: [PATCH] libcxx: Add musl support for __locale + +... which does not provide a known rune table and uses +missing locale-based string to integer conversion functions. +--- + libcxx/include/__locale | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/libcxx/include/__locale b/libcxx/include/__locale +index 3ba7ac1..98563b6 100644 +--- a/libcxx/include/__locale ++++ b/libcxx/include/__locale +@@ -26,6 +26,38 @@ + #include <cstddef> + #include <cstring> + ++// Detect musl libc (inspired by musl detection from gcc's config.guess) ++#include <features.h> ++#if !(defined(__UCLIBC__) || defined(__dietlibc__) || defined(__GLIBC__)) ++# include <stdarg.h> ++# ifdef __DEFINED_va_list ++# ifndef __MUSL_LIBC__ ++# define __MUSL_LIBC__ ++# endif ++# endif ++#endif ++ ++#ifdef __MUSL_LIBC__ ++// Fall back to default rune table for musl libc ++# ifndef _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE ++# define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE ++# endif ++// Implement missing strto*_l functions for musl libc ++# define __MUSL_LIBC_CREATE_STRTOX_L(X) \ ++ static inline auto \ ++ strto ## X ## _l(const char* str, char** end, int base, locale_t l) { \ ++ locale_t old = uselocale(l); \ ++ auto result = strto ## X(str, end, base); \ ++ uselocale(old); \ ++ return result; \ ++ } ++__MUSL_LIBC_CREATE_STRTOX_L(l) ++__MUSL_LIBC_CREATE_STRTOX_L(ll) ++__MUSL_LIBC_CREATE_STRTOX_L(ul) ++__MUSL_LIBC_CREATE_STRTOX_L(ull) ++# undef __MUSL_LIBC_CREATE_STRTOX_L ++#endif ++ + #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS + # include <cwchar> + #else +-- +2.30.2 + diff --git a/etc/repos.json b/etc/repos.json index cc6945d..6301aba 100644 --- a/etc/repos.json +++ b/etc/repos.json @@ -387,6 +387,23 @@ , "patches": "patches" } } + , "compilers/clang-18.1.1-native": + { "repository": + { "type": "archive" + , "content": "7a020fab54c00befc5fa96fd8e2fddc3d98c933d" + , "fetch": "https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-18.1.1.tar.gz" + , "sha256": "62439f733311869dbbaf704ce2e02141d2a07092d952fc87ef52d1d636a9b1e4" + , "subdir": "llvm-project-llvmorg-18.1.1" + , "pragma": {"special": "resolve-partially"} + } + , "target_root": "compilers" + , "target_file_name": "clang-18-native.TARGETS" + , "bindings": + { "rules": "rules/clang_with_gcc13" + , "binutils": "imports/binutils-latest" + , "patches": "patches" + } + } , "tools/busybox-1.36.1": { "repository": { "type": "archive" @@ -468,7 +485,12 @@ , "clang-latest-native": { "repository": "toolchains" , "target_file_name": "clang.TARGETS" - , "bindings": {"rules": "rules", "clang": "compilers/clang-17.0.6-native"} + , "bindings": {"rules": "rules", "clang": "compilers/clang-18.1.1-native"} + } + , "clang-18.1.1-native": + { "repository": "toolchains" + , "target_file_name": "clang.TARGETS" + , "bindings": {"rules": "rules", "clang": "compilers/clang-18.1.1-native"} } , "clang-17.0.6-native": { "repository": "toolchains" @@ -582,6 +604,15 @@ , "compiler": "clang-latest-native" } } + , "clang-18.1.1-native+tools": + { "repository": "toolchains" + , "target_file_name": "compiler+tools.TARGETS" + , "bindings": + { "rules": "rules" + , "tools": "tools-all" + , "compiler": "clang-18.1.1-native" + } + } , "clang-17.0.6-native+tools": { "repository": "toolchains" , "target_file_name": "compiler+tools.TARGETS" |