$(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 6918e6a76b)
Revert "Fixed problem with overlong command line."
This reverts commit dd02ac09a1.
See also https://github.com/ARMmbed/mbed-os/pull/12646#issuecomment-602058273
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
$(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.
It seem to preprocess asm with the `.S` extension on linux, but the
windows build of Arm Compiler 5 seems to omit the preprocessing step
unless you have a `.sx` extension. Odd.
For toolchains that do not implicitly run the C pre-processor on their
linker scripts the toolchain is expected to define a `preproc`
attribute. The Makefiles then pick up on this attribute and add another
rule for pre-processing the linker script automatically.