summaryrefslogtreecommitdiff
path: root/util/crossgcc
AgeCommit message (Collapse)Author
2016-03-01crosstool: add EXPAT as a dependency on the gdb build.Ronald G. Minnich
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-02-29buildgcc: Add support for gdb on x86_64-elfStefan Reinauer
Change-Id: I99f5842d1dc03b3f2d747c5abae7170214313284 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13848 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-18crossgcc: Change 'tar balls' to 'tarballs'Martin Roth
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-15Fix a build problem with power 8: use --with-system-zlibRonald G. Minnich
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-13crossgcc: Use acpica-unix2 over acpica-unixPatrick Georgi
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-10buildgcc: enable multilib for gccPatrick Georgi
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-04crossgcc: Add checksum for makeStefan Reinauer
I forgot to add that when I added support to buildgcc. Change-Id: I586d64805e72f9512057a4e0698bdee19cc53146 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13568 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-04crossgcc: Rename x86 to x64Stefan Reinauer
Idee4eb5d112e3f6bffced0681e9112101bed6763 has renamed the architecture by accident. Rename it back. Change-Id: I5509d2aa09df513789325bc24d9b696a09cb898f Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13567 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03crossgcc: Bring back the old iasl building schemePatrick Georgi
This makes the cross{gcc,tools}-* targets build iasl again, without building it many times for cross{gcc,tools} Change-Id: I7546c2af5f7cce3a4f1a08f593fb5cbc675d69ad Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13564 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03crossgcc: Also add the nds32le architecture to the coreboot MakefilePatrick Georgi
Change-Id: Ibf3346586d188dbd5b7ab10bedfc1609b2bb1499 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13565 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-03crossgcc/Makefile.inc: deduplicate cross*-$arch rulesPatrick Georgi
Change-Id: Idee4eb5d112e3f6bffced0681e9112101bed6763 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13524 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-03buildgcc: Move all toolchain build targets to util/crossgccStefan Reinauer
There is a lot of potential to completely get rid of Makefile and keep everything in Makefile.inc, but for now this declutters the main Makefile.inc. Change-Id: I653313c74207f955514c036c81efcbfd988827c9 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13518 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03buildgcc: Reorganize when IASL is builtStefan Reinauer
Instead of passing a variable around and painstakingly making sure that one target builds with it, and the others without, make IASL a dependency of the "catch all" targets. This also drops iasl as dependency from individual architecture targets, but things are more orthogonal that way. Note: instead of `make crossgcc-i386`, use `make crossgcc-i386 iasl` Change-Id: I8cd2e89acdd0f795836571470bad28fbf8797f58 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13563 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03buildgcc: add nds32le compilerStefan Reinauer
Some Chrome ECs are based on that architecture Change-Id: Ib5d0c2f6f518fafc1ceb02c5f71c0935d16c66bb Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13562 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03buildgcc: Rename ARM target from armv7a to armStefan Reinauer
The ARM target can compile for much more than just v7a. Change-Id: Ia4f67abcffdfe9c56c5d1848c75dfea83755e755 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13517 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-31buildgcc: Add GNU make to reference toolchainStefan Reinauer
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-31buildgcc: Update LLVM to 3.7.1Stefan Reinauer
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-31buildgcc: Rename armv7-a-eabi compiler to arm-eabiStefan Reinauer
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-26crossgcc: Enable powerpc64-linux target without ppc64-linux headersPatrick Georgi
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-26buildgcc: Help GMP build with 32-bit NetBSDNico Huber
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-25Revert "util/crossgcc: Build Ada frontend by default"Nico Huber
This reverts commit 89798bcb0cee369cd2aaeda8704d23d347dbe192. 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-23util/crossgcc: Build Ada frontend by defaultNico Huber
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-22util/crossgcc: Don't build gnattoolsNico Huber
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-09buildgcc: Print out all missing tools then haltMartin Roth
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-07buildgcc: Don't request that optional tools be installedMartin Roth
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-07Revert "util/crossgcc: Regenerate MPFR autotools files before build"Timothy Pearson
This reverts commit 68d0e4a5a1e7028227f6fbe086c891955cb7854e. 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-07util/crossgcc: Bump MPFR version to 3.1.3Timothy Pearson
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-04util/crossgcc: Add ppc64el supportTimothy Pearson
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-04util/crossgcc: Regenerate MPFR autotools files before buildTimothy Pearson
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-04util/crossgcc: Bump GMP version to 6.1.0Timothy Pearson
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>
2015-12-20buildgcc: Add coreboot toolchain string to clang versionMartin Roth
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-16buildgcc: Add coreboot toolchain version to iaslMartin Roth
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-11-27crossgcc/buildgcc: add parameter to show version number of toolMartin Roth
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-19crossgcc: Update makefile buildsMartin Roth
- Only build IASL once for the 'all' targets instead of once for each. - Change the control of what gets built from different targets to variables on the build line. - Clean up and correct the list of phony targets - Don't keep the temporary files around while building all. This takes up a lot of space. If it's desired behavior, add BUILDGCC_OPTIONS=-t on the make command line. - Add comments about CPU= and BUILDGCC_OPTIONS= variables - Add KEEP_SOURCES option Change-Id: I7752974e249f25717b42be25a841c69af84d5c69 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12300 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-04buildgcc: change -j variable name from BUILDJOBS to CPUSMartin Roth
The buildgcc makefile was using the variable 'BUILDJOBS' to pass the number of cores to use for the build into buildgcc. This is changed to 'CPUS' to match the variable name for the what-jenkins-does target. Change-Id: I373c4988e9f096ca2e142afdd5e94d7d806891e3 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12299 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-31tree: drop last paragraph of GPL copyright headerPatrick Georgi
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-05buildgcc: Fix the binutils-no-doc patch with 2.25zbao
The binutils-2.25 has added some new line, making the hunk move downward a little. The utility patch can fix the offset with "fuzz" message. So, recreate the patch to avoid that message. Change-Id: Ie659a8faf923465f6d47f7c0c0bf903c5eb903ab Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11639 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-05buildgcc: Add patch for building binutils by clang 6.0zbao
Clang is the default compiler on BSD and OS X. With this change, we don't have to install gcc any more. Clang can act as host cc. This is a known issue on GNU mail list. Please refer the link below. https://sourceware.org/bugzilla/show_bug.cgi?id=17473 Change-Id: I0f014b776e86e6d0cbebd560cb17f469f31e1dfb Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11638 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-05buildgcc: Show the progress when downloadingzbao
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-09-10crossgcc: Preparations for building Ada frontendNico Huber
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-10crossgcc: Add option to build gcc for specific languagesNico Huber
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-08-31buildgcc: Show the exit status of wget if downloading fails.zbao
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-31buildgcc: remove getopt when doing clean.zbao
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-26crossgcc: rename source file names from gcc-5.2.0/* to binutils-2.25/* in ↵Jonathan A. Kollasch
binutils riscv patches Followup-To: I6f37748b4cf0852d292f8f5156fc27ab8fd481b6 Change-Id: Ib6599b2380b5f2efd92ae78b72b45f3d65681379 Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-on: http://review.coreboot.org/11329 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2015-08-26buildgcc: Move a bunch of code into a functionzbao
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-24crossgcc: rename source file names from empty/* to gcc-5.2.0/* in riscv patchesPatrick Georgi
Some patch implementations (eg. BSD) create new files by taking the "---" file name instead of the "+++" one, so set both to the file name that is to be created. Change-Id: I6f37748b4cf0852d292f8f5156fc27ab8fd481b6 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reported-by: Idwer Vollering <vidwer@gmail.com> Reported-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-on: http://review.coreboot.org/11303 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-08-21crossgcc: Fix x86_64-elf target's -m16 supportPatrick Georgi
It still needs to pass --32 (yes, 32) to the assembler. x86_64-linux does this (through some other config file), x86_64-elf did not. This fixes building SeaBIOS with our x86_64-elf multilib compiler. Change-Id: Ibe2a70e46e64e71c947482be5ec0eaf7f7bf300d Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/11289 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-08-20crossgcc: Update gcc to 5.2.0Patrick Georgi
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-13buildgcc: Fix the options checkzbao
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-06buildgcc: Deal with gmp on 32bit Cygwin on 64bit hostzbao
Similar to what the below change says, ( http://review.coreboot.org/10792 commit ddb8f808940899240411282d0feb1e2f65ef43a9 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-06buildgcc: Get the clean and correct uname on Cygwinzbao
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-07-22crossgcc: Support /bin/sh pointing to dashPatrick Georgi
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-14buildgcc: Show the archive URLPaul Menzel
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-12Update crossgcc Makefile for new buildgcc argumentsMartin Roth
The script `util/crossgcc/buildgcc` was rewritten in commit 85b07d68 (buildgcc: move to a package centric user interface) and the switches changed. This patch does the following: - IASL was split out of the gcc builds, so needs a target of its own. - Add clang build target - Update the build-ARCH targets as buildgcc -G no longer builds gcc. - Rework all the targets to use common targets to call buildgcc - Split the tempfile clean from the regular clean - Change the 'all' target to leave the tempfiles until all architectures are built so that if one fails and needs a rebuild, it doesn't have to start from scratch. - Add an all_without_gdb target - Add clang build to all Change-Id: I4ff720eab6d9b72d00757fd2b632e6d9a6c25aa3 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: http://review.coreboot.org/10679 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-07-07buildgcc: update IASL to version 20150619Stefan Reinauer
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-07buildgcc: work around bug in --print-librt-file-nameStefan Reinauer
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-04buildgcc: Deal with gmp on 32bit Linux on 64bit CPUsPatrick Georgi
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-04crossgcc: Fix binutils for aarch64Patrick Georgi
The gold linker didn't build. Change-Id: I93c26a7715e781b001a71978d8fadbf65fdfe427 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/10791 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
2015-06-24crossgcc/Makefile: Allow making toolchains using multiple coresMartin Roth
I looked for a way to pass the 'make crossgcc -j8' on to buildgcc, but didn't find a way to get that value directly. MAKEFLAGS turns -j8 into a jobserver variable. Instead, this patch allows the number of CPUs to be set on the command line through a variable instead. Example: 'make crossgcc BUILDJOBS=8' Change-Id: I37608cdb4549226cb7ff8c3ff6d9f4773acf6b0b Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: http://review.coreboot.org/10620 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-24crossgcc/Makefile: clean more, add distclean targetMartin Roth
Update the clean target to remove the intermediate files. These should get removed automatically, but if the build stops in the middle, or if the -t command is used for buildgcc, they can be left in the directory. Add a distclean target that removes the downloaded tarballs as well as everything else. Change-Id: I6ea19e7a499b0c313c1d2eff7e36386204ec834e Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: http://review.coreboot.org/10621 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2015-06-22buildgcc: Add list of valid platform to the help text.Martin Roth
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-20buildgcc: Update clang search stringMarc Jones
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-17buildgcc: Don't build iasl with gccStefan Reinauer
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-17buildgcc: enable biarch support for x86_64-elfStefan Reinauer
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-17buildgcc: Check for dependencies after printing bannerStefan Reinauer
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-17buildgcc: Clarify required user actionStefan Reinauer
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-16buildgcc: Define $CMAKE only if clang package is builtDavid Hendricks
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-12buildgcc: improve portability of 'type' usePatrick Georgi
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-12buildgcc: replace [[ ... == ... ]] with something more portablePatrick Georgi
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-10buildgcc: build with bfd and gold linkerStefan Reinauer
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-10buildgcc: move to a package centric user interfaceStefan Reinauer
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-10buildgcc: fix compilation of IASLStefan Reinauer
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-10buildgcc: Update and fix GDBStefan Reinauer
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-10buildgcc: Reorder main programStefan Reinauer
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-10buildgcc: Don't use BUILDDIRPREFIXStefan Reinauer
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-10buildgcc: solidify and remove boilerplate codeStefan Reinauer
- 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-09buildgcc: use ${GDB_DIR} instead of gdb-${GDB_VERSION}Stefan Reinauer
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-09buildgcc: Fail if a patch failed to applyStefan Reinauer
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-09buildgcc: Don't run autoconfStefan Reinauer
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-09buildgcc: move from if test to if [ .. ]Stefan Reinauer
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-09buildgcc: move from `..` to $( .. )Stefan Reinauer
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-08buildgcc: Unify and refactor build scriptsStefan Reinauer
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-08crossgcc: Add clang supportStefan Reinauer
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-08buildgcc: refactor package unpacking, patching and buildingStefan Reinauer
- 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-08Remove empty lines at end of fileElyes HAOUAS
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-06buildgcc: factor out downloading, unpacking and patchingStefan Reinauer
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-04crossgcc: Improve compatibility of the toolchain across host systemsPatrick Georgi
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-05-21Remove address from GPLv2 headersPatrick Georgi
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-04crossgcc: Re-download the archive if it is incompletezbao
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-04-30crossgcc: improve error message on missing toolsPatrick Georgi
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-29crossgcc: don't use libdl while building GDB on FreeBSDIdwer Vollering
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-28buildgcc: OpenBSD's tar and patch are sufficient, tooPatrick Georgi
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-26crossgcc: close stdin when search_tool() execute programs.Alexander Couzens
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-03-30crossgcc: Fix calling outside util/crossgccPatrick Georgi
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-29crossgcc: Build mipsel-elf, not mips-elfPatrick Georgi
The build system expects mipsel, and it's the more precise name, too. Change-Id: I9e1135385b3f1374b3179ecf5e11a1d60bc17ef7 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/9144 Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-03-25crossgcc: Factor out error reportingPatrick Georgi
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-25crossgcc: point users to the log file in case of errorPatrick Georgi
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-25crossgcc: check for more tools that we requirePatrick Georgi
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-18crossgcc: jump to crossgcc path before building the toolchainPatrick Georgi
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-17crossgcc: Add x86_64 to list of supported architecturesStefan Reinauer
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>