OK, I will use CFLAGS-.oS += -mcmodel=medium and have-cmodel-medium. 从 Windows 版邮件发送 发件人: Xi Ruoyao 发送时间: 2022年11月30日 15:34 收件人: caiyinyu@loongson.cn; Florian Weimer 抄送: adhemerval.zanella@linaro.org; libc-alpha@sourceware.org; i.swmail@xen0n.name; xuchenghua@loongson.cn 主题: Re: 回复: [PATCH] LoongArch: Use mediumcmodel build libc_nonshared.a. On Wed, 2022-11-30 at 14:55 +0800, caiyinyu@loongson.cn wrote: > +# All the objects in lib*_nonshared.a need to be compiled with medium > code > +# model or large applications may fail to link. > +CFLAGS-.oS += -mcmodel=medium >   > We just need add -mcmodel=medium to four files not all. I still prefer "all", to prevent subtle breakages if someone adds a file into or removes a file from libc_nonshared.a. Currently other .oS files are in libsupport_nonshared.a which is used by the test suite and not installed. /* snip */ > +LIBC_CONFIG_VAR([enable_cmodel_medium], It looks like we are using "-" instead of "_" in the first parameter of LIBC_CONFIG_VAR calls everywhere. Note that it's a variable name in a Makefile, not a shell script. And I'd remove the "enable" prefix: this prefix makes the variable looks like "something can be turned on/off by `--{enable,disable}-cmodel- medium'" but it's not true. So I think "cmodel-medium" or "have-cmodel-medium" would be a better name. > [$libc_cv_loongarch_cmodel_medium]) -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University