Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
| 6 | if __arm internal compiler macro is defined then make assumes that the |
| 7 | system is not posix and goes ahead and undefs POSIX, which results in |
| 8 | miscompiling make with clang, since clang does define __arm unlike gcc |
| 9 | which does not, but they both support posix just fine, so here check for |
| 10 | compiler not being clang when __arm is defined before undefining posix |
| 11 | |
| 12 | Fixes 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 | |
| 17 | Upstream-Status: Pending |
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 19 | --- |
| 20 | src/makeint.h | 2 +- |
| 21 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 22 | |
| 23 | diff --git a/src/makeint.h b/src/makeint.h |
| 24 | index 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 | -- |
| 37 | 2.25.1 |
| 38 | |