Skip to content

Commit e971690

Browse files
committed
WIP
1 parent 5b6ac18 commit e971690

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

.github/workflows/abi-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- name: Build mlibc
9191
run: |
9292
set -e
93-
xbstrap install mlibc-static mlibc-headers-only
93+
xbstrap install mlibc-headers-only
9494
working-directory: build/
9595

9696
- name: Download glibc

abis/linux/signal.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,12 @@ struct sigcontext {
348348
typedef struct {
349349
unsigned long gregs[NGREG];
350350
struct _fpstate *fpregs;
351+
#if defined(__x86_64__)
351352
unsigned long __reserved1[8];
353+
#elif defined(__i386__)
354+
unsigned long oldmask;
355+
unsigned long cr2;
356+
#endif
352357
} mcontext_t;
353358

354359
typedef struct __ucontext {
@@ -611,14 +616,14 @@ struct sigcontext {
611616
unsigned long sc_pc;
612617
unsigned long sc_regs[32];
613618
unsigned sc_flags;
614-
unsigned long sc_extcontext[1] __attribute__((__aligned__(16)));
619+
__extension__ unsigned long sc_extcontext[0] __attribute__((__aligned__(16)));
615620
};
616621

617622
typedef struct {
618623
unsigned long pc;
619624
unsigned long gregs[32];
620625
unsigned flags;
621-
unsigned long extcontext[1] __attribute__((__aligned__(16)));
626+
__extension__ unsigned long extcontext[0] __attribute__((__aligned__(16)));
622627
} mcontext_t;
623628

624629
struct sigaltstack {
@@ -633,7 +638,7 @@ typedef struct __ucontext {
633638
stack_t uc_stack;
634639
sigset_t uc_sigmask;
635640
long __uc_pad;
636-
mcontext_t uc_mcontext;
641+
__extension__ mcontext_t uc_mcontext;
637642
} ucontext_t;
638643

639644
#else

scripts/header-abi-compare-config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ ignored_macros:
131131
- _PATH_VARDB
132132
- _POSIX_OPEN_MAX
133133
- PTHREAD_DESTRUCTOR_ITERATIONS
134+
- PTHREAD_STACK_MIN
134135
- MINSIGSTKSZ
135136
- SIGSTKSZ
136137
- _PC_FILESIZEBITS

scripts/header-abi-compare.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def parse(
401401
clang_args += [f"-I{base_dir}"]
402402
clang_args += [f"-I{base_dir / f"{args.arch}-linux-gnu"}"]
403403
clang_args += [f"--target={f"{args.arch}-linux-gnu"}"]
404-
clang_args += ["-D_GNU_SOURCE", "-Wno-macro-redefined"]
404+
clang_args += ["-D_GNU_SOURCE", "-D_FILE_OFFSET_BITS=64", "-Wno-macro-redefined"]
405405

406406
try:
407407
tu = index.parse(
@@ -607,6 +607,9 @@ def is_enum(obj):
607607
"-o",
608608
f"{tempdir.name}/test-a-preprocessed.hpp",
609609
f"{tempdir.name}/test-a-primary.hpp",
610+
"-D_GNU_SOURCE",
611+
"-D_FILE_OFFSET_BITS=64",
612+
"-Wno-macro-redefined",
610613
],
611614
capture_output=True,
612615
)
@@ -624,6 +627,9 @@ def is_enum(obj):
624627
"-o",
625628
f"{tempdir.name}/test-b-preprocessed.hpp",
626629
f"{tempdir.name}/test-b-primary.hpp",
630+
"-D_GNU_SOURCE",
631+
"-D_FILE_OFFSET_BITS=64",
632+
"-Wno-macro-redefined",
627633
],
628634
capture_output=True,
629635
)
@@ -680,6 +686,9 @@ def is_enum(obj):
680686
"-o",
681687
f"{tempdir.name}/test-a",
682688
f"{tempdir.name}/test-a.cpp",
689+
"-D_GNU_SOURCE",
690+
"-D_FILE_OFFSET_BITS=64",
691+
"-Wno-macro-redefined",
683692
],
684693
capture_output=True,
685694
)
@@ -697,6 +706,9 @@ def is_enum(obj):
697706
"-o",
698707
f"{tempdir.name}/test-b",
699708
f"{tempdir.name}/test-b.cpp",
709+
"-D_GNU_SOURCE",
710+
"-D_FILE_OFFSET_BITS=64",
711+
"-Wno-macro-redefined",
700712
],
701713
capture_output=True,
702714
)

0 commit comments

Comments
 (0)