This problem is still around after Juan's Makefile reorganizations.
Before, I had provided two alternative patches:
* The first version wrote the list of libqemu_common.a's and
$(HWLIB)'s object files into a text file from Makefile[.hw] that was
later read in Makefile.target.
* The second version was using dedicated Makefile[.hw] targets for
printing the object files to stdout for use by Makefile.target,
avoiding the need to write an intermediate file.
Avi had preferred a variation of the first version for reduced
complexity.
Other ideas that crossed my mind were:
* using GNU ld directly instead of gcc for linking (broken by -Wl and
some other LDFLAGS)