Re: [PATCH v2 07/10] gen-version-script: parse Solaris "nm" output (Solaris support)
authorTomi Ollila <tomi.ollila@iki.fi>
Tue, 6 Nov 2012 16:58:50 +0000 (18:58 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:23 +0000 (09:50 -0800)
f1/e3a2b1c72fa205cc6674f451701550d7986b92 [new file with mode: 0644]

diff --git a/f1/e3a2b1c72fa205cc6674f451701550d7986b92 b/f1/e3a2b1c72fa205cc6674f451701550d7986b92
new file mode 100644 (file)
index 0000000..c28c882
--- /dev/null
@@ -0,0 +1,100 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5CBCB431FB6\r
+       for <notmuch@notmuchmail.org>; Tue,  6 Nov 2012 08:58:50 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id UhhF-NFAErTM for <notmuch@notmuchmail.org>;\r
+       Tue,  6 Nov 2012 08:58:50 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id CC3B7431FAE\r
+       for <notmuch@notmuchmail.org>; Tue,  6 Nov 2012 08:58:49 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id BD917100094;\r
+       Tue,  6 Nov 2012 18:58:50 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Blake Jones <blakej@foo.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 07/10] gen-version-script: parse Solaris "nm" output\r
+       (Solaris support)\r
+In-Reply-To: <1352142123-18286-8-git-send-email-blakej@foo.net>\r
+References: <1352142123-18286-1-git-send-email-blakej@foo.net>\r
+       <1352142123-18286-8-git-send-email-blakej@foo.net>\r
+User-Agent: Notmuch/0.14+81~gb8371cd (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 06 Nov 2012 18:58:50 +0200\r
+Message-ID: <m2sj8mzn05.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 06 Nov 2012 16:58:50 -0000\r
+\r
+On Mon, Nov 05 2012, Blake Jones <blakej@foo.net> wrote:\r
+\r
+> The output of "nm" on Solaris is substantially different from that on\r
+> Linux, and the current version of gen-version-script is tied to the\r
+> Linux "nm" output.  This patch separates the parts of "nm" processing\r
+> which are dependent on the output format into a couple shell functions,\r
+> and makes another shell function to use the appropriate version of\r
+> "c++filt" to demangle symbols.  It also modifies lib/Makefile.local\r
+> to pass the generated symbol table correctly to the Solaris linker.\r
+\r
+\r
+// stuff deleted\r
+\r
+> index 76670d5..d7d96da 100644\r
+> --- a/lib/gen-version-script.sh\r
+> +++ b/lib/gen-version-script.sh\r
+> @@ -1,3 +1,4 @@\r
+> +#!/bin/sh\r
+>  \r
+>  # we go through a bit of work to get the unmangled names of the\r
+>  # typeinfo symbols because of\r
+> @@ -11,10 +12,44 @@ fi\r
+>  HEADER=$1\r
+>  shift\r
+>  \r
+> +if [ `uname -s` == SunOS ] ; then\r
+> +    #\r
+> +    # Using Solaris "nm", a defined symbol looks like this:\r
+> +    #\r
+\r
+The POSIX / Bourne -comformant equality comparison is '='. \r
+\r
+e.g.\r
+\r
+$ ./heirloom-sh/sh -c ' [ a == b ] || echo x'\r
+./heirloom-sh/sh: test: unknown operator ==\r
+zsh: exit 1     ./heirloom-sh/sh -c ' [ a == b ] || echo x'\r
+\r
+Interesting that Solaris /bin/sh did not fail there...\r
+\r
+Hmm, gen-version-script doesn't have shebang... it is run like:\r
+\r
+sh $(srcdir)/$(lib)/gen-version-script.sh $< $(libnotmuch_modules) > $@\r
+\r
+in lib/Makefile.local -- taking sh fron PATH.\r
+\r
+\r
+Tomi\r