I'm trying to install gcc from hp with swinstall but what happens is the following:
I change source to the correct depot, it complains it can't find anything, when I change target to /usr/local, it shows the depot in the list. Next, I mark it for install, install it, but then it gets installed in /usr/local/usr/local
So I changed the location, by default it is /usr/local, but I can't remove that because when I use a different location it still installs under /usr/local/something/else.
It doesn't want to use / as target though. Apperently I'm missing something but I don't know what.
You can't do that. swinstall must install stuff in the intended directory. The idea of a target is so you can remote mount the entire filesystem of another host and install using, say, /remote/anotherbox/root/ as a target. Then when sign on to anotherbox, gcc would still be in /usr/local/. You need to let swinstall install gcc in /usr/local. You can first make /usr/local a symbolic link or a loopback mount to another place, but these must be permanent. gcc needs to know where it will reside at build time and will try to find stuff in /usr/local. After the install, you can symlink it elsewhere if you really must.
To install gcc elsewhere, you will need to download the gcc source code and install it yourself. This won't work with /usr/bin/cc which is an old pre-ansi K&R C compiler. You will need to obtain HP's Ansi-C compiler.