diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2022-10-07 16:55:14 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2022-10-10 21:10:34 +0800 |
commit | d0bbecb1c418b680505faa998fe420f0fd4bbfc1 (patch) | |
tree | 1cf4bdd4959a199da3e6c68bf7ad0f3ed530b216 /gcc | |
parent | 99e9796ca1e9afcf820214353756a9a140d89be3 (diff) | |
download | gcc-d0bbecb1c418b680505faa998fe420f0fd4bbfc1.zip gcc-d0bbecb1c418b680505faa998fe420f0fd4bbfc1.tar.gz gcc-d0bbecb1c418b680505faa998fe420f0fd4bbfc1.tar.bz2 |
RISC-V: Add riscv_vector.h wrapper in testsuite to prevent pull in stdint.h from C library
For RISC-V linux/glibc toolchain will got header file not found when including
stdint.h if multilib is not enabled, it because some header file will
try to include gnu/stubs-<ABI-NAME>.h from the system, however it only
generated when multilib enabled.
In order to prevent that, we introduce a wrapper for riscv_vector.h,
include stdint-gcc.h rather than the default stdint.h.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/riscv_vector.h: New.
Reported-by: Christoph Müllner <christoph.muellner@vrull.eu>
Tested-by: Christoph Müllner <christoph.muellner@vrull.eu>
Reviewed-by: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h b/gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h new file mode 100644 index 0000000..fbb4858f --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h @@ -0,0 +1,11 @@ +/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from + C library, that might cause problem on testing RV32 related testcase when + we disable multilib. */ +#ifndef _RISCV_VECTOR_WRAP_H + +#define _GCC_WRAP_STDINT_H +#include "stdint-gcc.h" +#include_next <riscv_vector.h> +#define _RISCV_VECTOR_WRAP_H + +#endif |