Read the manpage of
-target option does not specify a directory, but an actual volume (emphasis mine):
The target volume is specified with the
-target parameter (
-tgt is accepted as a synonym). It must already be mounted when the installer command is invoked.
So, just run it, specifying your boot volume:
installer -pkg GCC-10.7.pkg -target /
I guess that should be enough. A package installer knows where to put its files.
Is there an uninstall counterpart to installer?
Not really. Every package installer also creates a so-called "receipt" which contains a list of those files that were installed. This receipt is mostly used for repairing permissions, but can also (theoretically) be used to "undo" package installations.
These receipt files are located in:
/var/db/receipts starting with OS X 10.6.
~/Library/Receipts/db/ in OS X 10.5 (but here, it's an Sqlite database)
/Library/Receipts in OS X 10.4
lsbom command, you can list the contents of such a receipt file.
lsbom -fls /var/db/receipts/some.receipt.bom
This gives you a list of files. If you need to, you can try to remove all of these files. But I have never seen somebody really encourage that. Your mileage may vary.