From: John Levon <levon@movementarian.org>
Subject: [PATCH 03/18] sparse: lib.c should handle being built 32-bit, compiling 64-bit, on x86.
Date: Wed, 21 Nov 2018 18:08:45 +0000 [thread overview]
Message-ID: <E1gQCRW-00067W-NW@movementarian.org> (raw)
Signed-off-by: John Levon <levon@movementarian.org>
---
lib.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib.c b/lib.c
index be71e5b3..f20e0885 100644
--- a/lib.c
+++ b/lib.c
@@ -440,6 +440,10 @@ static void handle_arch_m64_finalize(void)
switch (arch_m64) {
case ARCH_LP32:
/* default values */
+#if defined(__x86_64__) || defined (__i386)
+ add_pre_buffer("#weak_define __i386__ 1\n");
+ add_pre_buffer("#weak_define __i386 1\n");
+#endif
return;
case ARCH_LP64:
bits_in_long = 64;
@@ -459,7 +463,7 @@ static void handle_arch_m64_finalize(void)
case_64bit_common:
bits_in_pointer = 64;
pointer_alignment = 8;
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined (__i386)
add_pre_buffer("#weak_define __x86_64__ 1\n");
add_pre_buffer("#weak_define __x86_64 1\n");
#endif
--
2.14.1
reply other threads:[~2018-11-24 1:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1gQCRW-00067W-NW@movementarian.org \
--to=levon@movementarian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).