Skip to content

Commit 2d219c5

Browse files
jmontleonlsandov1
authored andcommitted
Use medany instead of large model for RISCV
Signed-off-by: Jason Montleon <[email protected]>
1 parent 9e5ea06 commit 2d219c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ AC_SUBST(TARGET_LDFLAGS_OLDMAGIC)
13131313

13141314
LDFLAGS="$TARGET_LDFLAGS"
13151315

1316-
if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 ; then
1316+
if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 ; then
13171317
# Use large model to support 4G memory
13181318
AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
13191319
CFLAGS="$TARGET_CFLAGS -mcmodel=large"
@@ -1323,9 +1323,11 @@ if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_
13231323
])
13241324
if test "x$grub_cv_cc_mcmodel" = xyes; then
13251325
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
1326-
elif test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64; then
1326+
elif test "$target_cpu" = sparc64; then
13271327
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
13281328
fi
1329+
elif test "$target_cpu" = riscv64 ; then
1330+
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
13291331
fi
13301332

13311333
if test "$target_cpu"-"$platform" = x86_64-efi; then

0 commit comments

Comments
 (0)