summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--configure.in14
-rw-r--r--ext/extmk.rb4
-rw-r--r--version.h4
4 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9850e701fa..7d2233b34a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Oct 4 13:05:58 2002 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * configure.in (RUBY_PROG_GNU_LD): check whether the linker is GNU ld.
+
+ * ext/extmk.rb (create_makefile): add -Wl,-no-undefined to $DLDFLAGS
+ on Linux if GNU ld is used and --enable-shared is specified.
+
Thu Oct 3 20:22:11 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* bcc32/mkexports.rb: to work on cygwin via telnet.
diff --git a/configure.in b/configure.in
index 90d2230f6b..b3425ceffd 100644
--- a/configure.in
+++ b/configure.in
@@ -32,6 +32,17 @@ AC_SUBST(CPPOUTFILE)
rm -f conftest*])
])
+AC_DEFUN(RUBY_PROG_GNU_LD,
+[AC_CACHE_CHECK(whether the linker is GNU ld, rb_cv_prog_gnu_ld,
+[if `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null; then
+ rb_cv_prog_gnu_ld=yes
+else
+ rb_cv_prog_gnu_ld=no
+fi
+])
+GNU_LD=$rb_cv_prog_gnu_ld
+AC_SUBST(GNU_LD)])
+
rb_version=`grep RUBY_VERSION $srcdir/version.h`
MAJOR=`expr "$rb_version" : '#define RUBY_VERSION "\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*"'`
MINOR=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*"'`
@@ -127,6 +138,7 @@ fi
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
+RUBY_PROG_GNU_LD
RUBY_CPPOUTFILE
OUTFLAG='-o '
@@ -729,7 +741,7 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes;;
solaris*) if test "$GCC" = yes; then
LDSHARED='$(CC) -Wl,-G'
- if `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null; then
+ if test $rb_cv_prog_gnu_ld = yes; then
LDFLAGS="-Wl,-E"
LDSHARED="$LDSHARED -shared"
fi
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 06d46f1064..50b2890a22 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -44,6 +44,7 @@ require 'shellwords'
$topdir = File.expand_path(".")
$top_srcdir = srcdir
+# avoid warning for $VERBOSE mode
Object.class_eval do remove_method :create_makefile end
def create_makefile(target)
@@ -64,6 +65,9 @@ def create_makefile(target)
end
$DLDFLAGS = CONFIG["DLDFLAGS"].dup
+ if /linux/ =~ RUBY_PLATFORM and $configure_args['--enable-shared'] and CONFIG["GNU_LD"] == "yes"
+ $DLDFLAGS << " -Wl,-no-undefined"
+ end
if $configure_args['--enable-shared'] or CONFIG["LIBRUBY"] != CONFIG["LIBRUBY_A"]
$libs = CONFIG["LIBRUBYARG"] + " " + $libs
diff --git a/version.h b/version.h
index 6ab43d690d..ff96c54607 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.3"
-#define RUBY_RELEASE_DATE "2002-10-03"
+#define RUBY_RELEASE_DATE "2002-10-04"
#define RUBY_VERSION_CODE 173
-#define RUBY_RELEASE_CODE 20021003
+#define RUBY_RELEASE_CODE 20021004