Hi!
I've recently had the unfortunate opportunity of having to invoke gpc/cygwin from a compiling/testing engine that used only MS-DOS file names (i.e., all-caps 8.3).
(if anybody cares, it was University of California at San Diego's PC^2, an ACM Programming Contest management program)
The problem was that, when invoking gpc, the program used the .PAS extension, which gpc didn't recognize as a valid source file, and passed it to the linker.
% gpc FOO.PAS /n/gnu/gcc-2.95.2-gpc-19991030-libg++-2.8.1.3-libgcj-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/real-ld:FOO.PAS: file format not recognized; treating as linker script /n/gnu/gcc-2.95.2-gpc-19991030-libg++-2.8.1.3-libgcj-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/real-ld:FOO.PAS:1: parse error collect2: ld returned 1 exit status
No problem, I though, I just need to insert `-x pascal' before the source filename, as I had done in the gcc and g++ compiling scripts. Unfortunately, it failed too:
% gpc -x pascal FOO.PAS gpc: Internal GPC problem: internal option `--amtmpfile' not given
I ended up having to write a shell-script that would convert the extension to lower case, so it wasn't a show-stopper.
Anyway, I believe it would be nice if gpc were more gcc-like, in the sense of accepting `-x' (and any other flags gcc accepts, for that matter).
Cheers,
On 18 Nov 99, at 18:05, Alexandre Oliva wrote:
Hi!
I've recently had the unfortunate opportunity of having to invoke gpc/cygwin from a compiling/testing engine that used only MS-DOS file names (i.e., all-caps 8.3).
(if anybody cares, it was University of California at San Diego's PC^2, an ACM Programming Contest management program)
The problem was that, when invoking gpc, the program used the .PAS extension, which gpc didn't recognize as a valid source file, and passed it to the linker.
% gpc FOO.PAS
[...]
Yes, I have just noticed this too. It only happens when you pass the extension in uppercase characters from the command line (i.e., regardless of whether the actual filename is uppercase or not, if you pass the filename in lowercase characters (e.g., % gpc foo.pas), everything will be fine).
One option for dealing with this is for gpc.exe to convert the filename to lowercase before passing it on (only on systems such as Win32 and Dos which do not care about the case of filenames). This is what I have done. I can send you a diff for gpc.c if you want (hmmm ... my diff also contains some hacks for compiling mingw32 programs (i.e., programs that don't require the Cywin dll), so I am not sure that you would want it).
In any case, this is probably something that is better for Peter to look into for a permanent fix.
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ Author of: Chief's Installer Pro v5.20a for Win32 ftp://ftp.demon.co.uk/pub/ibmpc/win95/apps/chief32/chief52a.zip