aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in2
-rw-r--r--configure.in6
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 545348ebfc..7cf9e981f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Nov 25 10:39:14 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * Makefile.in (EXTLDFLAGS): export it.
+ * configure.in: add --no-undefined if --enable-shared is specified.
+ Gentoo enabled this option long time. Also, export EXTLDFALGS.
+
Fri Nov 25 08:48:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* configure.in: turn on PIE if --enable-shared is not specified.
diff --git a/Makefile.in b/Makefile.in
index cc8f31d6c2..abdee569a8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -57,7 +57,7 @@ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir)
XCFLAGS = @XCFLAGS@
CPPFLAGS = @CPPFLAGS@ $(INCFLAGS)
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
-EXTLDFLAGS =
+EXTLDFLAGS = @EXTLDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
diff --git a/configure.in b/configure.in
index 30be256903..38e444e743 100644
--- a/configure.in
+++ b/configure.in
@@ -2266,6 +2266,11 @@ AS_CASE("$enable_shared", [yes], [
if test "$rb_cv_binary_elf" = yes; then
SOLIBS='$(LIBS)'
fi
+
+ if test "$GCC" = yes; then
+ RUBY_TRY_CFLAGS(-Xlinker --no-undefined, RUBY_APPEND_OPTION(EXTLDFLAGS, -Xlinker --no-undefined))
+ fi
+
AS_CASE(["$target_os"],
[sunos4*], [
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
@@ -2613,6 +2618,7 @@ AC_SUBST(debugflags)dnl
AC_SUBST(warnflags)dnl
AC_SUBST(XCFLAGS)dnl
AC_SUBST(XLDFLAGS)dnl
+AC_SUBST(EXTLDFLAGS)dnl
AC_SUBST(LIBRUBY_LDSHARED)
AC_SUBST(LIBRUBY_DLDFLAGS)
AC_SUBST(RUBY_INSTALL_NAME)