common-mk: gyplint: check for static/shared lib linkage

We build static libs as PIEs with the assumption that they only get
used in standalone programs (which are also PIEs).  This is normally
fine.  But when someone tries to link a static lib into a shared lib,
it can fail due to the slight PIC-vs-PIE differences.  Add a gyplint
check to catch this whenever possible.

BUG=chromium:685313
TEST=gyplint correctly flags hammerd

Change-Id: Ie80aaddf5a0d26675f5413bcedb6672619e4e8b2
Reviewed-on: https://chromium-review.googlesource.com/703414
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2 files changed