diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-04-08 13:45:18 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2022-04-18 09:54:07 -0400 |
commit | a234df30dff854f5935c5416febe04f003c12bfc (patch) | |
tree | 915f5a7a7a5139546ce781c87badce616cc42509 | |
parent | 4d7327b04d8e5384973185cc649a56e2779be714 (diff) | |
download | rockbox-a234df30dff854f5935c5416febe04f003c12bfc.tar.gz rockbox-a234df30dff854f5935c5416febe04f003c12bfc.zip |
Fix sim build for glibc >=2.34
Change-Id: If63787514b6bffc0afb71f9d651f8c6f0c328a2d
-rw-r--r-- | firmware/asm/thread.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/asm/thread.h b/firmware/asm/thread.h index 82edc81deb..5372be73ab 100644 --- a/firmware/asm/thread.h +++ b/firmware/asm/thread.h | |||
@@ -38,6 +38,16 @@ struct regs | |||
38 | #include <errno.h> | 38 | #include <errno.h> |
39 | #ifdef HAVE_SIGALTSTACK_THREADS | 39 | #ifdef HAVE_SIGALTSTACK_THREADS |
40 | #include <signal.h> | 40 | #include <signal.h> |
41 | #ifdef _DYNAMIC_STACK_SIZE_SOURCE | ||
42 | /* glibc 2.34 made MINSIGSTKSZ non-constant. This is a problem for sim | ||
43 | * builds. Hosted targets are using ancient glibc where MINSIGSTKSZ is | ||
44 | * still a compile time constant. On platforms where this is a problem | ||
45 | * (mainly x86-64 and ARM64) the signal stack size can be big, so let's | ||
46 | * give a decent amount of space and hope for the best... | ||
47 | * FIXME: this isn't a great solution. */ | ||
48 | #undef MINSIGSTKSZ | ||
49 | #define MINSIGSTKSZ 16384 | ||
50 | #endif | ||
41 | /* MINSIGSTKSZ for the OS to deliver the signal + 0x3000 for us */ | 51 | /* MINSIGSTKSZ for the OS to deliver the signal + 0x3000 for us */ |
42 | #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x3000) /* Bytes */ | 52 | #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x3000) /* Bytes */ |
43 | #elif defined(HAVE_WIN32_FIBER_THREADS) | 53 | #elif defined(HAVE_WIN32_FIBER_THREADS) |