Hi,

Eric Sunshine <sunshine / sunshineco.com> writes:

> > eban        Sun, 30 Nov 2003 11:27:35 +0000
>  >  	nextstep*)	: ${LDSHARED='cc -r -nostdlib'}
>  >  			LDFLAGS="$LDFLAGS -u libsys_s"
>  > -			DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
>  >  			rb_cv_dlopen=yes ;;
>  >  	openstep*)	: ${LDSHARED='cc -dynamic -bundle ...
>  >  			: ${LDFLAGS=""}
>  > -			DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
>  >  			rb_cv_dlopen=yes ;;
>  >  	rhapsody*)	: $LDSHARED='cc -dynamic -bundle ...
>  >  			: ${LDFLAGS=""}
>  > -			DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
>  >  			rb_cv_dlopen=yes ;;
>  >  	darwin*)	: ${LDSHARED='cc -dynamic -bundle ...
>  >  			: ${LDFLAGS=""}
>  > -			DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
> 
> I am afraid that I do not understand why you made this change. 
> Unfortunately, removing the DLDFLAGS assignments for the Apple/NeXT 
> platforms breaks builds when --enable-fat-binary is used.  ARCH_FLAGS is 
> required at both compilation and link time, thus this change is 
> unwarranted since it causes extensions to be linked incorrectly.

I forgot add ARCH_FLAG to DLDFLAGS in lib/mkmf.rb.
Please check this out.

-- 
eban

Index: lib/mkmf.rb =================================================================== RCS file: /src/ruby/lib/mkmf.rb,v retrieving revision 1.158 diff -u -1 -r1.158 mkmf.rb --- lib/mkmf.rb 30 Nov 2003 11:27:34 -0000 1.158 +++ lib/mkmf.rb 30 Nov 2003 13:53:36 -0000 @@ -726,3 +726,3 @@ CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']} -DLDFLAGS = #$LDFLAGS #{CONFIG['DLDFLAGS']} #$DLDFLAGS +DLDFLAGS = #$LDFLAGS #{CONFIG['DLDFLAGS']} #$DLDFLAGS #$ARCH_FLAG LDSHARED = #{CONFIG['LDSHARED']}