coreboot-kgpe-d16/util/crossgcc
Patrick Georgi 095db339f7 util/crossgcc: Allow building a new gcc against new binutils with -D
With -D, the newly built toolchain isn't installed into $prefix/...
but into $DESTDIR/$prefix/... while being built for $prefix alone.

This is useful for distributions, but it breaks down when the build
host already has the toolchain installed in $prefix without proper
build isolation (cf. gentoo):

In such cases libgcc etc are built using the new compiler (as gcc's
build system is smart enough to state the path explicitly), but that
compiler then uses its regular algorithm to determine the path to as,
ld, ...
That makes it use the tools from $prefix, which might differ in formats
(assembly, certain object file flags, ...): nds32le-elf in particular
has rather unstable formats still, and so new compilers can't work
with old binutils.

The approach to deal with this is to take an unused path that's
specified by gcc's build system ($out/gcc/$arch/$version) and symlink
it to the new toolchain - these explicitly given directories take
precedence over the default search path, and so the new binutils
are used.

Change-Id: Ia9a262e73f56cd486a2ae07422b598c205a03aed
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/27241
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-06-26 20:58:01 +00:00
..
patches buildgcc: Update IASL to 20180531 2018-06-03 23:08:49 +00:00
sum crossgcc: Update to clang 6.0 & cmake 3.11.3 2018-06-11 08:28:55 +00:00
Dockerfile crossgcc/Dockerfile: Add gnat to build the Ada toolchain 2017-03-23 18:55:18 +01:00
Makefile crossgcc/Makefile: don't allow to call buildgcc in parallel 2018-04-09 09:40:34 +00:00
Makefile.inc util/crossgcc: update jenkins-build-toolchain 2017-01-04 22:18:55 +01:00
README Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
buildgcc util/crossgcc: Allow building a new gcc against new binutils with -D 2018-06-26 20:58:01 +00:00
edk2tools.txt crossgcc: fix edk2 tools_def template 2017-11-30 16:51:16 +00:00
getopt.c

README

README
------

This is a cross toolchain builder for -elf toolchains (ie. no libc support)

known working:
  i386-elf
  x86_64-elf
  powerpc-elf
  mipsel-elf
  arm-elf
  armv7a-eabi
  aarch64-elf

known broken:
  alpha-elf
  powerpc64-elf