LoongArch: Fix ld FAIL test cases To avoid differences in C library paths on different systems use gcc instead of ld to perform the test. Problems caused by adding options to different distributions will not be fixed.