Commit Graph

316 Commits

Author SHA1 Message Date
Patrick Georgi 790aab6c77 crossgcc: fix DESTDIR builds
We need to rewrite libtool's files (foo.la) a couple of times so it
knows where to look
(while still whining that $DESTDIR$TARGET != $TARGET. well, duh.)

Change-Id: I54cafd47c76d855222ba905b5eb4533a23bdfd34
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/19463
Tested-by: build bot (Jenkins)
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-04-27 18:11:25 +02:00
Nico Huber d5829e9bdb buildgcc: Relax GNAT version checks
Compiling the GNAT frontend of GCC seems to have stabilized since GCC
4.9.0. So build it by default if GNAT >= 4.9 is installed.

TEST=Bootstrapped all GCC versions from 4.9.0 to 6.2 and built the
     i386 cross toolchain with each.

Change-Id: I9d1127595dc6b9bcece9c5e5cc7e45f467744ab9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18777
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-03-23 18:41:21 +01:00
Nico Huber cdf79e6a8d buildgcc: Fix check for a .success file
We were looking for the wrong file for some time. With bootstrapping
enabled, this resulted in a spurious message about the host GCC being
already built.

Change-Id: Ieb52c5925ea5615c83311319f22693b72f4987f9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18776
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-03-23 18:41:09 +01:00
Nico Huber 0ff3b392a9 buildgcc: Search for `xz` too
Change-Id: I05d5f26f7cf9ab41b14aaecfe421b88ef9a2394a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18775
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
2017-03-14 16:59:45 +01:00
Iru Cai 03353de80b buildgcc: Update GCC, Binutils, GMP, MPFR, GDB, IASL and LLVM
- GCC gets updated from 5.2.0 to 6.3.0:
gcc-6.3.0_riscv.patch is a diff between 5fcb8c4 and 173684b in
riscv-gcc, and it needs gcc-6.3.0_memmodel.patch.

- Binutils goes from 2.26.1 to 2.28:
There is a build error for MIPS gold so I add patch for it.

- GMP gets a bump from 6.1.0 to 6.1.2
- MPFR is updated from 3.1.4 to 3.1.5
- GDB is upgraded from 6.1.1 to 6.1.2
- IASL is changed from 20160831 to 20161222
- LLVM is changed from 3.8.0 to 3.9.1

Change-Id: I20fea838d798c430d8c4d2cc6b07614d967c60c5
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17189
Tested-by: build bot (Jenkins)
2017-03-05 18:35:18 +01:00
Patrick Georgi df1ff231e4 buildgcc: try curl if wget is not present
There are systems that come with curl but not wget (eg macOS) and they
now have to install one less additional dependency.

Also fix some cosmetic issues in console output and require valid
certificates on https downloads.

Change-Id: Idc2ce892fbb6629aebfe1ae2a95dcef4d5d93aca
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/18048
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-10 14:43:49 +01:00
Nico Huber 2c1c02ea6a buildgcc: Remove quotes around a $CC call
If we use ccache we have to interpret spaces in $CC as separation
characters. The downside is that we can't support spaces in the
compiler's path. But, well...

Change-Id: I4e6e6324389354669a755f570083a40ff00b1bbf
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18018
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2017-01-04 22:18:24 +01:00
Nico Huber 010ecf8009 buildgcc: Indicate CXXFLAGS for binutils
CXXFLAGS seems to be used a lot and have to be specified independently
from CFLAGS.

Change-Id: Iff4c76e54a46e908299b532fd848165a3dc04d43
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17937
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-28 03:36:58 +01:00
Nico Huber ae6187f01f buildgcc: Fix string comparison operator
Change-Id: I8ff8d51507dcf12cd554c8b4713074a99e47c11e
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17942
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-28 03:36:36 +01:00
Nico Huber 8bbd596de6 buildgcc: Build GMP `--with-pic` if GCC defaults to `-pie`
GCC 6 can optionally default to building all binaries as position
independent executables (PIE). This breaks linking against static
libraries that are compiled without position independent code (PIC).

Building GMP `--with-pic` in this case seems to be the least fragile
solution.

TEST=Run `make all` and `make BUILDGCC_OPTIONS=-b build-i386` in
     util/crossgcc on Debian Stretch.

Change-Id: I5f3185af9c8d599379a628e18724b217b88be974
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17936
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2016-12-27 23:34:12 +01:00
Nico Huber 26267a7a41 buildgcc: Be less restrictive when trying to build GNAT
It turned out that newer GNAT versions can build our current (5.3.0)
GNAT without bootstrapping. So adapt the version enforcement.

Change-Id: Ie7189e8bcadeee56cf5c2172e8c0ae7cd534685a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17706
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-06 23:56:38 +01:00
Martin Roth 2c6a8060da crossgcc/buildgcc: Show additional information while building
- Show number of threads being used to build.
- Show the version number of each package when skipping it.
- Show whether the tool is a host or target build.

Change-Id: I1134c08b417a731859e6b25fe38aecf01a85927b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17418
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-11-28 18:58:47 +01:00
Patrick Georgi 1b593e5ad7 util/crossgcc: fix using -D
Otherwise errors similar to "touch: cannot touch
'${TARGETDIR}/.GMP.6.1.0.success': No such file
or directory" might occur.

Change-Id: I4f24c93a25b7d567d3ce14a0415d20fd0778c9c8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/17603
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-28 01:01:58 +01:00
Martin Roth c295d5e249 crossgcc/buildgcc: Add package version to saved .success file
Previously, the .success file for each target didn't save the version,
of the package that was built.  This created problems when someone
wanted to update to a new version and could not rebuild.

Change-Id: I9975b198ac4a7de8ff9323502e1cbd0379a1dbb8
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17417
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-17 17:57:47 +01:00
Nico Huber 66c2c1a2d4 buildgcc: Build gnat by default if host compiler seems compatible
Change-Id: I2a13e188ddb0b7d64d3c0ec979a1a493bf160afc
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16678
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 22:10:30 +02:00
Nico Huber 04a1f6a3bc buildgcc: Ask the user to install gnat if it's missing
Change-Id: Ib840eac29fc8cedfaef4847fd9700bd4a70300ba
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16677
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 22:08:32 +02:00
Nico Huber 75797166ce buildgcc: Don't try to build gnat with a different version
Change-Id: I64a33d2cc4793e54a50fa439a4461c40d424b569
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16676
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 22:07:59 +02:00
Nico Huber 156d87c024 buildgcc: Warn when building GCC with a different major version
GCC build instruction recommend to bootstrap a native compiler first.
Not sure, when that is really necessary. A major version change seems
reasonable.

Change-Id: I80a9ec25739b7d33a1d1c7b4b2140d19d89a99ae
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16675
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 17:03:23 +02:00
Nico Huber aee7f46cd3 buildgcc: Add functions to test GCC versions
Just add some helpers that show parts (major, major.minor) of the GCC
version to be built (buildcc_*) and of the host compiler (hostcc_*).
They will be used in follow-up commits.

Change-Id: I37c12ad1a2d08645f40a9f0f0a479c8d7cc3e127
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16674
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 17:03:09 +02:00
Nico Huber bd74d561ad buildgcc: Show excessive arguments and bail out
Also remove a dead line that checks for unknown options: We already let
`getopt` check that.

Change-Id: I0e829b266e192757d6e455ee4cc608315bb4b7be
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16681
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 17:02:20 +02:00
Nico Huber 78df0bf46d buildgcc: Check exit status of `getopt`
We accidentally checked the status of `eval` instead.

