[MPlayer-dev-eng] gcc -MM bug?

Arpi arpi at thot.banki.hu
Sun May 14 23:23:31 CEST 2006


Hi,

It's a bit offtopic, but as mplayer also include(d) .depend support,
it isn't not so much...

The problem: when running gcc's make-depend feature (gcc -M or -MM)
on a file in a subdirectory, it produces wrong output, as it
cuts out the path. example:

# gcc -MM game-egypt/math.c
math.o: game-egypt/math.c game-egypt/paylines.h
#

it should produce  game-egypt/math.o: game-egypt/math.c...

according to gcc manual:

By default CPP takes the name of the main input file, including any
path, deletes any file suffix such as .c, and appends the plat-
form's usual object suffix.  The result is the target.

tested with gcc 3.3 and 4.0, on OSX.

i've checked mplayer source, and it also includes some files from
subdirs, the ones in SRCS_MENCODER, for example libvo/aclib.c.

g5:~/mplayer arpi$ grep aclib .depend 
aclib.o: libvo/aclib.c config.h cpudetect.h libvo/fastmemcpy.h

so it's also incorrectly created .depend, make will not recompile
aclib.o if any of its dependencies change!

any ideas? is it a known gcc bug, a feature or what? workarounds?

A'rpi




More information about the MPlayer-dev-eng mailing list