Skip to content

Commit bc929b0

Browse files
TelGomeDongyan Chen
authored andcommitted
Update configure and Makefile
Since the patch "RISC-V: Add generic tune as default" has been commited into the trunk, the configure should also been updated. Here is the link: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=20f593018519fec1602dc39c08ba2e674a2d8a1c Signed-off-by: TelGome <93700071+TelGome@users.noreply.github.com>
1 parent 062ad35 commit bc929b0

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ endif
3535

3636
WITH_ARCH ?= @WITH_ARCH@
3737
WITH_ABI ?= @WITH_ABI@
38-
WITH_TUNE ?= @WITH_TUNE@
38+
WITH_TUNE = @WITH_TUNE@
3939
WITH_ISA_SPEC ?= @WITH_ISA_SPEC@
4040
SYSROOT := $(INSTALL_DIR)/sysroot
4141
ENABLE_LIBSANITIZER ?= @enable_libsanitizer@

configure

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ Optional Packages:
14001400
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
14011401
--with-arch=rv64gc Sets the base RISC-V ISA, defaults to rv64gc
14021402
--with-abi=lp64d Sets the base RISC-V ABI, defaults to lp64d
1403-
--with-tune=rocket Set the base RISC-V CPU, defaults to rocket
1403+
--with-tune=generic Set the base RISC-V CPU, defaults to GCC's default
14041404
--with-isa-spec=20191213
14051405
Set the default ISA spec version, default to
14061406
20191213, available options: 2.2, 20190608, 20191213
@@ -4014,12 +4014,16 @@ fi
40144014
if test ${with_tune+y}
40154015
then :
40164016
withval=$with_tune;
4017-
else $as_nop
4018-
with_tune=rocket
4019-
40204017
fi
40214018
40224019
4020+
if test -n "$with_tune" && test "$with_tune" != "yes"; then
4021+
WITH_TUNE="--with-tune=$with_tune"
4022+
else
4023+
WITH_TUNE=""
4024+
4025+
fi
4026+
40234027
40244028
# Check whether --with-isa-spec was given.
40254029
if test ${with_isa_spec+y}
@@ -4078,7 +4082,6 @@ WITH_ARCH=--with-arch=$with_arch
40784082
40794083
WITH_ABI=--with-abi=$with_abi
40804084
4081-
WITH_TUNE=--with-tune=$with_tune
40824085
40834086
WITH_ISA_SPEC=--with-isa-spec=$with_isa_spec
40844087

configure.ac

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,19 @@ AC_ARG_WITH(abi,
9494
)
9595

9696
AC_ARG_WITH(tune,
97-
[AS_HELP_STRING([--with-tune=rocket],
98-
[Set the base RISC-V CPU, defaults to rocket])],
97+
[AS_HELP_STRING([--with-tune=generic],
98+
[Set the base RISC-V CPU, defaults to GCC's default])],
9999
[],
100-
[with_tune=rocket]
100+
[]
101101
)
102102

103+
if test -n "$with_tune" && test "$with_tune" != "yes"; then
104+
WITH_TUNE="--with-tune=$with_tune"
105+
else
106+
WITH_TUNE=""
107+
108+
fi
109+
103110
AC_ARG_WITH(isa-spec,
104111
[AS_HELP_STRING([--with-isa-spec=20191213],
105112
[Set the default ISA spec version, default to 20191213, available options: 2.2, 20190608, 20191213])],
@@ -134,7 +141,7 @@ AS_IF([test "x$with_abi" = xdefault],
134141

135142
AC_SUBST(WITH_ARCH, --with-arch=$with_arch)
136143
AC_SUBST(WITH_ABI, --with-abi=$with_abi)
137-
AC_SUBST(WITH_TUNE, --with-tune=$with_tune)
144+
AC_SUBST(WITH_TUNE)
138145
AC_SUBST(WITH_ISA_SPEC, --with-isa-spec=$with_isa_spec)
139146
AC_SUBST(WITH_SIM, $with_sim)
140147
AC_SUBST(WITH_LANGUAGES, $with_languages)

0 commit comments

Comments
 (0)