From c93b7ae9bd3b007830cbb8514f069fad8bd2ee3d Mon Sep 17 00:00:00 2001 From: eban Date: Sun, 30 Nov 2003 16:09:42 +0000 Subject: [PATCH] * lib/mkmf.rb (TRY_LINK, link_command): added support for DLDFLAGS and ARCH_FLAG. [ruby-dev:22085] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 ++++++- lib/mkmf.rb | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93cbfe525d..4f57d4e676 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 1 01:03:27 2003 WATANABE Hirofumi + + * lib/mkmf.rb (TRY_LINK, link_command): added support for DLDFLAGS + and ARCH_FLAG. [ruby-dev:22085] + Sun Nov 30 20:18:07 2003 WATANABE Hirofumi * configure.in: keep ARCH_FLAG separate. export ARCH_FLAG. @@ -9,7 +14,7 @@ Sun Nov 30 20:18:07 2003 WATANABE Hirofumi * lib/mkmf.rb (link_command, cc_command): use ARCH_FLAG. - * lib/mkfm.rb (configuration): add ARCH_FLAG to DLDFLAGS. + * lib/mkmf.rb (configuration): add ARCH_FLAG to DLDFLAGS. * Makefile.in: add ARCH_FLAG to DLDFLAGS. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 34c9dd4edc..bb79a5e4c5 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -217,6 +217,7 @@ def link_command(ldflags, opt="", libpath=$LIBPATH) 'CFLAGS' => "#$CFLAGS", 'ARCH_FLAG' => "#$ARCH_FLAG", 'LDFLAGS' => "#$LDFLAGS #{ldflags}", + 'DLDFLAGS' => "#$DLDFLAGS", 'LIBPATH' => libpathflag(libpath), 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs", 'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS") @@ -948,7 +949,7 @@ def init_mkmf(config = CONFIG) $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup $LDFLAGS = (with_config("ldflags") || "").dup $INCFLAGS = "-I#{$topdir}" - $DLDFLAGS = (arg_config("DLDFLAGS") || "").dup + $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup $LIBEXT = config['LIBEXT'].dup $OBJEXT = config["OBJEXT"].dup $LIBS = "#{config['LIBS']} #{config['DLDLIBS']}" @@ -1015,7 +1016,7 @@ COMPILE_C = config_string('COMPILE_C') || '$(CC) $(CFLAGS) $(CPPFLAGS) -c $<' COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<' TRY_LINK = config_string('TRY_LINK') || "$(CC) #{OUTFLAG}conftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) " \ - "$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(LOCAL_LIBS) $(LIBS)" + "$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(DLDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)" LINK_SO = config_string('LINK_SO') || if CONFIG["DLEXT"] == $OBJEXT "ld $(DLDFLAGS) -r -o $(DLLIB) $(OBJS)\n"