[OpenBIOS] Compiling Openbios with Sparc cross compiler

Paul Wilhelm bearcat.pilot at gmail.com
Wed Jun 6 17:23:50 CEST 2012


On the machine that does compile, the following file is used:
/usr/include/bits/sigcontext.h
This file has a copyright of 2002 from FSF.
This file does not try to use __u32, etc, and does not include other files
that do.

On the machine that fails to compile, the following file is used:
/usr/include/i386-linux-gnu/bits/sigcontext.h
This file has a copyright of 1998 from FSF. This includes asm/sigcontext.h
which in turn includes linux/types.h before using __u32, etc. linux/types.h
includes asm/types.h (which in other other circumstance would include other
files that include the definition for __u32, etc.). With the asm/types.h in
target/include, things get broken.

I did some googling to find out how the /usr/include/bits directory gets
filled, what package might set that up, but, I did not find anything useful.

Any suggestions?


On Tue, Jun 5, 2012 at 8:27 PM, P. Wilhelm <bearcat.pilot at gmail.com> wrote:

> On 6/5/2012 8:18 AM, Andreas Färber wrote:
>
>> Am 05.06.2012 01:15, schrieb Paul Wilhelm:
>>
>>> Thanks for your kind help / suggestions.
>>>
>>> Here is a more verbose version of the compile error output.
>>>
>>> paul at linux-jkcx:~/src/**openbios-devel>  env V=1 make build-verbose
>>> Building...
>>> make[1]: Entering directory `/home/paul/src/openbios-**
>>> devel/obj-sparc32'
>>> true
>>> true
>>> gcc -O2 -g -DFCOMPILER -DBOOTSTRAP -DSWAP_ENDIANNESS
>>> -DNATIVE_BITWIDTH_EQUALS_HOST_**BITWIDTH -Wall -Wredundant-decls
>>> -Wshadow
>>> -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wundef
>>> -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
>>> -Wnested-externs -W -MMD -MP -MT host/kernel/dict.o -MF
>>> 'host/kernel/dict.d' -I../include -I../kernel -I../kernel/include
>>> -I./target/include -c -o host/kernel/dict.o ../kernel/dict.c
>>> gcc -O2 -g -DFCOMPILER -DBOOTSTRAP -DSWAP_ENDIANNESS
>>> -DNATIVE_BITWIDTH_EQUALS_HOST_**BITWIDTH -Wall -Wredundant-decls
>>> -Wshadow
>>> -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wundef
>>> -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
>>> -Wnested-externs -W -MMD -MP -MT host/kernel/bootstrap.o -MF
>>> 'host/kernel/bootstrap.d' -I../include -I../kernel -I../kernel/include
>>> -I./target/include -c -o host/kernel/bootstrap.o ../kernel/bootstrap.c
>>>
>> Now that's a problem with the host compilation environment, it says gcc,
>> not sparc-elf-gcc.
>>
>>  In file included from /usr/include/asm/sigcontext.h:**5:0,
>>>                  from /usr/include/bits/sigcontext.**h:28,
>>>                  from /usr/include/signal.h:339,
>>>                  from ../kernel/bootstrap.c:13:
>>> /usr/include/linux/types.h:27:**1: error: unknown type name ‘__u16’
>>> /usr/include/linux/types.h:28:**1: error: unknown type name ‘__u16’
>>> /usr/include/linux/types.h:29:**1: error: unknown type name ‘__u32’
>>> /usr/include/linux/types.h:30:**1: error: unknown type name ‘__u32’
>>> /usr/include/linux/types.h:31:**1: error: unknown type name ‘__u64’
>>> /usr/include/linux/types.h:32:**1: error: unknown type name ‘__u64’
>>> /usr/include/linux/types.h:34:**1: error: unknown type name ‘__u16’
>>> /usr/include/linux/types.h:35:**1: error: unknown type name ‘__u32’
>>> In file included from /usr/include/bits/sigcontext.**h:28:0,
>>>                  from /usr/include/signal.h:339,
>>>                  from ../kernel/bootstrap.c:13:
>>> /usr/include/asm/sigcontext.h:**24:2: error: unknown type name ‘__u32’
>>> /usr/include/asm/sigcontext.h:**25:2: error: unknown type name ‘__u32’
>>> /usr/include/asm/sigcontext.h:**28:2: error: unknown type name ‘__u64’
>>> /usr/include/asm/sigcontext.h:**33:2: error: unknown type name ‘__u32’
>>> /usr/include/asm/sigcontext.h:**38:2: error: unknown type name ‘__u32’
>>> /usr/include/asm/sigcontext.h:**191:2: error: unknown type name ‘__u64’
>>> /usr/include/asm/sigcontext.h:**192:2: error: unknown type name ‘__u64’
>>> /usr/include/asm/sigcontext.h:**193:2: error: unknown type name ‘__u64’
>>> /usr/include/asm/sigcontext.h:**198:2: error: unknown type name ‘__u32’
>>> make[1]: *** [host/kernel/bootstrap.o] Error 1
>>> make[1]: Leaving directory `/home/paul/src/openbios-**devel/obj-sparc32'
>>> make: *** [build-verbose] Error 1
>>>
>> On my system those typedefs are in /usr/include/asm-generic/int-**ll64.h.
>> Could some package be missing?
>>
>> Andreas
>>
>>  Instead of picking up /usr/include/asm/types.h (which in turn picks up
> /usr/include/asm-generic/**types.h which picks up
> /usr/include/asm-generic/int-**ll64.h), it is using
> openbios-devel/obj-sparc32/**target/include/asm/types.h
>
> This is because of the -I../target/include.
>
> Not sure if this was the intent. I have a machine at work where this
> compile works, so I'll check to see what that machine is doing.
>
> Paul.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openbios.org/pipermail/openbios/attachments/20120606/4b00e242/attachment-0001.html>


More information about the OpenBIOS mailing list