Make improvements

- Let OpenMP be usable via cosmocc
- Let libunwind be usable via cosmocc
- Make X86_HAVE(AVXVNNI) work correctly
- Avoid using MAP_GROWSDOWN on qemu-aarch64
- Introduce in6addr_any and in6addr_loopback
- Have thread stacks use MAP_GROWSDOWN by default
- Ask OpenMP to not use filesystem to manage threads
- Make NI_MAXHOST and NI_MAXSERV available w/o _GNU_SOURCE
This commit is contained in:
Justine Tunney 2024-01-29 15:45:10 -08:00
parent 5f8e9f14c1
commit 369aebfc48
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
36 changed files with 416 additions and 80 deletions

View file

@ -6699,10 +6699,12 @@ void __kmp_internal_end_thread(int gtid_req) {
// -----------------------------------------------------------------------------
// Library registration stuff.
#ifndef __COSMOPOLITAN__
static long __kmp_registration_flag = 0;
// Random value used to indicate library initialization.
static char *__kmp_registration_str = NULL;
// Value to be saved in env var __KMP_REGISTERED_LIB_<pid>.
#endif // __COSMOPOLITAN__
static inline char *__kmp_reg_status_name() {
/* On RHEL 3u5 if linked statically, getpid() returns different values in
@ -6726,6 +6728,7 @@ char *temp_reg_status_file_name = nullptr;
#endif
void __kmp_register_library_startup(void) {
#ifndef __COSMOPOLITAN__
char *name = __kmp_reg_status_name(); // Name of the environment variable.
int done = 0;
@ -6937,9 +6940,11 @@ void __kmp_register_library_startup(void) {
} // while
KMP_INTERNAL_FREE((void *)name);
#endif // __COSMOPOLITAN__
} // func __kmp_register_library_startup
void __kmp_unregister_library(void) {
#ifndef __COSMOPOLITAN__
char *name = __kmp_reg_status_name();
char *value = NULL;
@ -7006,6 +7011,7 @@ void __kmp_unregister_library(void) {
__kmp_registration_flag = 0;
__kmp_registration_str = NULL;
#endif // __COSMOPOLITAN__
} // __kmp_unregister_library
// End of Library registration stuff.