From dd02ac09a18efeed9fd0289f2d3e09101897b204 Mon Sep 17 00:00:00 2001 From: David Hebbeker Date: Wed, 18 Mar 2020 14:40:12 +0100 Subject: [PATCH] Fixed problem with overlong command line. The list of object files was so long, that it got truncated by the bash (git-bash). Error was /usr/bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /usr/bin/sh: -c: line 1: syntax error: unexpected end of file mingw32-make[1]: *** [Makefile:679: mbed-os-example-blinky-baremetal.elf] Error 1 mingw32-make: *** [Makefile:26: all] Error 2 Such a problem has aleady been reported in: https://github.com/ARMmbed/mbed-os/issues/10943#issuecomment-510064805 I fixed this problem using this answer: https://stackoverflow.com/a/37506805/5534993 --- tools/export/makefile/Makefile.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/export/makefile/Makefile.tmpl b/tools/export/makefile/Makefile.tmpl index c62aa95f6b5..87c9f2a8d9d 100644 --- a/tools/export/makefile/Makefile.tmpl +++ b/tools/export/makefile/Makefile.tmpl @@ -135,7 +135,7 @@ $(PROJECT).link_script{{link_script_ext}}: $(LINKER_SCRIPT) {% block target_project_elf %} $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) {% if pp_cmd -%} $(PROJECT).link_script{{link_script_ext}} {% else%} $(LINKER_SCRIPT) {% endif %} - +@echo "$(filter %.o, $^)" > .link_options.txt + $(file > .link_options.txt,$(filter %.o, $^) +@echo "link: $(notdir $@)" @$(LD) $(LD_FLAGS) {{link_script_option}} $(filter-out %.o, $^) $(LIBRARY_PATHS) --output $@ {{response_option}}.link_options.txt $(LIBRARIES) $(LD_SYS_LIBS) {% endblock %}