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