Fink:Policy:GCC

From the Fink Wiki
Revision as of 18:31, 5 April 2006 by RangerRick (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


The GCC field

A package needs a GCC field if anything in the package is compiled with c++ or g++.

This is a practical guide. For policy information see the packaging manual and email to fink-devel .

How to tell if a binary has been compiled with g++

A good way to tell if a binary in your package was compiled with g++ is:

nm -g $binary > symbols
c++filt3 < symbols > symbols.filt
diff symbols symbols.filt

In most cases, if there is a difference it was compiled with g++ (some exceptions exist involving weirdly named C functions).

The script

The script gcc-field can check one or more packages to see if they need a GCC field.

To check one package, run it like this:

gcc-field $package

If it prints anything, the package doesn't have the right field (or is an exceptional case). If it doesn't print anything, you're ok!

You can also check all your packages:

gcc-field --maintainer=Vasilevsky

Or check a set of files:

find ./root-foo | gcc-field -

Please run gcc-field --help for details.