0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 86b7947156a0c33e768d0a265e38f2881a70a7e2 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Fri, 6 Mar 2020 23:19:37 -0800
  4. Subject: [PATCH] makeinst: Do not undef POSIX on clang/arm
  5. if __arm internal compiler macro is defined then make assumes that the
  6. system is not posix and goes ahead and undefs POSIX, which results in
  7. miscompiling make with clang, since clang does define __arm unlike gcc
  8. which does not, but they both support posix just fine, so here check for
  9. compiler not being clang when __arm is defined before undefining posix
  10. Fixes error like
  11. ../make-4.3/src/job.c:507:27: error: too many arguments to function call, expected 0, have 1
  12. sigsetmask (siggetmask (0) & ~fatal_signal_mask)
  13. ~~~~~~~~~~ ^
  14. Upstream-Status: Pending
  15. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  16. ---
  17. src/makeint.h | 2 +-
  18. 1 file changed, 1 insertion(+), 1 deletion(-)
  19. diff --git a/src/makeint.h b/src/makeint.h
  20. index c428a36..fadf963 100644
  21. --- a/src/makeint.h
  22. +++ b/src/makeint.h
  23. @@ -115,7 +115,7 @@ extern int errno;
  24. #endif
  25. /* Some systems define _POSIX_VERSION but are not really POSIX.1. */
  26. -#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
  27. +#if (defined (butterfly) || (defined (__arm) && !defined(__clang__)) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
  28. # undef POSIX
  29. #endif
  30. --
  31. 2.25.1