Re: Compilers should have an option to ignore unknown flags?
- From: Richard.L.Hamilton@xxxxxxxxxxxxxxxxxx (Richard L. Hamilton)
- Date: Thu, 08 Jun 2006 06:40:55 -0500
In article <1149692211.400998.198530@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
vanospam@xxxxxxx writes:
Dave (from the UK) wrote:
I'm sure I'm not the first or last to try to compile a bit of
open-source software with a Sun compiler and find it stop because some
idiot developer has added -Wall or some other gcc specific flag and
totally ignores what you set CFLAGS too.
I've reported this as a bug on the GNU Common Lisp
http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=16697
where I set CFLAGS to -fast -fsimple=1, but the the configure script
turns that into
-fast -fsimple=1 -Wall -DVOL=volatile -fsigned-char -O3 -fomit-frame-pointer
So needless to say the Sun compiler (Studio 11) stops.
I'm not suggesting Sun try to implement all gcc flags (that would be
crazy), but it would be useful if there was an option something like
-ignoreunknown
While I understand where you are coming from in porting code from one
os to another, having the compiler or any application for that matter
ask to ignore flags is wrong. While there may be a couple, I can't
think of any application right now that will ignore an incorect option
on the command line. I wouldn't want it to. If it did, then something
that I was sure that I was setting might not be set because of a typo.
For compiler, the results could lead to a long troubleshooting session.
Not my idea of fun.
Better to take the makefiles or make scripts into an editor and resolve
the problems. A few global replaces and they should be eliminated.
As I said before, I understand where you are coming from, but an
-ignoreunkown flag is a bad idea.
I agree that ignoring unknown flags silently would almost always be very
unwise, but as long as it issued a warning message showing the ignored
flag (but didn't fail), would it still be a problem? That way, at least
one would be _told_ which flags had no effect and were accepted for
command-line compatibility only.
--
mailto:rlhamil@xxxxxxxxx http://www.smart.net/~rlhamil
Lasik/PRK theme music:
"In the Hall of the Mountain King", from "Peer Gynt"
.
- Follow-Ups:
- Re: Compilers should have an option to ignore unknown flags?
- From: Giorgos Keramidas
- Re: Compilers should have an option to ignore unknown flags?
- References:
- Compilers should have an option to ignore unknown flags?
- From: Dave (from the UK)
- Re: Compilers should have an option to ignore unknown flags?
- From: vanospam
- Compilers should have an option to ignore unknown flags?
- Prev by Date: Re: latest sol9 recommended broke printing
- Next by Date: Re: problem with bootin Solaris
- Previous by thread: Re: Compilers should have an option to ignore unknown flags?
- Next by thread: Re: Compilers should have an option to ignore unknown flags?
- Index(es):
Relevant Pages
|