From 26043e5ee4f4d44d732ee921b5fd5f6fb9422d86 Mon Sep 17 00:00:00 2001 From: Volodymyr Medvid Date: Mon, 4 Feb 2019 20:10:39 +0200 Subject: [PATCH] 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 6918e6a76b7ab3e0e7b4f89319ea39d3dad0972b) Revert "Fixed problem with overlong command line." This reverts commit dd02ac09a18efeed9fd0289f2d3e09101897b204. See also https://github.com/ARMmbed/mbed-os/pull/12646#issuecomment-602058273 --- 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 87c9f2a8d9d..c62aa95f6b5 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 %} - $(file > .link_options.txt,$(filter %.o, $^) + +@echo "$(filter %.o, $^)" > .link_options.txt +@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 %}