Skip to content

Commit f24f9db

Browse files
committed
Refactor --with-tune
Signed-off-by: demin.han <[email protected]>
1 parent 9f82026 commit f24f9db

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

configure

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,9 @@ multilib_gen
651651
WITH_LANGUAGES
652652
WITH_SIM
653653
WITH_ISA_SPEC
654-
WITH_TUNE
655654
WITH_ABI
656655
WITH_ARCH
656+
WITH_TUNE
657657
enable_default_pie
658658
debug_info
659659
default_target
@@ -3999,19 +3999,16 @@ fi
39993999
# Check whether --with-tune was given.
40004000
if test ${with_tune+y}
40014001
then :
4002-
withval=$with_tune;
4003-
4004-
fi
4005-
4002+
withval=$with_tune; WITH_TUNE=--with-tune=$with_tune
40064003
4007-
if test "x$with_tune" != "x"; then
4008-
WITH_TUNE="--with-tune=$with_tune"
4009-
else
4004+
else $as_nop
40104005
WITH_TUNE=""
40114006
4007+
40124008
fi
40134009
40144010
4011+
40154012
# Check whether --with-isa-spec was given.
40164013
if test ${with_isa_spec+y}
40174014
then :
@@ -4069,7 +4066,6 @@ WITH_ARCH=--with-arch=$with_arch
40694066
40704067
WITH_ABI=--with-abi=$with_abi
40714068
4072-
40734069
WITH_ISA_SPEC=--with-isa-spec=$with_isa_spec
40744070
40754071
WITH_SIM=$with_sim

configure.ac

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,10 @@ AC_ARG_WITH(abi,
8181
AC_ARG_WITH(tune,
8282
[AS_HELP_STRING([--with-tune=generic],
8383
[Set the base RISC-V CPU, defaults to GCC's default])],
84-
[]
84+
[AC_SUBST(WITH_TUNE,--with-tune=$with_tune)],
85+
[AC_SUBST(WITH_TUNE,"")]
8586
)
8687

87-
if test "x$with_tune" != "x"; then
88-
WITH_TUNE="--with-tune=$with_tune"
89-
else
90-
WITH_TUNE=""
91-
92-
fi
93-
9488
AC_ARG_WITH(isa-spec,
9589
[AS_HELP_STRING([--with-isa-spec=20191213],
9690
[Set the default ISA spec version, default to 20191213, available options: 2.2, 20190608, 20191213])],
@@ -125,7 +119,6 @@ AS_IF([test "x$with_abi" = xdefault],
125119

126120
AC_SUBST(WITH_ARCH, --with-arch=$with_arch)
127121
AC_SUBST(WITH_ABI, --with-abi=$with_abi)
128-
AC_SUBST(WITH_TUNE)
129122
AC_SUBST(WITH_ISA_SPEC, --with-isa-spec=$with_isa_spec)
130123
AC_SUBST(WITH_SIM, $with_sim)
131124
AC_SUBST(WITH_LANGUAGES, $with_languages)

0 commit comments

Comments
 (0)