https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82834
Bug ID: 82834 Summary: Cross-compiler doesn't find correct multilib for target Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: simon at pushface dot org Target Milestone: --- I have r254339, and built a cross-compiler on macOS 10.11.6 (darwin 15.6.0), newlib 2.5.0: $ arm-eabi-gcc -v Using built-in specs. COLLECT_GCC=arm-eabi-gcc COLLECT_LTO_WRAPPER=/opt/gcc-8.0.0/bin/../libexec/gcc/arm-eabi/8.0.0/lto-wrapper Target: arm-eabi Configured with: /Volumes/Miscellaneous/tmp/gcc/configure --build=x86_64-apple-darwin15 --disable-libada --disable-libcc1 --disable-libcilkrts --disable-libmudflap --disable-libsanitizer --disable-libssp --disable-nls --disable-shared --disable-lto --enable-languages=c,ada --enable-multilib --prefix=/Volumes/Miscellaneous/arm/gcc-8.0.0 --target=arm-eabi --with-bugurl=URL:mailto:si...@pushface.org --with-gnu-as --with-gnu-ld --with-newlib --with-stage1-ldflags='-static-libstdc++ -static-libgcc -Wl,-headerpad_max_install_names' --with-system-zlib --without-libiconv-prefix --with-arch=armv7 Thread model: single gcc version 8.0.0 20171102 (experimental) (GCC) This was on macOS 10.11.6 (Darwin 15.6.0) I compile my code with -mlittle-endian -mfloat-abi=hard -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb and it looks as though the compiler has added -march=armv7e-m+fp When I link (same options), the link fails because /opt/gcc-8.0.0/bin/../lib/gcc/arm-eabi/8.0.0/../../../../arm-eabi/bin/ld: error: /Users/simon/cortex-gnat-rts/test-stm32f4//testbed uses VFP register arguments, /opt/gcc-8.0.0/bin/../lib/gcc/arm-eabi/8.0.0/../../../../arm-eabi/lib/libm.a(lib_a-acosl.o) does not /opt/gcc-8.0.0/bin/../lib/gcc/arm-eabi/8.0.0/../../../../arm-eabi/bin/ld: failed to merge target specific data of file /opt/gcc-8.0.0/bin/../lib/gcc/arm-eabi/8.0.0/../../../../arm-eabi/lib/libm.a(lib_a-acosl.o) etc etc. I find that I get a successful link by adding -L/opt/gcc-8.0.0/arm-eabi/lib/thumb/autofp/v7/fpu -L/opt/gcc-8.0.0/lib/gcc/arm-eabi/8.0.0/thumb/autofp/v7/fpu