summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog19
-rw-r--r--configure.in8
-rw-r--r--cygwin/GNUmakefile.in20
-rw-r--r--defines.h2
4 files changed, 27 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index d0faa38..239f7e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/configure.in b/configure.in
index e115561..7bf4e39 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index 0acb327..7e8672b 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -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
diff --git a/defines.h b/defines.h
index 0aee7d8..24bb3b0 100644
--- a/defines.h
+++ b/defines.h
@@ -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