[gccsdk] Compiling on FreeBSD

John Tytgat John.Tytgat at aaug.net
Sun Sep 7 13:56:52 PDT 2008

In message <48C01F86.5030005 at aether.demon.co.uk>
          Matthew Hambley <lists at aether.demon.co.uk> wrote:

> I'm having trouble getting GCC4-head to compile. My system is FreeBSD 
> but I've installed the correct version of automake/autoconf locally so 
> that shouldn't be a problem.
> The tale end of the output is as follows:
> /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H  -I. 
> -I/home/riscos/gccsdk/gcc4/srcdir/bfd -I. -I. 
> -I/home/riscos/gccsdk/gcc4/srcdir/bfd 
> -I/home/riscos/gccsdk/gcc4/srcdir/bfd/../include 
> -I/home/riscos/gccsdk/gcc4/srcdir/bfd/../intl -I../intl    -W -Wall 
> -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o 
> elf32-arm.lo /home/riscos/gccsdk/gcc4/srcdir/bfd/elf32-arm.c
> gcc -DHAVE_CONFIG_H -I. -I/home/riscos/gccsdk/gcc4/srcdir/bfd -I. -I. 
> -I/home/riscos/gccsdk/gcc4/srcdir/bfd 
> -I/home/riscos/gccsdk/gcc4/srcdir/bfd/../include 
> -I/home/riscos/gccsdk/gcc4/srcdir/bfd/../intl -I../intl -W -Wall 
> -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c 
> /home/riscos/gccsdk/gcc4/srcdir/bfd/elf32-arm.c -o elf32-arm.o
> cc1: warnings being treated as errors
> /home/riscos/gccsdk/gcc4/srcdir/bfd/elf32-arm.c:2142: warning: no 
> previous prototype for 'bfd_elf32_arm_create_riscos_module_reloc'
> /home/riscos/gccsdk/gcc4/srcdir/bfd/elf32-arm.c:2222: warning: no 
> previous prototype for 'bfd_elf32_arm_allocate_riscos_module_reloc'
> *** Error code 1

That source should build warning free.

> [...]
> I don't know where these missing prototypes should be defined so can't 
> find out why they haven't. Has this problem been observed and/or solved 
> before? Has anyone ever had any luck building on FreeBSD?

The bfd_elf32_arm_allocate_riscos_module_reloc routine (and its prototype)
is part of our GCCSDK patches, i.e. recipe/patches/{elf32-arm.c.p,
bfd.bfd-in.h.p}.  So it looks like the former got applied but the latter
not.  Or, the file srcdir/bfd/bfd-in.h got patched but the build system
didn't realise it was updated and didn't correctly generate the files

For all clearness, the header file for bfd module is generated in the
builddir-cross/bfd directory (actually more than one header file is
generated) based on the srcdir/bfd/bfd-in.h file.

If you don't immediately find the real problem, feel free to make the
full build log available (starting from a clean build) and I'll have a
look if I can find the clue there.

John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven

More information about the gcc mailing list