If the output of gcc is passed to stdout, the prints from cblink will be included in the final output. This caused issues when the generated dependency rules were wrongly formatted due to the extra prints from cblink.
The code below would have this issue if it was called with cblink instead of a regular call.
> $(CXX) -M $(CFLAGS) $(INCLUDES) *.cc services/*.cc xmlrpc++/src/*.cpp > Makefile.dep
Some possible solutions could be by using stderr instead, or adding different handling depending on how the command is called.
The error below was seen when building 'feh' (as part of bug 3054). The issue was worked around by building file deps.mk separately before building the whole project.
> 13:15:57 [linma@linma tlmisc]$ cbrun x86_64 make feh
> CBLINK_BINSTATIC="Imlib2 Xcb" CBLINK_ADD="-lXext -lxcb -ldl -lXau -lXdmcp -lfreetype" \
> make -C feh magic=0 \
> LDFLAGS="-g" \
> CC="cblink --as-needed --disable-rpath gcc"
> make: Entering directory `/local/home/linma/thinlinc-git/ctc/tlmisc/feh'
> make: Entering directory `/local/home/linma/thinlinc-git/ctc/tlmisc/feh/src'
> deps.mk:1: *** target pattern contains no `%'. Stop.
> make: Leaving directory `/local/home/linma/thinlinc-git/ctc/tlmisc/feh/src'
> make: *** [build-src] Error 2