diff options
-rwxr-xr-x | libexec/build-make-compile | 4 | ||||
-rwxr-xr-x | libexec/build-num-cpus | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libexec/build-make-compile b/libexec/build-make-compile index 6a2a8a9..5cbb743 100755 --- a/libexec/build-make-compile +++ b/libexec/build-make-compile @@ -32,8 +32,6 @@ build_make_compile() trap build_make_compile_cleanup 0 load_rules "${1}" - build uninstall "${1}" - # Declare compilation variables before loading the rules as the package # may potentially overwrite this data, in particular the toolchain data # is usually rewritten within the toolchain/buildtools rule. @@ -42,6 +40,8 @@ build_make_compile() mkenv "compile" PKG_LOGFILE="${L}/compile.log" + build uninstall "${1}" >> "${PKG_LOGFILE}" + # pkgconfig can be a right pita... PKG_CONFIG_LIBDIR="${SYSROOT}/usr/share/pkgconfig:${SYSROOT}/usr/lib/pkgconfig" PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" diff --git a/libexec/build-num-cpus b/libexec/build-num-cpus index ab88f3f..37d6c6b 100755 --- a/libexec/build-num-cpus +++ b/libexec/build-num-cpus @@ -1,8 +1,12 @@ #!/usr/bin/env build +# FIXME maybe we should rely on a list of possible commands and go through them +# all (nproc,lscpu,etc..) instead of attempting to guess based on the OS? case "${CBUILD:-$(build-dumpmachine)}" in (*linux*) eval 'build_num_cpus() { nproc; }';; -(*) die "unknown host '${CBUILD}'";; + +# Default to returning 1 CPU if we do not know how to handle the platform. +(*) eval 'build_num_cpus() { echo 1; }';; esac if test "${BUILDER_CALL_STACK}" = '__main__'; then |