All syscall wrapper functions which have unit tests have been enabled.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/src/__support/OSUtil/linux/riscv64/syscall.h | ||
---|---|---|
44 | What condition codes? |
- Remove a copy paste remnant from the syscall implementation.
- Enable more string functions.
libc/src/__support/OSUtil/linux/riscv64/syscall.h | ||
---|---|---|
44 | Thanks for catching - it was a copy-paste remnant which I have now removed. |
libc/src/__support/OSUtil/linux/riscv64/syscall.h | ||
---|---|---|
11 | Copy paste error in the include guard |
Hey @sivachandra, we seem to need the signal-macros.h and the fenv stuff to get this patch compiling:
/home/mgadelha/llvm-project/build/projects/libc/include/llvm-libc-macros/linux/signal-macros.h:86:2: error: "Signal stack sizes not defined for your platform." #error "Signal stack sizes not defined for your platform." ^ 1 error generated.
/home/mgadelha/llvm-project/libc/src/__support/FPUtil/FEnvImpl.h:51:25: error: unknown type name 'fenv_t' LIBC_INLINE int get_env(fenv_t *) { return 0; } ^ /home/mgadelha/llvm-project/libc/src/__support/FPUtil/FEnvImpl.h:53:31: error: unknown type name 'fenv_t' LIBC_INLINE int set_env(const fenv_t *) { return 0; } ^ 2 errors generated.
This was enough to fix compilation, and all tests are passing:
diff --git a/libc/include/llvm-libc-macros/linux/signal-macros.h b/libc/include/llvm-libc-macros/linux/signal-macros.h index 069a23347797..4dc39dec47de 100644 --- a/libc/include/llvm-libc-macros/linux/signal-macros.h +++ b/libc/include/llvm-libc-macros/linux/signal-macros.h @@ -82,6 +82,9 @@ #elif defined(__aarch64__) #define MINSIGSTKSZ 5120 #define SIGSTKSZ 16384 +#elif defined(__riscv) +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 #else #error "Signal stack sizes not defined for your platform." #endif diff --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h index ec21555071c8..179140ae6b9b 100644 --- a/libc/src/__support/FPUtil/FEnvImpl.h +++ b/libc/src/__support/FPUtil/FEnvImpl.h @@ -48,9 +48,9 @@ LIBC_INLINE int get_round() { return FE_TONEAREST; } LIBC_INLINE int set_round(int) { return 0; } -LIBC_INLINE int get_env(fenv_t *) { return 0; } +LIBC_INLINE int get_env(void *) { return 0; } -LIBC_INLINE int set_env(const fenv_t *) { return 0; } +LIBC_INLINE int set_env(const void *) { return 0; } } // namespace __llvm_libc::fputil #endif
@mikhail.ramalho - there are two modes for building the libc, the overlay mode and the full build mode. With this patch, I am only bringing up the overlay mode. The signal macros and fenv pieces become relevant in the full build mode. Can we do them as follow ups?
Oh, I see, my mistake! I was always building with -DLLVM_LIBC_FULL_BUILD=ON
I agree, let's disable it for now.
Em ter., 7 de mar. de 2023 às 16:55, Siva Chandra via Phabricator <
reviews@reviews.llvm.org> escreveu:
sivachandra added a comment.
@mikhail.ramalho - there are two modes for building the libc, the overlay
mode and the full build mode. With this patch, I am only bringing up the
overlay mode. The signal macros and fenv pieces become relevant in the full
build mode. Can we do them as follow ups?Repository:
rG LLVM Github MonorepoCHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145452/new/
Copy paste error in the include guard