We are facing the same issue when migrating our dockerfile from debian 12 to 13.
We install the compiler like this:
```
FROM build-0 as build-util-linux-amd64
ENV HOST=x86_64-linux-gnu
FROM build-0 as build-util-linux-arm64
ENV HOST=aarch64-linux-gnu
FROM build-util-linux-$TARGETARCH as build-util-linux
RUN apt-get update && apt-get install -y gcc-${HOST//_/-}
```
And always call the triplet gcc, so that our dockerfile can build on any arch
for any arch.
Can you be specific why we can't use --with-as for native compiler?
If we really can't, can we at least make gcc-14-x86-64-linux-gnu depends on
binutils on amd64 (rather than binutils-x86-64-linux-gnu), so that it will not
complain on missing /usr/bin/as?