This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: target=sh-elf build error
Hello Nick,
On Dec 27 , 2005, at 18:49 , Nick Clifton wrote:
Hi Anders,
When trying to build a toolchain for the sh-elf target, the build
stops with the following error message:
gcc -DHAVE_CONFIG_H -I. -I../../src/gprof -I. -D_GNU_SOURCE -
DDEBUG -I../bfd -I../../src/gprof/../include -I../../src/gprof/../
bfd -I../../src/gprof/../intl -I../intl -I. -DLOCALEDIR="\"/Users/
anders/local/share/locale\"" -W -Wall -Wstrict-prototypes -
Wmissing-prototypes -Werror -g -O2 -c ../../src/gprof/mips.c
gcc -g -O2 -c -o flat_bl.o ../../src/gprof/flat_bl.m
Thinking about this some more, I would guess that flat_bl.m is
attempted to be compiled with GCC has something to do with *.m
being the default extension for Objective-C. Disabling gprof from
configure lets the build complete, but I have no idea on how to
fix the actual problem.
The Makefile in your gprof build directory should contain a rule to
translate this flat_bl.m file into a flat_bl.c file, which is then
compiled as normal. For some unknown reason it would appear that
this .m to .c translation step is not taking place. Perhaps it has
something to do with the version of make that you are using ?
You're right, there is a .m.c rule, and if I delete the generated .c
files from the source directory they are regenerated, but the .m
files still seem to be caught by the built-in implicit rules added by
Apple to their version of make. Building binutils with "make -r"
seems to work, so I'm happy with that. Since this is not an issue
with FSF binutils it's off-topic so I'll drop the thread here, unless
someone has any other suggestions. FWIW, the relevant Apple patch can
be seen here:
<http://www.opensource.apple.com/darwinsource/10.4.3/gnumake-110/
patches/patch-default.c>
Regards,
Anders Montonen