Change-Id: I1ba258944184ed707ed1f176e528d8266656cb59
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16680
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 17:02:05 +02:00
Nico Huber cc414dd47f buildgcc: Fix GNU getopt usage
Looks like this never worked correctly: There are three argument formats
to GNU getopt and none of them matches what we fed it. The missing
double dash before the `set` arguments proves that we always called it
with parameters that `getopt` did NOT parse.

Change-Id: Ib8343976ef31774b18567a9fc9745a9f58dd287a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16679
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 17:01:54 +02:00
Nico Huber 152e78e794 buildgcc: Fix option arguments
As we support `getopt` versions that don't know long options, every
option arguments needs a short option.

Also add the long options `--urls` and `--nocolor` to the `getopt`
string.

Change-Id: I11c393c3d90c7a16cdda119594221c85f902ed40
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16682
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 17:01:16 +02:00
Martin Roth 2ab981b87e buildgcc: Update to acpica version 20160831
Change-Id: I3e3973e1c47505718cf73435156104ab73680441
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16387
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-20 22:20:38 +02:00
Idwer Vollering ba349ab12e buildgcc: Quote command substitution
There are shells where the result of a command substitution is subject
to word splitting (e.g. dash when assigning a value inside an export
statement).

Change-Id: I70a5bc124af7ee621da2bdb4777f3eaba8adafbb
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/15820
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
2016-09-11 14:27:42 +02:00
zbao 5cf758d45b buildgcc: Search the cksum command without checking OS type
The checksum command might appear to be unpredictable only by
checking the OS. Just list the candidates, sorted by possibility.

Change-Id: Ia3f4f5f0f98ff47d322a4f70689cca0bd4fa79fa
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/11483
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-02 18:06:38 +02:00
Martin Roth 589ef9de8f crossgcc: Update make to latest version: 4.2.1
Change-Id: I4af90fd2fcfb2a823f9e6b1e975c71581f0b55e9
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16164
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-08-13 23:31:29 +02:00
Zheng Bao bb003c8126 buildgcc: printf no-color before quiting
On some kind of terms (shell in emacs), the color-ctrl
letters don't work. The backspaces can not delete
correct number of letters. So we don't print color-ctrl
letters in loop.

Change-Id: I1f1729095e8968a9344ed9f1f278f7c78f7110e9
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/16066
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-08-11 15:14:53 +02:00
Nico Huber 4b48ed8f38 buildgcc: Apply patches with -p1
Turned out that there are versions of the patch command that use the
left hand side path for new files created by a patch. This behavior is
incompatible with some of our patches. Stripping the topmost dir from
the path with -p1 helps.

While touching that line, I couldn't resist to drop a command
substituion (the `echo $patch`). It really shouldn't be necessary as the
path to the patch file is already expanded in the head of the for loop.

Change-Id: I95398605db6dd54a8b08d8bc84c6602edbea6e10
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/15908
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: build bot (Jenkins)
2016-07-31 17:37:41 +02:00
Paul Kocialkowski 7899db2355 buildgcc: Never set GMP CFLAGS manually in order to get the right flags
When no CFLAGS are explicitly provided to it, the GMP configure script
will figure out the best optimization flags to use on its own. In
particular, it will setup the march, mfpu and mtune flags based on
hardware detection.

