dovecot-2.1: Enable --no-undefined linker flag only for Linux.

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 19 18:41:59 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/7d9163ce4253
changeset: 13516:7d9163ce4253
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 19 18:41:36 2011 +0300
description:
Enable --no-undefined linker flag only for Linux.
BSDs don't seem to be happy with it.

diffstat:

 configure.in |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 02c84406c661 -r 7d9163ce4253 configure.in
--- a/configure.in	Mon Sep 19 18:33:40 2011 +0300
+++ b/configure.in	Mon Sep 19 18:41:36 2011 +0300
@@ -2674,7 +2674,15 @@
 
 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
 if test "$with_gnu_ld" = yes; then
-  NOPLUGIN_LDFLAGS="-Wl,--as-needed -Wl,--no-undefined"
+  NOPLUGIN_LDFLAGS="-Wl,--as-needed"
+  case "$host_os" in
+    linux*)
+      # This appears to work in Linux, but not in BSDs..
+      NOPLUGIN_LDFLAGS="$NOPLUGIN_LDFLAGS -Wl,--no-undefined"
+      ;;
+    *)
+      ;;
+  esac
   LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS"
   AC_SUBST(NOPLUGIN_LDFLAGS)
 fi


More information about the dovecot-cvs mailing list