FYI - cross building on Cygwin works for multiple arches with only one hack to kbuild

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been working with cross compilers and portable tool chains. To flush out hidden assumptions I sometimes build in environments like Solaris and Cygwin as well as on Linux. I recently got 22 different gcc cross compilers and associated binutils etc. to build on Cygwin so I gave a try building kernel defconfigs for most of the arches. To my pleasant surprise, I was able to successfully build vmlinux in 10 cases while only having to make one (1) hack on the kernel build system. Kudos to the kbuild support!

The only problem was that the Cygwin /usr/include/elf.h file used in scripts/mod/modpost.h is lacking a few arch specific symbols and redefines a few other symbols. But, by adding these and ignoring the redefines I got variable numbers of section mismatches on different arches so mod post was apparently not too unhappy with the hack.

Is it worth trying to use the linux/elf.h or otherwise work round the Cygwin elf.h? If I remember correctly Solaris had similar problems last time I tried it, but that port is not building right now because of other problems so I can't easily test it right now. I'd be glad to hack on and/or try stuff if it's worth while and someone can point me in the right direction. I'm not currently subscribed so please include in on reply.

Steve Kenton


#define R_386_32           1            /* Direct 32 bit  */
#define R_386_PC32         2            /* PC relative 32 bit */
#define R_386_32PLT        11
#define R_MIPS_32               2       /* Direct 32 bit */
#define R_MIPS_26               4       /* Direct 26 bit shifted */
#define R_MIPS_HI16             5       /* High 16 bit */
#define R_MIPS_LO16             6       /* Low 16 bit */
#define R_ARM_PC24              1       /* PC relative 26 bit branch */
#define R_ARM_ABS32             2       /* Direct 32 bit  */

WARNING: modpost: Found 7 section mismatch(es).
WARNING: modpost: Found 4 section mismatch(es).
WARNING: modpost: Found 37 section mismatch(es).
WARNING: modpost: Found 1 section mismatch(es).
WARNING: modpost: Found 19 section mismatch(es).
WARNING: modpost: Found 12 section mismatch(es).
WARNING: modpost: Found 1 section mismatch(es).
WARNING: modpost: Found 3 section mismatch(es).
WARNING: modpost: Found 18 section mismatch(es).
WARNING: modpost: Found 25 section mismatch(es).
WARNING: modpost: Found 3 section mismatch(es).



--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux