scripts/mod/file2alias.c cross compile problem

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Luck, Tony <tony.luck@...>, Sam Ravnborg <sam@...>
Cc: Thomas Renninger <trenn@...>, Jan Dittmer <jdi@...>, Len Brown <lenb@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, <linux-acpi@...>, <linux-kernel@...>, <linux-ia64@...>
Date: Friday, July 27, 2007 - 9:39 pm

On Fri, Jul 27, 2007 at 04:21:47PM -0700, Luck, Tony wrote:


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.



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

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
scripts/mod/file2alias.c cross compile problem, Adrian Bunk, (Fri Jul 27, 9:39 pm)
Re: scripts/mod/file2alias.c cross compile problem, Thomas Renninger, (Thu Aug 2, 11:09 am)
RE: scripts/mod/file2alias.c cross compile problem, Luck, Tony, (Thu Aug 2, 12:25 pm)
RE: scripts/mod/file2alias.c cross compile problem, Rusty Russell, (Thu Aug 2, 6:08 pm)
RE: scripts/mod/file2alias.c cross compile problem, Thomas Renninger, (Thu Aug 16, 10:27 am)
RE: scripts/mod/file2alias.c cross compile problem, Luck, Tony, (Thu Aug 16, 12:26 pm)
RE: scripts/mod/file2alias.c cross compile problem, Thomas Renninger, (Thu Aug 16, 1:03 pm)
Re: scripts/mod/file2alias.c cross compile problem, Adrian Bunk, (Thu Aug 2, 7:03 pm)
Re: scripts/mod/file2alias.c cross compile problem, Andreas Schwab, (Thu Aug 2, 12:36 pm)
RE: scripts/mod/file2alias.c cross compile problem, Luck, Tony, (Thu Aug 2, 1:40 pm)
Re: scripts/mod/file2alias.c cross compile problem, Sam Ravnborg, (Thu Aug 2, 2:09 pm)
Re: scripts/mod/file2alias.c cross compile problem, Adrian Bunk, (Thu Aug 2, 3:15 pm)
Re: scripts/mod/file2alias.c cross compile problem, Sam Ravnborg, (Thu Aug 2, 3:24 pm)