Skip to content

Commit 26b94ee

Browse files
committed
autotools: Remove "auto" value of --with-ecmult-gen-kb option
"auto" implies that a value is being chosen based on build system introspection or host system capabilities. However, for the `--with-ecmult-gen-kb` option, the value "auto" is hardcoded, which might lead to confusion. This change replaces "auto" with a more appropriate default value.
1 parent 122dbae commit 26b94ee

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
BUILD: check
1212
### secp256k1 config
1313
ECMULTWINDOW: 15
14-
ECMULTGENKB: auto
14+
ECMULTGENKB: 22
1515
ASM: no
1616
WIDEMUL: auto
1717
WITH_VALGRIND: yes

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
BUILD: 'check'
2323
### secp256k1 config
2424
ECMULTWINDOW: 15
25-
ECMULTGENKB: 'auto'
25+
ECMULTGENKB: 22
2626
ASM: 'no'
2727
WIDEMUL: 'auto'
2828
WITH_VALGRIND: 'yes'

configure.ac

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ AC_ARG_WITH([ecmult-window], [AS_HELP_STRING([--with-ecmult-window=SIZE],
213213
)],
214214
[set_ecmult_window=$withval], [set_ecmult_window=15])
215215

216-
AC_ARG_WITH([ecmult-gen-kb], [AS_HELP_STRING([--with-ecmult-gen-kb=2|22|86|auto],
216+
AC_ARG_WITH([ecmult-gen-kb], [AS_HELP_STRING([--with-ecmult-gen-kb=2|22|86],
217217
[The size of the precomputed table for signing in multiples of 1024 bytes (on typical platforms).]
218218
[Larger values result in possibly better signing/keygeneration performance at the cost of a larger table.]
219-
["auto" is a reasonable setting for desktop machines (currently 22). [default=auto]]
219+
[The default value is a reasonable setting for desktop machines (currently 22). [default=22]]
220220
)],
221-
[req_ecmult_gen_kb=$withval], [req_ecmult_gen_kb=auto])
221+
[set_ecmult_gen_kb=$withval], [set_ecmult_gen_kb=22])
222222

223223
AC_ARG_WITH([valgrind], [AS_HELP_STRING([--with-valgrind=yes|no|auto],
224224
[Build with extra checks for running inside Valgrind [default=auto]]
@@ -350,13 +350,6 @@ case $set_ecmult_window in
350350
;;
351351
esac
352352

353-
# Set ecmult gen kb
354-
if test x"$req_ecmult_gen_kb" = x"auto"; then
355-
set_ecmult_gen_kb=22
356-
else
357-
set_ecmult_gen_kb=$req_ecmult_gen_kb
358-
fi
359-
360353
case $set_ecmult_gen_kb in
361354
2)
362355
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=2 -DCOMB_TEETH=5"
@@ -368,7 +361,7 @@ case $set_ecmult_gen_kb in
368361
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=43 -DCOMB_TEETH=6"
369362
;;
370363
*)
371-
AC_MSG_ERROR(['ecmult gen table size not 2, 22, 86 or "auto"'])
364+
AC_MSG_ERROR(['ecmult gen table size not 2, 22 or 86'])
372365
;;
373366
esac
374367

0 commit comments

Comments
 (0)