Fix -nopie/-nopie check.
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 30 Jan 2017 13:38:50 +0000 (14:38 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 30 Jan 2017 18:38:55 +0000 (19:38 +0100)
commitb53f595b3ed989335d7cd1618a5502270cdb26de
treed13c66011f3f6aed72751e612fbf151e5593df72
parent6371e9c10433578bb236a8284ddb9ce9e201eb59
Fix -nopie/-nopie check.

We don't use lgcc_s but missing lgcc_s or another library cause test to fail.
So use -nostdlib.
We need to use -Werror to avoid warning-generated case to be accepted.
Clang uses -nopie rather than -no-pie. Check both and use whichever one works.
Additionally android clang passes -pie to the linker even though it doesn't
define __PIE__. So if compilation without no-pie logic fails add -nopie/-no-pie
even if __PIE__ is not defined.
acinclude.m4
configure.ac