[PATCH] test: don't use dump and restore in a pipeline
[notmuch-archives.git] / 90 / b41b472e42f4eef787b5fb693adf071b7ea7f9
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 E91D3429E2E\r
6         for <notmuch@notmuchmail.org>; Thu,  1 Jan 2015 04:17:21 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 alBPRuaZkeXo for <notmuch@notmuchmail.org>;\r
16         Thu,  1 Jan 2015 04:17:21 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 97CBD429E29\r
21         for <notmuch@notmuchmail.org>; Thu,  1 Jan 2015 04:17:17 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <bremner@tesseract.cs.unb.ca>)\r
24         id 1Y6egn-00054A-15; Thu, 01 Jan 2015 08:17:17 -0400\r
25 Received: (nullmailer pid 28811 invoked by uid 1000); Thu, 01 Jan 2015\r
26         12:16:50 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [PATCH 2/5] build/ruby: make use of -Wl,--no-undefined configurable\r
30 Date: Thu,  1 Jan 2015 13:16:37 +0100\r
31 Message-Id: <1420114600-28396-3-git-send-email-david@tethera.net>\r
32 X-Mailer: git-send-email 2.1.3\r
33 In-Reply-To: <1420114600-28396-1-git-send-email-david@tethera.net>\r
34 References: <1420114600-28396-1-git-send-email-david@tethera.net>\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Thu, 01 Jan 2015 12:17:22 -0000\r
48 \r
49 In particular this is supposed to help build on systems (presumably\r
50 using a non-gnu ld) where this flag is not available.\r
51 ---\r
52  bindings/Makefile.local  |  4 +++-\r
53  bindings/ruby/extconf.rb |  5 +++--\r
54  configure                | 13 +++++++++++++\r
55  3 files changed, 19 insertions(+), 3 deletions(-)\r
56 \r
57 diff --git a/bindings/Makefile.local b/bindings/Makefile.local\r
58 index 6ed1344..210055f 100644\r
59 --- a/bindings/Makefile.local\r
60 +++ b/bindings/Makefile.local\r
61 @@ -5,7 +5,9 @@ dir := bindings\r
62  # force the shared library to be build\r
63  ruby-bindings: lib/libnotmuch.so\r
64  ifeq ($(HAVE_RUBY_DEV),1)\r
65 -       cd $(dir)/ruby && ruby extconf.rb --vendor\r
66 +       cd $(dir)/ruby && \\r
67 +               EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \\r
68 +               ruby extconf.rb --vendor\r
69         $(MAKE) -C $(dir)/ruby\r
70  else\r
71         @echo Missing dependency, skipping ruby bindings\r
72 diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb\r
73 index 6160db2..6d5607e 100644\r
74 --- a/bindings/ruby/extconf.rb\r
75 +++ b/bindings/ruby/extconf.rb\r
76 @@ -10,8 +10,9 @@ dir = File.join('..', '..', 'lib')\r
77  # includes\r
78  $INCFLAGS = "-I#{dir} #{$INCFLAGS}"\r
79  \r
80 -# make sure there are no undefined symbols\r
81 -$LDFLAGS += ' -Wl,--no-undefined'\r
82 +if ENV['EXTRA_LDFLAGS']\r
83 +  $LDFLAGS += " " + ENV['EXTRA_LDFLAGS']\r
84 +end\r
85  \r
86  def have_local_library(lib, path, func, headers = nil)\r
87    checking_for checking_message(func, lib) do\r
88 diff --git a/configure b/configure\r
89 index 7df3b29..1a4c956 100755\r
90 --- a/configure\r
91 +++ b/configure\r
92 @@ -712,6 +712,16 @@ else\r
93      as_needed_ldflags=""\r
94  fi\r
95  \r
96 +printf "Checking for -Wl,--no-undefined... "\r
97 +if ${CC} -Wl,--no-undefined -o minimal minimal.c >/dev/null 2>&1\r
98 +then\r
99 +    printf "Yes.\n"\r
100 +    no_undefined_ldflags="-Wl,--no-undefined"\r
101 +else\r
102 +    printf "No (nothing to worry about).\n"\r
103 +    no_undefined_ldflags=""\r
104 +fi\r
105 +\r
106  WARN_CXXFLAGS=""\r
107  printf "Checking for available C++ compiler warning flags... "\r
108  for flag in -Wall -Wextra -Wwrite-strings; do\r
109 @@ -916,6 +926,9 @@ RPATH_LDFLAGS = ${rpath_ldflags}\r
110  # Flags needed to have linker link only to necessary libraries\r
111  AS_NEEDED_LDFLAGS = ${as_needed_ldflags}\r
112  \r
113 +# Flags to have the linker flag undefined symbols in object files\r
114 +NO_UNDEFINED_LDFLAGS = ${no_undefined_ldflags}\r
115 +\r
116  # Whether valgrind header files are available\r
117  HAVE_VALGRIND = ${have_valgrind}\r
118  \r
119 -- \r
120 2.1.3\r
121 \r