Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 2c / 0e74af163e2d314e8d172d31539f24e4f0d26c
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 arlo.cworth.org (Postfix) with ESMTP id 394D66DE0948\r
6  for <notmuch@notmuchmail.org>; Sat, 13 Jun 2015 23:00:10 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.196\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.196 tagged_above=-999 required=5 tests=[AWL=0.186, \r
12  T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id hdEzx7CV_8iv for <notmuch@notmuchmail.org>;\r
16  Sat, 13 Jun 2015 23:00:08 -0700 (PDT)\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
18  [87.98.215.224])\r
19  by arlo.cworth.org (Postfix) with ESMTPS id 2107D6DE0350\r
20  for <notmuch@notmuchmail.org>; Sat, 13 Jun 2015 23:00:07 -0700 (PDT)\r
21 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
22  4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
23  id 1Z40x3-0002Yw-UM; Sun, 14 Jun 2015 05:59:25 +0000\r
24 Received: (nullmailer pid 14190 invoked by uid 1000); Sun, 14 Jun 2015\r
25  05:59:07 -0000\r
26 From: David Bremner <david@tethera.net>\r
27 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
28 Subject: [PATCH] lib, ruby: make use of -Wl,--no-undefined configurable\r
29 Date: Sun, 14 Jun 2015 07:58:44 +0200\r
30 Message-Id: <1434261524-14139-1-git-send-email-david@tethera.net>\r
31 X-Mailer: git-send-email 2.1.4\r
32 In-Reply-To: <1433142542-2307-3-git-send-email-david@tethera.net>\r
33 References: <1433142542-2307-3-git-send-email-david@tethera.net>\r
34 X-BeenThere: notmuch@notmuchmail.org\r
35 X-Mailman-Version: 2.1.18\r
36 Precedence: list\r
37 List-Id: "Use and development of the notmuch mail system."\r
38  <notmuch.notmuchmail.org>\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
40  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
42 List-Post: <mailto:notmuch@notmuchmail.org>\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
45  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
46 X-List-Received-Date: Sun, 14 Jun 2015 06:00:10 -0000\r
47 \r
48 In particular this is supposed to help build on systems (presumably\r
49 using a non-gnu ld) where this flag is not available.\r
50 ---\r
51  bindings/Makefile.local  |  4 +++-\r
52  bindings/ruby/extconf.rb |  5 +++--\r
53  configure                | 13 +++++++++++++\r
54  lib/Makefile.local       |  2 +-\r
55  4 files changed, 20 insertions(+), 4 deletions(-)\r
56 \r
57 diff --git a/bindings/Makefile.local b/bindings/Makefile.local\r
58 index 16817f5..d236f01 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 built\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 13a8dca..b967a4e 100755\r
90 --- a/configure\r
91 +++ b/configure\r
92 @@ -751,6 +751,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 @@ -955,6 +965,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 diff --git a/lib/Makefile.local b/lib/Makefile.local\r
120 index f9ecd50..b58b4e8 100644\r
121 --- a/lib/Makefile.local\r
122 +++ b/lib/Makefile.local\r
123 @@ -33,7 +33,7 @@ LIBRARY_SUFFIX = so\r
124  LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)\r
125  SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)\r
126  LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)\r
127 -LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) -Wl,--no-undefined\r
128 +LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) $(NO_UNDEFINED_LDFLAGS)\r
129  ifeq ($(PLATFORM),OPENBSD)\r
130  LIBRARY_LINK_FLAG += -lc\r
131  endif\r
132 -- \r
133 2.1.4\r
134 \r