From: Blake Jones Date: Thu, 8 Nov 2012 06:29:12 +0000 (+1600) 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=f80d99b9477ffdae3d9a8cbd807391eddf079553;p=notmuch-archives.git Re: [PATCH v2 07/10] gen-version-script: parse Solaris "nm" output (Solaris support) --- diff --git a/e7/edbb67529dd124a790ea2eee252bfafedcf355 b/e7/edbb67529dd124a790ea2eee252bfafedcf355 new file mode 100644 index 000000000..eb6f8a4a4 --- /dev/null +++ b/e7/edbb67529dd124a790ea2eee252bfafedcf355 @@ -0,0 +1,92 @@ +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 47BC3431FB6 + for ; Wed, 7 Nov 2012 22:29:19 -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 VDqIFEl6R7m8 for ; + Wed, 7 Nov 2012 22:29:18 -0800 (PST) +Received: from foo.net (70-36-235-136.dsl.static.sonic.net [70.36.235.136]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id AF088431FAE + for ; Wed, 7 Nov 2012 22:29:18 -0800 (PST) +Received: from foo.net (localhost [127.0.0.1]) + by foo.net (8.14.5+Sun/8.14.5) with ESMTP id qA86TCsD024583; + Wed, 7 Nov 2012 22:29:12 -0800 (PST) +To: Tomi Ollila +Subject: Re: [PATCH v2 07/10] gen-version-script: parse Solaris "nm" output + (Solaris support) +In-Reply-To: Your message of "Tue, 06 Nov 2012 18:58:50 +0200." + +Date: Wed, 07 Nov 2012 22:29:12 -0800 +Message-ID: <24582.1352356152@foo.net> +From: Blake Jones +X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 + (foo.net [127.0.0.1]); Wed, 07 Nov 2012 22:29:12 -0800 (PST) +Cc: notmuch@notmuchmail.org +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: Thu, 08 Nov 2012 06:29:20 -0000 + +>> @@ -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 '='. + +Sigh, of course it is. Fixed. + +> 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... + +I was running on Solaris 11.1, which uses ksh93 as its /bin/sh. You're +absolutely right that Solaris 10 would fall over, though. + +Similarly, the following line: + + demangled=$(demangle $sym) + +doesn't work on traditional sh. I've replaced $() with ``. + +> 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. + +I updated the first line from the #! invocation to a comment saying + + # This script is invoked via "sh .../gen-version-script.sh". + +Would a respun version of these patches help toward testing? + +Blake