From: Brian P. <br...@va...> - 2000-07-19 18:42:59
|
Richard Guenther wrote: > > Hi! > > I'm unable to build the current mesa on standard Linux/ix86: > > ./configure --disable-ggi-fbdev > > gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../include > -I../../../src/GGI/include -I../../../src -g -O2 -Wall > -fomit-frame-pointer -ffast-math -fexpensive-optimizations -malign-loops=2 > -malign-jumps=2 -malign-functions=2 -D_REENTRANT -Wp,-MD,.deps/stubs.pp -c > stubs.c -fPIC -DPIC -o stubs.lo > stubs.c: In function `MesaGGIdl_stubs': > stubs.c:415: `GGIFUNC_open' undeclared (first use in this function) > stubs.c:415: (Each undeclared identifier is reported only once > stubs.c:415: for each function it appears in.) > stubs.c:418: `GGIFUNC_exit' undeclared (first use in this function) > stubs.c:419: `GGIFUNC_close' undeclared (first use in this function) > stubs.c:416: warning: unreachable code at beginning of switch statement > make[4]: *** [stubs.lo] Error 1 > > It seems that though GGI seems to be detected disabled correctly: > > checking for ggi/ggi.h... (cached) yes > checking for main in -lggi... (cached) yes > checking for kgi/kgi.h... (cached) no > checking if we should build GGIMesa's fbdev target... no > checking if we should build GGIMesa's generic KGI driver... no > > (but ggi.h installed) is is tried to use it - as I can see from > conf.h GGI is enabled... > > /* #undef FX */ > /* #undef FX_GLIDE3 */ > #define GGI 1 > #define SVGA 1 > #define USE_XSHM 1 > > so perhaps we need a --disable-ggi switch... [see attached patch] > also --disable-svga should be there for the same reasons (well I > would vote for all but X11 and GLX drivers to be disabled by default > and to be enabled by --enable-feature rather than autodetecting such > stuff anyway). > > Note that the patch includes addition of -fstrict-aliasing as this > enables a whole range of optimizations of array access and friends > and makes a huge difference (just checked that here on IRIX) - I hope > Mesa is safe with the aliasing rules of ANSI C.... at least it seems > to work with the supplied demos (just picked a few random ones). > > Richard. > > -- > Richard Guenther <ric...@st...> > WWW: http://www.anatom.uni-tuebingen.de/~richi/ > The GLAME Project: http://www.glame.de/ > > Index: configure.in > =================================================================== > RCS file: /cvsroot/mesa3d/Mesa/configure.in,v > retrieving revision 1.27 > diff -u -r1.27 configure.in > --- configure.in 2000/07/01 08:22:08 1.27 > +++ configure.in 2000/07/19 11:27:18 > @@ -77,7 +77,7 @@ > dnl Optimization flags > if test "x$enable_debug" = xno && test "x$enable_prof" = xno; then > if test "x$GCC" = xyes; then > - CFLAGS="$CFLAGS -fomit-frame-pointer -ffast-math -fexpensive-optimizations" > + CFLAGS="$CFLAGS -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing" > case "$host" in > i*86-*-*) CFLAGS="$CFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2";; > esac > @@ -299,7 +299,12 @@ > > dnl ------------------------------------------ > dnl GGI driver > -have_ggi=auto > +AC_ARG_ENABLE(ggi, > +[ --disable-ggi Don't build the GGI target at all], > +have_ggi=$enableval, have_ggi=auto) > +if test "x$have_ggi" = xyes; then > + have_ggi=auto; > +fi > GGI_CFLAGS="" > GGI_LIBS="" > AC_ARG_WITH(ggi, OK, I've applied your patch to both the 3.2.1 and 3.3 branches. But, I removed the -fstrict-aliasing option from 3.2.1 just to be cautious. I always avoid pointer aliasing in function calls but can't guarantee that in anybody else's code. -Brian |