mirror of https://github.com/ARMmbed/mbed-os.git
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. Also, change the linker responce file name to .link_options.txt. This is an internal file, not a build artifact.pull/9596/head
parent
a8a21d30a1
commit
6918e6a76b
|
@ -135,9 +135,9 @@ $(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 > $@.in, $(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}}$@.in $(LIBRARIES) $(LD_SYS_LIBS)
|
||||
@$(LD) $(LD_FLAGS) {{link_script_option}} $(filter-out %.o, $^) $(LIBRARY_PATHS) --output $@ {{response_option}}.link_options.txt $(LIBRARIES) $(LD_SYS_LIBS)
|
||||
{% endblock %}
|
||||
|
||||
$(PROJECT).bin: $(PROJECT).elf
|
||||
|
|
Loading…
Reference in New Issue