Skip to content

Commit 3b77f23

Browse files
authored
Merge pull request #20194 from ziglang/musl-v1.2.5
upgrade musl to v1.2.5
2 parents ac3faa6 + 46b2f67 commit 3b77f23

File tree

187 files changed

+5775
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+5775
-183
lines changed

lib/libc/include/aarch64-linux-musl/bits/syscall.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@
299299
#define __NR_landlock_create_ruleset 444
300300
#define __NR_landlock_add_rule 445
301301
#define __NR_landlock_restrict_self 446
302+
#define __NR_process_mrelease 448
303+
#define __NR_futex_waitv 449
304+
#define __NR_set_mempolicy_home_node 450
305+
#define __NR_cachestat 451
306+
#define __NR_fchmodat2 452
302307

303308
#define SYS_io_setup 0
304309
#define SYS_io_destroy 1
@@ -600,4 +605,9 @@
600605
#define SYS_mount_setattr 442
601606
#define SYS_landlock_create_ruleset 444
602607
#define SYS_landlock_add_rule 445
603-
#define SYS_landlock_restrict_self 446
608+
#define SYS_landlock_restrict_self 446
609+
#define SYS_process_mrelease 448
610+
#define SYS_futex_waitv 449
611+
#define SYS_set_mempolicy_home_node 450
612+
#define SYS_cachestat 451
613+
#define SYS_fchmodat2 452
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#define FLT_EVAL_METHOD 0
2+
3+
#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
4+
#define LDBL_MIN 2.22507385850720138309e-308L
5+
#define LDBL_MAX 1.79769313486231570815e+308L
6+
#define LDBL_EPSILON 2.22044604925031308085e-16L
7+
8+
#define LDBL_MANT_DIG 53
9+
#define LDBL_MIN_EXP (-1021)
10+
#define LDBL_MAX_EXP 1024
11+
12+
#define LDBL_DIG 15
13+
#define LDBL_MIN_10_EXP (-307)
14+
#define LDBL_MAX_10_EXP 308
15+
16+
#define DECIMAL_DIG 17

lib/libc/include/arm-linux-musl/bits/syscall.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,11 @@
399399
#define __NR_landlock_create_ruleset 444
400400
#define __NR_landlock_add_rule 445
401401
#define __NR_landlock_restrict_self 446
402+
#define __NR_process_mrelease 448
403+
#define __NR_futex_waitv 449
404+
#define __NR_set_mempolicy_home_node 450
405+
#define __NR_cachestat 451
406+
#define __NR_fchmodat2 452
402407

403408
#define __ARM_NR_breakpoint 0x0f0001
404409
#define __ARM_NR_cacheflush 0x0f0002
@@ -807,4 +812,9 @@
807812
#define SYS_mount_setattr 442
808813
#define SYS_landlock_create_ruleset 444
809814
#define SYS_landlock_add_rule 445
810-
#define SYS_landlock_restrict_self 446
815+
#define SYS_landlock_restrict_self 446
816+
#define SYS_process_mrelease 448
817+
#define SYS_futex_waitv 449
818+
#define SYS_set_mempolicy_home_node 450
819+
#define SYS_cachestat 451
820+
#define SYS_fchmodat2 452
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#define FLT_EVAL_METHOD 0
22

3-
#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
4-
#define LDBL_MIN 2.22507385850720138309e-308L
5-
#define LDBL_MAX 1.79769313486231570815e+308L
6-
#define LDBL_EPSILON 2.22044604925031308085e-16L
3+
#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
4+
#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
5+
#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
6+
#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
77

8-
#define LDBL_MANT_DIG 53
9-
#define LDBL_MIN_EXP (-1021)
10-
#define LDBL_MAX_EXP 1024
8+
#define LDBL_MANT_DIG 113
9+
#define LDBL_MIN_EXP (-16381)
10+
#define LDBL_MAX_EXP 16384
1111

12-
#define LDBL_DIG 15
13-
#define LDBL_MIN_10_EXP (-307)
14-
#define LDBL_MAX_10_EXP 308
12+
#define LDBL_DIG 33
13+
#define LDBL_MIN_10_EXP (-4931)
14+
#define LDBL_MAX_10_EXP 4932
1515

