gcc-4.2's optimizer has a strange bug where it looses code from inner loops in certain situations. For example, if the appearently innocent looking code below is compiled with gcc-4.2 -S -O1, the inner loop's code is missing from the outputed assembly. struct Size { unsigned width; }; struct Command { unsigned length; struct Size sizes[32]; }; extern void emit_command(void *command, unsigned length); void create_surface( struct Size size, unsigned faces, unsigned levels) { struct Command cmd; unsigned face; unsigned level; cmd.length = faces*levels*sizeof(cmd.sizes[0]); for(face = 0; face < faces; ++face) { for(level = 0; level < levels; ++level) { cmd.sizes[face*levels + level] = size; // This should generate a shrl statement, but the whole for body // disappears in gcc-4.2 -O1/-O2/-O3! size.width >>= 1; } } emit(&cmd, sizeof cmd.length + cmd.length); } Note that this is not specific to MinGW's gcc-4.2 crosscompiler (the version typically found in debian/ubuntu's mingw32 packages). gcc-4.2 on Linux also displays the same error. gcc-4.3 and above gets this correctly though. Updated MinGW debian packages with gcc-4.3 are available from http://people.freedesktop.org/~jrfonseca/debian/pool/main/m/ |
||
---|---|---|
bin | ||
configs | ||
docs | ||
doxygen | ||
include | ||
progs | ||
scons | ||
src | ||
windows | ||
.emacs-dirvars | ||
.gitattributes | ||
.gitignore | ||
Makefile | ||
SConstruct | ||
acinclude.m4 | ||
autogen.sh | ||
common.py | ||
configure.ac |
docs/README.directfb
Mesa DirectFB Information Requirements ============ To build Mesa with DirectFB (DirectFBGL) support you need: - DirectFB at least 1.0.0 (http://directfb.org) - pkg-config at least 0.9 (http://pkgconfig.sf.net) Installation ============ Run make linux-directfb to build Mesa and DirectFBGL module, make install to install OpenGL libraries and cd src/mesa/drivers/directfb ; make install to install DirectFBGL module in the proper location. Actually, that last command may not be needed. Please provide feedback.