mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in (RUBY_PROG_GNU_LD): check whether the linker is GNU ld.
* ext/extmk.rb.in (create_makefile): add -Wl,-no-undefined to $DLDFLAGS on Linux if GNU ld is used and --enable-shared is specified. * configure.in (RUBY_MINGW32): backport from 1.7. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
50bb8a8699
commit
b054ffab16
4 changed files with 64 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
Fri Oct 4 14:23:08 2002 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* configure.in (RUBY_PROG_GNU_LD): check whether the linker is GNU ld.
|
||||
|
||||
* ext/extmk.rb.in (create_makefile): add -Wl,-no-undefined to $DLDFLAGS
|
||||
on Linux if GNU ld is used and --enable-shared is specified.
|
||||
|
||||
* configure.in (RUBY_MINGW32): backport from 1.7.
|
||||
|
||||
Thu Oct 3 20:09:52 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* ext/tcltklib/tcltklib.c (invoke_queue_handler): make singleton
|
||||
|
|
52
configure.in
52
configure.in
|
@ -6,6 +6,46 @@ dnl workaround for autoconf 2.53
|
|||
m4_pattern_allow([^[L]IBOBJS$])
|
||||
'
|
||||
|
||||
AC_DEFUN(RUBY_MINGW32,
|
||||
[case "$host_os" in
|
||||
cygwin*)
|
||||
AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
|
||||
[AC_TRY_CPP([
|
||||
#ifndef __MINGW32__
|
||||
# error
|
||||
#endif
|
||||
], rb_cv_mingw32=yes,rb_cv_mingw32=no)
|
||||
rm -f conftest*])
|
||||
test "$rb_cv_mingw32" = yes && target_os="mingw32"
|
||||
;;
|
||||
esac])
|
||||
|
||||
AC_DEFUN(RUBY_CPPOUTFILE,
|
||||
[AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile,
|
||||
[cppflags=$CPPFLAGS
|
||||
CPPFLAGS='-o conftest.i'
|
||||
AC_TRY_CPP([], rb_cv_cppoutfile=yes, rb_cv_cppoutfile=no)
|
||||
if test "$rb_cv_cppoutfile" = yes; then
|
||||
CPPOUTFILE=$CPPFLAGS
|
||||
else
|
||||
CPPOUTFILE='> conftest.i'
|
||||
fi
|
||||
CPPFLAGS=$cppflags
|
||||
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]*"'`
|
||||
|
@ -91,6 +131,14 @@ fi
|
|||
AC_PROG_CC
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
|
||||
RUBY_PROG_GNU_LD
|
||||
RUBY_CPPOUTFILE
|
||||
|
||||
OUTFLAG='-o '
|
||||
AC_SUBST(OUTFLAG)
|
||||
|
||||
RUBY_MINGW32
|
||||
|
||||
AC_PROG_YACC
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
|
@ -550,7 +598,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
|
||||
|
@ -577,7 +625,7 @@ if test "$with_dln_a_out" != yes; then
|
|||
LDFLAGS="-rdynamic"
|
||||
DLDFLAGS='-Wl,-soname,$(.TARGET)'
|
||||
else
|
||||
test "$GCC" = yes && `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null || LDSHARED="ld -Bshareable"
|
||||
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
|
||||
fi
|
||||
rb_cv_dlopen=yes ;;
|
||||
netbsd*) LDSHARED='${CC} -shared'
|
||||
|
|
|
@ -377,6 +377,9 @@ def create_makefile(target)
|
|||
end
|
||||
|
||||
$DLDFLAGS = '@DLDFLAGS@'
|
||||
if /linux/ =~ RUBY_PLATFORM and $configure_args['--enable-shared'] and "@GNU_LD@" == "yes"
|
||||
$DLDFLAGS << " -Wl,-no-undefined"
|
||||
end
|
||||
|
||||
if $configure_args['--enable-shared'] or "@LIBRUBY@" != "@LIBRUBY_A@"
|
||||
$libs = "@LIBRUBYARG@ " + $libs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define RUBY_VERSION "1.6.8"
|
||||
#define RUBY_RELEASE_DATE "2002-10-03"
|
||||
#define RUBY_RELEASE_DATE "2002-10-04"
|
||||
#define RUBY_VERSION_CODE 168
|
||||
#define RUBY_RELEASE_CODE 20021003
|
||||
#define RUBY_RELEASE_CODE 20021004
|
||||
|
|
Loading…
Add table
Reference in a new issue