However, when CFLAGS are provided, they are used as-is and such
detection doesn't happen. When the march, mfpu and mtune flags are not
provided (which happens when GMP wasn't built already), not only will
related optimizations be disabled, but some code might not build because
of missing support. This happens with NEON instructions on ARMv7 hosts.

Thus, it is better not to set CFLAGS and leave it up to the GMP
configure script to get them right and still reuse those later.

Change-Id: I6ffcbac1298523d1b8ddf29a8bca1b00298828a7
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/15452
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-07-21 11:49:25 +02:00
Martin Roth 6101dfbaf3 buildgcc: Update the revision to 1.41
The binutils patch went in without updating the revision,
so we need to update it now. This was done in commit bcfa7ccb
(buildgcc: Update to binutils-2.26.1 & Fix aarch64 build issue)

Change-Id: Ifad4a2e3973f1f60d0ea840945e2bd097e1b4474
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15712
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-07-16 00:03:30 +02:00
Martin Roth bcfa7ccb28 buildgcc: Update to binutils-2.26.1 & Fix aarch64 build issue
- Update to the latest version of GNU binutils
- Add a patch to undo the changes to binutils done by commit c1baaddf
so that arm-trusted-firmware builds correctly again.

Test: Build arm-trusted-firmware (ATF) with this patch.  Build ATF
with binutils 2.26.1 changing the '.align x,0' to '.align x', which
changes the padding bytes to NOP instructions.  Verify that everything
except the padding bytes is the same.

See https://sourceware.org/bugzilla/show_bug.cgi?id=20364 for more
information about this issue.

Change-Id: I559c863c307b4146f8be8ab44b15c9c606555544
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15711
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-07-14 23:58:56 +02:00
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
Nico Huber 11ea2b378b buildgcc: Make package build() function more versatile
Refactor build() to make things more flexible:

Add a parameter that tells if we build a package for the host or for a
target architecture. This is just passed to the build_$package()
function and can be used later to take different steps in each case
(e.g. for bootstrapping a host gcc).

Move .success files into the destination directory. That way we can tell
that a package has been built even if the package build directory has
been removed.

Change-Id: I52a7245714a040d11f6e1ac8bdbff8057bb7f0a1
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/13471
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-05 11:52:40 +02:00
Stefan Reinauer 3dc5d079fe buildgcc: Update Python to 3.5.1
Change-Id: I57f935b94ab0db2e9ff9434fb496d470bb4ec987
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14463
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-05-04 20:40:57 +02:00
Stefan Reinauer 498f3d0cd5 buildgcc: Update gdb and expat
Update gdb to 7.11 and expat to 2.1.1
riscv64-elf is still broken.

Change-Id: Id7605f4274fcb15f9c3e366f5c492328f70f7956
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14461
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2016-05-04 20:21:29 +02:00
Iru Cai ae8e3a0bbb crossgcc: Update toolchain
New tools:
* mpfr 3.1.4
* binutils 2.26
* gcc 5.3.0
* llvm/clang 3.8.0

Patch changes:
* binutils-2.25_fix-aarch64.patch: fixed in 2.26
* binutils-2.25_host-clang.patch: the positions of header file
  includes have been adjusted
* binutils-2.25_no-bfd-doc.patch: update to 2.26
* binutils-2.25_riscv.patch: update from riscv-gnu-toolchain
* gcc-5.2.0_elf_biarch.patch: update to 5.3.0
* gcc-5.2.0_gnat.patch: update to 5.3.0
* gcc-5.2.0_libgcc.patch: update to 5.3.0
* gcc-5.2.0_nds32.patch: update to 5.3.0
* gcc-5.2.0_riscv.patch: update from riscv-gnu-toolchain
* cfe-3.7.1.src_frontend.patch: update to 3.8.0

In the latest code of riscv-gnu-toolchain project, the patch for
{binutils,gcc}/config.sub has been removed, and the target is renamed
as riscv32 and riscv64. The `riscv' to `riscv64' change in xcompile is
in another commit.

Test results:
All GCC and LLVM/clang toolchain build successfully.

x86,arm: qemu boots
power8: firmware fails to boot
aarch64,mips: not tested
riscv: firmware fails to build with new binutils
clang: firmware fails to boot

Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Change-Id: I42ce89c29263d768d161c28199994f17d0389633
Reviewed-on: https://review.coreboot.org/14227
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-04 20:21:11 +02:00
Nico Huber 5f72f960df buildgcc: Always set HOSTCFLAGS
Always set HOSTCFLAGS to the flags GMP was built with, defaulting to
"-Os" if it isn't built yet. Previously, if GMP was already built or
not even in the list of packages to be built, this was silently skipped
and other packages were built with empty HOSTCFLAGS.

Change-Id: I29b2ea75283410a6cea60dc1c92b87573aebfb34
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13550
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-05-04 13:39:14 +02:00
Stefan Reinauer d9d2102bec buildgcc: Use smaller xz archives
The xz archives are slightly smaller than the bz2 archives for gmp
and mpfr, so use them instead to speed up the download.

Change-Id: I3729455cdbc46e5a0cff119ecca97b0e00c3d402
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14462
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-05-04 07:20:49 +02:00
Stefan Reinauer a344b68936 buildgcc: Drop --target from python and expat
Both packages are not using the target architecture. Drop it,
and remove them from package_uses_targetarch

Change-Id: I58efde4cb7cc39e7e3c31527eb7682e318928100
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14464
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-05-04 07:20:17 +02:00
Stefan Reinauer 88e83e580d crossgcc: Move temp file handling into cleanup function
Move code to handle leaving temp files around into cleanup.

Change-Id: Ief346d7973f693ec06c8bef6492cf1330858d9e1
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14346
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-04-19 01:38:06 +02:00
Stefan Reinauer 88352d7365 crossgcc: Add version number to script name
Store both the version number and git hash in the file name
when copying the buildgcc script to the destination directory.

Also, fix the quoting in the lines touched anyways, and move the
script to $TARGETDIR/share/

Change-Id: Ib37dc2be57ee7f0ae18a0b954f537f8b4c2db9d0
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14347
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-15 22:38:20 +02:00
Martin Roth 444ece2a38 crossgcc: skip TARGETARCH for tools that don't use it
Many of the tools and libraries don't use a target architecture, but
they were still getting put in one. This change separates out the
builds that need the target architecture from the ones that don't,
and sets the build directory accordingly.

This will help keep from rebuilding the libraries when building all
of the tools if you keep the temporary files around (-t option).

Change-Id: Id6c17719332f2244657f103f5f07ca7812d51af1
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14229
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-12 06:33:25 +02:00
Aaron Durbin b2229dc199 util/crossgcc/buildgcc: correct clang test
On certain versions of /bin/sh the following sequence
causes problems.
'$CC --version | grep clang &>/dev/null && ...'

The above is a bashish for 2>&1 >/dev/null. However, buildgcc
is interpeted by /bin/sh which doesn't necessarily mean bash.
On dash it's effectively forking grep off into the background
and always evaluating an empty statement to /dev/null while
unconditionally running whatever follows the &&.

Change-Id: Ie3a2ebb12226434d50a7b2a7e254c8b80ae4c46b
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14281
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-11 16:10:43 +02:00
Aaron Durbin 0ac4e5a7f8 util/crossgcc/buildgcc: quote parameters that may have spaces
On certain versions of /bin/sh assigning variables with spaces
unquoted leads to failures. Therefore, quote variables that
are known to be passed in that have spaces.

Change-Id: I007c56c3bfb8183bb4b16cf0591f6aa508fd105d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14280
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-09 01:02:21 +02:00
Stefan Reinauer 2fe2d3d775 buildgcc: enable interwork/multilib for binutils
Otherwise, on OS X, some architectures will fail
to build libgcc (verified for ARM toolchain).

Change-Id: I8b58e0582596ad39cad92e9d478158c46a96a26e
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14256
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-06 21:05:25 +02:00
Stefan Reinauer 45f77b81a4 crossgcc: Fix compilation on Clang systems
Most cross compilers fail to compile on systems with Clang being the
default compiler (OS X and some BSDs). Clang dislikes some of GCC's
autogenerated code. We also missed switching CFLAGS to CXXFLAGS when GCC
switched to C++ compilation per default.

Change-Id: I87caa1a15982c431048aa79748ea7ef655a9a3a1
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14232
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-06 19:27:16 +02:00
Martin Roth 591790fca5 buildgcc: Add check for missing libraries and test for zlib
- Add check_for_library routine to test for missing libraries.
- Add a check for zlib.
- Remove 'utility' text from please_install() routine since we can test
for libraries or utilities now.
- Remove incorrect 'solution' text from alternate install since I was
updating that line.

Change-Id: Id5ef28f8bde114cbf4e5a91fc119d42593ea6ab2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14147
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-25 18:15:04 +01:00
Martin Roth 95f7b22dc4 buildgcc: support pigz and lbzip2 decpmpressors if installed.
These are multi-threaded decompressors for .gz and .bz2 compressed
files.  If they're installed, use them to decompress, if they're not,
use the standard single-threaded decompressors.

Change-Id: I397740817e6b234a43b62075899964bdab14f121
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14146
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-25 18:14:31 +01:00
Martin Roth 588c79ddde buildgcc: Fix help text formatting
Add a newline after the supported version text.
Move $TARGETDIR left so that longer paths print better.

Change-Id: If520e1b8657a526dee27763aee62cb78777d020d
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14145
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-25 18:11:43 +01:00
Patrick Georgi 1fc02d1d34 crossgcc: Enable multiple targets for a platform
This is required on powerpc64 to build both little endian and big endian
libgcc.

Change-Id: I295c8ee5e8131d4108e98d1bfd53abb8bd8982b2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/14163
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-24 21:49:20 +01:00
Martin Roth 64b35f341b buildgcc: Update coreboot's IASL version to 20160318
Update IASL from 20150619 to 20160318
See release notes at acpica.org

Change-Id: Ic7e7b3956378ad611069e984d5a59c78e4cb08b1
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/12817
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-24 21:22:27 +01:00
Jonathan Neuschäfer f14f640168 crossgcc/buildgcc: Add missing quotation mark
Change-Id: I5c20fd7057751a912aa2b2118dc5610c1ef647dc
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14039
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-03-11 22:00:04 +01:00
Martin Roth 3e0f74d6b5 crossgcc/buildgcc: Update for recent arch additions
- Add powerpc64le-linux-gnu & nds32le-elf to the instructions as
supported architectures
- Add nds32le-elf as a supported architecture so it will stop warning
when you build it.

Change-Id: Ifcdbc3d082eae5b9b5f8828914e7d2b7ed1f13a4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13961
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-03-11 18:25:28 +01:00
Martin Roth 1484c03916 crossgcc/buildgcc: Add comment about URLs and jenkins builder
Add a comment to try to lower possible confusion later if the jenkins
tool builder fails to build a new tool.  The URLs for the packages that
are downloaded are checked against known locations so that someone can't
maliciously download a package from somewhere and run it on the build
server.  This provides a little bit of security, but could confuse
someone if they don't realize it.

Change-Id: I7858e3d86fc705b480f6792b6adf3d5349580e01
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13955
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-03-11 17:55:38 +01:00
Stefan Reinauer 266b5171a3 buildgcc: Bump version to 1.36
Numerous changes have gone in since the last bump, let's increase
the version.

Change-Id: Ie3ae8c24b26bd22b70bc5ddf5c1125b5b1d3a021
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13873
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-03-03 04:23:25 +01:00
Martin Roth 58c68d56de crossgcc: add 'urls' option to print urls of all packages
This should allow the builder to download the packages securely.

Change-Id: If5feeff85bd551cbe08849421197d11cc2432d1e
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13867
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-02 19:11:01 +01:00
Martin Roth 4a53db06ec buildgcc: Add 'nocolor' option to remove color codes from output
When writing to a logfile, the color codes just make things confusing.
The --nocolor option will allow these to not be printed.

Change-Id: I67645aac20b420ac83b828e77e0e50aab88d3d47
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13866
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-02 18:57:10 +01:00
Ronald G. Minnich fb944f4270 crosstool: add EXPAT as a dependency on the gdb build.
qemu-power8 wants to tell about itself with XML, and so
we need to build gdb with EXPAT so it can understand XML.

Change-Id: I460e27f883956ed5d54e6070916e2682ee0f7a1b
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/13846
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-01 21:25:25 +01:00
Martin Roth 0362517d1c crossgcc: Change 'tar balls' to 'tarballs'
Change-Id: I8665724c381c204af5bc8bb06117c8af9c32be8a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13729
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-18 01:21:21 +01:00
Ronald G. Minnich 7ee16b7348 Fix a build problem with power 8: use --with-system-zlib
Power 8 was once again having build issues. Adding --with-system-zlib
fixes them. It seems the builtin one is only needed when you are going
to build programs, and it falls apart in other cases.

Searching --with-system-zlib reveals this to be a very popular topic.

This has not broken other toolchain builds (for me); it should not for
anyone else. Then again, this is gcc, about which I need say no more.

Change-Id: Ica9d057d88982543b5dda471cc949c31fe15932f
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/13700
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-15 21:35:18 +01:00
Patrick Georgi 85bb946362 crossgcc: Use acpica-unix2 over acpica-unix
Apparently acpica-unix is shipped under
"A non-open source license (the 'Intel license')" while acpica-unix2
comes under GPLv2/BSD dual license. (see https://acpica.org/Licensing)

So go with unix2.

Change-Id: I412812187bbf488eb4ad6d7fb8d2840f2f5e06d4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13686
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-13 16:59:59 +01:00
Patrick Georgi 8e68aff51c buildgcc: enable multilib for gcc
Make the gcc build system create multiple libgcc.a instances for
different ABIs.

Change-Id: I1c888bf751bf43566da8927ed0aedb53857363bf
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13625
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-10 09:45:58 +01:00
Stefan Reinauer a851bbb40a buildgcc: Add GNU make to reference toolchain
Change-Id: I8a41065880c3fd1f95ee8877031bf1738aaae859
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13519
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-31 22:41:21 +01:00
Stefan Reinauer ea1a5fef4d buildgcc: Update LLVM to 3.7.1
Not much testing, update mostly so we can test with the
latest scan-build.

Change-Id: I50d28b7e0dfd31f9ae565c8515d5ab1760ca4c62
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13516
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-31 22:37:51 +01:00
Stefan Reinauer 27522ad375 buildgcc: Rename armv7-a-eabi compiler to arm-eabi
The compiler really supports a whole line of ARM CPUs, not just
ARMv7a:
arm-eabi-gcc: note: valid arguments to '-march=' are: armv2 armv2a
   armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m
   armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m
   armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native
So let's reflect this in the cross compiler name.

Change-Id: I717760d80954655b2de9ae019b813d81e9a75762
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13515
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-31 22:37:35 +01:00
Patrick Georgi 0a97d7eeba crossgcc: Enable powerpc64-linux target without ppc64-linux headers
It may still fail on non-Linux, and the compiler may do fancy things,
but it builds.

Change-Id: If3456f5fef8d01082a49978dc7cda5450f96f5cc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13416
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
2016-01-26 15:35:07 +01:00
Nico Huber de45c59080 buildgcc: Help GMP build with 32-bit NetBSD
GMP's configure tries to build for 64-bit with a 32-bit userspace on
NetBSD too. Help it by forcing ABI=32.

Change-Id: I290ea0ef1626fdd88dc3ff74fadb9578ef6a1c9c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13067
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-26 04:45:57 +01:00
Nico Huber 32c4a06a43 Revert "util/crossgcc: Build Ada frontend by default"
This reverts commit 89798bcb0c.

Disable building gnat again as it turned out that many distros don't
ship with a sufficient recent version of gnat. We'll have to find a
reliable way to check for the installed gnat version and query the
user or bootstrap gcc in that case.

Change-Id: Ife7cf7c9d1567aca898ce308b120a7b9e146e5f5
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/13422
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
2016-01-25 21:24:34 +01:00
Nico Huber 89798bcb0c util/crossgcc: Build Ada frontend by default
Change-Id: I4889219f055aeefd449f9a9fcc4dc716b8c439d4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13042
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-01-23 01:41:31 +01:00
Nico Huber 420b2a513e util/crossgcc: Don't build gnattools
I thought we'd be using gnatmake but it's deprecated. Who needs it
anyway?

Change-Id: Ic08add72e771fa346c8a736ea901863ea5737d91
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13041
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-22 17:01:47 +01:00
Martin Roth 8846382cbb buildgcc: Print out all missing tools then halt
Instead of printing out a single tool that needs to be installed
each time buildgcc is run, print out the entire list of tools
to be installed, then halt.

Change-Id: I7761760eef3c45ba371f882a4f987408945bb3e5
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12856
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-09 22:18:59 +01:00
Martin Roth e396317244 buildgcc: Don't request that optional tools be installed
Previously, when we tested for g++ and two different versions of clang,
if the earlier versions were not found, buildgcc would still request
that they be installed.  This obviously isn't needed, and isn't the
desired outcome.
Now, if one of the first tests fails, nothing gets printed.  If all
the tests fail, it tells you to install either g++ or clang.

Change-Id: I71359f59c4c6bee3c3c55e4e6105f11e6ca51527
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12852
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 22:59:02 +01:00
Timothy Pearson 4ba946c1e1 Revert "util/crossgcc: Regenerate MPFR autotools files before build"
This reverts commit 68d0e4a5a1.

Special handling of MPFR is no longer needed with the latest
MPFR release.

Change-Id: I96d9ea92cfb74eed6af2ba62254f0678081e2b4f
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12833
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 15:16:17 +01:00
Timothy Pearson 74432e1b61 util/crossgcc: Bump MPFR version to 3.1.3
The current MPFR version contains a stale config.guess file
that requires special handling on ppc64el systems.  Bump
the MPFR version to the latest release.

Change-Id: I5e86c732c09f8a6a43f9812452124d64d337ea3f
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12832
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 15:16:13 +01:00
Timothy Pearson a9f62359e2 util/crossgcc: Add ppc64el support
Change-Id: I619f7c3cef7f0aaa6fccb3d52f2ac1f6ace6d0d6
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12818
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-01-04 21:54:38 +01:00
Timothy Pearson 68d0e4a5a1 util/crossgcc: Regenerate MPFR autotools files before build
The config.guess file included with MPFR is completely obsolete,
leading to build failures on ppc64el due to the system architecture
not being detected.  Regenerate the files from the host system via
automake before attempting to build MPFR.

Change-Id: I00fc16003906e373d112c25978197ac907adccfd
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12816
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-01-04 21:54:13 +01:00
Timothy Pearson 9631016660 util/crossgcc: Bump GMP version to 6.1.0
The previous official GMP release (6.0.0) contains a bug that
prevents compilation on ppc64el systems.  Increase version
to the latest version (6.1.0).

Bug details:

gcc build on ppc64el fails with:
(.text+0x4c): undefined reference to `BMOD_1_TO_MOD_1_THRESHOLD'

While I don't have an exact commit hash due to Hg use upstream,
a missing BMOD_1_TO_MOD_1_THRESHOLD define on ppc64el was quietly
fixed in Hg before the 6.1.0 release.

Change-Id: I1c05a1c194141db5f8522148c2e20e7558d34714
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12811
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-01-04 21:53:52 +01:00
Martin Roth fb5647a60b buildgcc: Add coreboot toolchain string to clang version
clang version now returns:
coreboot toolchain v1.33 November 25th, 2015 clang version 3.6.1
(tags/RELEASE_361/final) (based on LLVM 3.6.1)

Change-Id: I948d7f4d06c244987342cfc7d5c7e728cbed93bd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12777
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 02:43:13 +01:00
Martin Roth 6f656138a6 buildgcc: Add coreboot toolchain version to iasl
Add the coreboot toolchain version to iasl's version output.

% ./xgcc/bin/iasl -v
Intel ACPI Component Architecture
ASL+ Optimizing Compiler version 20150619-64
Copyright (c) 2000 - 2015 Intel Corporation

coreboot toolchain v1.33 November 25th, 2015

This won't actually be checked until the next version of
iasl so that we don't have to rebuild again for no reason.

The buildgcc version was intentionally not incremented for
this minor change.

Change-Id: I03a1a777fdb84e34bfceb7b1eb43fffbc1f3a2fc
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12688
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-16 01:19:14 +01:00
Martin Roth edf965a01e crossgcc/buildgcc: add parameter to show version number of tool
By adding the version number of tools, we can help people keep up to
date with their tool versions.  This will be used now to determine
whether the IASL version being used is the version supported by
coreboot.

Change-Id: I24a68b01c819871f90403869570125e71b96bd70
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12545
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-27 18:23:56 +01:00
Patrick Georgi a73b93157f tree: drop last paragraph of GPL copyright header
It encourages users from writing to the FSF without giving an address.
Linux also prefers to drop that and their checkpatch.pl (that we
imported) looks out for that.

This is the result of util/scripts/no-fsf-addresses.sh with no further
editing.

Change-Id: Ie96faea295fe001911d77dbc51e9a6789558fbd6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11888
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-31 21:37:39 +01:00
zbao 282dd95143 buildgcc: Show the progress when downloading
Grep the output of wget, showing only the percentage.
Leave the final "100%" unerased.
Checking return code of wget is removed.

Change-Id: I4559e88d541738a594dce92e23589992f234cb9b
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11520
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-05 17:21:55 +00:00
Nico Huber 135ca51314 crossgcc: Preparations for building Ada frontend
As with most other languages, a pre-installed Ada toolchain is needed
to build gcc's Ada frontend. To support building with older host tool-
chains, the patch `gcc-5.2.0_gnat.patch` disables warnings for unknown
pragmas. Building has been tested with host gcc-4.9 and hopefully works
with newer versions, too.

For convenience, the gnattools (e.g. gnatmake etc.) will be build if
'ada' is specified as a target language.

Change-Id: Ia78c29d1aba2943de5238421a324cfff8eb08875
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/11590
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-09-10 09:17:08 +00:00
Nico Huber bb313bf221 crossgcc: Add option to build gcc for specific languages
Add an option `--languages` which takes a list of target languages to
buildgcc. That list gets passed through to the configure step for
building gcc.

Also alter the Makefile to pass $(BUILD_LANGUAGES) to that option, if
this variable is set.

Change-Id: I6a74ab2c75871ea8d03a499cca33d88938b59c8d
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/11589
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-10 09:12:00 +00:00
zbao d22b9ea1cb buildgcc: Show the exit status of wget if downloading fails.
Change-Id: Ie3a44c6db9c9c186c52b4743334266ec5411ba8a
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11472
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-08-31 06:45:13 +00:00
zbao ff3f15cd4d buildgcc: remove getopt when doing clean.
Change-Id: I9f59a00e735f39df813b2216290da62eea3c595d
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11372
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-08-31 06:44:57 +00:00
zbao 06e85acb40 buildgcc: Move a bunch of code into a function
Refactor the code to be better understandable.

Change-Id: Ia815a27f7cc83c226a32e87485d712a5fbf4168e
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11318
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-08-26 01:06:17 +00:00
Patrick Georgi af473ede1f crossgcc: Update gcc to 5.2.0
All compilers built, incl. x86_64-elf as multilib and riscv-elf.

Change-Id: Iafa61b1d2ffc9c737ab67a417c62417593b69372
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/10975
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-08-20 14:39:01 +00:00
zbao 433fa5735c buildgcc: Fix the options check
1. Add -P|--package to build iasl
2. Remove -G|--skip-gdb, which was to skip gdb.
3. Add -S|--scripting to build gdb
4. Remove -C|--clang, which was to build clang.

All these changes are aligned with the options parsing below.
The help text is correct.

Change-Id: I897ea5e8ab002086e45bf05ff33230815b246057
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11158
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-08-13 10:06:11 +02:00
zbao 11f1d31d78 buildgcc: Deal with gmp on 32bit Cygwin on 64bit host
Similar to what the below change says,
(
 http://review.coreboot.org/10792
  commit ddb8f80894
  Author: Patrick Georgi <patrick@georgi-clan.de>
  Date:   Sat Jul 4 17:45:54 2015 +0200

    buildgcc: Deal with gmp on 32bit Linux on 64bit CPUs

    GMP is overeager to detect 64bit ABIs even if the entire running codebase is
    32bit (but on a 64bit CPU). Enforce a 32bit build in that situation.
)
building GMP can not detect Cygwin is 32bit either if the
host which Cygwin is running is 64bit. We set ABI=32
in that case.

Change-Id: Ic53d75defebbe902325eb07f3d8631b2a53245ef
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11123
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-08-06 05:51:57 +02:00
zbao e05c1eac44 buildgcc: Get the clean and correct uname on Cygwin
Running `uname` on Cygwin gets "CYGWIN_NT-6.1-WOW" instead of "Cygwin".
We need to fix the $UNAME on Cygwin.

Change-Id: I540bfc52089951006fd0e20bb9893a3d891df9e1
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11124
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-08-06 05:50:35 +02:00
Patrick Georgi 5da95dc4c2 crossgcc: Support /bin/sh pointing to dash
It doesn't know "source", but wants the older "." instead

Change-Id: Iafa61b1d2ffc9c737ab67a417c62417593b69374
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/10974
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-07-22 01:44:54 +02:00
Paul Menzel b2ba3957e5 buildgcc: Show the archive URL
In case of downloading errors, the URL is handy for analyzing the cause.

Change-Id: I6874cdc3c881cfdd52c80f80323536c30723654b
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/10853
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <gaumless@gmail.com>
2015-07-14 04:34:25 +02:00
Stefan Reinauer adf61e2926 buildgcc: update IASL to version 20150619
Change-Id: Ic0cb6826bb624e905b9c715f17a7629bc7b751c5
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10818
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-07-07 17:08:45 +02:00
Stefan Reinauer e9e6e3d93c buildgcc: work around bug in --print-librt-file-name
Running "clang -target i386-elf --print-librt-file-name" prints
[..]/bin/../lib/clang/3.6.1/lib/libclang_rt.builtins-i386.a

However, the correct path is [..]/lib/linux/libclang_rt.builtins-i386.a
on a Linux host. Hence, create symbolic links to make sure that our
build system finds the file where it expects it.

Change-Id: I21ef5c4a690d83c326717ca55c5ace558257a0ec
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10815
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-07-07 17:07:56 +02:00
Patrick Georgi ddb8f80894 buildgcc: Deal with gmp on 32bit Linux on 64bit CPUs
GMP is overeager to detect 64bit ABIs even if the entire running codebase is
32bit (but on a 64bit CPU). Enforce a 32bit build in that situation.

Change-Id: I23e9e57f3c8b0e3ad2e4e1e3eb106f7830aa76a1
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/10792
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-07-04 23:39:34 +02:00
Martin Roth d1da74ff9d buildgcc: Add list of valid platform to the help text.
Change-Id: Ic48a08d1067c850555cf04ad29e65e9bdb7c4243
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: http://review.coreboot.org/10619
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2015-06-22 21:28:21 +02:00
Marc Jones 5ee6951e5a buildgcc: Update clang search string
buildgcc fails if g++ or clang isn't found on the host. This
was failing on OSX due to the string used to check for clang
doesn't match "Apple LLVM". Add an additional search string for
clang "LLVM".

Change-Id: I05e36cfc690061b3233376d57f44f197cab933ea
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-on: http://review.coreboot.org/10569
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-20 22:17:59 +02:00
Stefan Reinauer bd8b2e31d2 buildgcc: Don't build iasl with gcc
There's a separate target -P iasl for that now.

Change-Id: I95c0fe8fc266859d8a31b7bea890775dc9f19694
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10567
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-17 21:15:17 +02:00
Stefan Reinauer 682a90c011 buildgcc: enable biarch support for x86_64-elf
With this change, the x86_64-elf-gcc can compile i386-elf
binaries by specifying -m32. The patch against GCC is needed
to enable building the 32bit libraries when building x86_64-elf-gcc

Change-Id: Ic86a009eccfdf3e33a398bcdcc13b15c8dfc0d31
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10497
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-17 21:15:07 +02:00
Stefan Reinauer 66e93355d1 buildgcc: Check for dependencies after printing banner
For consistency in user output, move the check for all
required utilities after printing the banner and parsing
options.

Change-Id: I5bf31368885c73e35f18b02d53d099f3f3871acc
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10566
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-06-17 03:11:19 +02:00
Stefan Reinauer 93a9630be3 buildgcc: Clarify required user action
When required tools are missing, try to give the user more detailed
information on how to solve the problem.

Change-Id: Ifa21c1af38a036a7d4f5a786041a87a7d45f4ec5
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10555
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-17 03:10:46 +02:00
David Hendricks cd5cdd3ba4 buildgcc: Define $CMAKE only if clang package is built
This moves the CMAKE definition down into the case statement
for $PACKAGE so that it is only required when the user wants to
build clang.

With this approach, "./buildgcc -P clang" will error out with the
"ERROR: Missing tool:" message if cmake is not installed.

Change-Id: I1e5c1bd67ade8f93ba0390df7f234deb47b9b18a
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/10556
Tested-by: build bot (Jenkins)
Reviewed-by: Francis Rowe <info@gluglug.org.uk>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-16 08:42:25 +02:00
Patrick Georgi c866591698 buildgcc: improve portability of 'type' use
The precise phrase returned by 'type' differs between locales and shells.
It also doesn't matter because it returns an error code when it hasn't found a
match.
Let's simply assume there's no build_$OneOfOurPackages commands around that
could also match.

Change-Id: I44f021243149701e8da9dd74c368ca2ad4509419
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Tested-on: linux bash, linux dash, solaris sh, solaris ksh.
Reviewed-on: http://review.coreboot.org/10517
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-12 08:40:54 +02:00
Patrick Georgi f2c15f5136 buildgcc: replace [[ ... == ... ]] with something more portable
using grep is an extra process invocation, but it's not a bashism.
Also match precisely, so AGCC doesn't trigger on GCC (we don't have collisions
right now, but we won't have to deal with them in the future)

Change-Id: I242833c350b7f1e6a6793f288c1aae0b50d57a26
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/10518
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-12 02:31:37 +02:00
Stefan Reinauer 2f97ebc4c9 buildgcc: build with bfd and gold linker
Build with bfd and gold linker, but use bfd linker per default
and make sure that lto is enabled in both binutils and gcc

Change-Id: I0584396b4580674cfdca24fbed0d8eeb1ee38806
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10496
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
2015-06-10 07:32:43 +02:00
Stefan Reinauer 85b07d68c1 buildgcc: move to a package centric user interface
Instead of building IASL and GDB implicitly when building
GCC, this patch changes buildgcc to let you explicitly specify
what you want to build.

This will prevent IASL from building over and over again, when
all you need is GDB.

The new command line option is -P | --package <package> where
package is one of the following: GCC, GDB, CLANG, IASL
If no package is specified, buildgcc will default to GCC.

Change-Id: I8836bed16fc2bc39e0951199143581cc6d71cb4d
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10492
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2015-06-10 07:27:49 +02:00
Stefan Reinauer 429424f366 buildgcc: fix compilation of IASL
IASL was broken when compiling without GCC.

Change-Id: Ib859ce41c1dda10181781c025fc378504f5ebb91
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10495
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
2015-06-10 06:06:36 +02:00
Stefan Reinauer bed95b22c3 buildgcc: Update and fix GDB
GDB stopped building ever since we updated from version 7.6
but nobody noticed ;)
Update from 7.9 to 7.9.1 and bring the required patches forward.

Change-Id: I2f357525a46d5540e9f57b80d830943bbd5dfcaf
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10494
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
2015-06-10 06:06:13 +02:00
Stefan Reinauer 5dd2635af9 buildgcc: Reorder main program
This groups all tasks happening in the main program,
orders them according to their dependencies and adds
comments on the various tasks.

Change-Id: Ib62bd213977cbc3307ef62e9a7e64515563968c1
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10490
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Tested-by: build bot (Jenkins)
2015-06-10 06:05:39 +02:00
Stefan Reinauer 05bbc9208a buildgcc: Don't use BUILDDIRPREFIX
Change-Id: I7be9b39a0d92882fa437f666d7f4a85e6f0a23f6
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10489
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-06-10 06:05:17 +02:00
Stefan Reinauer 1c70e052aa buildgcc: solidify and remove boilerplate code
- don't capture build_$package in a subshell by piping it
- move HOSTCFLAGS to build_GMP
- only create a build directory if a build happens
- automatically collect packages to build

Change-Id: Ic5a9f3f222faecd3381b413e5f25dff87262a855
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10475
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Tested-by: build bot (Jenkins)
2015-06-10 06:04:50 +02:00
Stefan Reinauer 7b40e42c49 buildgcc: use ${GDB_DIR} instead of gdb-${GDB_VERSION}
Bring gdb in sync with all other build targets.

Change-Id: I9c478947a00f044edf910a91d876bbf486a791cf
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10488
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-06-09 23:31:34 +02:00
Stefan Reinauer 916b8455ff buildgcc: Fail if a patch failed to apply
Otherwise one could end up with what they think is a coreboot toolchain
but in fact it'd be missing some patches.

Change-Id: Ic451f7061b822d0f4b64acc9976ba81fd544e85b
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10487
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-06-09 23:31:22 +02:00
Stefan Reinauer d0f837239d buildgcc: Don't run autoconf
gcc and binutils fixed their upstream tar balls, and running
autoconf created more problems than it solved

Change-Id: I0003dd597f521701405ff35923214435136b262d
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10486
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2015-06-09 23:31:14 +02:00
Stefan Reinauer dbc0087f9e buildgcc: move from if test to if [ .. ]
Change-Id: I29fe23e377045f08b8212742d84c2ee2b4a61b15
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10485
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-06-09 23:31:03 +02:00
Stefan Reinauer d764912e0e buildgcc: move from `..` to $( .. )
Change-Id: I7a095470d408d013a4a915e010c59ea99ca1f1c8
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10484
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-06-09 23:30:43 +02:00
Stefan Reinauer e7757bdeee buildgcc: Unify and refactor build scripts
This removes quite a bit of boilerplate from the script, and makes
it easier to read.

Change-Id: I92348b810ff19f7d18810f842b76e0e595b3d397
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10435
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-08 20:00:21 +02:00
Stefan Reinauer 14ce213901 crossgcc: Add clang support
Add a new option -C|--clang to buildgcc to build a clang based
toolchain as opposed to a gcc based toolchain. This toolchain
comes with the required patches needed to successfully build
coreboot, and also with clang's famous scan-build script.

Change-Id: I1aea7cd6002edc4f3bb2b46dc1f69a212ad18f77
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10415
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-08 20:00:11 +02:00
Stefan Reinauer 699ac27dec buildgcc: refactor package unpacking, patching and building
- keep a list of packages to build in $PACKAGES and only download,
  patch and build a package if it is in that list (instead of having
  exceptions for GDB, EXPAT and PYTHON)
- unify interface for download() and unpack_and_patch()
- consolidate some randomly spread code like creating / removing
  build directories and calls to searchtool()

Change-Id: I2070e3b2fbb84eb18e9220658fb2d5518b8179ee
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10434
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2015-06-08 20:00:04 +02:00
Elyes HAOUAS 52648623e0 Remove empty lines at end of file
Used command line to remove empty lines at end of file:
find . -type f -exec sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \;

Change-Id: I816ac9666b6dbb7c7e47843672f0d5cc499766a3
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: http://review.coreboot.org/10446
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-08 00:55:07 +02:00
Stefan Reinauer 88935481c9 buildgcc: factor out downloading, unpacking and patching
This will be useful for adding clang support (and hopefully
makes the code a bit more readable)

Change-Id: Ie866fb2bd71e2a64f26f2755961bd126e101cbe5
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10433
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-06 08:41:22 +02:00
Patrick Georgi 31bf37eb32 crossgcc: Improve compatibility of the toolchain across host systems
crossgcc builds gmp, whose build system normally optimises for the hardware
it's built on. That may give a minor performance boost but has the downside
that the compiler becomes non-portable and may break on other systems due to
illegal instructions.

Setting CFLAGS to some reasonable value prevents gmp's configure script from
choosing CPU specific -mtune flags (which may enable optimizations that only
run on CPUs with the same feature set).
Enabling "fat" builds make the build system add all optimized assembler
routines and makes the selection of the right one a runtime decision instead
of deciding at compile time.

Change-Id: I72d20627270baa082cd02ebb4c9a09cd23f30f8c
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/10412
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-04 17:15:02 +02:00
Patrick Georgi b890a1228d Remove address from GPLv2 headers
As per discussion with lawyers[tm], it's not a good idea to
shorten the license header too much - not for legal reasons
but because there are tools that look for them, and giving
them a standard pattern simplifies things.

However, we got confirmation that we don't have to update
every file ever added to coreboot whenever the FSF gets a
new lease, but can drop the address instead.

util/kconfig is excluded because that's imported code that
we may want to synchronize every now and then.

$ find * -type f -exec sed -i "s:Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *MA[, ]*02110-1301[, ]*USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 59 Temple Place[-, ]*Suite 330, Boston, MA *02111-1307[, ]*USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.:Foundation, Inc.:" {} +
$ find * -type f
	-a \! -name \*.patch \
	-a \! -name \*_shipped \
	-a \! -name LICENSE_GPL \
	-a \! -name LGPL.txt \
	-a \! -name COPYING \
	-a \! -name DISCLAIMER \
	-exec sed -i "/Foundation, Inc./ N;s:Foundation, Inc.* USA\.* *:Foundation, Inc. :;s:Foundation, Inc. $:Foundation, Inc.:" {} +

Change-Id: Icc968a5a5f3a5df8d32b940f9cdb35350654bef9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/9233
Tested-by: build bot (Jenkins)
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
2015-05-21 20:50:25 +02:00
zbao 939dc8492a crossgcc: Re-download the archive if it is incomplete
If the buildgcc is interrupt by Ctrl-C, probably part of
an archive is downloaded. If we run buildgcc again, the
incomplete archive would be considered as cached file
and skipped.

We check file hashes to see if the file is complete. If test
is failed, we need to delete the partially-downloaded file
and download it again.

sha1sum is quite different among the distributions.
Only Linux, Cygwin, Darwin have been tested.

Once new archive is deployed, a new checksum would be created,
which should be uploaded along with the script buildgcc.

Change-Id: Ibb1aa25a0374f774e1e643fe5e698de7bf7cc418
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/4511
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-05-04 14:56:21 +02:00
Patrick Georgi ae5ab604d5 crossgcc: improve error message on missing tools
People were confused about the 'missing toolchain', so
improve the error message.

Change-Id: Icaee338aeedce2255bcfdafe5407c9df02ad9c4a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/10036
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2015-04-30 04:12:19 +02:00
Idwer Vollering 1b7c9590f4 crossgcc: don't use libdl while building GDB on FreeBSD
Since FreeBSD doesn't have libdl, these errors are shown:
- config.log: /usr/bin/ld: cannot find -ldl
- crossgcc-build.log: configure: error: C compiler cannot create executables

Conditionally pass the presence of libdl in LDFLAGS.

Change-Id: I79c48da7e6700a4606c9e0c1314241db8997d3f3
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: http://review.coreboot.org/2342
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-04-29 14:42:37 +02:00
Patrick Georgi 7cb26b4a6e buildgcc: OpenBSD's tar and patch are sufficient, too
No need to enforce GNU versions for them.

Change-Id: Ieeb43298331fbefbcc1e230d41a90e9df56993eb
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/10017
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-04-28 22:49:13 +02:00
Alexander Couzens d268ab32e3 crossgcc: close stdin when search_tool() execute programs.
bzip2 --version |grep -c will wait for input on stdin. ./buildgcc will hang because of this.
Add `cat /dev/null |` close the stdin.

Change-Id: I2a8b08a4d90ca7a89705923d5b68ba6ac13f29b3
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: http://review.coreboot.org/9605
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-04-26 15:39:32 +02:00
Patrick Georgi 5602f2cd73 crossgcc: Fix calling outside util/crossgcc
Copy $0 contains the path, and we cd into that early.

Change-Id: If4124d16dea97b5eee4996bdfa3eae3d5d94c5d1
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/9145
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@google.com>
2015-03-30 12:04:39 +02:00
Patrick Georgi 74c06421b9 crossgcc: Factor out error reporting
Instead of repeating the ok/failed test all the time,
move it into a function.

Change-Id: I7496dfb5d3d2385316c577e1cf0901950b0e7083
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/8987
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-03-25 23:38:34 +01:00
Patrick Georgi 7964354467 crossgcc: point users to the log file in case of error
The first problem for crossgcc users that encounter build errors is
figuring out what is wrong with the build. Point out where the logs
reside.

Change-Id: I0300ecf6356c1a4ce18ae1e37fe0a56f46210d13
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/8982
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-03-25 23:38:32 +01:00
Patrick Georgi 915c4fc6fe crossgcc: check for more tools that we require
Change-Id: Ie002c69ab23cfc961b77771c4f2c20e5ae6bea60
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/8633
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-03-25 09:15:40 +01:00
Patrick Georgi 8135dba368 crossgcc: jump to crossgcc path before building the toolchain
We use paths relative to that in the buildgcc script.

Change-Id: I2b79c3d2c75088af7e8e362d18a38274352eb965
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/8713
Reviewed-by: Aaron Durbin <adurbin@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-03-18 21:50:33 +01:00
Stefan Reinauer 24f9cb91d0 crossgcc: Add x86_64 to list of supported architectures
You can build your new toolchain with:
  $ cd util/crossgcc/
  $ ./buildgcc -d /opt/cross -p x86_64-elf -j 16
or
  $ make crossgcc-x64

Change-Id: I8eb584166294578d2b33c63e94ed3aca9b5de4f4
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/8668
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-03-17 01:07:27 +01:00
Patrick Georgi b706288d95 crossgcc: Unify tool tests, add check for g++ or clang
Change-Id: I406f5cfc61bc87ccc2c0b9283b4fbb8cef8dfc1b
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/8522
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-03-09 13:33:33 +01:00
Patrick Georgi f0bbc95f12 crossgcc: Add RISC-V support
Change-Id: If1e0f7ed21f67d7a185dad251ede81ddbc18c4e5
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/8629
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2015-03-08 13:56:08 +01:00
Patrick Georgi 53c388fe6d crossgcc: Update toolchain
Update GCC to 4.9.2, binutils to 2.25.

Change-Id: Iae9763163b7f42c55a39e26b4beedee67d14a6e4
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/8628
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2015-03-08 13:56:03 +01:00
Patrick Georgi 9b7efa55b3 crossgcc: Add mipsel-elf as supported target
Change-Id: Icd8050d9193f9957468cfa13901ec14e993e50de
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/8630
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2015-03-08 12:32:12 +01:00
Patrick Georgi 6321f523e7 crossgcc: Clean GNU make context so builds succeed
GCC's build system is sometimes confused by our build system's
configuration: make crossgcc failed, while
util/crossgcc/buildgcc -p armv7-a-eabi didn't.

Make sure the GCC build system runs independently from
ours by breaking any ties.

Change-Id: I563e17b22127bc8c83ebfb17252184a3b6e0e58b
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/8545
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2015-02-28 22:20:44 +01:00
Paul Menzel e661942785 util/crossgcc/buildgcc: Upgrade MPC from 1.0.1 to 1.0.3
The following changes are included.

Changes in version 1.0.3:
  - Fixed mpc_pow, see
    http://lists.gforge.inria.fr/pipermail/mpc-discuss/2014-October/001315.html
  - #18257: Switched to libtool 2.4.5.

Changes in version 1.0.2:
  - Fixed mpc_atan, mpc_atanh for (+-0, +-1), see
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57994#c7
  - Fixed mpc_log10 for purely imaginary argument, see
    http://lists.gforge.inria.fr/pipermail/mpc-discuss/2012-September/001208.html

Upgrading also fixes the issue, where for example running `make crossgcc-arm`
ails as MPC cannot be built.

	Building MPC 1.0.1 ... failed

As it worked for others, it turns out that I had a release archive for
MPC 1.0.1 cached from October 2014, which was generated incorrectly, so
that `./configure` and `Makefile` are missing.

	$ LANG=C ls -l util/crossgcc/tarballs/mpc-1.0.1.tar.gz
	-rw-r--r-- 1 joey joey 224232 Oct 19  2013 util/crossgcc/tarballs/mpc-1.0.1.tar.gz
	$ md5sum util/crossgcc/tarballs/mpc-1.0.1.tar.gz
	22a27bee89616dca4d654fc579a816e5  util/crossgcc/tarballs/mpc-1.0.1.tar.gz
	$ md5sum mpc-1.0.1.tar.gz # downloaded today
	b32a2e1a3daa392372fbd586d1ed3679  mpc-1.0.1.tar.gz

So upgrade to MPC 1.0.3 as the release archive as of today contains the
needed files.

	$ md5sum util/crossgcc/tarballs/mpc-1.0.3.tar.gz
	d6a1d5f8ddea3abd2cc3e98f58352d26  util/crossgcc/tarballs/mpc-1.0.3.tar.gz

Change-Id: Ibfd02a9b362b12361b210d512420b87caebb0fdf
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
TEST:Run `make crossgcc-arm` and observe `Building MPC 1.0.3 ... ok`.
Reviewed-on: http://review.coreboot.org/8521
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-23 21:38:44 +01:00
Scott Duplichan 4270a9777c buildgcc: Fix msys2 crossgcc build fail
A leading double slash can result when $DESTDIR/$TARGETDIR is expanded
in the libelf portion of buildgcc. The leading double slash causes buildgcc to fail when run from Windows/Msys2. Replace $DESTDIR/$TARGETDIR
with $DESTDIR$TARGETDIR to avoid the problem.

Change-Id: Ide2bae41c07c1566f80104c3a2e2acab53de0d17
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-on: http://review.coreboot.org/7788
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2014-12-15 16:49:42 +01:00
Patrick Georgi 32a5a5f467 buildgcc: support DESTDIR for libelf
The libelf build system doesn't support the
DESTDIR variable. Work around by mangling prefix
when installing.

Change-Id: I3a56eb2bf919bcb9b586b945dce26a02dbaff931
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/7613
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2014-11-30 12:20:17 +01:00
Patrick Georgi d730ca8529 crossgcc: Update GCC from 4.7.3 to 4.8.3 and update to version 1.25
gcc 4.9.2 fails on our tree right now. We should clean that
up and test before we make it the reference version.

Also, the AMD K8/Fam10 issue we had last year, for which
Vladimir provided an "untested" fix (which is in,
commit a6c29fe684), isn't
reproducible: I boot-tested an unpublished AMD K8 board
with coreboot built with gcc 4.8.3.
(Disclaimer: since the old issue depended on compiler
decisions on register allocation, any change to code
or compiler could mix up things in semi-random ways.)

Change-Id: I8f1460a8da2c9e2d581482b22a4824b10b8987fa
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/7526
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2014-11-20 13:54:57 +01:00
Andrew Wu b67e9a1acd crossgcc: Support OSX 10.9 built-in tar utility program.
Unlike OSX 10.8, OSX 10.9 doesn't provide GNU tar program, and built-in
tar program is bsdtar 2.8.3. bsdtar can build crossgcc toolchain.
Modify buildgcc to support tar in OSX 10.9 (uname = Darwin).

Change-Id: I093898f8f99e29918387f9b275a30af461a7e1be
Signed-off-by: Andrew Wu <arw@dmp.com.tw>
Reviewed-on: http://review.coreboot.org/5598
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2014-04-29 21:23:10 +02:00
Alexandru Gagniuc 87cc49bc5b crossgcc: Update IASL to latest version (20140114)
Change-Id: I2450cad4a43907b8ca6d8f4d35932d7f451f71ea
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/5116
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2014-02-14 02:52:45 +01:00
Patrick Georgi 44af57a78b buildgcc: defer cleaning up the tree a bit
cleanup() uses BUILDDIRPREFIX, which is set after the
getopt loop.

Change-Id: I8a904781ee4fefc42681d31e94b64008cf03750a
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/4544
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
2013-12-22 04:53:12 +01:00
Zheng Bao f95bb2d7bb crossgcc: Fix a typo.
Change-Id: I8b88957a93e6369c59e9eb17f4ba48954fbc3c02
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/4526
Tested-by: build bot (Jenkins)
2013-12-13 06:09:21 +01:00
Zheng Bao 691b313c28 crossgcc: Continue to unpack archive if it was incomplete
If the unpacking was interrupt by Ctrl-C, probably part of
an archive is unpacked. If we run buildgcc again, the
incomplete folder would be and skipped.

We can create a file to tell the script the unpacking is done.

Change-Id: Id9eb74d119e22b62c70dca9b38a92c3dbdf0f64c
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/4512
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2013-12-09 11:14:24 +01:00