Bug report #407275 fails to consider that one might use crossdev to build a toolchain for arm-based microcontrollers, which only support the thumb ISA. Furthermore, as far as I can tell, multilib must be disabled in order to achieve the highest-performing optimizations with "hard" FPU support. With multilib enabled, gcc gets "--with-multilib-list=aprofile,rmprofile", which directly conflicts with the desired options, "--with-cpu=cortex-m4 --with-float-abi=hard --with-fpu=fpv4-sp-d16 --with-mode=thumb", based directly on this wiki page: https://wiki.gentoo.org/wiki/ARM . My workaround (suggested by hairu in #gentoo-arm) was to create a file in /etc/portage/profile/package.use.force/ which forces USE=-multilib for the relevant cross-arm-foo-none-eabi packages. The file had to be carefully named so that it's read AFTER the automatically-generated crossdev files. There should be a better way to prepare this toolchain. Reproducible: Always My build host is arm64 with multilib enabled.
I'm running into the same problem, can't build hardfloat arm compiler very easily because keeps failing with: ``` Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile,rmprofile ``` Which seems to contradict the intention within toolchain.eclass: ``` # If multilib is used, make the compiler build multilibs # for A or R and M architecture profiles. Do this only # when no specific arch/mode/float is specified, e.g. # for target arm-none-eabi, since doing this is # incompatible with --with-arch/cpu/float/fpu. if is_multilib && [[ ${arm_arch} == arm ]] ; then confgcc+=( --with-multilib-list=aprofile,rmprofile ) fi ;; ```