Re: [htdig] htdig-3.1.5 +prune_parent_dir_href patch version 0.0

Subject: Re: [htdig] htdig-3.1.5 +prune_parent_dir_href patch version 0.0
From: Geoff Hutchison (
Date: Fri May 05 2000 - 16:33:43 PDT

At 1:31 PM +0300 5/5/00, Peter L. Peres wrote:
>here is everything. Please let me know if I broke something. imho the
>Makefile of a production release should have -O(as high as you dare) and
>no -g and it should strip the binaries. The difference in runtime on small
>machines is significant. I have modified the to remove -g
>with gcc and g++, but it does not strip by itself (you have to do it by
>hand, especially htdig and htsearch).

First off, I should note that the configure script (which you
patched) is generated by the autoconf package. The ht://Dig code is
by no means the only group that uses autoconf-generated scripts as-is.

Now, you ask "why would autoconf generate with -g -O2 by default?" I
don't know the exact reason, but remember that the code must compile
on a wide variety of platforms and with a wide variety of compilers.
So first off, -O2 is the highest optimization you can rely on for
most compilers. You may not remember, but even with gcc-2.7.2, -O2
was itself buggy. Some compilers choke on optimization levels >2.

So now you probably wonder why the -g is included by autoconf. Again,
I don't know the exact reason, but my guess is that it is used
because it will be useful. For most people, the added bloat is
minimal compared to the utility. If it wasn't included, than anytime
someone posted a bug report, we'd probably have to tell them to
recompile with -g. Not so good.

If you'd like a better answer, I suggest you ask the autoconf mailing
list or maintainers yourself.

Now, why doesn't it strip by default?

Again, it's a matter of cost/benefit tradeoff. The Makefiles in 3.1.5
are fairly standard, though they're hand-written. The install target
on most packages does not strip binaries, but you can "make
install-strip" on many packages and have them stripped. Again, I'm
just following standard practice--my reasoning would follow that
outlined above for debugging information.

Also remember that if you *really* want to compile things the way you
want, you can easily do this through the Makefile or at the time you
run configure. For example:

CFLAGS="-O3 -funroll-loops" CXXFLAGS="-O3" ./configure

This is what I do personally. But I'm also aware as a maintainer that
this is not something to be blindly followed--I've tested the
compiler and the code at this level and it works.


-Geoff Hutchison
Williams Students Online

------------------------------------ To unsubscribe from the htdig mailing list, send a message to You will receive a message to confirm this.

This archive was generated by hypermail 2b28 : Fri May 05 2000 - 14:21:32 PDT