summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/make
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-03-06 23:29:04 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-08 08:21:11 +0000
commit09e1c01162c2faa204f3b7f9abf6f7b1c4e9274c (patch)
tree8f8dcb3f6afca00e3d9c11636809a039d129c4a5 /meta/recipes-devtools/make
parent0bbf04fa3e98068bfab3a91e84f145201de2a28f (diff)
downloadpoky-09e1c01162c2faa204f3b7f9abf6f7b1c4e9274c.tar.gz
make: Fix build on arm/clang
clang defines __arm which is interpreted as non-posix by make build system but thats not correct when using clang so patch addresses that (From OE-Core rev: e225278a8a894389add56d14908398c14512f6c9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/make')
-rw-r--r--meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch38
-rw-r--r--meta/recipes-devtools/make/make_4.3.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch b/meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch
new file mode 100644
index 0000000000..2da7c983dc
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch
@@ -0,0 +1,38 @@
1From 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
diff --git a/meta/recipes-devtools/make/make_4.3.bb b/meta/recipes-devtools/make/make_4.3.bb
index cd0ecd4df2..3e0eb543ba 100644
--- a/meta/recipes-devtools/make/make_4.3.bb
+++ b/meta/recipes-devtools/make/make_4.3.bb
@@ -8,6 +8,7 @@ SRC_URI += "\
8 file://0001-src-dir.c-fix-buffer-overflow-warning.patch \ 8 file://0001-src-dir.c-fix-buffer-overflow-warning.patch \
9 file://0002-w32-compat-dirent.c-follow-header.patch \ 9 file://0002-w32-compat-dirent.c-follow-header.patch \
10 file://0003-posixfcn-fcntl-gnulib-make-emulated.patch \ 10 file://0003-posixfcn-fcntl-gnulib-make-emulated.patch \
11 file://0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch \
11" 12"
12 13
13EXTRA_OECONF += "--without-guile" 14EXTRA_OECONF += "--without-guile"