Skip to content

IBM zSystems: Hardcode HWCAP_S390_VXRS#1766

Merged
Dead2 merged 1 commit intozlib-ng:developfrom
iii-i:hardcode-HWCAP_S390_VXRS
Aug 16, 2024
Merged

IBM zSystems: Hardcode HWCAP_S390_VXRS#1766
Dead2 merged 1 commit intozlib-ng:developfrom
iii-i:hardcode-HWCAP_S390_VXRS

Conversation

@iii-i
Copy link
Copy Markdown
Member

@iii-i iii-i commented Aug 9, 2024

Compiling zlib-ng with glibc 2.17 (minimum version still supported by crosstool-ng) fails due to the lack of HWCAP_S390_VX - it was introduced in glibc 2.23.

Strictly speaking, this is a problem with the feature detection logic in cmake. However, it's not worth disabling the s390x vectorized CRC32 if the hwcap constant is missing and the compiler intrinsics are available.

So fix by hardcoding the constant. It's a part of the kernel ABI, which does not change.

Compiling zlib-ng with glibc 2.17 (minimum version still supported by
crosstool-ng) fails due to the lack of HWCAP_S390_VX - it was
introduced in glibc 2.23.

Strictly speaking, this is a problem with the feature detection logic
in cmake. However, it's not worth disabling the s390x vectorized CRC32
if the hwcap constant is missing and the compiler intrinsics are
available.

So fix by hardcoding the constant. It's a part of the kernel ABI,
which does not change.
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.91%. Comparing base (d54e376) to head (4b653be).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1766      +/-   ##
===========================================
- Coverage    83.01%   82.91%   -0.11%     
===========================================
  Files          135      135              
  Lines        10291    10283       -8     
  Branches      2783     2697      -86     
===========================================
- Hits          8543     8526      -17     
- Misses        1051     1064      +13     
+ Partials       697      693       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iii-i
Copy link
Copy Markdown
Member Author

iii-i commented Aug 9, 2024

CMake / macOS GCC UBSAN (ARM64) fails for unrelated reasons.
codecov/project failure looks bogus - it points to, e.g., arch/x86/chunkset_avx2.c, which has nothing to do with this change.

Copy link
Copy Markdown
Collaborator

@mtl1979 mtl1979 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Dead2 Dead2 merged commit f858914 into zlib-ng:develop Aug 16, 2024
This was referenced Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants