diff options
-rw-r--r-- | config.h.in | 3 | ||||
-rwxr-xr-x | configure | 19 | ||||
-rw-r--r-- | riscv/riscv.ac | 5 |
3 files changed, 27 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in index eedd390..46d8c00 100644 --- a/config.h.in +++ b/config.h.in @@ -126,6 +126,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Default value for --with-target switch */ +#undef TARGET_ARCH + /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD @@ -714,6 +714,7 @@ with_boost_regex with_isa with_priv with_varch +with_target enable_commitlog enable_histogram enable_dirty @@ -1394,6 +1395,8 @@ Optional Packages: --with-priv=MSU Sets the default RISC-V privilege modes supported --with-varch=vlen:128,elen:64,slen:128 Sets the default vector config + --with-target=riscv64-unknown-elf + Sets the default target config Some influential environment variables: CC C compiler command @@ -5924,6 +5927,22 @@ fi +# Check whether --with-target was given. +if test "${with_target+set}" = set; then : + withval=$with_target; +cat >>confdefs.h <<_ACEOF +#define TARGET_ARCH "$withval" +_ACEOF + +else + +cat >>confdefs.h <<_ACEOF +#define TARGET_ARCH "riscv64-unknown-elf" +_ACEOF + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : diff --git a/riscv/riscv.ac b/riscv/riscv.ac index 3acecc2..bdc2c3f 100644 --- a/riscv/riscv.ac +++ b/riscv/riscv.ac @@ -26,6 +26,11 @@ AC_ARG_WITH(varch, AC_DEFINE_UNQUOTED([DEFAULT_VARCH], "$withval", [Default value for --varch switch]), AC_DEFINE_UNQUOTED([DEFAULT_VARCH], ["vlen:128,elen:64,slen:128"], [Default value for --varch switch])) +AC_ARG_WITH(target, + [AS_HELP_STRING([--with-target=riscv64-unknown-elf], + [Sets the default target config])], + AC_DEFINE_UNQUOTED([TARGET_ARCH], "$withval", [Default value for --target switch]), + AC_DEFINE_UNQUOTED([TARGET_ARCH], ["riscv64-unknown-elf"], [Default value for --target switch])) AC_SEARCH_LIBS([dlopen], [dl dld], [ AC_DEFINE([HAVE_DLOPEN], [], [Dynamic library loading is supported]) |