[PATCH] add GCC_OPTIONS

David O'Brien obrien@FreeBSD.org
Sun Jun 29 06:56:00 GMT 2003


On Fri, Jun 27, 2003 at 05:07:04PM -0700, Geoff Keating wrote:
> If you must do something like this, put
> 
> #!/bin/sh
> exec /usr/bin/gcc -g $*
> 
> in the PATH.

This will affect *all* shells/terminals for the given login (if not the
entire machine).  What if one is compiling something in one window that
needs this kind of treatment; yet wants to compile something else that
doesn't?  One experiences more pain than needed.

Or if one has a script to build several packages, and one of them needs
-m32 added (say for something not yet properly ported on an AMD64
machine)?  It is much easier for a script to
"cd foo ; env GCC_OPTIONS=-m32 make", than have the script create a
wrapper script and them rm it, etc...

GNU ld, GNU ls, GNU grep and other GNU utils support environmental
variables like this and I don't really think it has caused a problem for
bug reports.

-- 
-- David  (obrien@FreeBSD.org)



More information about the Gcc-patches mailing list