mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 08:42:28 +00:00
Release Cosmopolitan v3.8.0
This change switches c++ exception handling from sjlj to standard dwarf. It's needed because clang for aarch64 doesn't support sjlj. It turns out that libunwind had a bare-metal configuration that made this easy to do. This change gets the new experimental cosmocc -mclang flag in a state of working so well that it can now be used to build all of llamafile and it goes 3x faster in terms of build latency, without trading away any perf. The int_fast16_t and int_fast32_t types are now always defined as 32-bit in the interest of having more abi consistency between cosmocc -mgcc and -mclang mode.
This commit is contained in:
parent
5b9862907c
commit
c9152b6f14
188 changed files with 199063 additions and 636 deletions
|
@ -3,8 +3,8 @@
|
|||
#endif
|
||||
|
||||
#define __COSMOPOLITAN_MAJOR__ 3
|
||||
#define __COSMOPOLITAN_MINOR__ 7
|
||||
#define __COSMOPOLITAN_PATCH__ 1
|
||||
#define __COSMOPOLITAN_MINOR__ 8
|
||||
#define __COSMOPOLITAN_PATCH__ 0
|
||||
#define __COSMOPOLITAN__ \
|
||||
(100000000 * __COSMOPOLITAN_MAJOR__ + 1000000 * __COSMOPOLITAN_MINOR__ + \
|
||||
__COSMOPOLITAN_PATCH__)
|
||||
|
@ -93,6 +93,30 @@
|
|||
#include "libc/integral/llp64.inc"
|
||||
#endif
|
||||
|
||||
#undef __INT_FAST16_MAX__
|
||||
#undef __INT_FAST16_TYPE__
|
||||
#undef __UINT_FAST16_MAX__
|
||||
#undef __INT_FAST16_WIDTH__
|
||||
#undef __UINT_FAST16_TYPE__
|
||||
|
||||
#define __INT_FAST16_MAX__ 2147483647
|
||||
#define __INT_FAST16_TYPE__ int
|
||||
#define __UINT_FAST16_MAX__ 4294967295U
|
||||
#define __INT_FAST16_WIDTH__ 32
|
||||
#define __UINT_FAST16_TYPE__ unsigned int
|
||||
|
||||
#undef __INT_FAST32_MAX__
|
||||
#undef __INT_FAST32_TYPE__
|
||||
#undef __UINT_FAST32_MAX__
|
||||
#undef __INT_FAST32_WIDTH__
|
||||
#undef __UINT_FAST32_TYPE__
|
||||
|
||||
#define __INT_FAST32_MAX__ 2147483647
|
||||
#define __INT_FAST32_TYPE__ int
|
||||
#define __UINT_FAST32_MAX__ 4294967295U
|
||||
#define __INT_FAST32_WIDTH__ 32
|
||||
#define __UINT_FAST32_TYPE__ unsigned int
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifdef __STDC__
|
||||
#include "libc/integral/c.inc"
|
||||
|
|
22
libc/intrin/personality.c
Normal file
22
libc/intrin/personality.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
||||
│ vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi │
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ Copyright 2024 Justine Alexandra Roberts Tunney │
|
||||
│ │
|
||||
│ Permission to use, copy, modify, and/or distribute this software for │
|
||||
│ any purpose with or without fee is hereby granted, provided that the │
|
||||
│ above copyright notice and this permission notice appear in all copies. │
|
||||
│ │
|
||||
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
||||
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
||||
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
||||
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
||||
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
||||
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
|
||||
__attribute__((__weak__)) void __gxx_personality_v0() {
|
||||
__builtin_trap();
|
||||
}
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_AMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_AMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/ammintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/ammintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_AMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/amxcomplexintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/amxcomplexintrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/amxfp16intrin.h"
|
||||
#else
|
||||
#include "third_party/intel/amxfp16intrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_ACLE_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_ACLE_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/aarch64/clang/arm_acle.h"
|
||||
#else
|
||||
#include "third_party/aarch64/arm_acle.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_ACLE_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_BF16_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_BF16_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/aarch64/clang/arm_bf16.h"
|
||||
#else
|
||||
#include "third_party/aarch64/arm_bf16.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_BF16_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_FP16_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_FP16_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/aarch64/clang/arm_fp16.h"
|
||||
#else
|
||||
#include "third_party/aarch64/arm_fp16.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_FP16_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_NEON_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_NEON_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/aarch64/clang/arm_neon.h"
|
||||
#else
|
||||
#include "third_party/aarch64/arm_neon.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_NEON_H_ */
|
||||
|
|
8
libc/isystem/arm_sve.h
Normal file
8
libc/isystem/arm_sve.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_SVE_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_SVE_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/aarch64/clang/arm_sve.h"
|
||||
#else
|
||||
#include "third_party/aarch64/arm_sve.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_SVE_H_ */
|
8
libc/isystem/arm_vector_types.h
Normal file
8
libc/isystem/arm_vector_types.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARM_VECTOR_TYPES_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_ARM_VECTOR_TYPES_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/aarch64/clang/arm_vector_types.h"
|
||||
#else
|
||||
#include "third_party/aarch64/arm_vector_types.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARM_VECTOR_TYPES_H_ */
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/avxifmaintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/avxifmaintrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/avxneconvertintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/avxneconvertintrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/avxvnniint16intrin.h"
|
||||
#else
|
||||
#include "third_party/intel/avxvnniint16intrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/avxvnniint8intrin.h"
|
||||
#else
|
||||
#include "third_party/intel/avxvnniint8intrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CLZEROINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_CLZEROINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/clzerointrin.h"
|
||||
#else
|
||||
#include "third_party/intel/clzerointrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CLZEROINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/cmpccxaddintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/cmpccxaddintrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_EMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_EMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/emmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/emmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_EMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_IMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_IMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/immintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/immintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_IMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_MM_MALLOC_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_MM_MALLOC_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/mm_malloc.h"
|
||||
#else
|
||||
#include "third_party/intel/mm_malloc.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_MM_MALLOC_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_MMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_MMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/mmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/mmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_MMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_MWAITXINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_MWAITXINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/mwaitxintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/mwaitxintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_MWAITXINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_NMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_NMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/nmmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/nmmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_PMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_PMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/pmmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/pmmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_PMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_POPCNTINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_POPCNTINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/popcntintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/popcntintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_POPCNTINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/prfchiintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/prfchiintrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/raointintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/raointintrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SGXINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SGXINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/sgxintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/sgxintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SGXINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/sha512intrin.h"
|
||||
#else
|
||||
#include "third_party/intel/sha512intrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/sm3intrin.h"
|
||||
#else
|
||||
#include "third_party/intel/sm3intrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/sm4intrin.h"
|
||||
#else
|
||||
#include "third_party/intel/sm4intrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/smmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/smmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_TMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_TMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/tmmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/tmmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_TMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/usermsrintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/usermsrintrin.internal.h"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_WMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_WMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/wmmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/wmmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_WMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_X86INTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_X86INTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/x86intrin.h"
|
||||
#else
|
||||
#include "third_party/intel/x86intrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_X86INTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_XMMINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_XMMINTRIN_INTERNAL_H_
|
||||
#ifdef __clang__
|
||||
#include "third_party/intel/clang/xmmintrin.h"
|
||||
#else
|
||||
#include "third_party/intel/xmmintrin.internal.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_XMMINTRIN_INTERNAL_H_ */
|
||||
|
|
|
@ -42,7 +42,8 @@ $(LIBC_MEM_A_OBJS): private \
|
|||
COPTS += \
|
||||
-fno-sanitize=all \
|
||||
-Wframe-larger-than=4096 \
|
||||
-Walloca-larger-than=4096
|
||||
-Walloca-larger-than=4096 \
|
||||
-fexceptions
|
||||
|
||||
o/$(MODE)/libc/mem/asan.o: private \
|
||||
CFLAGS += \
|
||||
|
|
|
@ -7,10 +7,10 @@ void *bsearch(const void *, const void *, size_t, size_t,
|
|||
void *bsearch_r(const void *, const void *, size_t, size_t,
|
||||
int (*)(const void *, const void *, void *), void *)
|
||||
paramsnonnull((1, 2, 5)) nosideeffect;
|
||||
void qsort3(void *, size_t, size_t,
|
||||
int (*)(const void *, const void *)) libcesque paramsnonnull();
|
||||
void qsort(void *, size_t, size_t,
|
||||
int (*)(const void *, const void *)) libcesque paramsnonnull();
|
||||
void qsort3(void *, size_t, size_t, int (*)(const void *, const void *))
|
||||
paramsnonnull();
|
||||
void qsort(void *, size_t, size_t, int (*)(const void *, const void *))
|
||||
paramsnonnull();
|
||||
void qsort_r(void *, size_t, size_t,
|
||||
int (*)(const void *, const void *, void *), void *)
|
||||
paramsnonnull((1, 4));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue