On Thu, Jun 07, 2018 at 06:14:42PM -0700, PGNet Dev wrote: > On 6/7/18 6:08 PM, Darren Tucker wrote: > > Well the intent is you should be able to set CC and LD to whatever you > > want as long as they work. In this case, the OSSH_CHECK_LDFLAG_LINK > > test invokes autoconf's AC_LINK_IFELSE with uses CC not LD. I'm not > > sure what to do about it yet though. I don't see a way to get AC_LINK_IFELSE to use $LD rather than $CC, but I think we can prevent this problem by detecting the unsupported option earlier. Please try this diff. It should also prevent the warnings in the LD=gcc case. (Note you will need to run "autoreconf" to rebuild configure after applying it, then run ./configure.) diff --git a/aclocal.m4 b/aclocal.m4 index ac6b6684..8b4ba126 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -25,14 +25,14 @@ 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" else AC_MSG_RESULT([yes]) CFLAGS="$saved_CFLAGS $_define_flag" -fi], +fi ], [ 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" ] ) -- Darren Tucker (dtucker at dtucker.net) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement. _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev