From d0bbecb1c418b680505faa998fe420f0fd4bbfc1 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 7 Oct 2022 16:55:14 +0800 Subject: [PATCH] RISC-V: Add riscv_vector.h wrapper in testsuite to prevent pull in stdint.h from C library MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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-.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 Tested-by: Christoph Müllner Reviewed-by: Ju-Zhe Zhong --- .../gcc.target/riscv/rvv/base/riscv_vector.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h 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 000000000000..fbb4858fc867 --- /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 +#define _RISCV_VECTOR_WRAP_H + +#endif -- 2.47.3