poudriere icon indicating copy to clipboard operation
poudriere copied to clipboard

Poudriere should allow native xtools for non-QEMU builds

Open clausecker opened this issue 2 years ago • 4 comments

Prerequisites

  • [x] Have you checked for an existing issue describing your idea?

What is your proposal?

Poudriere should permit to create and use native-xtools when building for a natively supported architecture that is not the same architecture as the host system (i.e. i386 on amd64).

What is the existing behavior, if any?

Poudriere only permits native xtools when building with emulation.

What is the motivation / use case for the change?

Some architectures (amd64, arm64, potentially mips64, ppc64, riscv64) support running 32 bit binaries on a 32 bit kernel, so ports for the 32 bit variant can be built natively. Neverthless it is very useful to build these ports with a 64 bit tool chain because often running 64 bit code is faster on these platforms. Additionally, some ports require more than 4 GB of virtual memory to compile and link, so building them with a native toolchain is impossible. Xtools are required in such a situation to get a 32 bit binary of the port at all.

Did you consider any alternatives?

No.

Is this really a ports feature request?

Yes.

Example

On an arm64 system, I want to be able to do

poudriere jail -c -j 13Rarmv7 -a arm.armv7 -b -x -m src=/usr/src

But right now, the -x option is silently ignored as armv7 builds do not require QEMU on arm64.

Additional context

n/a

clausecker avatar Oct 09 '21 18:10 clausecker

definitely +1.

Am looking to do this for arm.armv6

ivr588 avatar Nov 02 '21 12:11 ivr588

Have found that the reason poudriere calls for qemu on aarch64 when trying to build a jail for armv6 is because on aarch64 MACHINE_ARCH32 is set to armv7. To get poudriere to build on aarch64 an armv6 jail, one must modify /usr/src/sys/arm64/include/param.h and rebuild the kernel. (thanks to markml for the suggestion)

ivr588 avatar Nov 04 '21 13:11 ivr588

The only real bug here is that on aarch64, poudriere prompts for QEMU when asked to compile a jail for a non-native host. It does this in spite of QEMU not being available as an emulating host on aarch64.

ivr588 avatar Nov 04 '21 13:11 ivr588

@ivr588 That is a different issue. I am specifically interested in using native x-tools to build armv7 packages on aarch64 or i386 packaged on amd64 because a 64 bit compiler runs faster than a 32 bit compiler on these platforms. QEMU does not enter the picture here.

clausecker avatar Nov 04 '21 13:11 clausecker