switch-coreboot/util
Nico Huber 9718834ac5 UPSTREAM: 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)

BUG=None
BRANCH=None
TEST=None

Change-Id: Icb47d3e9dbafc55737fbc3ce62a084fb9d5f359a
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/13473
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/358602
Reviewed-by: Martin Roth <martinroth@chromium.org>
2016-07-07 01:09:46 -07:00
..
abuild abuild: Add option of starting with an existing defconfig file 2016-03-13 03:05:43 +01:00
acpi tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
amdfwtool amdfwtool: Fix some PSP2 issues 2016-03-03 12:03:03 +01:00
amdtools Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
archive archive: build archive tool with HOSTCC 2016-03-08 17:40:05 +01:00
arm_boot_tools/mksunxiboot arm_boot_tools: Add 'b' to fopen flags for Windows compatibility 2014-12-19 18:55:34 +01:00
autoport UPSTREAM: autoport: Add prompt for enabling unsafe inteltool glx option 2016-06-13 15:55:28 -07:00
bimgtool codebase: Change makefile $(shell pwd) commands to $(CURDIR) 2016-03-11 18:48:06 +01:00
board_status UPSTREAM: board_status: Abort early if the coreboot image doesn't exist 2016-05-26 03:21:20 -07:00
broadcom secimage: Use libz's crc32 function 2015-08-09 12:34:24 +02:00
cbfstool UPSTREAM: fmaptool: Accept hex values with uppercase letters 2016-07-07 01:09:37 -07:00
cbmem util/cbmem: Scale time stamp values correctly 2016-03-14 21:30:01 +01:00
checklist UPSTREAM: util/checklist: Add bootblock support 2016-06-10 00:17:58 -07:00
chromeos crosfirmware: Make script more silent 2016-05-04 18:54:59 +02:00
crossgcc UPSTREAM: buildgcc: Add option to bootstrap a host gcc 2016-07-07 01:09:46 -07:00
dtd_parser util: Look for python2 binary instead of python 2016-01-26 00:25:19 +01:00
ectool ectool: fix NetBSD compilation 2016-01-27 17:15:56 +01:00
exynos util: Look for python2 binary instead of python 2016-01-26 00:25:19 +01:00
futility futility: don't pass toolchain flags into futility's build 2016-04-05 13:36:32 +02:00
fuzz-tests tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
genbuild_h genbuild_h: Fix numeric comparison to remove error 2016-03-14 23:37:12 +01:00
genprof util/genprof: improve handling of command line arguments 2014-08-12 09:02:44 +02:00
gitconfig UPSTREAM: rebase.sh: Update to current cros branch 2016-06-30 10:08:27 -07:00
ifdfake tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
ifdtool util/ifdtool: add option to change chip density 2016-03-13 04:42:40 +01:00
intelmetool UPSTREAM: intelmetool: Add the X99 ISA Bridge device id 2016-06-06 23:35:00 -07:00
inteltool UPSTREAM: inteltool: handle unsafe dumping of graphics registers 2016-06-09 02:16:10 -07:00
intelvbttool tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
ipqheader util: ipq40xx: Scripts to combine SBL and Coreboot ELFs 2016-05-09 09:36:27 +02:00
k8resdump tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
kconfig UPSTREAM: util/kconfig: Fix gconfig build 2016-07-07 01:08:48 -07:00
lint UPSTREAM: src/commonlib/lz4_wrapper: Correct inline asm for unaligned 64-bit copy 2016-06-27 17:12:45 -07:00
marvell util/marvell: Add Marvell doimage utility and dependency in relevant Makefile 2016-02-11 14:16:08 +01:00
mma util/mma: changing BOOT_STUB to COREBOOT region and few more things 2016-05-10 22:59:36 +02:00
msrtool msrtool/configure: change svn to git 2015-12-14 22:52:49 +01:00
mtkheader util: Look for python2 binary instead of python 2016-01-26 00:25:19 +01:00
nvidia Make upstream tree CrOS SDK friendly 2016-05-12 15:42:17 -06:00
nvramtool util/nvramtool/cli/nvramtool.c: Add newline to error message 2016-04-11 16:26:58 +02:00
optionlist optionslist: Don't add a timestamp 2016-02-21 01:46:15 +01:00
post util: Add a very simple utility to test POST cards. 2016-02-26 07:00:33 +01:00
release util/release: extend release script 2016-02-01 08:58:37 +01:00
riscvtools UPSTREAM: util/riscvtools: Add script that turns coreboot.rom into an ELF 2016-06-22 10:40:38 -07:00
rockchip rockchip: update make_idb.py 2016-03-16 15:24:10 +01:00
romcc romcc.1: Point bug reporters to the coreboot ML / bug tracker 2016-05-01 16:29:09 +02:00
sconfig UPSTREAM: sconfig: Add a new generic device type 2016-05-20 20:04:05 +00:00
scripts chromeos.fmd: Mark RW_LEGACY as CBFS 2016-04-05 13:37:31 +02:00
showdevicetree tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
spkmodem_recv tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
superiotool UPSTREAM: superiotool: Add support for chip NCT6102D / NCT6106D 2016-05-26 14:34:19 -07:00
uio_usbdebug tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
vgabios Redo testbios utility to use all of YABEL 2016-02-18 01:47:04 +01:00
viatool codebase: Change makefile $(shell pwd) commands to $(CURDIR) 2016-03-11 18:48:06 +01:00
xcompile xcompile: test if gcc is really available 2016-05-03 04:16:24 +02:00