16-
#define DECIMAL_DIG 17
16+
#define DECIMAL_DIG 36

lib/libc/include/generic-musl/elf.h

Lines changed: 120 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ typedef struct {
315315
#define EM_RISCV 243
316316
#define EM_BPF 247
317317
#define EM_CSKY 252
318-
#define EM_NUM 253
318+
#define EM_LOONGARCH 258
319+
#define EM_NUM 259
319320

320321
#define EM_ALPHA 0x9026
321322

@@ -558,6 +559,11 @@ typedef struct {
558559

559560

560561

562+
typedef Elf32_Word Elf32_Relr;
563+
typedef Elf64_Xword Elf64_Relr;
564+
565+
566+
561567
#define ELF32_R_SYM(val) ((val) >> 8)
562568
#define ELF32_R_TYPE(val) ((val) & 0xff)
563569
#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
@@ -698,7 +704,14 @@ typedef struct {
698704
#define NT_MIPS_DSP 0x800
699705
#define NT_MIPS_FP_MODE 0x801
700706
#define NT_MIPS_MSA 0x802
707+
#define NT_RISCV_CSR 0x900
708+
#define NT_RISCV_VECTOR 0x901
701709
#define NT_VERSION 1
710+
#define NT_LOONGARCH_CPUCFG 0xa00
711+
#define NT_LOONGARCH_CSR 0xa01
712+
#define NT_LOONGARCH_LSX 0xa02
713+
#define NT_LOONGARCH_LASX 0xa03
714+
#define NT_LOONGARCH_LBT 0xa04
702715

703716

704717

@@ -3249,6 +3262,7 @@ enum
32493262
#define R_RISCV_TLS_DTPREL64 9
32503263
#define R_RISCV_TLS_TPREL32 10
32513264
#define R_RISCV_TLS_TPREL64 11
3265+
#define R_RISCV_TLSDESC 12
32523266

32533267
#define R_RISCV_BRANCH 16
32543268
#define R_RISCV_JAL 17
@@ -3275,23 +3289,122 @@ enum
32753289
#define R_RISCV_SUB16 38
32763290
#define R_RISCV_SUB32 39
32773291
#define R_RISCV_SUB64 40
3278-
#define R_RISCV_GNU_VTINHERIT 41
3279-
#define R_RISCV_GNU_VTENTRY 42
3292+
#define R_RISCV_GOT32_PCREL 41
32803293
#define R_RISCV_ALIGN 43
32813294
#define R_RISCV_RVC_BRANCH 44
32823295
#define R_RISCV_RVC_JUMP 45
32833296
#define R_RISCV_RVC_LUI 46
3284-
#define R_RISCV_GPREL_I 47
3285-
#define R_RISCV_GPREL_S 48
3286-
#define R_RISCV_TPREL_I 49
3287-
#define R_RISCV_TPREL_S 50
32883297
#define R_RISCV_RELAX 51
32893298
#define R_RISCV_SUB6 52
32903299
#define R_RISCV_SET6 53
32913300
#define R_RISCV_SET8 54
32923301
#define R_RISCV_SET16 55
32933302
#define R_RISCV_SET32 56
32943303
#define R_RISCV_32_PCREL 57
3304+
#define R_RISCV_IRELATIVE 58
3305+
#define R_RISCV_PLT32 59
3306+
#define R_RISCV_SET_ULEB128 60
3307+
#define R_RISCV_SUB_ULEB128 61
3308+
#define R_RISCV_TLSDESC_HI20 62
3309+
#define R_RISCV_TLSDESC_LOAD_LO12 63
3310+
#define R_RISCV_TLSDESC_ADD_LO12 64
3311+
#define R_RISCV_TLSDESC_CALL 65
3312+
3313+
#define EF_LARCH_ABI_MODIFIER_MASK 0x07
3314+
#define EF_LARCH_ABI_SOFT_FLOAT 0x01
3315+
#define EF_LARCH_ABI_SINGLE_FLOAT 0x02
3316+
#define EF_LARCH_ABI_DOUBLE_FLOAT 0x03
3317+
#define EF_LARCH_OBJABI_V1 0x40
3318+
3319+
#define R_LARCH_NONE 0
3320+
#define R_LARCH_32 1
3321+
#define R_LARCH_64 2
3322+
#define R_LARCH_RELATIVE 3
3323+
#define R_LARCH_COPY 4
3324+
#define R_LARCH_JUMP_SLOT 5
3325+
#define R_LARCH_TLS_DTPMOD32 6
3326+
#define R_LARCH_TLS_DTPMOD64 7
3327+
#define R_LARCH_TLS_DTPREL32 8
3328+
#define R_LARCH_TLS_DTPREL64 9
3329+
#define R_LARCH_TLS_TPREL32 10
3330+
#define R_LARCH_TLS_TPREL64 11
3331+
#define R_LARCH_IRELATIVE 12
3332+
#define R_LARCH_MARK_LA 20
3333+
#define R_LARCH_MARK_PCREL 21
3334+
#define R_LARCH_SOP_PUSH_PCREL 22
3335+
#define R_LARCH_SOP_PUSH_ABSOLUTE 23
3336+
#define R_LARCH_SOP_PUSH_DUP 24
3337+
#define R_LARCH_SOP_PUSH_GPREL 25
3338+
#define R_LARCH_SOP_PUSH_TLS_TPREL 26
3339+
#define R_LARCH_SOP_PUSH_TLS_GOT 27
3340+
#define R_LARCH_SOP_PUSH_TLS_GD 28
3341+
#define R_LARCH_SOP_PUSH_PLT_PCREL 29
3342+
#define R_LARCH_SOP_ASSERT 30
3343+
#define R_LARCH_SOP_NOT 31
3344+
#define R_LARCH_SOP_SUB 32
3345+
#define R_LARCH_SOP_SL 33
3346+
#define R_LARCH_SOP_SR 34
3347+
#define R_LARCH_SOP_ADD 35
3348+
#define R_LARCH_SOP_AND 36
3349+
#define R_LARCH_SOP_IF_ELSE 37
3350+
#define R_LARCH_SOP_POP_32_S_10_5 38
3351+
#define R_LARCH_SOP_POP_32_U_10_12 39
3352+
#define R_LARCH_SOP_POP_32_S_10_12 40
3353+
#define R_LARCH_SOP_POP_32_S_10_16 41
3354+
#define R_LARCH_SOP_POP_32_S_10_16_S2 42
3355+
#define R_LARCH_SOP_POP_32_S_5_20 43
3356+
#define R_LARCH_SOP_POP_32_S_0_5_10_16_S2 44
3357+
#define R_LARCH_SOP_POP_32_S_0_10_10_16_S2 45
3358+
#define R_LARCH_SOP_POP_32_U 46
3359+
#define R_LARCH_ADD8 47
3360+
#define R_LARCH_ADD16 48
3361+
#define R_LARCH_ADD24 49
3362+
#define R_LARCH_ADD32 50
3363+
#define R_LARCH_ADD64 51
3364+
#define R_LARCH_SUB8 52
3365+
#define R_LARCH_SUB16 53
3366+
#define R_LARCH_SUB24 54
3367+
#define R_LARCH_SUB32 55
3368+
#define R_LARCH_SUB64 56
3369+
#define R_LARCH_GNU_VTINHERIT 57
3370+
#define R_LARCH_GNU_VTENTRY 58
3371+
#define R_LARCH_B16 64
3372+
#define R_LARCH_B21 65
3373+
#define R_LARCH_B26 66
3374+
#define R_LARCH_ABS_HI20 67
3375+
#define R_LARCH_ABS_LO12 68
3376+
#define R_LARCH_ABS64_LO20 69
3377+
#define R_LARCH_ABS64_HI12 70
3378+
#define R_LARCH_PCALA_HI20 71
3379+
#define R_LARCH_PCALA_LO12 72
3380+
#define R_LARCH_PCALA64_LO20 73
3381+
#define R_LARCH_PCALA64_HI12 74
3382+
#define R_LARCH_GOT_PC_HI20 75
3383+
#define R_LARCH_GOT_PC_LO12 76
3384+
#define R_LARCH_GOT64_PC_LO20 77
3385+
#define R_LARCH_GOT64_PC_HI12 78
3386+
#define R_LARCH_GOT_HI20 79
3387+
#define R_LARCH_GOT_LO12 80
3388+
#define R_LARCH_GOT64_LO20 81
3389+
#define R_LARCH_GOT64_HI12 82
3390+
#define R_LARCH_TLS_LE_HI20 83
3391+
#define R_LARCH_TLS_LE_LO12 84
3392+
#define R_LARCH_TLS_LE64_LO20 85
3393+
#define R_LARCH_TLS_LE64_HI12 86
3394+
#define R_LARCH_TLS_IE_PC_HI20 87
3395+
#define R_LARCH_TLS_IE_PC_LO12 88
3396+
#define R_LARCH_TLS_IE64_PC_LO20 89
3397+
#define R_LARCH_TLS_IE64_PC_HI12 90
3398+
#define R_LARCH_TLS_IE_HI20 91
3399+
#define R_LARCH_TLS_IE_LO12 92
3400+
#define R_LARCH_TLS_IE64_LO20 93
3401+
#define R_LARCH_TLS_IE64_HI12 94
3402+
#define R_LARCH_TLS_LD_PC_HI20 95
3403+
#define R_LARCH_TLS_LD_HI20 96
3404+
#define R_LARCH_TLS_GD_PC_HI20 97
3405+
#define R_LARCH_TLS_GD_HI20 98
3406+
#define R_LARCH_32_PCREL 99
3407+
#define R_LARCH_RELAX 100
32953408

32963409
#ifdef __cplusplus
32973410
}

lib/libc/include/generic-musl/fcntl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ struct f_owner_ex {
184184
#define SPLICE_F_MORE 4
185185
#define SPLICE_F_GIFT 8
186186
int fallocate(int, int, off_t, off_t);
187-
#define fallocate64 fallocate
188187
int name_to_handle_at(int, const char *, struct file_handle *, int *, int);
189188
int open_by_handle_at(int, struct file_handle *, int);
190189
ssize_t readahead(int, off_t, size_t);
@@ -207,6 +206,9 @@ ssize_t tee(int, int, size_t, unsigned);
207206
#define posix_fadvise64 posix_fadvise
208207
#define posix_fallocate64 posix_fallocate
209208
#define off64_t off_t
209+
#if defined(_GNU_SOURCE)
210+
#define fallocate64 fallocate
211+
#endif
210212
#endif
211213

212214
#ifdef __cplusplus

lib/libc/include/generic-musl/poll.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct pollfd {
3636

3737
int poll (struct pollfd *, nfds_t, int);
3838

39-
#ifdef _GNU_SOURCE
39+
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
4040
#define __NEED_time_t
4141
#define __NEED_struct_timespec
4242
#define __NEED_sigset_t
@@ -45,7 +45,7 @@ int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
4545
#endif
4646

4747
#if _REDIR_TIME64
48-
#ifdef _GNU_SOURCE
48+
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
4949
__REDIR(ppoll, __ppoll_time64);
5050
#endif
5151
#endif

lib/libc/include/generic-musl/stdc-predef.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
#define __STDC_IEC_559__ 1
88
#endif
99

10+
#if !defined(__STDC_UTF_16__)
1011
#define __STDC_UTF_16__ 1
12+
#endif
13+
14+
#if !defined(__STDC_UTF_32__)
1115
#define __STDC_UTF_32__ 1
16+
#endif
1217

1318
#endif

lib/libc/include/generic-musl/string.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ char *strchrnul(const char *, int);
9595
char *strcasestr(const char *, const char *);
9696
void *memrchr(const void *, int, size_t);
9797
void *mempcpy(void *, const void *, size_t);
98-
#ifndef __cplusplus
99-
char *basename();
100-
#endif
10198
#endif
10299

103100
#ifdef __cplusplus

0 commit comments

Comments
 (0)