summaryrefslogtreecommitdiff
path: root/util/xcompile
AgeCommit message (Collapse)Author
2016-02-23xcompile: Add parameter to aid in debuggingMartin Roth
There was a report that xcompile wasn't finding the compilers correctly, so to aid in future debugging, this adds a parameter to show what xcompile is doing as it runs. Run from the command line: ./util/xcompile/xcompile --debug Change-Id: I779cb3de7b4e3f62a2ef2a6245c3538be518870c Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13047 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-21Support arm-linux-gnueabi compilers.Vladimir Serbinenko
Change-Id: I0edbc93807028a091f0f1bcae81a4092538a3422 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: https://review.coreboot.org/13747 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-03xcompile: Add a way to specify -march=i586Martin Roth
Instead of instructing users to edit xcompile when they want to build a quark platform, give the build a way to set -march=586 so that the quark code will build correctly. The Quark processor does not support the instructions introduced with the Pentium 6 architecture. Change-Id: I0ed69aadc515f86f76800180e0e33bcd75feac5a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13552 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: FEI WANG <wangfei.jimei@gmail.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-26xcompile: fill in power8 64bit LEPatrick Georgi
Change-Id: Id0316042f665ec9c095887cf6a37a7949ed8e861 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13421 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
2016-01-26xcompile: also look for *-linux compiler tripletPatrick Georgi
Not just *-linux-gnu. Change-Id: Ib817c6d207d3b69ce7595505f2b45f3be35b7d2f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13420 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
2016-01-26xcompile: document all the variables!Patrick Georgi
What's the exact difference between TARCH, TSUPP and TBFDARCHS? Fear no more, it's documented. Change-Id: I18717eb1e20b1c0a82a485d391de2794a77c59ae Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13419 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
2016-01-23util/xcompile: Add gnatbind toolNico Huber
Change-Id: I79c94a1a951fe7e3493b839364a79fa2edb57ff3 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/13043 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-15xcompile: Add core count to .xcompileMartin Roth
I think these four methods should cover most operating systems, with many supporting several of the methods. If we don't find anything, we're not any worse off than we were before. The big issue would be if we get an incorrect value. Change-Id: I4a612d39e93173e9d6e0de892f5bebf716912b1a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12937 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-14xcompile: More updates on ARM64 Erratum flagsMartin Roth
I tried to handle the checking for the config flag internal to xcompile, but the config flags don't appear to have been loaded into the environment by make at that point. This does update the if to check if the flag is even set before putting anything into .xcompile though. If the LDFLAG isn't set, there's no point in appending anything. Also removes the LP version of the erratum config flag, which was a copy/paste mistake from $(CONFIG_LP_COMPILER_GCC). Change-Id: I3d8b0328c85310393a120741a498bc18867a6f54 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12858 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-07xcompile: Quote variables to prevent globbing and splitting.Martin Roth
Quoting variables prevents word splitting and glob expansion, and prevents the script from breaking when input contains spaces, line feeds, glob characters and such. See shellcheck warning SC2086 Change-Id: Ib6ca46b64a621c4bea5c33ac312f2824b0386235 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12845 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: Use local variables in the test functionsMartin Roth
Using the local variables instead of positional parameters helps readability. - Add and use the local variables in testcc. - Use the existing local variables in testld. Change-Id: Ice13288b830a7aa043b360eaee8e36f060589a18 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12844 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: use $() instead of backticksMartin Roth
While the backtick syntax isn't actually deprecated, the $() syntax is preferred. Since both styles were being used in this script, settle on the new standard for all cases. Change-Id: I33770d666781b4fa34c909411e0d220c2540dbb4 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12843 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: Only include arm64 erratum check in arm64 sectionMartin Roth
Clean up the output file a bit by only including the erratum for arm64 into the that architecture section instead of every architecture. Change-Id: Ib6276f12aee5deb92a03e1c4fa2ad57db46bdc8f Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12842 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: Put compiler variables outside of 'if' to allow checkingMartin Roth
In order to be able to check the compiler versions, we need to be able to access the compiler variables. Move the original assignments outside of the GCC check, and assign either the GCC or CLANG compiler to the actual CC_ environment variable later. This ends up with the same value set, while allowing the compiler versions to be checked. Change-Id: Iffad02d526420ebbdfb15ed45eb51187caaa94fb Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12841 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: Separate flags from clang executableMartin Roth
We already have a CFLAGS variable - Use it for all of the flags. Change-Id: I22b4c5cf24b8743e85ffab29ddcccdc6c732ea3b Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12840 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: Add XGCCPATH to clang compilerMartin Roth
The XGCCPATH prefix is on all the other tools and compilers, so add it to clang as well, so it can be found correctly. Change-Id: Ibc250a81433f37bbb0555d32605aebe3a68aaf40 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12839 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: Add separation for architectures to improve readabilityMartin Roth
- Add bar at the top of each architecture - Make the architecture name and the TARCH_SEARCH to two lines - Add a second line at the bottom of each architecture - Add a comment about the two blank lines so they don't get accidentally removed. Change-Id: Ib4326bd94fe39b979244816ce54b752d083f6b16 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12838 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07xcompile: Use tabs for indentationMartin Roth
Change-Id: I96a5048050f8016c3c569f20318b4d421a4470a7 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12837 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-05xcompile: Remove warnings about missing tools & architecturesMartin Roth
Let toolchain.inc error out when the architecture or tool is missing. Change-Id: I39a51e5a2c778d6bbc50354807e5e2b717fa9e52 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12682 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-07xcompile: Don't warn on missing power8 compilerMartin Roth
Until there's a reason to, don't print a warning about the missing power8 compiler. Change-Id: I47c60e0a16892f0fa228e1439e0424926bca00a4 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12634 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-12-03add support for power8 to xcompile scriptRonald G. Minnich
power8 is set up by ibm as a powerpc subset, so we follow that rule here: we call it a powerpc but require -mcpu=power8 Change-Id: Ib5212be22db9584b0dc0eeed5c06ec1924347067 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/12624 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-20build system: tighten down .xcompile handling some morePatrick Georgi
Bail out if .xcompile is incomplete or can't be regenerated. Change-Id: I74adeded7a3e849b25bf65c5b02f67820f29c7e2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12477 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20xcompile: Redirect the objdump stderr to /dev/nullzbao
On system with clang, "as" is available but "objdump" is not by default. So if ${gccprefix} is empty, "as" can run successfully and the "objdump" below might report error. Mask that output. Change-Id: I9940f069f66e097973ed6138cf3c696087fa5531 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11681 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Martin Roth <martinroth@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-08-28arm64: xcompile: Add support for A53 erratum 843419Julius Werner
This patch adds support to enable a linker workaround to a hardware erratum on some early Cortex-A53 revisions. Since the linker option was added very recently, we use xcompile to test whether the toolchain supports it first. It is also guarded by a Kconfig since only a few ARM64 SoCs will need this and it incurs a performance penalty. BRANCH=none BUG=none TEST=Turned it on or off for Smaug and confirmed that it (dis)appeared in verbose make output accordingly. Change-Id: I01c9642d3cf489134645f0db6f79f1c788ddb00d Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Original-Commit-Id: 57128785760c4dfa32d6e6d764756443a9323cb7 Original-Change-Id: Ia5dd124f484e38460d75fb864304e7e8b18d16b7 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/294745 Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/11403 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2015-08-25xcompile: Force localization of objdump to CMartin Roth
In testing other localization changes, I found that I couldn't build anymore because xcompile wasn't picking up my toolchain. I traced it to the regex comparison of '.*format \(.[a-z0-9-]*\)' to the string 'formato del fichero elf32-i386'. Forcing the localization of objdump to C before doing the comparison fixes the issue. Change-Id: I6bed5a9824807dd5bc5a38b711ab47e2af4b0c29 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11304 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Zheng Bao <zheng.bao@amd.com>
2015-08-10xcompile: crossgcc lookup in parent paths, for painless libpayload supportPaul Kocialkowski
libpayload is calling the xcompile script from payloads/libpayload, so the script never finds the path on its own and has to be fed the right XGCCPATH by hand. This makes xcompile look for the parent path too, so that it can find the crossgcc toolchains when called from libpayload. Change-Id: Icc41bb68e3a43810f40f03ab1eb08af07a50a3de Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: http://review.coreboot.org/11119 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-07-09libpayload: Use top level xcompileStefan Reinauer
Instead of having a second copy that already within 2-3 days becamer quite outdated, use the same xcompile copy for coreboot and libpayload, as we do with Kconfig already. This requires a simple change to the top level xcompile to understand both CONFIG_COMPILER_GCC and CONFIG_LP_COMPILER_GCC (only one of them will occur at the same time) libpayload's .xcompile target was moved later so that it can make use of $(top) Change-Id: I44001067f551cd0776dd303cbaeaa40eb3d5c1db Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10863 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-07-09xcompile: switch around armv7 TCARCHesStefan Reinauer
clang probing will pick up the first one that clang does not complain about and right now that is armv7a-eabi, even though our toolchain builds for armv7-a-eabi (and consecutively the build fails because there is no armv7a-eabi-as) Change-Id: I2594151150107f8e9c1aad33647dcb2f9878f953 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10830 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-07-07Unconditionally compile romstage with -Wa,--divideStefan Reinauer
The option --divide is required by our assembler to ensure that '/' is not parsed as a comment sign but as a division, because some of the cache as ram code is using divisions. The --divide parameter has been part of the GNU as since binutils 2.17. Hence, compile romstage (which contains cache as ram init) with -Wa,--divide unconditionally instead of probing for it and adding it to all compiler invocations (because that is causing random trouble with clang when compiling the SMM code and calling gcc with --divide instead of -Wa,--divide) Change-Id: Ideefb2a243dc1d657ba415a99c1f8ab1d93800e0 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10817 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-07-07xcompile: Fix compiler invocation in testccStefan Reinauer
While for GCC targets the compiler is just defined as a single binary, for clang it is defined as a binary and some options, e.g.: clang -target i386-elf -ccc-gcc-name i386-elf-gcc When executing the compiler with "$1", the shell will look for a binary with the above name (instead of just clang) and always fail detection of any CFLAGS. By adding -c we prevent the compiler from failing because it can't link a user space program (when what we're looking for, is whether a specific compiler flag can be used to compile a coreboot object file) Change-Id: I1e9ff32fe40efbe3224c69785f31bc277f21d21b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10816 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-07-06util/xcompile/xcompile: use env(1) to find bashJonathan A. Kollasch
Not all systems put bash at /bin/bash. Change-Id: Ib58cd2f6cf330b5b2678d55bb929696872fba9c9 Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-on: http://review.coreboot.org/10808 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-07-04xcompile: ask for compiler runtime using appropriate CFLAGSPatrick Georgi
xcompile keeps two CFLAGS around now, for GCC and CLANG. Normally they're not required to request the libgcc/compiler-rt path, but with the multilib capable x86_64-elf target it's required to make it pick the right libgcc when used as i386-elf builder. Change-Id: I700e7aa5783dc36698dd2ab8a38642a144e80fe9 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/10795 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
2015-06-20xcompile: x86-64-elf wants -Wa,--divide, tooStefan Reinauer
Change-Id: I03eb1c0f1e0b0c6213ec6b26cf41dadd4df9b910 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10574 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2015-06-16xcompile: Don't print error messagesStefan Reinauer
Don't print error messages if an unpatched clang is detected. Change-Id: If77722a40a59e99f01d121a0c43999f05f3c4421 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10554 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-16xcompile: add support for x86-64Stefan Reinauer
Add support for detecting an x86-64 cross compiler in xcompile. Change-Id: Icd2c9af7903956216db1fd54902eab6da0fe3e21 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-on: http://review.coreboot.org/8669 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-08xcompile: Fix errors thrown during make gitconfigStefan Reinauer
$ make gitconfig util/xcompile/xcompile: line 164: -print-librt-file-name: command not found util/xcompile/xcompile: line 164: -print-librt-file-name: command not found util/xcompile/xcompile: line 164: -print-librt-file-name: command not found util/xcompile/xcompile: line 164: -print-librt-file-name: command not found [..] Change-Id: Ib477566e3841e419aa7880c912636540a0ad5432 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10464 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
2015-06-04build system: move more clang handling to xcompilePatrick Georgi
clang requires some additional options to disable warnings which can be handled by xcompile. Also drop the hard coded clang compilers in Makefile Change-Id: I0f12f755420f315127e6d9adc00b1246c6e7131b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/7612 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-04build system: move compiler runtime determination to xcompilePatrick Georgi
Instead of fetching libgcc's location and required compiler flags on every individual build, do it once in xcompile. Change-Id: Ie5832fcb21710c4cf381ba475589d42ce0235f96 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/10425 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
2015-06-04xcompile: Detect clang compilersPatrick Georgi
This uses the availability of CONFIG_* variables in .xcompile and tests for compilers in xcompile so that the build system doesn't need to probe them. Change-Id: I359ad6245d2527efa7e848a9b38f5f194744c827 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/10424 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-04xcompile: Rename internal variable CFLAGS to CFLAGS_GCCPatrick Georgi
This is in preparation of adding support for clang to xcompile. Change-Id: I518d077f134610082b0939b1525682f2289eec34 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/10423 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-05-27xcompile: Add CROSS_COMPILE_* variableFurquan Shaikh
Add CROSS_COMPILE_* variable that can be passed to third-party component compilations. BUG=chrome-os-partner:40414 BRANCH=None TEST=CROSS_COMPILE_* variable is passed in correctly. Change-Id: I053325524601adf76ea35f7e74811fbc1c31781e Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: c07bd66e25900d064d6c69bddada67112ba5f183 Original-Change-Id: I3e4a5262acd84830205f64ba9a935974dd36ebbd Original-Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/272372 Original-Tested-by: Furquan Shaikh <furquan@chromium.org> Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org> Original-Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/10306 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh <furquan@google.com>
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-04util/xcompile/xcompile: Allow to override `HOSTCC` variablePaul Menzel
Currently `xcompile` generates `.xcompile` with the following at the top. # platform agnostic and host tools IASL:=iasl HOSTCC:=gcc The assignment `:=` doesn’t allow to override the variable. So use `?=` instead so the host compiler can be passed to coreboot. HOSTCC=gcc-5 make Note, that this is just a hack, as the existence of `gcc` is checked beforehand. Change-Id: Iebf3e43eb7eaffa7cf0efe97710d9feb3fe2a989 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/9457 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-04-28xcompile: improve mips toolchain handlingVadim Bendebury
The mips toolchain used by coreboot so far comes from Chrome OS chroot and is built explicitly for little endian code generation. Other flavors of MIPS toolchain usually generate big endian code by default and require command line options to switch to little endian mode. This patch adds another variable to the set of compiler flags examined to determine compiler compatibility. This results in adding another nested for loop in test_architecture(). To avoid the need to break from different levels of nesting, processing of the successful case is taken out from test_architecture(). With this change the Mentor Graphics provided mips GCC toolchain is accepted by xcompile, resulting in the following output: ARCH_SUPPORTED+=mips SUBARCH_SUPPORTED+=mips mipsel CC_mips:=mips-linux-gnu-gcc CFLAGS_mips:= -Wno-unused-but-set-variable -fno-stack-protector -Wl,--build-id=none -mno-abicalls -fno-pic -EL CPP_mips:=mips-linux-gnu-cpp AS_mips:=mips-linux-gnu-as LD_mips:=mips-linux-gnu-ld NM_mips:=mips-linux-gnu-nm OBJCOPY_mips:=mips-linux-gnu-objcopy OBJDUMP_mips:=mips-linux-gnu-objdump READELF_mips:=mips-linux-gnu-readelf STRIP_mips:=mips-linux-gnu-strip AR_mips:=mips-linux-gnu-ar Change-Id: I4da384b366880929693c59dc0e1c522b35c41bea Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/9997 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-04-28xcompile: Use local variables and make cosmetic changesVadim Bendebury
Declaring function variables local improves bash scripts' robustness. Cosmetic changes among other things include renaming variables from plural to singular and vice versa as appropriate, and replacing spaces with tabs. Tested by confirming that sorted output generated by util/xcompile/xcompile is the same before and after the change. Change-Id: I7305b3a4e45478ed3653b7d915dde4f83965f6c1 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/9996 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-04-10armv7-m: add armv7-m configurationDaisuke Nojiri
this change adds armv7-m configuration for bootblock and verstage. BUG=none TEST=Built cosmos, daisy_spring, falco, lumpy, nyan, nyan_blaze, rush_ryu, storm, veyron_pinky BRANCH=none Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ib2496e33d5690c91c8fff0f101ec31837c8809bc Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 34b838ebdcb0506799d86b64204f54a171114304 Original-Change-Id: I1c899d8969b1f8d0fa4cff617099d222bc4b4f4b Original-Reviewed-on: https://chromium-review.googlesource.com/224772 Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Original-Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Original-Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: http://review.coreboot.org/9379 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-03-30build system: mips is a valid nickname for mipselPatrick Georgi
Change-Id: I5829a96cbb0af0398113efbdf34dfa3d102bf4c8 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/9146 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins)
2015-03-23build: mips: add default compilation optionsVadim Bendebury
MIPS targets should be compiled with no position independent code allowed, as the generated image often does not support short range components reference. BUG=chrome-os-partner:31438 TEST=with the rest of the patches included MIPS board urara builds successfully Change-Id: I8ac2a2f6979d3b468159c9e29d07e022f48ab18a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: e932b203db3e7cb510a7bf862d4538d55b6c7271 Original-Change-Id: I637dd44eb565447c18b2c3cdb022d0933c52fd20 Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/215677 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/8822 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>