* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e77a0b7b24
commit
2d03f7274f
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
|||||||
|
Tue Jan 20 15:32:29 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Tue Jan 20 13:03:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jan 20 13:03:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (hash): fixed the tail bytes handling in the aligned
|
* string.c (hash): fixed the tail bytes handling in the aligned
|
||||||
|
@ -123,7 +123,7 @@ all:
|
|||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
||||||
miniruby$(EXEEXT):
|
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)$@
|
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE) $(LIBS) $(OUTFLAG)$@
|
||||||
|
|
||||||
$(PROGRAM):
|
$(PROGRAM):
|
||||||
@ -141,9 +141,7 @@ $(LIBRUBY_A):
|
|||||||
$(LIBRUBY_SO):
|
$(LIBRUBY_SO):
|
||||||
@-$(PRE_LIBRUBY_UPDATE)
|
@-$(PRE_LIBRUBY_UPDATE)
|
||||||
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@
|
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@
|
||||||
@-test "$(OBJDUMP)" = "" || test "$(OBJCOPY)" = "" || { \
|
-$(OBJCOPY) -w -L '@EXPORT_PREFIX@Init_*' $@
|
||||||
set dummy `$(OBJDUMP) -t $@ | sed '/^[^ ]* g/!d;s/.* //;/^\(Init_\|vm_\)/!d;s/^/-L /'`; \
|
|
||||||
shift; test "$$#" = 0 || $(OBJCOPY) "$$@" $@; }
|
|
||||||
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
|
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
|
||||||
File.symlink "$(LIBRUBY_SO)", link}' \
|
File.symlink "$(LIBRUBY_SO)", link}' \
|
||||||
$(LIBRUBY_ALIASES) || true
|
$(LIBRUBY_ALIASES) || true
|
||||||
|
@ -1478,7 +1478,7 @@ if test "$with_dln_a_out" != yes; then
|
|||||||
rb_cv_dlopen=yes;;
|
rb_cv_dlopen=yes;;
|
||||||
cygwin*|mingw*) : ${LDSHARED="${CC} -shared "'$(if $(filter-out -g -g0,$(debugflags)),,-s)'}
|
cygwin*|mingw*) : ${LDSHARED="${CC} -shared "'$(if $(filter-out -g -g0,$(debugflags)),,-s)'}
|
||||||
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
|
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=""}
|
: ${LIBPATHENV=""}
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
hiuxmpp) : ${LDSHARED='ld -r'} ;;
|
hiuxmpp) : ${LDSHARED='ld -r'} ;;
|
||||||
@ -1871,6 +1871,7 @@ case "$target_os" in
|
|||||||
cygwin*)
|
cygwin*)
|
||||||
if test x"$enable_shared" = xyes; then
|
if test x"$enable_shared" = xyes; then
|
||||||
LIBRUBY_SO='cyg$(RUBY_SO_NAME)'${MAJOR}${MINOR}${TEENY}.dll
|
LIBRUBY_SO='cyg$(RUBY_SO_NAME)'${MAJOR}${MINOR}${TEENY}.dll
|
||||||
|
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
mingw*)
|
mingw*)
|
||||||
|
@ -5,7 +5,7 @@ ENABLE_SHARED=@ENABLE_SHARED@
|
|||||||
DLLWRAP = @DLLWRAP@ --target=@target_os@
|
DLLWRAP = @DLLWRAP@ --target=@target_os@
|
||||||
|
|
||||||
ifeq (@target_os@,cygwin)
|
ifeq (@target_os@,cygwin)
|
||||||
DLL_BASE_NAME := $(subst .dll,,$(LIBRUBY_SO))
|
DLL_BASE_NAME := $(LIBRUBY_SO:.dll=)
|
||||||
else
|
else
|
||||||
DLL_BASE_NAME := $(RUBY_SO_NAME)
|
DLL_BASE_NAME := $(RUBY_SO_NAME)
|
||||||
DLLWRAP += -mno-cygwin
|
DLLWRAP += -mno-cygwin
|
||||||
@ -29,7 +29,7 @@ WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT)
|
|||||||
SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
|
SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
|
||||||
EXTOBJS += $(if $(filter-out $(RUBYW_INSTALL_NAME),$(@:$(EXEEXT)=)),$(RUBY_INSTALL_NAME),$(@:$(EXEEXT)=)).res.$(OBJEXT)
|
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
|
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)
|
ruby: $(PROGRAM)
|
||||||
rubyw: $(WPROGRAM)
|
rubyw: $(WPROGRAM)
|
||||||
@ -63,22 +63,25 @@ GNUmakefile: $(srcdir)/cygwin/GNUmakefile.in
|
|||||||
|
|
||||||
ifeq (@target_os@,mingw32)
|
ifeq (@target_os@,mingw32)
|
||||||
$(OBJS) $(MAINOBJ): win32.h
|
$(OBJS) $(MAINOBJ): win32.h
|
||||||
|
endif
|
||||||
|
|
||||||
$(LIBRUBY_SO): $(RUBYDEF)
|
$(LIBRUBY_SO): $(RUBYDEF)
|
||||||
|
|
||||||
$(RUBYDEF): $(LIBRUBY_A) $(PREP) $(RBCONFIG)
|
$(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)
|
$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
||||||
|
endif
|
||||||
|
|
||||||
clean-local::
|
clean-local::
|
||||||
@$(RM) $(RUBYDEF)
|
@$(RM) $(RUBYDEF)
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (@target_os@,cygwin)
|
ifeq (@target_os@,cygwin)
|
||||||
cygwin-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY).dll: $(LIBRUBY_A)
|
cygwin-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY).dll: $(LIBRUBY_A) $(RUBYDEF)
|
||||||
@NM@ --extern --defined $(LIBRUBY_A) | \
|
@DLLWRAP@ -s --def=$(RUBYDEF) -o $@
|
||||||
$(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
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean-local::
|
clean-local::
|
||||||
|
@ -143,15 +143,11 @@ class Exports::Mingw < Exports
|
|||||||
|
|
||||||
def each_export(objs)
|
def each_export(objs)
|
||||||
objdump(objs) do |l|
|
objdump(objs) do |l|
|
||||||
yield $1 if / [[:upper:]] _(.*)$/ =~ l
|
yield $1 if / [[:upper:]] _((?!Init_).*)$/ =~ l
|
||||||
end
|
end
|
||||||
yield "strcasecmp", "_stricmp"
|
yield "strcasecmp", "_stricmp"
|
||||||
yield "strncasecmp", "_strnicmp"
|
yield "strncasecmp", "_strnicmp"
|
||||||
end
|
end
|
||||||
|
|
||||||
def symbols()
|
|
||||||
@syms.select {|k, v| v}.sort.collect {|k, v| "#{k}=#{v}"}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
END {
|
END {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user