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:20:32 +0000
commite225278a8a894389add56d14908398c14512f6c9 (patch)
treece42125e5401ebd8ed543ffef2d6abba50bcf866 /meta/recipes-devtools/make
parent57fcf9b517fe95e871122946cb99fe7fa9fd2e26 (diff)
downloadopenembedded-core-contrib-e225278a8a894389add56d14908398c14512f6c9.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 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 @@
+From 86b7947156a0c33e768d0a265e38f2881a70a7e2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 6 Mar 2020 23:19:37 -0800
+Subject: [PATCH] makeinst: Do not undef POSIX on clang/arm
+
+if __arm internal compiler macro is defined then make assumes that the
+system is not posix and goes ahead and undefs POSIX, which results in
+miscompiling make with clang, since clang does define __arm unlike gcc
+which does not, but they both support posix just fine, so here check for
+compiler not being clang when __arm is defined before undefining posix
+
+Fixes error like
+../make-4.3/src/job.c:507:27: error: too many arguments to function call, expected 0, have 1
+ sigsetmask (siggetmask (0) & ~fatal_signal_mask)
+ ~~~~~~~~~~ ^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/makeint.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/makeint.h b/src/makeint.h
+index c428a36..fadf963 100644
+--- a/src/makeint.h
++++ b/src/makeint.h
+@@ -115,7 +115,7 @@ extern int errno;
+ #endif
+
+ /* Some systems define _POSIX_VERSION but are not really POSIX.1. */
+-#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
++#if (defined (butterfly) || (defined (__arm) && !defined(__clang__)) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
+ # undef POSIX
+ #endif
+
+--
+2.25.1
+
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 += "\
file://0001-src-dir.c-fix-buffer-overflow-warning.patch \
file://0002-w32-compat-dirent.c-follow-header.patch \
file://0003-posixfcn-fcntl-gnulib-make-emulated.patch \
+ file://0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch \
"
EXTRA_OECONF += "--without-guile"