grub-devel
[Top][All Lists]
Advanced

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

Re: multiboot


From: Yoshinori K. Okuji
Subject: Re: multiboot
Date: Thu, 9 Dec 2004 03:16:04 +0100
User-agent: KMail/1.6.1

On Wednesday 08 December 2004 14:24, Johan Rydberg wrote:
> The initial problem was that AC_CHECK_SIZEOF doesn't work if you're
> cross-compiling.  I fixed this by using AC_COMPILE_CHECK_SIZEOF [1]
> instead.

Ok.

> But the major problem is that parts of GRUB2 requires a C library to
> be installed, at least headers such as alloca.h and stdint.h.  Is
> this really a valid demand?

Why do we use stdint.h? As far as I see, it is used only for 
powerpc-specific code. This should be removed. GRUB must use its own 
types defined in include/grub/types.h.

alloca should not be used. It must be replaced with something else (e.g. 
grub_malloc). Note that alloca requires a C library in some 
architectures.

> Another issue regarding BUILD_CC.  The normal convention is that if
> you want to build something that should run on the build machine, you
> use something similar to BUILD_CC.  That's why I think the following
> patch is self-explaining.

You are right. I didn't notice the bug, because I usually specify CC and 
BUILD_CC manually.

> That brings us the next issue; BUILD_CC is used to build
> _everything_, including the host-specific object files, and since
> BUILD_CC is set to /usr/bin/gcc in my cross-compiler environment it
> will try to compile PPC assembler sources with a i386 compiler.  Not
> good.

Why? Host-specific objects are compiled by CC instead of BUILD_CC.

Okuji




reply via email to

[Prev in Thread] Current Thread [Next in Thread]