[2/2] multilib_header: recognize BPF as a target

Message ID 1533834894-4576-2-git-send-email-daniel.diaz@linaro.org
State Accepted
Commit 70b41b3c335a80b4ac243f468f22331d261299db
Headers show
Series
  • [1/2] glibc: Make bits/wordsize.h multilibbed again
Related show

Commit Message

Daniel Díaz Aug. 9, 2018, 5:14 p.m.
When building with `clang -target bpf` using the
multilib_header, a recursion was unavoidable because
bits/wordsize.h would #include itself, still lacking
a definition for __MHWORDSIZE or __WORDSIZE.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
---
 scripts/multilib_header_wrapper.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h
index f516673..9660225 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -22,7 +22,9 @@ 
  */
 
 
-#if defined (__arm__)
+#if defined (__bpf__)
+#define __MHWORDSIZE			64
+#elif defined (__arm__)
 #define __MHWORDSIZE			32
 #elif defined (__aarch64__) && defined ( __LP64__)
 #define __MHWORDSIZE			64