* configure.in: should not use def file, use ld with

--export-all-symbols option on Cygwin/MinGW.
* defines.h: ditto.
* cygwin/GNUmakefile.in: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2003-06-01 12:58:56 +00:00
Родитель dc13952417
Коммит fd681fe0e5
4 изменённых файлов: 27 добавлений и 22 удалений

Просмотреть файл

@ -1,3 +1,12 @@
Sun Jun 1 21:50:01 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: should not use def file, use ld with
--export-all-symbols option on Cygwin/MinGW.
* defines.h: ditto.
* cygwin/GNUmakefile.in: ditto.
Sun Jun 01 13:33:49 2003 Takaaki Uematsu <uema2x@jcom.home.ne.jp>
* wince/string_wce.c: add strpbrk() for hpcpro support.
@ -19,14 +28,14 @@ Sat May 31 04:36:54 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Fri May 30 23:18:01 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
* ext/syck/rubyext.c (rb_syck_mktime): seconds calculated wrong.
* ext/syck/rubyext.c (rb_syck_mktime): seconds calculated wrong.
* ext/syck/gram.c: flexibility to anchors and transfer methods on
collections.
* ext/syck/gram.c: flexibility to anchors and transfer methods on
collections.
* ext/syck/token.c: hex escapes.
* ext/syck/token.c: hex escapes.
* lib/yaml/basenode.rb: YamlNode references changed to YAML::BaseNode.
* lib/yaml/basenode.rb: YamlNode references changed to YAML::BaseNode.
Fri May 30 22:28:04 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>

Просмотреть файл

@ -833,7 +833,7 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes;;
cygwin*|mingw*) : ${LDSHARED="${CC} -shared -s"}
XLDFLAGS='-Wl,--stack,0x02000000'
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import "'$(DEFFILE)'
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import,--export-all"
rb_cv_dlopen=yes ;;
hiuxmpp) LDSHARED='ld -r' ;;
atheos*) LDSHARED="$CC -shared"
@ -1166,7 +1166,6 @@ case "$target_os" in
esac
;;
cygwin*|mingw*)
EXPORT_PREFIX=' '
case "$target_os" in
cygwin*)
RUBY_SO_NAME=$target_os-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR}
@ -1180,14 +1179,13 @@ case "$target_os" in
COMMON_HEADERS="windows.h winsock.h"
;;
esac
XCFLAGS="$XCFLAGS -DRUBY_EXPORT"
XCFLAGS="$XCFLAGS"
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
if test x"$enable_shared" = xyes; then
LIBRUBY_SO='$(RUBY_SO_NAME)'.dll
LIBRUBY_DLDFLAGS='-Wl,--out-implib=$(LIBRUBY) $(RUBYDEF)'
LIBRUBY='lib$(LIBRUBY_SO).a'
else
LIBRUBY_SO=dummy
LIBRUBY_DLDFLAGS=''
LIBRUBY='lib$(RUBY_SO_NAME).a'
LIBRUBYARG='-l$(RUBY_SO_NAME)'
fi

Просмотреть файл

@ -6,6 +6,7 @@ ifneq ($(ENABLE_SHARED),yes)
RUBY_EXP = $(RUBY_INSTALL_NAME).exp
EXTOBJS = $(RUBY_EXP)
LIBRUBYARG = $(LIBRUBY_A)
LIBRUBY_SO =
endif
ifeq ($(RUBY_INSTALL_NAME),ruby)
@ -14,12 +15,11 @@ else
RUBYW_INSTALL_NAME = $(subst ruby,rubyw,$(RUBY_INSTALL_NAME))
endif
WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT)
RUBYDEF = $(RUBY_INSTALL_NAME).def
SOLIBS := $(RUBY_SO_NAME).res.@OBJEXT@ $(SOLIBS)
EXTOBJS += $(@:$(EXEEXT)=.res.@OBJEXT@)
$(LIBRUBY_SO): $(RUBYDEF) $(RUBY_SO_NAME).res.@OBJEXT@ $(RUBY_EXP)
$(LIBRUBY): $(LIBRUBY_SO)
$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
$(RUBY_EXP) $(LIBRUBY_SO): $(RUBY_SO_NAME).res.@OBJEXT@
%.res.@OBJEXT@: %.rc
@WINDRES@ --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@
@ -36,14 +36,12 @@ $(WPROGRAM): $(RUBYW_INSTALL_NAME).res.@OBJEXT@
$(PURIFY) $(CC) -mwindows -e _mainCRTStartup $(LDFLAGS) $(XLDFLAGS) \
$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
$(RUBYDEF): $(LIBRUBY_A)
echo EXPORTS > $(RUBYDEF)
@NM@ --extern-only --defined-only $(LIBRUBY_A) | sed -n 's/.* [CDT] _//p' >> $(RUBYDEF)
$(RUBY_EXP): $(RUBYDEF)
@DLLWRAP@ --output-exp=$(RUBY_EXP) --output-lib=$(LIBRUBY) \
--def=$(RUBYDEF) $(LIBRUBY_A) $(LIBS) -o $(PROGRAM)
rm $(PROGRAM)
$(RUBY_EXP): $(LIBRUBY_A)
@DLLWRAP@ --target=@target_os@ --driver-name=$(CC) \
--output-exp=$(RUBY_EXP) \
--export-all $(LIBRUBY_A) $(LIBS) -o $(PROGRAM)
$(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.o $(SOLIBS) -o $(PROGRAM)
@rm -f $(PROGRAM)
GNUmakefile: $(srcdir)/cygwin/GNUmakefile.in

Просмотреть файл

@ -125,7 +125,7 @@ void xfree _((void*));
#endif
#undef RUBY_EXTERN
#if defined __CYGWIN__ || defined _WIN32
#if defined _WIN32 && !defined __GNUC__
# ifndef RUBY_EXPORT
# define RUBY_EXTERN extern __declspec(dllimport)
# endif