aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-05-01 10:33:07 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-05-01 10:44:20 -0700
commitf250fe9732da76d6722b998036ba3af18135e87f (patch)
tree8099ab5469c261906c034e54c7bf495dbadb7285 /configure
parent5aa6006fb0448698a96f83b0ff3c25869d5195f7 (diff)
downloadriscv-gnu-toolchain-f250fe9732da76d6722b998036ba3af18135e87f.zip
riscv-gnu-toolchain-f250fe9732da76d6722b998036ba3af18135e87f.tar.gz
riscv-gnu-toolchain-f250fe9732da76d6722b998036ba3af18135e87f.tar.bz2
Add the "--with-cmodel" configure argument
This lets users select the code model when building the tools.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index 5b98b5d..cd0cbe0 100755
--- a/configure
+++ b/configure
@@ -584,6 +584,7 @@ PACKAGE_URL=''
ac_subst_vars='LTLIBOBJS
LIBOBJS
+cmodel
gcc_checking
multilib_names
multilib_flags
@@ -655,6 +656,7 @@ with_arch
with_abi
enable_multilib
enable_gcc_checking
+with_cmodel
'
ac_precious_vars='build_alias
host_alias
@@ -1299,6 +1301,8 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-arch=rv64imafdc Sets the base RISC-V ISA, defaults to rv64imafdc
--with-abi=lp64d Sets the base RISC-V ABI, defaults to lp64d
+ --with-cmodel Select the code model to use when building libc and
+ libgcc [--with-cmodel=medlow]
Some influential environment variables:
CC C compiler command
@@ -3304,6 +3308,23 @@ else
fi
+
+# Check whether --with-cmodel was given.
+if test "${with_cmodel+set}" = set; then :
+ withval=$with_cmodel;
+else
+ enable_gcc_checking=yes
+
+fi
+
+if test "x$with_cmodel" != x; then :
+ cmodel=-mcmodel=$with_cmodel
+
+else
+ cmodel=-mcmodel=medlow
+
+fi
+
ac_config_files="$ac_config_files Makefile"
ac_config_files="$ac_config_files scripts/wrapper/awk/awk"