On Fri, Jul 18, 2008 at 1:38 PM, Pavel Roskin <[EMAIL PROTECTED]> wrote: > Hello, Bean! > > I think this change from the x86_64 EFI patch should be reverted: > > * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to > GRUB_TARGET_SIZEOF_VOID_P. > > It causes warnings when compiling grub-emu on x64_64 for i386: > > kern/dl.c: In function 'grub_dl_resolve_symbols': > kern/dl.c:357: warning: cast from pointer to integer of different size > kern/dl.c:368: warning: cast from pointer to integer of different size > kern/dl.c:370: warning: cast to pointer from integer of different size > kern/dl.c:376: warning: cast from pointer to integer of different size > kern/dl.c:378: warning: cast to pointer from integer of different size > kern/dl.c:382: warning: cast to pointer from integer of different size > kern/dl.c:384: warning: cast to pointer from integer of different size > kern/dl.c:389: warning: cast from pointer to integer of different size > > I'm really close to eliminating all warnings, and such additions are not > making me happy. > > The warnings could be suppressed somehow, but I don't think it's the right > thing to do. 64-bit grub-emu cannot load 32-bit modules (and vice versa). > 64-bit grub-emu could load 64-bit modules in principle, although we don't > compile them. We could compile special grub-emu modules, but I would not > spend any serious effort on it. > > Anyway, I would prefer that we compile support for loading 64-bit modules > and possibly catch some useful warnings relevant to 64-bit platforms (even > if our target is 32-bit). It's better than to "implement" > cross-architecture loading of modules that would not work anyway by filling > the code with casts. It's better than to tolerate several warnings. Either > increases the risk that a real warning would be missed.
Hi, This is used for cross complication. For example, when we compile x86_64-efi in i386, the host system is i386, but target system is 64-bit. I have been compiling the efi image using this method, there is no problem. As for grub-emu, does it matter if we can't load external modules ? The import module are all static linked. Besides, some of the modules depend on real mode component, so we can't load them anyway. -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel