diff options
| author | Leslie Zhai <zhaixiang@loongson.cn> | 2024-12-11 15:10:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 08:10:58 +0100 |
| commit | 054de8e83f92bc49cd71789f1fa3852d907e67d4 (patch) | |
| tree | 846f115d78cf29ac64f971d019b109aa4b4e0568 | |
| parent | e6d1bf78a640b77d25f933dca0d75f91e20b6a1d (diff) | |
| download | box64-054de8e83f92bc49cd71789f1fa3852d907e67d4.tar.gz box64-054de8e83f92bc49cd71789f1fa3852d907e67d4.zip | |
[LA64] SIGRTMAX is 127 for ABI 1.0 (#2134)
* [LA64] SIGRTMAX is 127 for ABI 1.0 * [LA64] Added LARCH64_ABI_1 CMake option * [LA64] Change MAX_SIGNAL to 128 for ABI 1.0
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/include/box64context.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 95e7b0c7..8ba477c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ option(CI "Set to ON if running in CI" ${CI}) option(WITH_MOLD "Set to ON to use with mold" ${WITH_MOLD}) option(BOX32 "Set to ON to add Linux 32bits support (experimental, do not use)" ${BOX32}) option(BOX32_BINFMT "Also setup binfmt integration for box32" ${BOX32_BINFMT}) +option(LARCH64_ABI_1 "Set to ON if building for Loongarch64 ABI 1.0 system" ${LARCH64_ABI_1}) if(TERMUX) set(TERMUX_PATH "/data/data/com.termux/files") @@ -52,6 +53,10 @@ if(LARCH64) set(ARM_DYNAREC OFF CACHE BOOL "") set(RV64_DYNAREC OFF CACHE BOOL "") set(LARCH64_DYNAREC ON CACHE BOOL "") + if(LARCH64_ABI_1) + message(STATUS "Build for Loongarch64 ABI 1.0 system") + add_definitions(-DLA64_ABI_1) + endif() endif() if(RV64) set(LD80BITS OFF CACHE BOOL "") diff --git a/src/include/box64context.h b/src/include/box64context.h index ecf60f7f..575348bf 100644 --- a/src/include/box64context.h +++ b/src/include/box64context.h @@ -52,7 +52,11 @@ typedef struct kh_dynablocks_s kh_dynablocks_t; typedef void* (*procaddress_t)(const char* name); typedef void* (*vkprocaddess_t)(void* instance, const char* name); +#ifdef LA64_ABI_1 +#define MAX_SIGNAL 128 +#else #define MAX_SIGNAL 64 +#endif typedef struct tlsdatasize_s { int tlssize; |