On 02/17/2015 03:04 PM, Leif Lindholm wrote:
On Tue, Feb 17, 2015 at 04:39:22PM -0500, Jianning Wang wrote:
I am working on compile a UEFI project for AARCH64 platform on a Windows 7 machince using the following toolchain.
http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-aa...
Now everything compiles except the last step of using "aarch64-none-elf-ar". We have about 100 obj files (say from OBJ#001 to OBJ#100) and "aarch64-none-elf-ar" reported "OBJ#50 file is missing".
Any chance of showing us the build system - how you are ending up with this long a command line?
It seems to me that "aarch64-none-elf-ar" has a limit of the command line string size.I tried to shorten the directory name (and file name), the situation got improved a little bit, now "aarch64-none-elf-ar" reports ""OBJ#85 is missing".
Does anyone is there a such limit and how could we circumvent this problem?
I think the limit you are encountering is in that of Windows, not of the cross compiler.
Agreed; this limit is not in the cross-compiler but in the Windows command line.
The workarounds I could suggest would be to either build on Linux, or trying under a Unix-like environment like cygwin or mingw.
But I'm thinking there could be modifications done to your build system that would resolve this.
/ Leif
Tricks I've used in the past are to just break up the command line, and keep appending objects to the library -- e.g., a whole series of steps invoking "aarch64-none-elf-ar r".
Sometimes, using "aarch64-none-elf-ar @file" will let you put a long list of file names in the file instead.
Or, depending on where you are in the linking process, some combination of "aarch64-none-elf-ld -r" steps can be used to build up the .o you're trying to get to.