[coreboot] [PATCH]unify types in kconfig

Cristi Magherusan Cristi.Magherusan at net.utcluj.ro
Wed Aug 26 10:01:49 CEST 2009


On Tue, 2009-08-25 at 15:41 -0600, Myles Watson wrote:
> On Tue, Aug 25, 2009 at 12:41 PM, Myles Watson<mylesgw at gmail.com> wrote:
> > On Tue, Aug 25, 2009 at 11:37 AM, ron minnich<rminnich at gmail.com> wrote:
> >> On Tue, Aug 25, 2009 at 10:14 AM, Uwe Hermann<uwe at hermann-uwe.de> wrote:
> >>
> >>> Hm, you could be right. This was per-mainboard in Config.lb, but in
> >>> kconfig it should be a global/common option, and not set in each board.
> >>
> >> yes, we really need to start using the power of Kconfig now. Let's
> >> make it so people can choose this in menuconfig.
> >
>  Here's another attempt.
>  Signed-off-by: Myles Watson <mylesgw at gmail.com>
> 
>   It doesn't link.  The errors I'm getting look familiar, but the past
> solution isn't working for me:
>     CC         coreboot_ram
> /home/myles/try/buildrom-devel/work/coreboot/svn/build/coreboot_ram.o:
> In function `div_long':
> (.text+0x11c79): undefined reference to `__umoddi3'
> /home/myles/try/buildrom-devel/work/coreboot/svn/build/coreboot_ram.o:
> In function `div_long':
> (.text+0x11c92): undefined reference to `__udivdi3'
> /home/myles/try/buildrom-devel/work/coreboot/svn/build/coreboot_ram.o:
> In function `idiv_long':
> (.text+0x11dca): undefined reference to `__moddi3'
> /home/myles/try/buildrom-devel/work/coreboot/svn/build/coreboot_ram.o:
> In function `idiv_long':
> (.text+0x11de3): undefined reference to `__divdi3'
> collect2: ld returned 1 exit status
> make: *** [/home/myles/try/buildrom-devel/work/coreboot/svn/build/coreboot_ram]
> Error 1
> 
> These errors look like the same ones that can be fixed with
> gcc-multilib, but I have that installed.  I'm not sure how these files
> should be built now.

Hello,

I stumbled upon these errors when porting to Asus M2V-MX-SE, and they
are related to libgcc. Coreboot needs to be linked against libgcc when
using 64bit arithmetic in 32bit code. 

There are a few approaches for fixing this, like:
-link against libgcc (statically)
-implement the needed functions ourselves (copied from libgcc)
-avoid using 64bit arithmetic

I'm in inclined to vote for the first approach.

Cristi

-- 
Ing. Cristi Măgherușan, System/Network Engineer
Technical University of Cluj-Napoca, Romania
http://cc.utcluj.ro  +40264 401247
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090826/5a49c5fa/attachment.sig>


More information about the coreboot mailing list