#25 Can't link project with lots of .o files due to windows 8192 byte command line limitation

Version 0.5.4
windows (1)
Colin Peart

Using plug-in 0.5.4, eclipse juno sr2 on Windows 7x64

This isn't a bug really for GNU ARM Eclipse, just a question about working around a limition in windows... Switching to linux is a possibility, but that becomes difficult at work because I would have to host it in a VM and I don't like doing that. So, taking the obvious solution off the table:

I sorted out a problem earlier this week where I couldn't get a project to compile and link because there were too many individual files on the command line for the linker. It turns out that windows has a limitation of 8192 bytes for the command line. I have about 400 small .o files to link, and that quickly uses up that space. If I reduce the length of paths and file names, I can just squeeze it in, if I make my paths and file names shorter, but doing that guarentees me that at some point in the future, this will crop up again.

For GCC on windows, the recommended work around for the 8192 byte limit is to put some or all of the command line options into a text file and use the @file command line option to instruct the tool to read it's options from a text file, rather than the command line. At the moment, using the managed build system, this is not possible.

Ideally, the managed build system could detect long command lines for the linker and other parts of the toolchain, if necessary. When a command line becomes too long, the system would put the list of files to link into a text file and change the generated command line to use @filename. I would rather this happen in the toolchain plugin or higher up -- otherwise I would have to break open Make itself and that is not really a great plan in my mind.

Is it possible to add something to the GNU ARM Eclipse plug-in that could change the generated make file in that way?


  • Liviu Ionescu (ilg)

    At first sight this should be a feature of CDT, so that all plug-ins can benefit from it. GNU ARM Eclipse plug-in does not generate the make files itself, it just provides small bits of information to CDT which aggregates them.

    I don't know your application, but another workaround might be to group some of the files in libraries, and build them separately, as dependent projects.


  • Liviu Ionescu (ilg)

    • status: open --> closed
    • assigned_to: Liviu Ionescu (ilg)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks