Build fail for 7.3.0 with in-tree binutils

Jonathan Wakely jwakely.gcc@gmail.com
Thu Jan 25 18:58:00 GMT 2018


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.



More information about the Gcc-help mailing list