coreboot-kgpe-d16/util/crossgcc
Nico Huber 234d246535 buildgcc: Add option to bootstrap a host gcc
Bootstrapping gcc is the recommended way if your host gcc's version
doesn't match the gcc version you're going to build. While a build
with an outdated host gcc usually succeeds, an outdated gnat seems
to be a bigger issue.

v3: Some library controversy: gcc likes the libraries it ships with
    most but we don't want to install shared libraries. So we build
    them static --disable-shared) and install only the minimum
    (libgcc, libada, libstdc++). However, as the code of these
    libraries might be used to build a shared library we have to
    compile them with `-fPIC`.

v4: o Updated getopt strings.
    o The workaround for clang (-fbracket-depth=1024) isn't needed
      for bootstrapping and also breaks the build, as clang is only
      used for the first stage in that case and gcc doesn't know
      that option.

So far build tested with `make BUILDGCC_OPTIONS="-b -l c,ada"` on
  o Ubuntu 14.04 "Trusty Tahr" (i386)
  o Debian 8 "Jessie" (x86_64) (building python (-S) works too)
  o current Arch Linux (x86_64)
  o FreeBSD 10.3 (x86_64) (with gcc-aux package)

and with clang host compiler, thus C only: `make BUILDGCC_OPTIONS="-b"`
on
  o Debian 8 "Jessie" (x86_64)
  o FreeBSD 10.3 (x86_64)

v5: Rebased after toolchain updates to GCC 5.3.0 etc.

Build tested with `make BUILDGCC_OPTIONS="-b -l c,ada"` on
  o Debian 8 "Jessie" (x86_64)

Change-Id: Icb47d3e9dbafc55737fbc3ce62a084fb9d5f359a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/13473
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-05 11:52:57 +02:00
..
patches buildgcc: Update gdb and expat 2016-05-04 20:21:29 +02:00
sum buildgcc: Update Python to 3.5.1 2016-05-04 20:40:57 +02:00
Makefile crossgcc: Switch POWER8 to big endian mode 2016-03-24 18:32:23 +01:00
Makefile.inc crossgcc/Makefile.inc: Update jenkins-build-toolchain 2016-04-20 00:24:47 +02:00
README
buildgcc buildgcc: Add option to bootstrap a host gcc 2016-07-05 11:52:57 +02: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