1 Return-Path: <bremner@tesseract.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id F401B431FD2
\r
6 for <notmuch@notmuchmail.org>; Fri, 6 Mar 2015 13:59:36 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5
\r
12 tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id AQhpaw6y13ZN for <notmuch@notmuchmail.org>;
\r
16 Fri, 6 Mar 2015 13:59:35 -0800 (PST)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 6D772431FCF
\r
22 for <notmuch@notmuchmail.org>; Fri, 6 Mar 2015 13:59:31 -0800 (PST)
\r
23 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
24 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
25 id 1YU0Gg-0000RV-B4; Fri, 06 Mar 2015 21:58:50 +0000
\r
26 Received: (nullmailer pid 30537 invoked by uid 1000); Fri, 06 Mar 2015
\r
28 From: David Bremner <david@tethera.net>
\r
29 To: notmuch@notmuchmail.org
\r
30 Subject: [Patch v2 2/4] build/ruby: make use of -Wl,--no-undefined
\r
32 Date: Fri, 6 Mar 2015 22:57:51 +0100
\r
33 Message-Id: <1425679073-30439-3-git-send-email-david@tethera.net>
\r
34 X-Mailer: git-send-email 2.1.4
\r
35 In-Reply-To: <1425679073-30439-1-git-send-email-david@tethera.net>
\r
36 References: <1420114600-28396-6-git-send-email-david@tethera.net>
\r
37 <1425679073-30439-1-git-send-email-david@tethera.net>
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Fri, 06 Mar 2015 21:59:38 -0000
\r
52 In particular this is supposed to help build on systems (presumably
\r
53 using a non-gnu ld) where this flag is not available.
\r
55 bindings/Makefile.local | 4 +++-
\r
56 bindings/ruby/extconf.rb | 5 +++--
\r
57 configure | 13 +++++++++++++
\r
58 3 files changed, 19 insertions(+), 3 deletions(-)
\r
60 diff --git a/bindings/Makefile.local b/bindings/Makefile.local
\r
61 index 6ed1344..210055f 100644
\r
62 --- a/bindings/Makefile.local
\r
63 +++ b/bindings/Makefile.local
\r
64 @@ -5,7 +5,9 @@ dir := bindings
\r
65 # force the shared library to be build
\r
66 ruby-bindings: lib/libnotmuch.so
\r
67 ifeq ($(HAVE_RUBY_DEV),1)
\r
68 - cd $(dir)/ruby && ruby extconf.rb --vendor
\r
69 + cd $(dir)/ruby && \
\r
70 + EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
\r
71 + ruby extconf.rb --vendor
\r
72 $(MAKE) -C $(dir)/ruby
\r
74 @echo Missing dependency, skipping ruby bindings
\r
75 diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
\r
76 index 6160db2..6d5607e 100644
\r
77 --- a/bindings/ruby/extconf.rb
\r
78 +++ b/bindings/ruby/extconf.rb
\r
79 @@ -10,8 +10,9 @@ dir = File.join('..', '..', 'lib')
\r
81 $INCFLAGS = "-I#{dir} #{$INCFLAGS}"
\r
83 -# make sure there are no undefined symbols
\r
84 -$LDFLAGS += ' -Wl,--no-undefined'
\r
85 +if ENV['EXTRA_LDFLAGS']
\r
86 + $LDFLAGS += " " + ENV['EXTRA_LDFLAGS']
\r
89 def have_local_library(lib, path, func, headers = nil)
\r
90 checking_for checking_message(func, lib) do
\r
91 diff --git a/configure b/configure
\r
92 index 3ca9bed..409bb60 100755
\r
95 @@ -722,6 +722,16 @@ else
\r
96 as_needed_ldflags=""
\r
99 +printf "Checking for -Wl,--no-undefined... "
\r
100 +if ${CC} -Wl,--no-undefined -o minimal minimal.c >/dev/null 2>&1
\r
103 + no_undefined_ldflags="-Wl,--no-undefined"
\r
105 + printf "No (nothing to worry about).\n"
\r
106 + no_undefined_ldflags=""
\r
110 printf "Checking for available C++ compiler warning flags... "
\r
111 for flag in -Wall -Wextra -Wwrite-strings; do
\r
112 @@ -926,6 +936,9 @@ RPATH_LDFLAGS = ${rpath_ldflags}
\r
113 # Flags needed to have linker link only to necessary libraries
\r
114 AS_NEEDED_LDFLAGS = ${as_needed_ldflags}
\r
116 +# Flags to have the linker flag undefined symbols in object files
\r
117 +NO_UNDEFINED_LDFLAGS = ${no_undefined_ldflags}
\r
119 # Whether valgrind header files are available
\r
120 HAVE_VALGRIND = ${have_valgrind}
\r