logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: e6c3866ebddb8411acf5739f5c3cf804d1383857
parent d81d2bf669399219d64e22f146fe103d465d8459
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 18 Sep 2024 06:17:02 +0200

configure: Use CROSS_COMPILE as prefix before cc and gcov

Diffstat:

MREADME.md2+-
Mconfigure6++++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -25,7 +25,7 @@ Developed on Linux+musl, automatically tested on FreeBSD and NetBSD thanks to [S - `./bootstrap.sh` will compile the few utilities used by `./configure` for you ## Cross-compiling -Set the `CC` and `CFLAGS` environment variables for your target. +Set the `CC` and `CFLAGS` environment variables for your target, the usual `CROSS_COMPILE` is also supported as a fallback. To compile the test binaries without running them, run `make build-checks` ## Design differences diff --git a/configure b/configure @@ -15,6 +15,8 @@ Variables: PERLDIR=DIR MANDIR=DIR + CROSS_COMPILE=TRIPLE + MSGFMT=BIN CC=BIN YACC=BIN @@ -121,10 +123,10 @@ set -o pipefail PREFIX="${PREFIX:-/usr/local}" MSGFMT="${MSGFMT:-msgfmt}" -CC="${CC:-cc}" +CC="${CC:-${CROSS_COMPILE}cc}" YACC="${YACC:-yacc}" MAKE="${MAKE:-make}" -GCOV="${GCOV:-gcov}" +GCOV="${GCOV:-${CROSS_COMPILE}gcov}" # -DDEBUG: Otherwise assert() does nothing, fine to be removed in production CFLAGS="${CFLAGS:--g -O2 -DDEBUG}" M4="${M4:-m4}"