diff options
author | Colin Watson <cjwatson@debian.org> | 2022-02-24 17:04:18 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-02-25 01:24:04 +0100 |
commit | f107467179428a0e3ea9e4aa9738ac12ff02822d (patch) | |
tree | 79800afa7c69e471da3756cb92102a22f03d3e0e /m4/openssh.m4 | |
parent | upstream: free(3) wants stdlib.h (diff) | |
download | openssh-f107467179428a0e3ea9e4aa9738ac12ff02822d.tar.xz openssh-f107467179428a0e3ea9e4aa9738ac12ff02822d.zip |
Improve detection of -fzero-call-used-regs=all support
GCC doesn't tell us whether this option is supported unless it runs into
the situation where it would need to emit corresponding code.
Diffstat (limited to '')
-rw-r--r-- | m4/openssh.m4 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/m4/openssh.m4 b/m4/openssh.m4 index 4f9c3792d..8c33c701b 100644 --- a/m4/openssh.m4 +++ b/m4/openssh.m4 @@ -14,6 +14,8 @@ AC_DEFUN([OSSH_CHECK_CFLAG_COMPILE], [{ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include <stdlib.h> #include <stdio.h> +/* Trivial function to help test for -fzero-call-used-regs */ +void f(int n) {} int main(int argc, char **argv) { (void)argv; /* Some math to catch -ftrapv problems in the toolchain */ @@ -21,6 +23,7 @@ int main(int argc, char **argv) { float l = i * 2.1; double m = l / 0.5; long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; + f(0); printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); /* * Test fallthrough behaviour. clang 10's -Wimplicit-fallthrough does |