Le 27/08/2024 à 15:58, Jason A. Donenfeld a écrit :
> On Tue, Aug 27, 2024 at 09:20:16PM +0800, Xi Ruoyao wrote:
>> Building test_vdso_getrandom currently leads to following issue:
>>
>> In file included from
>> /home/xry111/git-repos/linux/tools/include/linux/compiler_types.h:36,
>> from
>> /home/xry111/git-repos/linux/include/uapi/linux/stddef.h:5,
>> from
>> /home/xry111/git-repos/linux/include/uapi/linux/posix_types.h:5,
>> from /usr/include/asm/sigcontext.h:12,
>> from /usr/include/bits/sigcontext.h:30,
>> from /usr/include/signal.h:301,
>> from vdso_test_getrandom.c:14:
>> /home/xry111/git-repos/linux/tools/include/linux/compiler-gcc.h:3:2:
>> error: #error "Please don't include <linux/compiler-gcc.h> directly, include
>> <linux/compiler.h> instead."
>> 3 | #error "Please don't include <linux/compiler-gcc.h> directly,
>> include <linux/compiler.h> instead."
>> | ^~~~~
>>
>> It's because the compiler_types.h inclusion in
>> include/uapi/linux/stddef.h is expected to be removed by the
>> header_install.sh script, as compiler_types.h shouldn't be used from the
>> user space.
>
> Hmm. If I run this on my current 6.10-based system, I get:
>
> $ make
> CC vdso_standalone_test_x86
> CC vdso_test_getrandom
> vdso_test_getrandom.c:43:41: error: field ‘params’ has incomplete type
> 43 | struct vgetrandom_opaque_params params;
> | ^~~~~~
>
> Because KHDR_INCLUDES is /usr/include instead.
>
> Christophe, any suggestions on this one? And any idea why loongarch is
> hitting it, but not x86 or ppc?
>
Can you 'make clean' then provide the output of 'make V=1' ?
On powerpc I get:
$ make ARCH=powerpc CROSS_COMPILE=ppc-linux-
SODIUM="-I/tmp/sodium/usr/local/include/ -L/tmp/sodium/usr/local/lib/
-lsodium" V=1
ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= vdso_test_gettimeofday.c
parse_vdso.c -o
/home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_gettimeofday
ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= vdso_test_getcpu.c
parse_vdso.c -o
/home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_getcpu
ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= vdso_test_abi.c parse_vdso.c
-o /home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_abi
ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= vdso_test_clock_getres.c -o
/home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_clock_getres
ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= -ldl vdso_test_correctness.c
-o
/home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_correctness
ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= -isystem
/home/chleroy/linux-powerpc/tools/testing/selftests/../../../tools/include
-isystem
/home/chleroy/linux-powerpc/tools/testing/selftests/../../../include/uapi
vdso_test_getrandom.c parse_vdso.c -o
/home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_getrandom
ppc-linux-gcc -std=gnu99 -D_GNU_SOURCE= -idirafter
/home/chleroy/linux-powerpc/tools/testing/selftests/../../../tools/include
-idirafter
/home/chleroy/linux-powerpc/tools/testing/selftests/../../../arch/powerpc/include
-idirafter
/home/chleroy/linux-powerpc/tools/testing/selftests/../../../include
-D__ASSEMBLY__ -DBULID_VDSO -DCONFIG_FUNCTION_ALIGNMENT=0
-Wa,--noexecstack -I/tmp/sodium/usr/local/include/
-L/tmp/sodium/usr/local/lib/ -lsodium vdso_test_chacha.c
/home/chleroy/linux-powerpc/tools/testing/selftests/../../../tools/arch/powerpc/vdso/vgetrandom-chacha.S
-o
/home/chleroy/linux-powerpc/tools/testing/selftests/vDSO/vdso_test_chacha
$
Thanks
Christophe