Skip to content

Cross-Compiling CoreCLR for ARM mfpu=vfpv4-d16 fails #113013

Open
@hopix

Description

@hopix

Description

Cross-compiling .net 9 runtime for VFP Configuration ARM vfpv4-d16 (-mfpu=vfpv4-d16) fails.

Following doc at https://github.com/dotnet/runtime/blob/v9.0.2/docs/workflow/building/coreclr/cross-building.md#cross-compiling-coreclr-for-other-vfp-configurations

Reproduction Steps

Using build command line:

docker run --rm -v /home/devix/dotnet-build/runtime9:/runtime -w /runtime -e ROOTFS_DIR=/crossrootfs/arm
    mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm
    ./build.sh
    --subset clr+host.native+libs.native+Clr.Aot
    --os linux -runtimeFlavor CoreCLR --cross --arch arm
    --hostConfiguration Release --librariesConfiguration Release --runtimeConfiguration Release
    --verbosity detailed
    --cmakeargs -DCLR_ARM_FPU_CAPABILITY=0x3 --cmakeargs -DCLR_ARM_FPU_TYPE=vfpv4-d16

Expected behavior

Build should succeed.

Actual behavior

Build fails where 1st error in log is:
In file included from /runtime/src/native/external/zlib-ng/arch/arm/slide_hash_neon.c:12: /runtime/src/native/external/zlib-ng/arch/arm/neon_intrins.h:38:28: error: expected identifier or '(' 38 | static inline uint16x8x4_t vld1q_u16_x4(uint16_t const *a) {

It seems to wrongly compiling for NEON instead of vfpv4-d16.
And few lines above error I can see:
* NEON_ADLER32, Support NEON instructions in adler32, using "-mfpu=neon"

Regression?

Using this since .net 5, and I checked that clean compile still works in .net 8 branch.

Known Workarounds

None

Configuration

Version: .NET 9
Target architecture: ARM
Running build from WSL 2 Ubuntu with Docker Desktop.

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status

    No status

Relationships

None yet

Development

No branches or pull requests

Issue actions