On 02/26/2010 08:08 PM, Dan Nicholson wrote:
> 
> Can you try the patch below? I think this fixes the issue more generally.

Yes, this one fixes the linking issue too. You can commit this one
instead of mine.

> 
> --
> Dan
> 
> From bf51ca551c4e4b994d15f3d6b374c5e5b21ece4e Mon Sep 17 00:00:00 2001
> From: Dan Nicholson <dbn.li...@gmail.com>
> Date: Fri, 26 Feb 2010 10:01:37 -0800
> Subject: [PATCH] progs/glsl: Ensure CFLAGS are passed during linking
> 
> Commit ab6825b3e3fd04564b7840e945fa32b0a7b3c0c2 fixed an issue where the
> architecture option -m32 wasn't being passed to the compiler when
> linking .o files. This would only fix the issue with user's building
> with the hacky --enable-32-bit. The right way to fix this is to pass
> CFLAGS to the linker, which the GNU make builtin rules unfortunately
> don't do.
> 
> Signed-off-by: Dan Nicholson <dbn.li...@gmail.com>
> ---
>  progs/glsl/Makefile |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile
> index aaa54cb..3b5a595 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) $(ARCH_FLAGS)
> +LDLIBS = $(LIBS)
>  
>  PROG_SOURCES = \
>       array.c \
> @@ -69,6 +69,9 @@ $(PROG_OBJS): $(UTIL_HEADERS)
>  
>  $(PROGS): $(UTIL_OBJS)
>  
> +.o:
> +     $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
> +
>  clean:
>       -rm -f $(PROGS)
>       -rm -f *.o *~


------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to