Hi,
On Thu, Feb 18, 2010 at 12:48 AM, Frank Heckenbach ih8mj@fjf.gnu.de wrote:
Rugxulo wrote:
On Tue, Feb 16, 2010 at 11:45 AM, Maurice Lombardi Maurice.Lombardi@ujf-grenoble.fr wrote:
In fact for that reason, in my personal works I always use the option -o blah.exe.
Well, GPC actually appends TARGET_EXECUTABLE_SUFFIX which can be set by the backend target specification. I assume it's not set in the DJGPP backend, but I don't know why. Historically it was because there was reason for the COFF file; if that's no more the case, it could have been set by default, AFAICS. (That would be a matter for the GCC developers, in particular for the DJGPP backend.)
DJGPP v1 used standalone COFF files (although you could bind GO32.EXE to it if needed, but it was much bigger that way and overly redundant with lots of EXEs). v2 uses a small (2 kb) stub to load and call CWSDPMI if none other is found. Other than that small stub, it is the COFF file exactly. And DJGPP always comes with EXE2COFF.EXE too, mainly for people wanting to do "copy /b cwsdstub.exe + mycoff mycoff.exe".
So, like I said, the only real advantage of "-o blah" producing both is for *nix-oriented makefiles (because obviously otherwise it's just a waste of space).
But I'm no GCC / DJGPP developer, and despite being on the djgpp-workers mailing list, I haven't heard jack lately. The people to ask would be Andris, Juan, Eli, Martin, Charles, DJ.
N.B. This "-o blah" issue came up back on May 26 of last year, if you want to see Andris' response on comp.os.msdos.djgpp. He basically says it's a linker script issue.
http://groups.google.com/group/comp.os.msdos.djgpp/browse_frm/thread/bbdbc69...
Whew! Perl, where are you when we need you? :-) Anyways, you could probably also use sed instead of tr and head; that would be cleaner, IMHO. But I'm not very *nix savvy, so who cares. ;-)
Unix says, the right tool for the job.
Why use perl when awk will do, or awk when sed will do, or sed when tr or grep will do (at least that's my principle) ...
It's just that sed can do what tr or head are doing in this example. Why use multiple tools when one will do the job?
[re: PENG] About the printer, do you get: "file 'prn' cannot be opened for writing"? (And yes, I agree that accessing the printer via a device file is silly, but that's the way it is/was under Dos.) After pressing Esc, will it work normally? (If that's all, I could probabably get rid of this somehow.)
Yes, that's what I mean. Everything seems okay after Esc, it's just a weird startup error. Obviously NT-based Windows (with all their DOS quirks and bugs) weren't as common when Peng was last updated.