summaryrefslogtreecommitdiff
path: root/util/crossgcc
AgeCommit message (Collapse)Author
2016-12-06buildgcc: Be less restrictive when trying to build GNATNico Huber
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-06buildgcc: Fix function prototype in GCCNico Huber
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>
2016-11-28crossgcc/buildgcc: Show additional information while buildingMartin Roth
- 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-28util/crossgcc: fix using -DPatrick Georgi
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-17crossgcc/buildgcc: Add package version to saved .success fileMartin Roth
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-09-26crossgcc: Add DockerfilePatrick Georgi
The dockerfile allows building an image with the current tree's crossgcc code. Change-Id: I59cd85b0acdf8776e3e090742d7f5d89d1c154e7 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: https://review.coreboot.org/16636 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-21buildgcc: Build gnat by default if host compiler seems compatibleNico Huber
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-21buildgcc: Ask the user to install gnat if it's missingNico Huber
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-21buildgcc: Don't try to build gnat with a different versionNico Huber
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-21buildgcc: Warn when building GCC with a different major versionNico Huber
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-21buildgcc: Add functions to test GCC versionsNico Huber
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-21buildgcc: Show excessive arguments and bail outNico Huber
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-21buildgcc: Check exit status of `getopt`Nico Huber
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-21buildgcc: Fix GNU getopt usageNico Huber
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-21buildgcc: Fix option argumentsNico Huber
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-20buildgcc: Update to acpica version 20160831Martin Roth
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-11buildgcc: Quote command substitutionIdwer Vollering
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-02buildgcc: Search the cksum command without checking OS typezbao
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-02Fix newlines at the end of filesMartin Roth
All but ga-g41m-es2l/cmos.default had multiple final newlines. ga-g41m-es2l/cmos.default had no final newline. Change-Id: Id350b513d5833bb14a2564eb789ab23b6278dcb5 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16361 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Antonello Dettori <dev@dettori.io>
2016-08-13crossgcc: Update make to latest version: 4.2.1Martin Roth
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-13crossgcc: Add gnumake target so that make can be built directlyMartin Roth
Previously, make could be built as one of the crosgcc* targets, but there was no way to just rebuild make, as there is for IASL. - Add an independent target - gnumake. - Add gnumake to the help text. - Add gnumake to the list of NOCOMPILE targets (Not compiling coreboot) Change-Id: I4df25f2e209ca14944d491dbfb8e9b085ff7aca3 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16163 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-11buildgcc: printf no-color before quitingZheng Bao
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-09buildgcc: Use upstream patch for aarch64 build issuePaul Kocialkowski
Upstream proposed and merged a patch fixing the ARM Trusted Firmware build issue that occurs with recent version sof binutils. This includes this patch instead of the previous one. See binutils commit 7ea12e5c3ad54da440c08f32da09534e63e515ca: "Fix the generation of alignment frags in code sections for AArch64." The issue was reported at: https://sourceware.org/bugzilla/show_bug.cgi?id=20364 Change-Id: I16a8043d3562107b8e84e93d3f3d768d26dac7e4 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/16110 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-31buildgcc: Apply patches with -p1Nico Huber
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-21buildgcc: Never set GMP CFLAGS manually in order to get the right flagsPaul Kocialkowski
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-16buildgcc: Update the revision to 1.41Martin Roth
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-14buildgcc: Update to binutils-2.26.1 & Fix aarch64 build issueMartin Roth
- 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-05buildgcc: Add option to bootstrap a host gccNico Huber
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-05buildgcc: Make package build() function more versatileNico Huber
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-05-04buildgcc: Update Python to 3.5.1Stefan Reinauer
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-04buildgcc: Update gdb and expatStefan Reinauer
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-04crossgcc: Update toolchainIru Cai
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-04buildgcc: Always set HOSTCFLAGSNico Huber
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-04buildgcc: Use smaller xz archivesStefan Reinauer
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-04buildgcc: Drop --target from python and expatStefan Reinauer
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-04-20crossgcc/Makefile.inc: Update jenkins-build-toolchainMartin Roth
Because the builders have the coreboot cross-compilers in their path, the XGCCPATH variable needs to be set after building the new toolchain before it will be used. - Add $DEST/bin to $PATH if $DEST is set, add the default location for toolchain builds otherwise. Because the jenkins build image puts the tools in the path, we ca - Add KEEP_SOURCES option to help speed up compilation (Slightly). - Log .xcompile for verification that the right toolchain was used. - Verify that test-toolchain passes. Change-Id: I7c270dab94be7e8f801d527169767018a24986e4 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14231 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-19crossgcc: Move temp file handling into cleanup functionStefan Reinauer
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-18crossgcc: Fix out of bounds array access for nds32leStefan Reinauer
Patch from Segher Boessenkool <segher@kernel.crashing.org> Change-Id: Ia91e0d6e50399da38afd8cdc0b92c82e4efa0a08 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14380 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-15crossgcc: Add version number to script nameStefan Reinauer
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-12crossgcc: skip TARGETARCH for tools that don't use itMartin Roth
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-11util/crossgcc/buildgcc: correct clang testAaron Durbin
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-09crossgcc: Add workaround for libgcc's GNU sed dependencyStefan Reinauer
libgcc fails to compile on a number of platforms when a non-GNU sed is used. This patch has been verified by building the MIPS reference toolchain on OS X. Change-Id: Ia1c18ea4359de7707ac2e2640f1b8f107c47cd8c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14275 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2016-04-09util/crossgcc/buildgcc: quote parameters that may have spacesAaron Durbin
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-06buildgcc: enable interwork/multilib for binutilsStefan Reinauer
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-06crossgcc: Fix compilation on Clang systemsStefan Reinauer
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-03-26Makefile: Update jenkins-build-toolchain to run build testsMartin Roth
Add coreboot build tests after running the toolchain build. This verifies that everything still builds with the new toolchain. Change-Id: Ifa51db897925c0b77791c83bbcbfd75045c907b5 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14156 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
2016-03-25buildgcc: Add check for missing libraries and test for zlibMartin Roth
- 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-25buildgcc: support pigz and lbzip2 decpmpressors if installed.Martin Roth
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-25buildgcc: Fix help text formattingMartin Roth
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-24crossgcc: Enable multiple targets for a platformPatrick Georgi
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>