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
pull/12646/head
David Hebbeker 2020-03-18 14:40:12 +01:00
parent 4f7339af78
commit dd02ac09a1
No known key found for this signature in database
GPG Key ID: 44067CC2C74FA380
1 changed files with 1 additions and 1 deletions

View File

@ -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 %}