Hello,
Making all in src make[6]: Entering directory '/home/jeronimo/pkg/openwrt/build_dir/target-mips_24kc_musl/ecl-16.1.3/build/atomic/src' make[7]: Entering directory '/home/jeronimo/pkg/openwrt/build_dir/target-mips_24kc_musl/ecl-16.1.3/build/atomic/src' libtool: compile: mips-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I../src -I/home/jeronimo/pkg/openwrt/build_dir/target-mips_24kc_musl/ecl-16.1.3/src/bdwgc/libatomic_ops/src -I/home/jeronimo/pkg/openwrt/staging_dir/target-mips_24kc_musl/usr/include -I/home/jeronimo/pkg/openwrt/staging_dir/target-mips_24kc_musl/include -I/home/jeronimo/pkg/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/usr/include -I/home/jeronimo/pkg/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/include/fortify -I/home/jeronimo/pkg/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/include -fPIC -Wall -Wextra -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -iremap/home/jeronimo/pkg/openwrt/build_dir/target-mips_24kc_musl/ecl-16.1.3:ecl-16.1.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/jeronimo/pkg/openwrt/staging_dir/target-mips_24kc_musl/usr/include/ -fPIC -D_THREAD_SAFE -MT atomic_ops.lo -MD -MP -MF .deps/atomic_ops.Tpo -c /home/jeronimo/pkg/openwrt/build_dir/target-mips_24kc_musl/ecl-16.1.3/src/bdwgc/libatomic_ops/src/atomic_ops.c -fPIC -DPIC -o atomic_ops.o {standard input}: Assembler messages: {standard input}:24: Error: opcode not supported on this processor: mips2 (mips2) `sync ' {standard input}:47: Error: opcode not supported on this processor: mips2 (mips2) `ll $2,0($4)' {standard input}:49: Error: opcode not supported on this processor: mips2 (mips2) `sc $5,0($4)' make[7]: *** [Makefile:597: atomic_ops.lo] Error 1 make[7]: Leaving directory '/home/jeronimo/pkg/openwrt/build_dir/target-mips_24kc_musl/ecl-16.1.3/build/atomic/src' make[6]: *** [Makefile:460: all] Error 2
This is an error in the libatomic_ops package. Since this package is widely used, I suggest looking whether OpenWRT already has it available and whether they have patches. You should also open an issue with the people developing this library.
Best regards, Marius Gerbershagen