Discussion:
manywarnings.m4 optimization request
Tim Ruehsen
2016-10-28 14:05:22 UTC
Permalink
Hi,

during some GNU internal discussion I was asked to post my proposal / request
here.

"I use manywarnings.m4 in my projects which take ~9s here (~25% of the whole
./configure run).
One gcc invocation per (possible) warning options sums up a lot.

gcc -Q --help=warning|awk '{ if ($2 == "[disabled]") print $1 }'
gives a complete list of available warning options which we can use without
checking each single option.
This also takes automatic advantage of new gcc warnings."


I took a look at the source but feel somewhat incompetent to provide a patch
(m4 and shell is just not my competence). It seems to be a pretty low-hanging
fruit for an expert, though.

I really would enjoy a faster manywarnings.m4 !

Regards, Tim
Jim Meyering
2016-10-29 17:09:01 UTC
Permalink
Post by Tim Ruehsen
Hi,
during some GNU internal discussion I was asked to post my proposal / request
here.
"I use manywarnings.m4 in my projects which take ~9s here (~25% of the whole
./configure run).
One gcc invocation per (possible) warning options sums up a lot.
gcc -Q --help=warning|awk '{ if ($2 == "[disabled]") print $1 }'
gives a complete list of available warning options which we can use without
checking each single option.
This also takes automatic advantage of new gcc warnings."
I took a look at the source but feel somewhat incompetent to provide a patch
(m4 and shell is just not my competence). It seems to be a pretty low-hanging
fruit for an expert, though.
I really would enjoy a faster manywarnings.m4 !
Good idea.
Just a matter of someone getting motivated and finding the time.

In the mean time, do you use a ./configure cache?
In day-to-day runs of configure, I rarely notice this, because my
initial invocation of ./configure usually includes e.g.,
`--cache=.cache`.

Of course, if you're always building from a just-unpacked tarball,
that doesn't help. In that case, you can use an absolute name or the
CONFIG_SITE envvar, per
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Site-Defaults.html.
Tim Rühsen
2016-10-30 17:08:21 UTC
Permalink
Post by Jim Meyering
Post by Tim Ruehsen
Hi,
during some GNU internal discussion I was asked to post my proposal /
request here.
"I use manywarnings.m4 in my projects which take ~9s here (~25% of the
whole ./configure run).
One gcc invocation per (possible) warning options sums up a lot.
gcc -Q --help=warning|awk '{ if ($2 == "[disabled]") print $1 }'
gives a complete list of available warning options which we can use without
checking each single option.
This also takes automatic advantage of new gcc warnings."
I took a look at the source but feel somewhat incompetent to provide a
patch (m4 and shell is just not my competence). It seems to be a pretty
low-hanging fruit for an expert, though.
I really would enjoy a faster manywarnings.m4 !
Good idea.
Just a matter of someone getting motivated and finding the time.
I hope someone finds the motivation.
It would of great help though, if someone could lead me to the (.m4 ?) files to
change and/or needed functionality. Than i could produce a patch prototype
that can be polished here.
Post by Jim Meyering
In the mean time, do you use a ./configure cache?
In day-to-day runs of configure, I rarely notice this, because my
initial invocation of ./configure usually includes e.g.,
`--cache=.cache`.
Of course, if you're always building from a just-unpacked tarball,
that doesn't help. In that case, you can use an absolute name or the
CONFIG_SITE envvar, per
https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Site-De
faults.html.
Thanks for the hints.
I use -C whenever possible, but developing means here testing all kinds of
compiler versions and CFLAGS combinations. This involves lot's of ./configure
runs without caching.
Since ./configure doesn't scale up with number of cpu cores... you just can't
imagine how long a ./configure run takes on of my OpenSolaris Sparc test
machines (~5-6 minutes). This is just wasting precious developer time...

But I give config.site a closer look...

Tim
Paul Eggert
2016-10-30 18:33:18 UTC
Permalink
Post by Tim Rühsen
It would of great help though, if someone could lead me to the (.m4 ?) files to
change and/or needed functionality.
http://savannah.gnu.org/git/?group=gnulib
http://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/manywarnings.m4
http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gnulib-readme.texi
Tim Ruehsen
2016-11-02 16:13:28 UTC
Permalink
Post by Paul Eggert
Post by Tim Rühsen
It would of great help though, if someone could lead me to the (.m4 ?)
files to change and/or needed functionality.
http://savannah.gnu.org/git/?group=gnulib
http://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/manywarnings.m4
http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gnulib-readme.texi
I made up code, working with recent gcc and clang for the wget2 project (wget
subproject). It takes ~100ms here (manywarnings taking ~9s) in a non-cached ./
configure run.

If anyone likes to make up a gnulib module ?

Just committed to master (git://git.savannah.gnu.org/wget/wget2.git), if
someone wants to take a look at it.
And not to forget, it is a developer only tool (and not very mature ;-).

Regards, Tim

Loading...