Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 868636

Summary: sys-devel/crossdev forces multilib for arm toolchains
Product: Gentoo Linux Reporter: Hypoon <futurehypoon>
Component: Current packagesAssignee: Gentoo Crossdev team <crossdev>
Status: UNCONFIRMED ---    
Severity: normal CC: bugs, embedded, herrtimson, toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=407275
Whiteboard:
Package list:
Runtime testing required: ---

Description Hypoon 2022-09-05 22:37:42 UTC
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.