This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Build fail for 7.3.0 with in-tree binutils
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Matt Godbolt <matt at godbolt dot org>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 25 Jan 2018 18:58:28 +0000
- Subject: Re: Build fail for 7.3.0 with in-tree binutils
- Authentication-results: sourceware.org; auth=none
- References: <CAFWXXN3P0-4-+sO4mSTjGn=+2_MbRQOXhACEGE7DM1zHe7b1Jg@mail.gmail.com> <CAH6eHdR3pqiPD8DRUqDsUR7=tzVHPf2HspTENRbUH2Z2TO4Wow@mail.gmail.com> <CAFWXXN1d6nQNEYaqJvD4UfdtTxwgGrGzy0pAcx5U5rcBDAV_=Q@mail.gmail.com> <CAH6eHdRSLOk6Yc9kAWjcS2yPpSvcN5WyNRk22__Ot-=Qz3UBoQ@mail.gmail.com> <CAH6eHdR3+ag0dq3dYPmsvYN2P1VvA995V1Siz3qPjFWDJ6v1xw@mail.gmail.com> <CAFWXXN3pG4p11PvAS9d+6f_8R=dYaiu1KmGdYm2T17LHXndQRg@mail.gmail.com>
On 25 January 2018 at 18:47, Matt Godbolt wrote:
> Thanks! I'll try 2.29 and see if that does the trick!
>
> In the spirit of trying to improve my process: How might one relocate a GCC?
> My understanding was that once paths had been "baked in" with `--prefix`
> they were set in stone.
Nope, quite the opposite. GCC uses no absolute paths except for system
dirs like /usr/include and /usr/lib (and they can be re-configured, or
avoided altogether with a sysroot).
> I'd love to use a more traditional installation
> process and then "relocate" once it's moved to the ultimate destination?
Moving it to the ultimate destination *is* the relocation, there's
nothing else needed.
So you can configure using --prefix=/some/empty/dir and then move
everything under /some/empty/dir to another location, and it will Just
Work. The only remnant of /some/empty/dir will be in the output of
'gcc -v' which will show the --prefix option.
If you'd prefer to avoid even that, you can configure without any
prefix, then do "make install DESTDIR=/some/empty/dir" to install
everything under that directory (DESTDIR is a GNU convention, see
https://www.gnu.org/prep/standards/html_node/DESTDIR.html for more
details). Then again just move verything from under /some/empty/dir to
another location. The downside of that is GCC won't know to look in
that path for binutils during its configure+bootstrap, because it
doesn't know about the path /some/empty/dir in advance, unlike when
you use --prefix. Using DESTDIR would probably work OK using your
combine tree build, where binutils is in-tree anyway.