Skip to content

Commit 26043e5

Browse files
vmedcydhebbeker
authored andcommitted
makefile export: create .link_options.txt with echo
$(file > $@.in, $(filter %.o, $^)) is not supported in GNU Make 3.81. Create the linker response file with pipe redirect from echo command. This is tested with Cygwin make and make 3.8.1 shipped with macOS. (cherry picked from commit 6918e6a) Revert "Fixed problem with overlong command line." This reverts commit dd02ac0. See also #12646 (comment)
1 parent 59540ed commit 26043e5

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-
$(file > .link_options.txt,$(filter %.o, $^)
138+
+@echo "$(filter %.o, $^)" > .link_options.txt
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)