[coreboot] QEMU build failure in master

Aaron Durbin adurbin at google.com
Wed May 6 18:54:47 CEST 2015


On Wed, May 6, 2015 at 9:51 AM, Timothy Pearson
<tpearson at raptorengineeringinc.com> wrote:
> On 05/06/2015 11:46 AM, Aaron Durbin wrote:
>>
>> On Wed, May 6, 2015 at 9:45 AM, Timothy Pearson
>> <tpearson at raptorengineeringinc.com>  wrote:
>>>
>>> On 05/06/2015 11:41 AM, Aaron Durbin wrote:
>>>>
>>>>
>>>> That's probably my fault. I was under the impression monotonic_timer
>>>> was a first class citizen now (I at least recall someone doing that) I
>>>> thought wrong?
>>>>
>>>> You could add the following in the beginning of that function:
>>>>
>>>> if (!IS_ENABLED(CONFIG_HAVE_MONOTONIC_TIMER)
>>>>      return 0;
>>>>
>>>> I need to look at your logs to know the build failure.
>>>>
>>>
>>> While I don't have the entire log available right now, this was the
>>> important part:
>>> coreboot/src/lib/timestamp.c:184: undefined reference to
>>> `timer_monotonic_get'
>>>
>>> There were no other errors, and no other warning output except from iasl
>>> (as
>>> usual).
>>>
>>> It looks like timer_monotonic_get may not be available on QEMU, which
>>> means
>>> your fix wouldn't work unless the entire block was #ifdefed out.
>>
>>
>> The compiler would throw out that code not used using dead code
>> elimination.
>
>
> All right, I wasn't sure if we wanted to rely on that or not.  It "feels"
> fragile at first glance, and might provide an unpleasant surprise down the
> line to a programmer less familiar with the internal workings of compilers.

The upside is that all he code paths are checked by the compiler
instead of going stale if the c preprocessor throws out the code.

>
>
> --
> Timothy Pearson
> Raptor Engineering
> +1 (415) 727-8645
> http://www.raptorengineeringinc.com



More information about the coreboot mailing list