(OK) Android 5+ —— error: only position independent executables (PIE) are supported.
CFLAGS += -fPIE
LDFLAGS += -fPIE -pie
such as:
export CFLAGS="-I/softdev/arm-libs/include -fPIE"
export CPPLAGS="$CPPFLAGS -fPIE"
export CXXLAGS="$CXXFLAGS -fPIE"
export LDFLAGS="-L/softdev/arm-libs/lib -static -fPIE -pie"