summaryrefslogtreecommitdiffstats
path: root/util/crossgcc
Commit message (Collapse)AuthorAgeFilesLines
...
* crossgcc/Makefile: don't allow to call buildgcc in parallelAlexander Couzens2018-04-091-0/+1
| | | | | | | | | Change-Id: If296414f8cb3bc87862cdc20f3d3acc1a3f78556 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/21229 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* buildgcc: Add patch to work around Musl libc issueNico Huber2018-01-151-0/+118
| | | | | | | | | | | | | | GCC includes `sched.h` after poisoning calloc(). This results in a build failure with Musl libc. We work around the issue by including `sched.h` earlier and throw around some void pointers so we only have to do it in one place. Change-Id: I1d5462eb9a448147a95dd4ec50361b3f5a28910c Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22786 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
* buildgcc: Drop libelf/elfutilsNico Huber2018-01-153-22/+6
| | | | | | | | | | | | | | | | | | Looks like we were unnecessarily dragging this around for some time now. GCC's installation manual doesn't mention libelf as a requirement and a build of crossgcc-i386 doesn't show any sign of it being used. This also fixes a lot issues on non-GNU distributions that were intro- duced by switching to the elfutils version of libelf. Change-Id: Iff308a9bed9ae3842557d251b75d1faadfafe0da Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22773 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* util/crossgcc: Output apt-get commands on debianAlex Thiessen2018-01-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | In the buildgcc script, there is a check that the tools required are installed. When a tool is missing, a message is output suggesting an installation method, e.g. `sudo apt-get install foo` on debian-based systems. When run on a true, vanilla debian system, the error message provides only a generic hint because the `please_install()` function fails to detect the OS kind. Detection is based on definition of `ID_LIKE` in `/etc/os-release` yet such systems only define `ID` to `debian`. This commit closes the detection gap. Tested on debian 9 (stretch). Change-Id: I3c867837e9157bee13010bd0a005028c369ce55f Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> Reviewed-on: https://review.coreboot.org/23231 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* buildgcc: Hide stderr output of getopt testNico Huber2017-12-071-1/+1
| | | | | | | | Change-Id: I03c38de3a3b88d569d629be7483eb53164cf136a Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22738 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* crossgcc: fix edk2 tools_def templatePatrick Georgi2017-11-301-4/+4
| | | | | | | | | | | Forgot the /bin/ part of the executable paths Change-Id: I87d63ec18338e376787d02bb771471e746a17b62 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/22640 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* util/crossgcc: Install a template for the edk2 build systemPatrick Georgi2017-11-282-0/+190
| | | | | | | | | | | | | Add a CBSDK tool set template that can be used in edk2 simply by appending $prefix/share/edk2config/tools_def.txt to Conf/tools_def.txt. After that, build -t CBSDK uses the coreboot compilers, providing a more predictable compiler choice. Change-Id: I76b38c928b831ee6f31450aa0ad59b4f906f394d Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/22570 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* buildgcc: Update binutils to 2.29.1Iru Cai2017-10-165-5/+5
| | | | | | | | | | Also change the tarball from .tar.bz2 to .tar.xz. Change-Id: I25134dbadf07a2f0cb356c8ac8f2c612a957d176 Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/20806 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
* crossgcc: Build libelf from elfutils 0.170Paul Menzel2017-10-164-34/+6
| | | | | | | | | | | | | | | | | | | | | | | | | > Could you make in a separate, independent change a update from the > completely outdated LIBELF (from mr511.de/software/libelf ) to recent > libelf? Those highly outdated libelf from this unmaintained mr511.de > webpage should not be used any more since years. There are also a ton > of security issues like for example: CVE-2017-7607, CVE-2017-7608, ... > CVE-2017-7613. Recent version of this software is included in the > elfutils that are available here: https://sourceware.org/elfutils/ -> > download link: > https://sourceware.org/elfutils/ftp/0.170/elfutils-0.170.tar.bz2 Remove the obsolete patch, which doesn’t apply anymore, and only affected the build system, which is different now. Increment the buildgcc version string as a tool version is changed. TEST=Running `make crossgcc-i386` succeeds. Change-Id: Iadd320a18c5d9fe2a82a347e39f01d8b7f8806c2 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/21435 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* util/crossgcc: Add bootstrap-only modePatrick Georgi2017-10-131-18/+27
| | | | | | | | | | | | | | | buildgcc -B (--bootstrap-only) builds only a bootstrap compiler. That useful if you want to package the cross compilers: first build the bootstrap compiler, then all required cross compilers in a separate directory (using the bootstrap compiler through an adjusted PATH). Change-Id: I089b51d1b898d4cf530845ba51283997fd229451 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21683 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* Update URLs in buildgccDoug Gale2017-10-081-13/+13
| | | | | | | | | | | | | | Change http to https on many URLs and update llvm.org URLs in buildgcc. The old URLs are deprecated and now switched to a http forwarder that can be attacked by MITM attacks. Change-Id: I68d4fe1a6236ed8540803e11cfc84e44a1d1ca35 Signed-off-by: Doug Gale <doug16k@gmail.com> Reviewed-on: https://review.coreboot.org/21729 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Martin Roth <martinroth@google.com>
* buildgcc: Implement simple tarball hash verificationJonathan Neuschäfer2017-10-041-20/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a relatively simple hash-based verification scheme for downloaded files (tarballs): After buildgcc downloads a file or notices that it has already been downloaded, it hashes the file, and compares the hash against the known hash stored in util/crossgcc/sum/$filename.cksum. Two errors can occur: 1. The hash file is missing. In this case, crossgcc asks the user to verify the authenticity of the downloaded file. It also calculates its hash and stores it in util/crossgcc/sum/$filename.cksum.calc. If the file is authentic, the user may rename the calculated hash file to $filename.cksum, so that it can be found the next time buildgcc is started. 2. The known hash and the calculated hash differ. This is the case that this patch seeks to protect against, because it may imply that the downloaded file was unexpectedly changed, either in transit (Man-in-the-Middle attack) or on the file server that it was downloaded from. If buildgcc detects such a hash mismatch, it asks the user to delete the downloaded file and retry, because it can also be caused by a benign network error. If, however, the error persists, buildgcc can't continue without risking that the user runs malicious code, and it stops. Note: The hash algorithm may be changed in the future, but for now I left it at SHA-1, to avoid bloating this patch. Change-Id: I0d5d67b34684d02011a845d00f6f5b6769f43b4f Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/21592 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* buildgcc: Fix up cross GCC buildingNico Huber2017-09-021-2/+2
| | | | | | | | | | | | Add a missing line-break escape and, rather cosmetic, guard execution of $CXX which we allow but don't force to be set. Change-Id: Icf6d3b7de4b7999b8214489f28997964c490d1e9 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/21307 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
* buildgcc: Integrate nds32 update from Andes TechnologyStefan Reinauer2017-09-014-23/+73403
| | | | | | | | | | | | | | | | | | | | This patch has been provided by Mentor Chih-Chyang Chang on behalf of Andes Technology. It fixes using the coreboot toolchain to compile the Chrome EC code base on the ITE8320 embedded controller. The new patch incorporates a fix for the issue previously fixed by patches/gcc-6.3.0_nds32.patch, so that patch can be removed. patches/gcc-6.3.0_riscv.patch needs to be slightly adjusted to still apply cleanly (configure scripts only). Change-Id: I0033888360f13ba951b692b3242aab6697ca61b3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20901 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* buildgcc: surround *.log with apostrophes when build failsIdwer Vollering2017-08-151-1/+1
| | | | | | | | | | | | Apparently the script's output text is unclear. Emphasize the file name, keeping the dot to close the sentence. Change-Id: I1f214b71629eda5fc54e5671ce63e58948343656 Signed-off-by: Idwer Vollering <vidwer@gmail.com> Reviewed-on: https://review.coreboot.org/21012 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
* buildgcc: Fix libelf 64bit detectionStefan Reinauer2017-08-071-0/+28
| | | | | | | | | | | Taken from crosstool-ng and and re-applied to 0.8.13 Change-Id: I43ad23b66ec10915cc68be8c395825f4f9161725 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20800 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
* buildgcc: Update to gdb 8.0 and expat 2.2.1Stefan Reinauer2017-08-078-15/+15
| | | | | | | | | | | | | Among other improvements, the new GDB has a new GDB/CLI command to erase flash memory and a few Python scripting enhancements. Change-Id: Ie3852d5bc74617d3e05509e19bbd1caa281da3e0 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20799 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
* crossgcc: Clean out ABI variable for GMPPatrick Georgi2017-07-191-0/+3
| | | | | | | | | | | | This is sometimes set by packaging systems (eg Gentoo), so give it a sane preset. Change-Id: I651fad12128143e8ed5053e7e9871ea271bfc797 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20632 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* crossgcc: patch out uses of $(P) variable from gcc/ada buildPatrick Georgi2017-07-181-0/+15
| | | | | | | | | | | | | | | Gentoo likes to use that variable for itself and insists on keeping it. Meanwhile it doesn't seem to be set or used anywhere else in the gcc build, and it seems there was a big $(P)-pruning going on in 2000, so why is it even (still) there? Related upstream change can be found at https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01015.html Change-Id: I2c2bdf9cb215c489f760f43642a86592924e4e65 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20612 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* crossgcc: Prefer gnatgcc over gcc if availablePatrick Georgi2017-07-111-1/+3
| | | | | | | | | | | | | | For distros that package and version gnat independently from gcc (such as Ubuntu), try to build with gnatgcc first. This fixes the issue of gcc -print-prog-name=gnat1 failing because gcc is of a different version. Change-Id: Icec6d1fba8855e88ac91d47842dcb7f6b9d35461 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20517 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* util/crossgcc: Fix typoPatrick Georgi2017-07-071-1/+1
| | | | | | | | | | | | buildgcc was copied to $DEST/share/buildgcc-$VERSION-, missing the commit id description. Change-Id: I83d2074b6466b0d99507845dc714a11ab2c58271 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20487 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* buildgcc: Adapt messages about GNAT and bootstrappingNico Huber2017-06-271-34/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ask for bootstrapping in case of a different host GCC major version. GCC's versioning scheme changed starting with the release of GCC 5. There are no big changes between the versions any more. Instead, show the message when the host GCC's version is below 4. In case GNAT can't be found, ask the user to abort and install it. Also give hints for Ubuntu where the package versions are a little messy (e.g. the meta packages gcc and gnat often point to different versions). In case GNAT is found but is too old (< 4.9), enable bootstrapping by default and tell the user that building will take longer. In all three cases show a timeout to draw the user's attention. v2: Update GNAT check to also look for `gnatbind`. It has to be somewhere in $PATH. Change-Id: I4d9de11d7469e137ede8ad138296d20c0f8ba78f Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20332 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* buildgcc: Rename quit() to exit_handler()Nico Huber2017-06-271-2/+2
| | | | | | | | | | | | | | | | "quit" is a signal name. The FreeBSD `sh` interprets trap quit 1 2 3 15 as command to reset all the respective signal handlers, instead of setting quit() as handler. Change-Id: I69b813ab583f15a9dd89a115f7aea66d966f981b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20391 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* util/crossgcc: Fix building gcc 6.3.0 with clangPatrick Georgi2017-06-271-0/+11
| | | | | | | | | | | It assumes that __builtin_longjmp takes a void **, which is decidedly distinctive from void *. Change-Id: I1930bb01dd62bd6abf0688b118236db2a9299e40 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/20366 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* crossgcc: Fix building with clang++ in the presence of gccPatrick Georgi2017-06-271-4/+9
| | | | | | | | | | | | Some environments (<grumble>cros_sdk</grumble>) provide gcc as $CC and clang++ as $CXX. The latter needs the higher bracket-depth while the former has no idea what it means, so tell CC and CXX individually. Change-Id: I72b75fb9bb5df3a9b1561ee8821ec43ada29b24f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/20365 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* buildgcc: Allow environment to override $CC/$CXXNico Huber2017-06-261-26/+82
| | | | | | | | | | | | | | | Also check for the presence of the given commands or "gcc", "cc" in this order if $CC is empty. To untangle the given compilers from boostrapped ones, introduce hostcc() and hostcxx() functions that return the respec- tive compilers to be used. Change-Id: Ic947be53eec25331173ac82ed742017ca3fbf83c Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20331 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* crossgcc/buildgcc: update file location codeMartin Roth2017-06-251-6/+6
| | | | | | | | | | | - Change from 'which' to 'command -v'. 'which' is not a posix command. Change-Id: Icdf18e7e496447157554b8e61b1528f03456536d Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20230 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* crossgcc: cosmetic overhaul of outputStefan Reinauer2017-06-221-5/+6
| | | | | | | | | | Straighten up output from the buildgcc script Change-Id: Iee6775b97560063bbdff0d31ceab2dddc58783b3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20302 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* crossgcc: Rename print_stable to print_supportedStefan Reinauer2017-06-221-6/+6
| | | | | | | | | | | | | That's what the option is called in the help text. Not sure where the divergence came from, so let's fix it. Change-Id: I621aa203da2d314b93de665dbdadbe4a43725375 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20301 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
* crossgcc: Update to clang 4.0Stefan Reinauer2017-06-2110-86/+7
| | | | | | | | | | | | | | | | | Drop Edward's cfe patch because it has been implemented by upstream clang differently. Instead of $ clang --print-librt-file-name the right way to get ahold of the compiler-rt builtin library is $ clang -rtlib=compiler-rt --print-libgcc-file-name Change-Id: I8aac5256da5bfb6f7bebeff0959f16b53867c581 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20274 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Add CMake 3.9.0-rc3 to coreboot toolchainStefan Reinauer2017-06-212-3/+20
| | | | | | | | | | | | | | Newer versions of clang will need newer versions of CMake (at least 3.4.3) to compile. This patch will enable us to switch to clang 4.0. Change-Id: I6c91163ce0efd4eb2410cdb433de8be23d510ecd Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20273 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* util/crossgcc: Fix musl libc supportPhilipp Deppenwiese2017-06-171-1/+1
| | | | | | | | | | | Disable NLS for libelf. Change-Id: Ia4d01393771ccdff9e0498d7efd1bbdd11cff8db Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org> Reviewed-on: https://review.coreboot.org/20235 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
* crossgcc: Resolve pointer and integer comparison in GCCPaul Kocialkowki2017-06-081-0/+27
| | | | | | | | | | | | | | | GCC version 7 is being a bit picky about pointer and integer comparison by default, which triggers a crossgcc build error. This backports a patch from upstream GCC to fix the issue. Change-Id: I8b1e806c10604c0df080ac5edc667bf1141e2c17 Signed-off-by: Paul Kocialkowki <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/20103 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* buildgcc: Fix color output in download_showing_percentageNico Huber2017-06-061-1/+1
| | | | | | | | | | | Probably this was never tested as the return to no color "\033[0m" was printed verbatim. Change-Id: I7e6e1049b062ffb138ebdaeb62ddc49581ff8db1 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/19811 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* crossgcc: disable libsanitizer for the bootstrapped compilerPatrick Georgi2017-04-281-0/+1
| | | | | | | | | | | | | | | | | | Ironically enough, libsanitizer is notorious for creating "uninitialized variable" warnings with different compiler versions than the one it's shipping with. Since we don't need it for building the real compiler, just skip it. Fixes building our compilers using the gnat-gpl 2014 compilers. Change-Id: I2130dfdf3eaf07d77cd70777419fc0ae4642b843 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/19478 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
* crossgcc: fix DESTDIR buildsPatrick Georgi2017-04-271-1/+12
| | | | | | | | | | | | | 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>
* crossgcc/Dockerfile: Add gnat to build the Ada toolchainNico Huber2017-03-231-3/+4
| | | | | | | | | | | | | | If gnat is installed, buildgcc automatically enables Ada support. Instead of the general `gnat` package we install `gnat-6` which saves us about 80 MiB of downloads of unused "dependencies". Change-Id: Ie0b8564d016d458cd33ff75a2ee7bbd5de33afe2 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/18772 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Martin Roth <martinroth@google.com>
* buildgcc: Relax GNAT version checksNico Huber2017-03-231-7/+7
| | | | | | | | | | | | | | | | 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>
* buildgcc: Fix check for a .success fileNico Huber2017-03-231-1/+1
| | | | | | | | | | | | 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>
* buildgcc: Search for `xz` tooNico Huber2017-03-141-0/+1
| | | | | | | | | 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>
* toolchain: fix compilation of GMP on FreeBSDIdwer Vollering2017-03-091-0/+20
| | | | | | | | | | | | | Built on FreeBSD -CURRENT Obtained from FreeBSD: https://github.com/freebsd/freebsd-ports/commit/bbedec80e36fe22a4f55433c3e6c2a64828fd9da Change-Id: Ic6b6db8e3a9d86a30c50a09d58566846446031ea Signed-off-by: Idwer Vollering <vidwer@gmail.com> Reviewed-on: https://review.coreboot.org/18675 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
* buildgcc: Update GCC, Binutils, GMP, MPFR, GDB, IASL and LLVMIru Cai2017-03-0537-13818/+4748
| | | | | | | | | | | | | | | | | | | | | - 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)
* buildgcc: try curl if wget is not presentPatrick Georgi2017-01-101-15/+21
| | | | | | | | | | | | | | | 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>
* util/crossgcc: update jenkins-build-toolchainMartin Roth2017-01-041-1/+2
| | | | | | | | | | | This allows the make jenkins-build-toolchain to use the BUILDGCC_OPTIONS variable. Previously, the options were hardcoded. Change-Id: I5f4c1d3fc8c714ec3640356ae3c86ae157f486d2 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17766 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
* buildgcc: Remove quotes around a $CC callNico Huber2017-01-041-1/+1
| | | | | | | | | | | | 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)
* buildgcc: Indicate CXXFLAGS for binutilsNico Huber2016-12-281-1/+4
| | | | | | | | | | | | 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>
* buildgcc: Fix string comparison operatorNico Huber2016-12-281-1/+1
| | | | | | | | | 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>
* buildgcc: Build GMP `--with-pic` if GCC defaults to `-pie`Nico Huber2016-12-271-0/+7
| | | | | | | | | | | | | | | | | | | 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>
* buildgcc: Be less restrictive when trying to build GNATNico Huber2016-12-061-2/+11
| | | | | | | | | | | | 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>
* buildgcc: Fix function prototype in GCCNico Huber2016-12-061-0/+24
| | | | | | | | | | | | | With some newer versions of GCC (experienced with GCC 6.2.1 on Arch- Linux) the first stage of a boostrapping fails due to a mismatching function prototype. Also add a missing `static` to the signature. Change-Id: Ia927036ccd725550f1191890515578bc80c74f80 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/17704 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>