problem compiling binutils 2.10

Heiko Nardmann h.nardmann@secunet.de
Wed Jun 28 01:20:00 GMT 2000


Now I have defined HOST_HPPAHPUX and saw that the following files were
missing:
lst.h
machine/reg.h

So I created bfd/hppa-hpux-include, copied lst.h, created machine, copied
reg.h and added the include path.
Now this is the result of make:

make[2]: Entering directory
`/home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd'
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
-D_GNU_SOURCE     -I. -I. -I./../include -Ihppa-hpux-include
-I./../intl -I../intl    -g -O2 -W -Wall -DHOST_HPPAHPUX -c som.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include
-Ihppa-hpux-include -I./../intl -I../intl -g -O2 -W -Wall-DHOST_HPPAHPUX -c
som.c -o som.o
In file included from som.c:31:
som.h:116: parse error before `COMPUNIT'
som.h:116: warning: no semicolon at end of struct or union
som.h:132: parse error before `}'
som.h:136: field `a' has incomplete type
som.c:201: warning: `struct symbol_dictionary_record' declared inside
parameter list
som.c:201: warning: its scope is only this definition or declaration, which is
probably not what you want.
som.c:243: parse error before `COMPUNIT'
som.c:250: warning: `struct lst_header' declared inside parameter list
som.c:253: warning: `struct lst_header' declared inside parameter list
som.c:265: warning: `struct lst_header' declared inside parameter list
som.c:265: warning: parameter has incomplete type
som.c:391: warning: missing braces around initializer
som.c:391: warning: (near initialization for `som_fixup_formats[0]')
som.c:792: `R_NO_RELOCATION' undeclared here (not in a function)
som.c:792: initializer element is not constant

and so on ...

COMPUNIT is a define in /usr/include/compunit.h:

struct compilation_unit {
        union name_pt    name;
        union name_pt    language_name;
        union name_pt    product_id;
        union name_pt    version_id;
        unsigned int     reserved   : 31;
        unsigned int     chunk_flag :  1;
        struct sys_clock compile_time;
        struct sys_clock source_time;
};

#define COMPUNIT struct compilation_unit
#define COMPUNITSZ sizeof(COMPUNIT)

So do I have to insert a include statement somewhere? If yes where is it best?

Alan Modra wrote:

> On Wed, 28 Jun 2000, Heiko Nardmann wrote:
>
> > Now I am not sure which header files are needed.
> > As far as I understand it this thing is only targeted for native HPPA
> > systems, isn't it?
>
> Yes.  One way to find out which header files are needed is to compile with
> -DHOST_HPPAHPUX added to CFLAGS and see what breaks.  I haven't tried this
> sort of this myself, so you'll probably need to do a little work.
>
> > Why are some format definitions part of binutils and some not?
>
> I don't know the history behind this, sorry.
>
> --
> Linuxcare.  Support for the Revolution.

--
Heiko Nardmann (Dipl.-Ing.), h.nardmann@secunet.de, Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50




More information about the Binutils mailing list