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