I wrote:
I've searched the changelog for binutils 2.14 and did not find any mention of such a patch.
I spoke too soon. The FSF binutils does not mention a fix for this problem; however, the 20030807 Mingw binutils snapshot does appear to contain a patch. See:
ftp://ftp2.sourceforge.net/pub/sourceforge/mingw/binutils-2.14.90-20030807-1-notes.txt
which says, in part:
The 2.14.90-20030807-1 snapshot incorporates modifications to official binutils CVS since last update. It also fixes a bug (again) with w9x fseek, where file contents are not zero'd out if you seek past the end and then write. This patch has not been in recent binutils releases.
So perhaps the OP can use that binutils snapshot (available at the same FTP location, or via http://www.mingw.org/ ) to work around the problem on Win9x.
-- Dave
Dave,
Thank you - it sounds promissing. I'll play with it tomorrow.
Today tried Cygwin. Yes - binutils are fixed there and files are clear but ... it blows up my foo.pas to more then 1 MB - ~300 KB exe + 960 KB Cygwin1.dll !
1 MB for just "begin end". Brrrr.
Peter.
--- "J. David Bryan" jdbryan@acm.org wrote:
I wrote:
I've searched the changelog for binutils 2.14 and
did not find any
mention of such a patch.
I spoke too soon. The FSF binutils does not mention a fix for this problem; however, the 20030807 Mingw binutils snapshot does appear to contain a patch. See:
ftp://ftp2.sourceforge.net/pub/sourceforge/mingw/binutils-2.14.90-20030807-1-notes.txt
which says, in part:
The 2.14.90-20030807-1 snapshot incorporates modifications to official binutils CVS since last update. It also fixes a bug (again) with w9x fseek, where file contents are not zero'd out if you seek past the end and then write. This patch has not been in recent binutils releases.
So perhaps the OP can use that binutils snapshot (available at the same FTP location, or via http://www.mingw.org/ ) to work around the problem on Win9x.
-- Dave
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
On 26 Jan 2004 at 9:27, Peter Norton wrote:
Thank you
You're welcome.
Today tried Cygwin. Yes - binutils are fixed there and files are clear but ... it blows up my foo.pas to more then 1 MB - ~300 KB exe + 960 KB Cygwin1.dll !
You might try compiling with "-mno-cygwin", which will eliminate the cygwin1.dll dependency (presuming that you've installed the "mingw" support files via Cygwin setup).
Indeed, trying:
gpc -s -mno-cygwin test.pas
...on a simple "program test (output); begin writeln ('hello') end." source file yields a 237K executable with no Cygwin dependency.
-- Dave
On Mon, 26 Jan 2004, Peter Norton wrote:
Dave,
Thank you - it sounds promissing. I'll play with it tomorrow.
Today tried Cygwin. Yes - binutils are fixed there and files are clear but ... it blows up my foo.pas to more then 1 MB - ~300 KB exe + 960 KB Cygwin1.dll !
1 MB for just "begin end". Brrrr.
Could you dynamic link the Cygwin1.dll ? Just a thought Russ
On 26 Jan 2004 at 9:46, Russell Whitaker wrote:
Could you dynamic link the Cygwin1.dll ?
It is dynamically linked. I gather that Peter is remarking on the "distribution size" (i.e., a 300K executable file and a 900K DLL file must be distributed to implement the program).
Of course, ">1 MB for just 'begin end'" doesn't scale -- one doesn't get a 2 MB program by adding two more statements. In a more typically sized program, the overhead of including large parts of the RTS is significantly less, because much more of the RTS will be used explicitly.
-- Dave
On 26 Jan 2004 at 9:46, Russell Whitaker wrote:
On Mon, 26 Jan 2004, Peter Norton wrote:
Dave,
Thank you - it sounds promissing. I'll play with it tomorrow.
Today tried Cygwin. Yes - binutils are fixed there and files are clear but ... it blows up my foo.pas to more then 1 MB - ~300 KB exe + 960 KB Cygwin1.dll !
1 MB for just "begin end". Brrrr.
Could you dynamic link the Cygwin1.dll ? Just a thought
The DLL *is* dynamically linked to the executables. I think what he meant was that he has to ship the DLL in addition to his executable.
If the program is for your own use on your own system, the size of the Cygwin DLL is a non-issue, since it is already there. Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
On 26 Jan 2004 at 9:46, Russell Whitaker wrote:
Could you dynamic link the Cygwin1.dll ? Just a thought
The DLL *is* dynamically linked to the executables. I think what he meant was that he has to ship the DLL in addition to his executable.
If the program is for your own use on your own system, the size of the Cygwin DLL is a non-issue, since it is already there.
Then I guess the question should be: Could you statically link the Cygwin1 library? :-)
If you're going to distribute a separate copy of the library with each executable anyway, dynamic linking doesn't make much sense.
Frank
On 26 Jan 2004 at 21:38, Frank Heckenbach wrote:
Prof A Olowofoyeku (The African Chief) wrote:
On 26 Jan 2004 at 9:46, Russell Whitaker wrote:
Could you dynamic link the Cygwin1.dll ? Just a thought
The DLL *is* dynamically linked to the executables. I think what he meant was that he has to ship the DLL in addition to his executable.
If the program is for your own use on your own system, the size of the Cygwin DLL is a non-issue, since it is already there.
Then I guess the question should be: Could you statically link the Cygwin1 library? :-)
Not ;-/
If you're going to distribute a separate copy of the library with each executable anyway, dynamic linking doesn't make much sense.
No. However, you would expect that the user might have a Cygwin installation anyway - and if s/he doesn't, then there only needs be one copy of the DLL on the system (assuming there are no version conflicts).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/