[oe-commits] [openembedded-core] 02/09: ruby: Remove __has_include and __has_include_next from preprocessed header file
git at git.openembedded.org
git at git.openembedded.org
Sun Jan 26 17:55:58 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9869ed580f9dd88f0a8c6baa1a80dd4555a8a190
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Thu Jan 23 12:00:39 2020 -0800
ruby: Remove __has_include and __has_include_next from preprocessed header file
one of the build steps ruby has is that it generated rb_mjit_header.h
during configure using gcc preprocessor using -dD which emits built-in
defines as well, problem happens when this header is later included in
subsequent compiles, where compiler errors out stating that an existing
internal define is redefined
| /tmp/20200123-2021083-2c601q.h:13849:9: error: "__has_include" cannot be used as a macro name
| 13849 | #define __has_include __has_include
| | ^~~~~~~~~~~~~
| compilation terminated due to -Wfatal-errors.
Since compiler already will take care of it internally we can edit it
out from this header file
Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-devtools/ruby/ruby.inc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc
index ce1b02f..d5cd329 100644
--- a/meta/recipes-devtools/ruby/ruby.inc
+++ b/meta/recipes-devtools/ruby/ruby.inc
@@ -38,3 +38,10 @@ do_configure_prepend() {
sed -i "s#%%TARGET_CFLAGS%%#$CFLAGS#; s#%%TARGET_LDFLAGS%%#$LDFLAGS#" ${S}/common.mk
rm -rf ${S}/ruby/
}
+
+do_compile_prepend() {
+ if [ -e ${B}/rb_mjit_header.h ]; then
+ sed -i -e "/#define __has_include __has_include/d" ${B}/rb_mjit_header.h
+ sed -i -e "/#define __has_include_next __has_include_next/d" ${B}/rb_mjit_header.h
+ fi
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list