Skip to content

Commit dd02ac0

Browse files
committed
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: #10943 (comment) I fixed this problem using this answer: https://stackoverflow.com/a/37506805/5534993
1 parent 4f7339a commit dd02ac0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/export/makefile/Makefile.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ $(PROJECT).link_script{{link_script_ext}}: $(LINKER_SCRIPT)
135135

136136
{% block target_project_elf %}
137137
$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) {% if pp_cmd -%} $(PROJECT).link_script{{link_script_ext}} {% else%} $(LINKER_SCRIPT) {% endif %}
138-
+@echo "$(filter %.o, $^)" > .link_options.txt
138+
$(file > .link_options.txt,$(filter %.o, $^)
139139
+@echo "link: $(notdir $@)"
140140
@$(LD) $(LD_FLAGS) {{link_script_option}} $(filter-out %.o, $^) $(LIBRARY_PATHS) --output $@ {{response_option}}.link_options.txt $(LIBRARIES) $(LD_SYS_LIBS)
141141
{% endblock %}

0 commit comments

Comments
 (0)