[haiku-commits] Re: r36456 - in haiku/trunk/build: jam scripts

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 25 Apr 2010 11:07:41 +0200

On 2010-04-25 at 00:28:26 [+0200], Oliver Tappe <zooey@xxxxxxxxxxxxxxx> wrote:
> On 2010-04-24 at 19:59:27 [+0000], Matt Madia <mattmadia@xxxxxxxxx> wrote:
> [ ... ]
> > Also, is there a programmatic way to confirm if a set of libraries are
> > gcc agnostic?
> > Otherwise, I'd be partially guessing while updating OptionalPackages.
> 
> Being gcc-agnostic in general means to not make use of C++ at all, I guess. 
> I
> do not know a precise way to find out if any lib does that, but you could 
> try
> cheating a bit by running this:
> 
>     nm <lib> | grep "\w _Z"
> 
> Any library/app that shows any results for that is a C++ library and thus 
> not
> compatible between gccs.

Of course this also catches C symbols that start with "_Z". A more reliable 
alternative:

  nm --demangle <lib> | grep '('

Only C++ functions will be found this way.

CU, Ingo

Other related posts: