summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ruby/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby')
-rw-r--r--meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch b/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch
new file mode 100644
index 0000000000..a1e6330445
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch
@@ -0,0 +1,26 @@
1Filter out __has_include* compiler defines
2
3They are internal to compiler and this header is later on includes in C
4files, but newer gcc >= 10 complains about it.
5
6error in initial header file:
7| In file included from /tmp/20200124-86625-14hiju4.c:1:
8| /tmp/20200124-86625-11y6l6i.h:13849:9: error: "__has_include" cannot be used as a macro name
9| 13849 | #define __has_include __has_include
10| | ^~~~~~~~~~~~~
11| compilation terminated due to -Wfatal-errors.
12
13Upstream-Status: Pending
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15
16--- a/common.mk
17+++ b/common.mk
18@@ -221,6 +221,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT
19 $(TIMESTAMPDIR)/$(arch)/.time
20 $(ECHO) building $(@F:.time=.h)
21 $(Q) $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new
22+ $(Q)sed -i -e "/#define __has_include __has_include/d" $(@F:.time=.h).new
23+ $(Q)sed -i -e "/#define __has_include_next __has_include_next/d" $(@F:.time=.h).new
24 $(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.h) $(@F:.time=.h).new
25
26 $(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h: $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time