[前][次][番号順一覧][スレッド一覧]

ruby-changes:10299

From: yugui <ko1@a...>
Date: Wed, 28 Jan 2009 20:09:05 +0900 (JST)
Subject: [ruby-changes:10299] Ruby:r21843 (ruby_1_9_1): merges r21685 from trunk into ruby_1_9_1.

yugui	2009-01-28 20:08:44 +0900 (Wed, 28 Jan 2009)

  New Revision: 21843

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21843

  Log:
    merges r21685 from trunk into ruby_1_9_1.
    * Makefile.in (miniruby): renames and then removes, to get rid of
      EPERM on cygwin and mingw.
    * Makefile.in ($(LIBRUBY_SO)): use wildcard option of objcopy.
    
    * configure.in (DLDFLAGS): do not export all symbols.
    
    * cygwin/GNUmakefile.in (RUBYDEF): rejects symbols prefixex with
      Init_.
    
    * win32/mkexports.rb (Exports::Mingw): includes all symbols except for
      prefixed with Init_ as well as mswin32.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/Makefile.in
    branches/ruby_1_9_1/configure.in
    branches/ruby_1_9_1/cygwin/GNUmakefile.in
    branches/ruby_1_9_1/win32/mkexports.rb

Index: ruby_1_9_1/configure.in
===================================================================
--- ruby_1_9_1/configure.in	(revision 21842)
+++ ruby_1_9_1/configure.in	(revision 21843)
@@ -1463,7 +1463,7 @@
 			rb_cv_dlopen=yes;;
 	cygwin*|mingw*)	: ${LDSHARED="${CC} -shared "'$(if $(filter-out -g -g0,$(debugflags)),,-s)'}
 			XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
-			DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
+			DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import"
 			: ${LIBPATHENV=""}
 			rb_cv_dlopen=yes ;;
 	hiuxmpp)	: ${LDSHARED='ld -r'} ;;
@@ -1856,6 +1856,7 @@
 	cygwin*)
 	    if test x"$enable_shared" = xyes; then
 		LIBRUBY_SO='cyg$(RUBY_SO_NAME)'${MAJOR}${MINOR}${TEENY}.dll
+		LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
 	    fi
 	    ;;
 	mingw*)
Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21842)
+++ ruby_1_9_1/ChangeLog	(revision 21843)
@@ -1,3 +1,18 @@
+Tue Jan 20 15:32:29 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* Makefile.in (miniruby): renames and then removes, to get rid of
+	  EPERM on cygwin and mingw.
+
+	* Makefile.in ($(LIBRUBY_SO)): use wildcard option of objcopy.
+
+	* configure.in (DLDFLAGS): do not export all symbols.
+
+	* cygwin/GNUmakefile.in (RUBYDEF): rejects symbols prefixex with
+	  Init_.
+
+	* win32/mkexports.rb (Exports::Mingw): includes all symbols except for
+	  prefixed with Init_ as well as mswin32.
+
 Wed Jan 28 15:24:11 2009  TAKANO Mitsuhiro (takano32)  <tak@n...>
 
 	* math.c: SEGV is caused by implicit rb_to_float declaration
Index: ruby_1_9_1/cygwin/GNUmakefile.in
===================================================================
--- ruby_1_9_1/cygwin/GNUmakefile.in	(revision 21842)
+++ ruby_1_9_1/cygwin/GNUmakefile.in	(revision 21843)
@@ -5,7 +5,7 @@
 DLLWRAP = @DLLWRAP@ --target=@target_os@
 
 ifeq (@target_os@,cygwin)
-  DLL_BASE_NAME := $(subst .dll,,$(LIBRUBY_SO))
+  DLL_BASE_NAME := $(LIBRUBY_SO:.dll=)
 else
   DLL_BASE_NAME := $(RUBY_SO_NAME)
   DLLWRAP += -mno-cygwin
