[lkml]   [2007]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectscripts/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

    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



    "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
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-07-28 03:43    [W:0.020 / U:39.412 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site