Fix --with-cmodel option

When passed with `--without-cmodel`, cmodel will get value `no` which is
unexpected.

Signed-off-by: demin.han <demin.han@starfivetech.com>
This commit is contained in:
demin.han 2025-07-22 18:38:30 +08:00 committed by Christoph Müllner
parent 43ff3d088e
commit 9cfb1a8675
2 changed files with 6 additions and 3 deletions

5
configure vendored
View File

@ -4177,10 +4177,13 @@ fi
if test ${with_cmodel+y}
then :
withval=$with_cmodel;
else $as_nop
with_cmodel=no
fi
if test "x$with_cmodel" != x
if test "x$with_cmodel" != xno
then :
cmodel=-mcmodel=$with_cmodel

View File

@ -177,10 +177,10 @@ AC_ARG_WITH(cmodel,
[AS_HELP_STRING([--with-cmodel],
[Select the code model to use when building libc and libgcc @<:@--with-cmodel=medlow@:>@])],
[],
[]
[with_cmodel=no]
)
AS_IF([test "x$with_cmodel" != x],
AS_IF([test "x$with_cmodel" != xno],
[AC_SUBST(cmodel, -mcmodel=$with_cmodel)],
[AC_SUBST(cmodel, -mcmodel=medlow)])