* gnu/packages/base.scm (coreutils): Remove Perl input
when (%current-target-system) is true. Use %standard-cross-phases as
the base when (%current-target-system) is true.
* gnu/packages/cross-base.scm: New file.
* gnu/packages/patches/gcc-cross-environment-variables.patch: New file.
* Makefile.am (MODULES): Add cross-base.scm.
(dist_patch_DATA): Add gcc-cross-environment-variables.patch.
* gnu/packages/base.scm (gcc-4.7): Use `LDFLAGS_FOR_TARGET' instead of
`LDFLAGS_FOR_BUILD', and use `-B' instead of `-L'.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for
"mips64el-linux".
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.