I’m trying to install GCC into /my/custom/path/gcc
but for some reason it installs into the normal installation path.
the commands i’m using:
configure --target=i686-pc-linux-gnu --disable-nls --enable-languages=c,c++ --without-headers
make DESTDIR=/my/custom/path/gcc
make DESTDIR=/my/custom/path/gcc install
What am I doing wrong?
You should run (in a new build tree outside of the source tree)
and then GCC will become installed in
/my/custom/path/gcc/bin/with include files in/my/custom/path/gcc/include/, libraries in/my/custom/path/gcc/lib/etc etcI suggest using
/opt/or$HOME/pubas your prefix and you might also be interested by the--program-suffix=-foooption(do that in a fresh new build tree outside of the source tree; your previous one is rotten)
After successive compilation with
make, you can run in your build treeand finally, you can copy the definitive files with something like
You may need to run this copy as root…
PS the installation prefix is built-in the
gccdriver binary, which actually runscc1orcc1plusetc…