romcc portability (cont)

Eric W. Biederman ebiederman at lnxi.com
Thu Oct 9 04:34:01 CEST 2003


<standard rant>
Please use the list for basic stuff like this.  As the reply
at least is educational to multiple people.

</standard rant>

"Peter Fox" <peter.fox at ifrsys.com> writes:

>   For various reasons I won't bore you with, I'm trying out the
>   freebios2 stuff on freebsd. I had a couple of problems compiling
>   romcc that you might like to address in the next version:
> 
>   Freebsd doesn't have <stdint.h>.
>
> I forgot to mention - I just commented out <stdint.h> and it seemed to compile
> ok without it, so I guess you don't actually need to include it.

I do use uint8_t, uint16_t, and uint32_t so stdint.h is needed. It
sounds like Freebsd may be defining these somewhere else at the
moment.

Short of building a configure script I really can't address this.  If
someone would like to contribute a configure script I would happily
accept one.  I am busy with more core aspects of the code at the moment.

I totally support the idea of building on Freebsd.  There is nothing
inherently Linux specific about LinuxBIOS at this point

>   __error() clashes with an entry in <errno.h> - perhaps you should
>   prefix your functions by '_romcc_', rather than '__' ?

Ouch this is a problem.

Everything with a leading underscore is reserved to the
implementation.  Double underscore is reserved for global scope and a
single underscore is reserved for file scope definitions.  So this is
my bug. 

I have just changed those three instances from __ to romcc_ and all
looks good here.  I will see what I can do about committing these
changes.

Eric



More information about the coreboot mailing list