From: "Dirk Hörner" <dirker@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/6] hostcc tools: include "compiler.h", fix included headers
Date: Mon, 4 Jun 2012 22:40:17 +0200 [thread overview]
Message-ID: <1338842419-27037-5-git-send-email-dirker@gmail.com> (raw)
In-Reply-To: <1338842419-27037-1-git-send-email-dirker@gmail.com>
When barebox headers get included from HOSTCC tools they should not
include other architecture specific headers as barebox might get
cross-compiled. Instead, the tool itself should include "compiler.h".
Signed-off-by: Dirk Hörner <dirker@gmail.com>
---
include/envfs.h | 2 ++
include/image.h | 2 +-
scripts/bareboxenv.c | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/envfs.h b/include/envfs.h
index b5849d9..67b8902 100644
--- a/include/envfs.h
+++ b/include/envfs.h
@@ -1,7 +1,9 @@
#ifndef _ENVFS_H
#define _ENVFS_H
+#ifdef __BAREBOX__
#include <asm/byteorder.h>
+#endif
#define ENVFS_MAGIC 0x798fba79 /* some random number */
#define ENVFS_INODE_MAGIC 0x67a8c78d
diff --git a/include/image.h b/include/image.h
index 35ff01b..027b5f2 100644
--- a/include/image.h
+++ b/include/image.h
@@ -31,8 +31,8 @@
#ifndef __IMAGE_H__
#define __IMAGE_H__
-#include <linux/types.h>
#ifdef __BAREBOX__
+#include <linux/types.h>
#include <asm/byteorder.h>
#include <stdio.h>
#include <string.h>
diff --git a/scripts/bareboxenv.c b/scripts/bareboxenv.c
index b0d5818..866e345 100644
--- a/scripts/bareboxenv.c
+++ b/scripts/bareboxenv.c
@@ -34,6 +34,8 @@
#include <getopt.h>
#include <libgen.h>
+#include "compiler.h"
+
#define debug(...)
void *xmalloc(size_t size)
--
1.7.10.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-06-04 20:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 20:40 [PATCH 0/6] Support cross-compiling on Mac OS X Dirk Hörner
2012-06-04 20:40 ` [PATCH 1/6] kbuild: Use Elfnn_Half as replacement for Elfnn_Section Dirk Hörner
2012-06-04 20:40 ` [PATCH 2/6] make: use wc -c instead of stat -c%s to get file sizes Dirk Hörner
2012-06-05 2:49 ` Jean-Christophe PLAGNIOL-VILLARD
2012-06-05 19:43 ` Sascha Hauer
2012-06-05 21:15 ` Dirk Hörner
2012-06-04 20:40 ` [PATCH 3/6] make: check for greadlink first, fall back to readlink Dirk Hörner
2012-06-05 8:56 ` Michael Olbrich
2012-06-04 20:40 ` Dirk Hörner [this message]
2012-06-04 20:40 ` [PATCH 5/6] scripts/compiler.h: fixup endianess defines on OS X Dirk Hörner
2012-06-04 20:40 ` [PATCH 6/6] scripts/genenv: always pass template to mktemp Dirk Hörner
2012-06-05 19:42 ` [PATCH 0/6] Support cross-compiling on Mac OS X Sascha Hauer
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=1338842419-27037-5-git-send-email-dirker@gmail.com \
--to=dirker@gmail.com \
--cc=barebox@lists.infradead.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