Refer to the implementation of aarch64 to fix PR118828. Lulu Cheng (3): LoongArch: Move the function loongarch_register_pragmas to loongarch-c.cc. LoongArch: Split the function loongarch_cpu_cpp_builtins into two functions. LoongArch: After setting the compilation options, update the predefined macros.
gcc/config/loongarch/loongarch-c.cc | 174 +++++++++++++----- gcc/config/loongarch/loongarch-protos.h | 1 + gcc/config/loongarch/loongarch-target-attr.cc | 48 ----- gcc/testsuite/gcc.target/loongarch/pr118828.c | 34 ++++ 4 files changed, 166 insertions(+), 91 deletions(-) create mode 100644 gcc/testsuite/gcc.target/loongarch/pr118828.c -- 2.34.1