Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950372 - sys-devel/crossdev do not allow to use the same arch as the host blocking cpu optimization
Summary: sys-devel/crossdev do not allow to use the same arch as the host blocking cpu...
Status: CONFIRMED
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: 2025-02-28 15:18 UTC by Lagu
Modified: 2025-03-01 17:23 UTC (History)
2 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 Lagu 2025-02-28 15:18:33 UTC
Hi! actually crossdev do not support using the host architecture, when we try it , it request to use chroot.

This affects directly on binhost, for example you want a binhost for a series of notebooks model, the model have a common CPU, and we would expect be able to optimize for that model.

When we use chroot, we only can build optimization for CPU that has instructions as a subset of the Host, so basically you can only optimize cpus older than the binhost cpu.

Servers/Binhosts usually takes a lot more time to be renovated, and are build different, a old one (5 years ago) can still be very nice for compiling or even better than a new notebook, this causes to be less probable be able to optimize new hardware for example notebooks.

Would be idea be able to use crossdev to make a compiler that allows us to optimize the target hardware.

I do not know in deep how this works, I know that it builds a special gcc and other tools to be used on the host and the output be the target, no idea if there is a way to make this.

Thx!
Comment 1 Mike Gilbert gentoo-dev 2025-03-01 17:04:10 UTC
A common way to avoid that check is to pass a custom value in the vendor field of the target triplet. For example:

crossdev --target x86_64-lagu-linux-gnu
Comment 2 James Le Cuirot gentoo-dev 2025-03-01 17:23:14 UTC
The way floppym suggests is the only feasible way. There's nothing to stop you just setting ROOT=/foo SYSROOT=/foo after doing some bootstrapping or extracting a stage3, but this generally doesn't work for a few reasons. It is often requested though, so I have experimented, but I currently still consider it virtually impossible.