You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 KiB

  1. From 6c4a67ece33d9551429490898bb3c793a689e913 Mon Sep 17 00:00:00 2001
  2. From: Colin Watson <cjwatson@debian.org>
  3. Date: Thu, 24 Feb 2022 16:04:18 +0000
  4. Subject: [PATCH] Improve detection of -fzero-call-used-regs=all support
  5. GCC doesn't tell us whether this option is supported unless it runs into
  6. the situation where it would need to emit corresponding code.
  7. ---
  8. m4/openssh.m4 | 3 +++
  9. 1 file changed, 3 insertions(+)
  10. --- a/m4/openssh.m4
  11. +++ b/m4/openssh.m4
  12. @@ -14,6 +14,8 @@ AC_DEFUN([OSSH_CHECK_CFLAG_COMPILE], [{
  13. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
  14. #include <stdlib.h>
  15. #include <stdio.h>
  16. +/* Trivial function to help test for -fzero-call-used-regs */
  17. +void f(int n) {}
  18. int main(int argc, char **argv) {
  19. (void)argv;
  20. /* Some math to catch -ftrapv problems in the toolchain */
  21. @@ -21,6 +23,7 @@ int main(int argc, char **argv) {
  22. float l = i * 2.1;
  23. double m = l / 0.5;
  24. long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
  25. + f(0);
  26. printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
  27. /*
  28. * Test fallthrough behaviour. clang 10's -Wimplicit-fallthrough does