On Dec 14, 2006, at 5:59 PM, Paul Brook wrote:
On Friday 15 December 2006 01:37, Josh Conner wrote:
All -
When I configure with --disable-bootstrap and build with:
CFLAGS="-g -O0"
The resultant compiler is built with the specified options.
However, if
I --enable-bootstrap, when I build with the same CFLAGS, these
options
are not used to build the final compiler. I can get past this by
using
BOOT_CFLAGS="-g -O0", but that seems a bit inconsistent.
My question is: Is this behaving as designed or would it be
reasonable
to file a bug and/or supply a patch to change the behavior so that
CFLAGS are respected whether bootstrapping is enabled or not?
It is working as documented:
http://gcc.gnu.org/onlinedocs/gccint/Makefile.html
http://gcc.gnu.org/install/build.html
I read that, could you please quote the part that documents the
current behavior.
Let me offer a counter quote:
If you want to save additional space during the bootstrap and in
the final installation as well, you can build the compiler binaries
without debugging information as in the following example. This will
save
roughly 40% of disk space both for the bootstrap and the final
installation.
(Libraries will still contain debugging information.)
make CFLAGS='-O' LIBCFLAGS='-g -O2' \
LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
I think that is pretty clear.
I think this is a bug that was unintentionally introduced by someone
that didn't realize all the nuances of this. If you examine the
patch submission where this was changed, I don't recall they called
out or discussed the changed behavior. Do you have a pointer that
shows otherwise?
Now, why do we do this, kinda simple, because this is a standard that
trancends gcc and dates back a long, long time, see http://
www.gnu.org/prep/standards/standards.html for example.
The fix is simple, we just change BOOT_CFLAGS = -O2 -g to instead be $
(CFLAGS). This way, if someone builds as documented in the manual,
they get the results documented in the manual.