build: fix binary-link with ld.gold linker
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 8 Mar 2013 16:04:05 +0000 (17:04 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Fri, 8 Mar 2013 16:04:05 +0000 (17:04 +0100)
commitaeddc5b5528a6308db70b13c54dfae4c5d47cc1f
treeb00baf11b09ad1358380fb092e7e8e215eb794f5
parente1344b5691e56167176e8c0c6d4d2081ddb765e2
build: fix binary-link with ld.gold linker

The ld.gold linker doesn't provide --format=default but needs --format=elf
instead. However, this doesn't work with ld.bfd. To avoid any linker
detection, we now link any binary file via partial-linking into a proper
object file itself and then link this object file in the final linking
step.
This also produces a fake libtool *.lo file so the libtool linking command
doesn't complain about PIC/non-PIC problems.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Makefile.am