github: gcc: Test i386 Interlocked functions
Add a step in the testcases-gcc job that compiles and links the
t_intrinc test with -march=i386 using the i686 GCC cross-compiler, and
then runs the test.
Without kernel32 fallback in intrin-impl.h, GCC correctly refuses to
inline __sync_* builtins on i386 (no CMPXCHG or XADD) and instead emits
calls to library helpers that do not exist and fail to link.
Even with kernel32 fallback, the final linked binary contains i486+
instructions from the CRT startup code, which is built for i686.
Building t_intrinc with -march doesn't change this. However, this does
not prevent the test from running on the CI runner, which has a modern
x86 CPU that supports these instructions.
Signed-off-by: Jaeden Amero <jaeden@patater.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
1 file changed