Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 868636 - sys-devel/crossdev forces multilib for arm toolchains
Summary: sys-devel/crossdev forces multilib for arm toolchains
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-05 22:37 UTC by Hypoon
Modified: 2024-09-06 19:17 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 1 Marco Sirabella 2024-09-06 19:17:15 UTC
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
			;;

```