[patch] Workaround for ar and ld for Windows cmdline length restriction

Esa Ilari Vuokko eivuokko at gmail.com
Mon May 8 21:35:10 EDT 2006


I have prepared a patch that works around Windows 32k command line
length restriction when invoking ar and ld, this makes using
ghc's split-objs possible in practice.

Tue May  9 04:15:32 FLE Daylight Time 2006  Esa Ilari Vuokko
<ei at vuokko.info>
  * Workaround for ar and ld for Windows cmdline length restriction

There is no guarantee that algorithm works, ideally I should
cut the lines at 32k, but instead I just call ar/ld for each one
hundred files.  Ld's case is a bit more complicated, with temp

Algorithms aren't perfect, but I think they fit practically all
packages out there (who has path to object file longer than
320+ characters, and hundred more?)

Better solution would be to use ar's and ld's @file-functionality,
but this isn't available in mingw's stable (or whatever) binutils
yet, and of course builds for 6.4.x series will never have them, so
it'd need ar/ld version checking which isn't totally trivial to add.

Best regards,

PS. Please CC me on replies as I am not subscribed.
PSS. It seems to me that indentation in source has both tabs and
  spaces.  That feels risky.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cabal-workaround-windows-32k-cmdline.gz
Type: application/gzip
Size: 5807 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/cabal-devel/attachments/20060509/9aaad686/cabal-workaround-windows-32k-cmdline.bin

More information about the cabal-devel mailing list