[openssh-commits] [openssh] 01/02: Give configure ability to set CFLAGS/LDFLAGS later
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Sep 8 12:46:04 AEST 2017
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit de35c382894964a896a63ecd5607d3a3b93af75d
Author: Damien Miller <djm at mindrot.org>
Date: Fri Sep 8 12:38:31 2017 +1000
Give configure ability to set CFLAGS/LDFLAGS later
Some CFLAGS/LDFLAGS may disrupt the configure script's operation,
in particular santization and fuzzer options that break assumptions
about memory and file descriptor dispositions.
This adds two flags to configure --with-cflags-after and
--with-ldflags-after that allow specifying additional compiler and
linker options that are added to the resultant Makefiles but not
used in the configure run itself.
E.g.
env CC=clang-3.9 ./configure \
--with-cflags-after=-fsantize=address \
--with-ldflags-after="-g -fsanitize=address"
---
configure.ac | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/configure.ac b/configure.ac
index 9094cf04..522f54b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -289,6 +289,16 @@ AC_ARG_WITH([cflags],
fi
]
)
+
+AC_ARG_WITH([cflags-after],
+ [ --with-cflags-after Specify additional flags to pass to compiler after configure],
+ [
+ if test -n "$withval" && test "x$withval" != "xno" && \
+ test "x${withval}" != "xyes"; then
+ CFLAGS_AFTER="$withval"
+ fi
+ ]
+)
AC_ARG_WITH([cppflags],
[ --with-cppflags Specify additional flags to pass to preprocessor] ,
[
@@ -307,6 +317,15 @@ AC_ARG_WITH([ldflags],
fi
]
)
+AC_ARG_WITH([ldflags-after],
+ [ --with-ldflags-after Specify additional flags to pass to linker after configure],
+ [
+ if test -n "$withval" && test "x$withval" != "xno" && \
+ test "x${withval}" != "xyes"; then
+ LDFLAGS_AFTER="$withval"
+ fi
+ ]
+)
AC_ARG_WITH([libs],
[ --with-libs Specify additional libraries to link with],
[
@@ -5022,6 +5041,9 @@ AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8])
AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
+CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
+LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
+
AC_EXEEXT
AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
openbsd-compat/Makefile openbsd-compat/regress/Makefile \
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list