@@ -29,7 +29,7 @@
 SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
 EXTOBJS += $(if $(filter-out $(RUBYW_INSTALL_NAME),$(@:$(EXEEXT)=)),$(RUBY_INSTALL_NAME),$(@:$(EXEEXT)=)).res.$(OBJEXT)
 RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(DLL_BASE_NAME).rc
-RUBYDEF = $(RUBY_SO_NAME).def
+RUBYDEF = $(DLL_BASE_NAME).def
 
 ruby: $(PROGRAM)
 rubyw: $(WPROGRAM)
@@ -63,22 +63,25 @@
 
 ifeq (@target_os@,mingw32)
 $(OBJS) $(MAINOBJ): win32.h
+endif
 
 $(LIBRUBY_SO): $(RUBYDEF)
 
 $(RUBYDEF): $(LIBRUBY_A) $(PREP) $(RBCONFIG)
+ifeq (@target_os@,cygwin)
+	@NM@ --extern --defined $(LIBRUBY_A) | \
+	  $(MINIRUBY) -n -e 'BEGIN{puts "VERSION $(MAJOR).$(MINOR)","EXPORTS"}' \
+			 -e 'puts $$1 if / [CDT] _((?!Init_).*)$$/' > $@
+else
 	$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
+endif
 
 clean-local::
 	@$(RM) $(RUBYDEF)
-endif
 
 ifeq (@target_os@,cygwin)
-cygwin-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY).dll: $(LIBRUBY_A)
-	@NM@ --extern --defined $(LIBRUBY_A) | \
-	  $(MINIRUBY) -ne 'BEGIN{puts "VERSION $(MAJOR).$(MINOR)","EXPORTS"}; puts $$1+"=$(@F)."+$$1 if / [CDT] _(.*)$$/' >rubydll.def
-	@DLLWRAP@ -s --def=rubydll.def -o $@
-	@rm -f rubydll.def
+cygwin-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY).dll: $(LIBRUBY_A) $(RUBYDEF)
+	@DLLWRAP@ -s --def=$(RUBYDEF) -o $@
 endif
 
 clean-local::
Index: ruby_1_9_1/win32/mkexports.rb
===================================================================
--- ruby_1_9_1/win32/mkexports.rb	(revision 21842)
+++ ruby_1_9_1/win32/mkexports.rb	(revision 21843)
@@ -143,15 +143,11 @@
 
   def each_export(objs)
     objdump(objs) do |l|
-      yield $1 if / [[:upper:]] _(.*)$/ =~ l
+      yield $1 if / [[:upper:]] _((?!Init_).*)$/ =~ l
     end
     yield "strcasecmp", "_stricmp"
     yield "strncasecmp", "_strnicmp"
   end
-
-  def symbols()
-    @syms.select {|k, v| v}.sort.collect {|k, v| "#{k}=#{v}"}
-  end
 end
 
 END {
Index: ruby_1_9_1/Makefile.in
===================================================================
--- ruby_1_9_1/Makefile.in	(revision 21842)
+++ ruby_1_9_1/Makefile.in	(revision 21843)
@@ -125,7 +125,7 @@
 .NOEXPORT:
 
 miniruby$(EXEEXT):
-		@$(RM) $@
+		@-if test -f $@; then mv -f $@ $@.old; $(RM) $@.old; fi
 		$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE) $(LIBS) $(OUTFLAG)$@
 
 $(PROGRAM):
@@ -143,9 +143,7 @@
 $(LIBRUBY_SO):
 		@-$(PRE_LIBRUBY_UPDATE)
 		$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@
-		@-test "$(OBJDUMP)" = "" || test "$(OBJCOPY)" = "" || { \
-		set dummy `$(OBJDUMP) -t $@ | sed '/^[^ ]* g/!d;s/.* //;/^\(Init_\|vm_\)/!d;s/^/-L /'`; \
-		shift; test "$$#" = 0 || $(OBJCOPY) "$$@" $@; }
+		-$(OBJCOPY) -w -L '@EXPORT_PREFIX@Init_*' $@
 		@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
 						  File.symlink "$(LIBRUBY_SO)", link}' \
 				$(LIBRUBY_ALIASES) || true

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]