[coreboot-gerrit] New patch to review for coreboot: crossgcc: skip TARGETARCH for tools that don't use it
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Sat Apr 2 19:12:54 CEST 2016
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14229
-gerrit
commit 3460b99f226fa00a4765a54d1bebe3bb2002ccf5
Author: Martin Roth <martinroth at google.com>
Date: Fri Apr 1 18:46:29 2016 -0600
crossgcc: skip TARGETARCH for tools that don't use it
Many of the tools and libraries don't use a target architecture, but
they were still getting put in one. This change separates out the
builds that need the target architecture from the ones that don't,
and sets the build directory accordingly.
This will help keep from rebuilding the libraries when building all
of the tools if you keep the temporary files around (-t option).
Change-Id: Id6c17719332f2244657f103f5f07ca7812d51af1
Signed-off-by: Martin Roth <martinroth at google.com>
---
util/crossgcc/buildgcc | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 81afc1f..74b26ab 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -287,13 +287,25 @@ is_package_enabled()
echo "$PACKAGES" |grep -q "\<$1\>"
}
+package_uses_targetarch()
+{
+ if [ "$1" = "GCC" ] || [ "$1" = "GDB" ] || [ "$1" = "BINUTILS" ] || \
+ [ "$1" = "PYTHON" ] || [ "$1" = "EXPAT" ]; then
+ true
+ else
+ false
+ fi
+}
+
build() {
package=$1
fn_exists build_$package || return
version="$(eval echo \$$package"_VERSION")"
- BUILDDIR=build-${TARGETARCH}-$package
+ package_uses_targetarch "$package" && \
+ BUILDDIR=build-${TARGETARCH}-$package || \
+ BUILDDIR=build-$package
mkdir -p ${BUILDDIR}
@@ -322,7 +334,7 @@ cleanup()
{
printf "Cleaning up temporary files... "
for package in $PACKAGES; do
- rm -rf build-${TARGETARCH}-$package $(eval echo \$$package"_DIR")
+ rm -rf build-${TARGETARCH}-$package build-$package $(eval echo \$$package"_DIR")
done
rm -f getopt
printf "${green}ok${NC}\n"
More information about the coreboot-gerrit
mailing list