diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-24 19:32:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-24 19:32:38 -0700 |
commit | d56dc0b641da647012af573dac4a5fa7b9883fe0 (patch) | |
tree | 7f618b9cbc06e7f4ba1771f7b7ccd370939df3bd /scripts/mod/file2alias.c | |
parent | 266c2e0abeca649fa6667a1a427ad1da507c6375 (diff) | |
parent | 4ce6efed48d736e3384c39ff87bda723e1f8e041 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus:
kbuild: soften modpost checks when doing cross builds
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 9ddf944cce2..348d8687b7c 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -51,11 +51,13 @@ do { \ sprintf(str + strlen(str), "*"); \ } while(0) +unsigned int cross_build = 0; /** * Check that sizeof(device_id type) are consistent with size of section * in .o file. If in-consistent then userspace and kernel does not agree * on actual size which is a bug. * Also verify that the final entry in the table is all zeros. + * Ignore both checks if build host differ from target host and size differs. **/ static void device_id_check(const char *modname, const char *device_id, unsigned long size, unsigned long id_size, @@ -64,6 +66,8 @@ static void device_id_check(const char *modname, const char *device_id, int i; if (size % id_size || size < id_size) { + if (cross_build != 0) + return; fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " "of the size of section __mod_%s_device_table=%lu.\n" "Fix definition of struct %s_device_id " |