This also occurs when OpenSSL is added and this is what we did to work around it:
[Object-File]
<InputFile>
*.obj
*.o
<OutputFile>
$(OUTPUT_DIR)(+)$(MODULE_NAME).lib
<Command.MSFT, Command.INTEL>
"$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST)
<Command.GCC>
"$(SLINK)" -cr ${dst} $(SLINK_FLAGS) @$(OBJECT_FILES_LIST)
<Command.RVCT, Command.WINRVCT>
"$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
<Command.RVCTCYGWIN, Command.ARMGCC, Command.ARMLINUXGCC, Command.WINGCC, Command.ARM>
#
# The original workaround for this...
# "$(OBJECT_FILES_LIST) has wrong paths for cygwin"
# ...was to use the $(OBJECT_FILES) inline.
# "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)
# However, when OpenSSL is included the resultant command line passed to AR is
# ~75Kb and AR fails to invoke with a command line this large.
# Therefore, instead we post process the object file list into the right form
# for AR (swapping the path separators) and pass the object list as a file.
#
sed "s:\\:/:g" $(OBJECT_FILES_LIST) > $(OBJECT_FILES_LIST).unix
"$(SLINK)" $(SLINK_FLAGS) ${dst} @$(OBJECT_FILES_LIST).unix
<Command.XCODE>
"$(SLINK)" $(SLINK_FLAGS) ${dst} -filelist $(OBJECT_FILES_LIST)
Regards,
Paul.
From: linaro-uefi-bounces@lists.linaro.org [mailto:linaro-uefi-bounces@lists.linaro.org]
On Behalf Of Jianning Wang
Sent: Tuesday, February 17, 2015 1:39 PM
To: linaro-uefi@lists.linaro.org
Cc: Daniel Samuelraj
Subject: [Linaro-uefi] "aarch64-none-elf-ar" has command line string size limit??
Hi,
I am working on compile a UEFI project for AARCH64 platform on a Windows 7 machince using the following toolchain.
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".
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?
Thanks
Jianning