Hi Stephen,
It appears within the bfd/doc makefile it Assumes CC=pcc correctly but sets
CC_FOR_BUILD = gcc which is nowhere on the system. This creates the below
error when compiling binutils on a musl-pcc system. Setting CC_FOR_BUILD =
pcc manually allows chew to build.
I think that the intention is that CC_FOR_BUILD should be set by the
user, if they are cross-compiling a toolchain.
The logic to choose CC_FOR_BUILD can be found in bfd/acinclude.m4:
AC_DEFUN([BFD_CC_FOR_BUILD],
[# Put a plausible default for CC_FOR_BUILD in Makefile.
if test -z "$CC_FOR_BUILD"; then
if test "x$cross_compiling" = "xno"; then
CC_FOR_BUILD='$(CC)'
else
CC_FOR_BUILD=gcc
fi
fi
So, if the CC_FOR_BUILD is not set, and if this is a cross-compilation,
then gcc is used as a last resort. The implication is that CC is for
native builds whereas CC_FOR_BUILD is for cross builds.
Cheers
Nick
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils