diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-06-08 13:55:59 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-06-08 13:55:59 +1000 |
commit | e1542a80797b4ea40a91d2896efdcc76a57056d2 (patch) | |
tree | d0f2edc4e8557f26152e3e5e6c8ecb4e3c17f969 /aclocal.m4 | |
parent | 57379dbd013ad32ee3f9989bf5f5741065428360 (diff) | |
download | openssh-git-e1542a80797b4ea40a91d2896efdcc76a57056d2.tar.gz |
Better detection of unsupported compiler options.
Should prevent "unsupported -Wl,-z,retpoline" warnings during linking.
ok djm@
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -25,7 +25,7 @@ int main(int argc, char **argv) { } ]])], [ -if `grep -i "unrecognized option" conftest.err >/dev/null` +if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null then AC_MSG_RESULT([no]) CFLAGS="$saved_CFLAGS" @@ -63,7 +63,7 @@ int main(int argc, char **argv) { } ]])], [ -if `grep -i "unrecognized option" conftest.err >/dev/null` +if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null then AC_MSG_RESULT([no]) CFLAGS="$saved_CFLAGS" @@ -100,8 +100,15 @@ int main(int argc, char **argv) { exit(0); } ]])], - [ AC_MSG_RESULT([yes]) - LDFLAGS="$saved_LDFLAGS $_define_flag"], + [ +if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null +then + AC_MSG_RESULT([no]) + LDFLAGS="$saved_LDFLAGS" +else + AC_MSG_RESULT([yes]) + LDFLAGS="$saved_LDFLAGS $_define_flag" +fi ], [ AC_MSG_RESULT([no]) LDFLAGS="$saved_LDFLAGS" ] ) |