All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH TRIVIAL v2] Avoid conflict with host definitions when cross-compiling
@ 2015-08-14 10:52 Pavel Fedin
  2015-08-20 11:31 ` Michal Marek
  0 siblings, 1 reply; 13+ messages in thread
From: Pavel Fedin @ 2015-08-14 10:52 UTC (permalink / raw)
  To: linux-kbuild; +Cc: trivial, mmarek

Certain platforms (e. g. BSD-based ones) define some ELF constants
according to host. This patch fixes problems with cross-building
Linux kernel on these platforms (e. g. building ARM 32-bit version
on x86-64 host).

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
---
v1 => v2
- Replaced "Cygwin" with "BSD-alike OS-es"
---
 scripts/mod/modpost.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index 168b43d..6a5e151 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -11,6 +11,12 @@
 
 #include "elfconfig.h"
 
+/* On BSD-alike OSes elf.h defines these according to host's word size */
+#undef ELF_ST_BIND
+#undef ELF_ST_TYPE
+#undef ELF_R_SYM
+#undef ELF_R_TYPE
+
 #if KERNEL_ELFCLASS == ELFCLASS32
 
 #define Elf_Ehdr    Elf32_Ehdr
-- 
2.4.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-25  9:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 10:52 [PATCH TRIVIAL v2] Avoid conflict with host definitions when cross-compiling Pavel Fedin
2015-08-20 11:31 ` Michal Marek
2015-08-20 12:31   ` Pavel Fedin
2015-08-20 12:38     ` Michal Marek
2015-08-20 13:18       ` Pavel Fedin
2015-08-21 12:49         ` Michal Marek
2015-08-24  6:44           ` Pavel Fedin
2015-08-24 16:36   ` Masahiro Yamada
2015-08-25  7:47     ` Pavel Fedin
2015-08-25  8:18       ` Masahiro Yamada
2015-08-25  9:27         ` Pavel Fedin
2015-08-25  9:56         ` Michal Marek
2015-08-25  9:59           ` Pavel Fedin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.