[libcxx-commits] [PATCH] D138680: [libc++] Remove Solaris related code
Jonathan Perkin via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 7 02:33:12 PST 2022
jperkin added a comment.
I, and many others in the illumos community, would be grateful if you'd hold off on doing this. I've maintained the full set of clang/llvm packages for illumos systems for many years, and it provides a useful alternative to GCC, with potentially one day switching over fully.
There are only minor changes required to ensure the 15.x series continues to build on illumos (14.x were fine):
- Apply the two patches below:
--- include/__locale.orig 2022-11-29 10:05:58.000000000 +0000
+++ include/__locale
@@ -495,7 +495,7 @@ public:
# if defined(_AIX)
static const mask __regex_word = 0x8000;
# else
- static const mask __regex_word = 0x80;
+ static const mask __regex_word = 0x80000;
# endif
#elif defined(_NEWLIB_VERSION)
// Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h.
--- include/__support/solaris/xlocale.h.orig 2022-11-29 10:05:58.000000000 +0000
+++ include/__support/solaris/xlocale.h
@@ -13,6 +13,9 @@
#ifndef __XLOCALE_H_INCLUDED
#define __XLOCALE_H_INCLUDED
+#include <cstdlib>
+#include <cwchar>
+#include <__support/xlocale/__strtonum_fallback.h>
#include <stdlib.h>
#ifdef __cplusplus
@@ -31,6 +34,7 @@ int tolower_l(int __c, locale_t __l);
struct lconv *localeconv(void);
struct lconv *localeconv_l(locale_t __l);
+#if 0
// FIXME: These are quick-and-dirty hacks to make things pretend to work
inline _LIBCPP_HIDE_FROM_ABI long long
strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t __loc) {
@@ -66,6 +70,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double
strtold_l(const char *__nptr, char **__endptr, locale_t __loc) {
return ::strtold(__nptr, __endptr);
}
+#endif
#ifdef __cplusplus
- Build with `-D_LIBCPP_NO_ABI_TAG=1`, otherwise there are `error: 'abi_tag' attribute applied to extern "C" declaration` errors.
Obviously a proper patch would simply remove the duplicate strtonum functions, my patch is optimised for size.
Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138680/new/
https://reviews.llvm.org/D138680
More information about the libcxx-commits
mailing list