Currently the check follows the practice of arm_acle.h. It's checked in
the configure script only when riscv_features is built, but always
checked for CMake.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
if(HAVE_LINUX_AUXVEC_H)
add_definitions(-DHAVE_LINUX_AUXVEC_H)
endif()
+check_include_file(asm/hwprobe.h HAVE_ASM_HWPROBE_H)
+if(HAVE_ASM_HWPROBE_H)
+ add_definitions(-DHAVE_ASM_HWPROBE_H)
+endif()
#
# Check to see if we have large file support
ARCH_STATIC_OBJS="${ARCH_STATIC_OBJS} riscv_features.o"
ARCH_SHARED_OBJS="${ARCH_SHARED_OBJS} riscv_features.lo"
+ cat > $test.c <<EOF
+#include <asm/hwprobe.h>
+EOF
+ if try $CC -c $CFLAGS $test.c; then
+ echo "Checking for asm/hwprobe.h... Yes." | tee -a configure.log
+ CFLAGS="${CFLAGS} -DHAVE_ASM_HWPROBE_H"
+ SFLAGS="${SFLAGS} -DHAVE_ASM_HWPROBE_H"
+ else
+ echo "Checking for asm/hwprobe.h... No." | tee -a configure.log
+ fi
fi
if test $buildrvv -eq 1; then
check_rvv_compiler_flag