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@google.com> Reviewed-on: https://review.coreboot.org/14229 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
c13866fd40
commit
444ece2a38
|
@ -286,13 +286,25 @@ is_package_enabled()
|
||||||
echo "$PACKAGES" |grep -q "\<$1\>"
|
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() {
|
build() {
|
||||||
package=$1
|
package=$1
|
||||||
|
|
||||||
fn_exists build_$package || return
|
fn_exists build_$package || return
|
||||||
|
|
||||||
version="$(eval echo \$$package"_VERSION")"
|
version="$(eval echo \$$package"_VERSION")"
|
||||||
BUILDDIR=build-${TARGETARCH}-$package
|
package_uses_targetarch "$package" && \
|
||||||
|
BUILDDIR=build-${TARGETARCH}-$package || \
|
||||||
|
BUILDDIR=build-$package
|
||||||
|
|
||||||
mkdir -p ${BUILDDIR}
|
mkdir -p ${BUILDDIR}
|
||||||
|
|
||||||
|
@ -321,7 +333,7 @@ cleanup()
|
||||||
{
|
{
|
||||||
printf "Cleaning up temporary files... "
|
printf "Cleaning up temporary files... "
|
||||||
for package in $PACKAGES; do
|
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
|
done
|
||||||
rm -f getopt
|
rm -f getopt
|
||||||
printf "${green}ok${NC}\n"
|
printf "${green}ok${NC}\n"
|
||||||
|
|
Loading…
Reference in New Issue