php fail to build litespeed sapi on riscv64
Build fails on riscv64 with
/usr/lib/gcc/riscv64-alpine-linux-musl/10.3.1/../../../../riscv64-alpine-linux-musl/bin/ld: sapi/litespeed/.libs/lsapilib.o: in function `lsapi_close_connection':
/home/buildozer/aports/community/php7/src/php-7.4.20/sapi/litespeed/lsapilib.c:438: undefined reference to `__sync_lock_test_and_set_1'
/usr/lib/gcc/riscv64-alpine-linux-musl/10.3.1/../../../../riscv64-alpine-linux-musl/bin/ld: sapi/litespeed/.libs/lsapilib.o: in function `LSAPI_Prefork_Accept_r':
/home/buildozer/aports/community/php7/src/php-7.4.20/sapi/litespeed/lsapilib.c:3572: undefined reference to `__sync_lock_test_and_set_1'
/usr/lib/gcc/riscv64-alpine-linux-musl/10.3.1/../../../../riscv64-alpine-linux-musl/bin/ld: sapi/litespeed/.libs/lsapilib.o: in function `lsapi_prefork_server_accept':
/home/buildozer/aports/community/php7/src/php-7.4.20/sapi/litespeed/lsapilib.c:3157: undefined reference to `__sync_lock_test_and_set_1'
collect2: error: ld returned 1 exit status
make: *** [Makefile:404: sapi/litespeed/php] Error 1
The same is for PHP.1
Edited by Andy Postnikov