Subject: Re: adding a platform specific (cygwin) gcc wrapper for -o
To: Johnny C. Lam <jlam@NetBSD.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/22/2004 16:10:35
On Wed, 22 Dec 2004, Johnny C. Lam wrote:

> > In particular, I want all "gcc -o filename" to be changed to "gcc -o
> > filename." (with the trailing period) on cygwin.
>
> Do you only want this to happen for executables?  What happens if you do
> "gcc -o foo.o foo.c"?

The .o object files should stay with .o as the final extension.

> We can definitely create some cygwin-gcc wrapper scripts, and you can
> use the existing scripts in pkgsrc/mk/wrapper as a guide to writing
> them.  However, this particular transformation you're trying to do looks
> potentially hard because we need to figure out when we're linking an
> executable versus linking a shared library or compiling an object file.
>
> I'll help out where I can.

Thanks. I'll try to do this.

My other workarounds instead are:

- recompile gcc so it doesn't do this in the first place

- fix or create wrappers for all tools that potentially use the filenames
with the dynamic ".exe" extension.

The problem is that filename and filename.exe are the same file and some
tools automatically append an ".exe" and some don't and some do it at the
wrong time. I'd prefer if I never saw the .exe in the first place.

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/