Skip to content

Commit

Permalink
RISC-V: Add riscv_vector.h wrapper in testsuite to prevent pull in st…
Browse files Browse the repository at this point in the history
…dint.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>
  • Loading branch information
kito-cheng committed Oct 10, 2022
1 parent 99e9796 commit d0bbecb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d0bbecb

Please sign in to comment.