[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070728013950.GE15129@stusta.de>
Date: Sat, 28 Jul 2007 03:39:51 +0200
From: Adrian Bunk <bunk@...sta.de>
To: "Luck, Tony" <tony.luck@...el.com>, Sam Ravnborg <sam@...nborg.org>
Cc: Thomas Renninger <trenn@...e.de>, Jan Dittmer <jdi@....org>,
Len Brown <lenb@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-ia64@...r.kernel.org
Subject: scripts/mod/file2alias.c cross compile problem
On Fri, Jul 27, 2007 at 04:21:47PM -0700, Luck, Tony wrote:
> > So it seems on ia64 with gcc 3.3.6 there's some 8 byte alignment of the
> > array members?
> >
> > Sam and the ia64 maintainers Cc'ed - they might know better what's going
> > on here.
>
> This ia64 maintainer is baffled ... but I don't see the problem here (perhaps
> because my build machine has gcc 3.4.6).
I found what causes this problem, and it only occurs during cross
compilation.
The struct is:
#define ACPI_ID_LEN 9
struct acpi_device_id {
__u8 id[ACPI_ID_LEN];
kernel_ulong_t driver_data;
};
When compiling for ia64, this results in:
struct acpi_device_id {
__u8 id[9];
uint64_t driver_data;
};
sizeof(struct acpi_device_id) for ia64 is due to different padding
after id[] 20 bytes on i386 but 24 bytes on ia64.
scripts/mod/file2alias.c is compiled with HOSTCC and ensures that
kernel_ulong_t is correct (in this case uint64_t for ia64), but it can't
cope with different padding on different architectures.
> -Tony
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists