On Mon, Nov 05 2012, Blake Jones <blakej@foo.net> 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