[BUG] openssh portable configure script disrespects/mispositions user's LDFLAGS
John Spencer
maillist-openssh at barfooze.de
Mon Nov 3 10:51:34 EST 2014
hello. when trying to add a custom -l flag thats needed for my setup, i
noticed that
1) openssh's configure script ignores LDFLAGS passed via environment
variables. this is contrary to the expectation of the user and to the
behaviour of 99% of autoconf based packages.
2) the LDFLAGS passed via the special --with-ldflags options are not
used in the last place on the command line, rendering any -l flags
passed unfunctional, because the .c file is passed as last element. that
way user passed libraries cannot satisfy missing link dependencies
because for static libraries the order on the command line is crucial.
example: if i use
--with-ldflags=-lfoo
the configure tests will look like
gcc -lfoo conftest.c and thus references of conftest.c to symbols in
libfoo.a not satisfied.
that makes it impossible to feed missing libraries manually into the
build process without patching the configure script. (in my case the
library i want to inject into the build process is related to the stack
protector feature of gcc, but there are plenty of other uses, for
example when trying to use a static linked openssl/libressl which
depends on libz.a or similar).
--JS
More information about the openssh-unix-dev
mailing list