Hi!
In gcc/configure.ac, we have:
changequote(,)dnl
# Compile in configure arguments.
if test -f configargs.h ; then
# Being re-configured.
gcc_config_arguments=`grep configuration_arguments configargs.h | sed
-e 's/.*"\([^"]*\)".*/\1/'`
gcc_config_arguments="$gcc_config_arguments : (reconfigured)
$TOPLEVEL_CONFIGURE_ARGUMENTS"
else
gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
fi
Couldn't we do something smarter than this?
Noticed while debugging why our bisect seed machine spends over 2 minutes in
sed when handling config.status, and the reason apparently was that it has
" : (reconfigured) " string in it 37753 times, so almost 700KB just in
that. If it is useful information how many times gcc has been reconfigured,
can't we use a human readable form instead, where we add
" : (reconfigured) " the first time and then just change it to
" : (2x reconfigured) ", ..., " : (37753x reconfigured) " etc.?
Also, don't we actually add the above way $TOPLEVEL_CONFIGURE_ARGUMENTS
multiple times (if not empty, that is)?
Jakub