2010/2/26 Török Edwin <edwinto...@gmail.com>: > On 02/26/2010 04:19 PM, Dan Nicholson wrote: >> 2010/2/25 Török Edvin <edwinto...@gmail.com>: >>> --- >>> progs/glsl/Makefile | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile >>> index 8928c83..aaa54cb 100644 >>> --- a/progs/glsl/Makefile >>> +++ b/progs/glsl/Makefile >>> @@ -16,7 +16,7 @@ LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) >>> -l$(GLU_LIB) \ >>> # using : to avoid APP_CC pointing to CC loop >>> CC := $(APP_CC) >>> CFLAGS := -I$(INCDIR) $(CFLAGS) >>> -LDLIBS = $(LIBS) >>> +LDLIBS = $(LIBS) $(ARCH_FLAGS) >> >> Can you show the error you're getting? This should already be handled >> in CFLAGS, but I suspect using make's implicit rules is causing this >> problem. > > CFLAGS is not used when linking .o files only, so the command-line > doesn't have -m32 at all:
Yeah, the built-in make pattern rule for linking .o files doesn't pass CFLAGS. We usually handle this by not using make's built-in rules for linking. > gcc array.o shaderutil.o readtex.o -L../../lib32 -lglut -lGLEW -lGLU > -lGL -lm -o array > /usr/bin/ld: skipping incompatible ../../lib32/libglut.so when searching > for -lglut > /usr/bin/ld: cannot find -lglut > collect2: ld returned 1 exit status > > And with that patch applied it correctly adds -m32 to the commandline > and links: > gcc array.o shaderutil.o readtex.o -L../../lib32 -lglut -lGLEW -lGLU > -lGL -lm -m32 -o array These programs aren't in progs/glsl. Are you sure this is solving your problem? Can you just show me the make output for the failed run? -- Dan ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev