Skip to content

macOs M1 build fix on arm cpu checks.#1198

Merged
Dead2 merged 1 commit intozlib-ng:developfrom
devnexen:mac_m1_build_fix
Apr 27, 2022
Merged

macOs M1 build fix on arm cpu checks.#1198
Dead2 merged 1 commit intozlib-ng:developfrom
devnexen:mac_m1_build_fix

Conversation

@devnexen
Copy link
Copy Markdown
Contributor

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2022

Codecov Report

Merging #1198 (676a433) into develop (bb89b77) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1198      +/-   ##
===========================================
- Coverage    87.38%   87.33%   -0.05%     
===========================================
  Files          114      114              
  Lines        10146    10146              
  Branches      2554     2554              
===========================================
- Hits          8866     8861       -5     
- Misses         956      961       +5     
  Partials       324      324              
Flag Coverage Δ
macos_clang 30.95% <ø> (ø)
macos_gcc 74.98% <ø> (ø)
ubuntu_clang 86.56% <ø> (-0.86%) ⬇️
ubuntu_clang_debug 86.96% <ø> (ø)
ubuntu_clang_inflate_allow_invalid_dist 86.26% <ø> (-0.86%) ⬇️
ubuntu_clang_inflate_strict 87.37% <ø> (ø)
ubuntu_clang_mmap 86.70% <ø> (-0.86%) ⬇️
ubuntu_clang_pigz 40.95% <ø> (ø)
ubuntu_clang_pigz_no_optim 41.14% <ø> (ø)
ubuntu_clang_pigz_no_threads 40.53% <ø> (ø)
ubuntu_clang_reduced_mem 87.82% <ø> (ø)
ubuntu_gcc 77.06% <ø> (ø)
ubuntu_gcc_aarch64 77.37% <ø> (ø)
ubuntu_gcc_aarch64_compat_no_opt 75.47% <ø> (ø)
ubuntu_gcc_aarch64_no_acle 76.27% <ø> (ø)
ubuntu_gcc_aarch64_no_neon 76.16% <ø> (ø)
ubuntu_gcc_armhf 77.38% <ø> (ø)
ubuntu_gcc_armhf_compat_no_opt 75.39% <ø> (ø)
ubuntu_gcc_armhf_no_acle 77.40% <ø> (ø)
ubuntu_gcc_armhf_no_neon 77.16% <ø> (ø)
ubuntu_gcc_armsf 77.25% <ø> (ø)
ubuntu_gcc_armsf_compat_no_opt 75.06% <ø> (ø)
ubuntu_gcc_benchmark 75.00% <ø> (ø)
ubuntu_gcc_compat_no_opt 76.60% <ø> (ø)
ubuntu_gcc_compat_sprefix 75.10% <ø> (ø)
ubuntu_gcc_m32 74.45% <ø> (-0.39%) ⬇️
ubuntu_gcc_mingw_i686 0.00% <ø> (ø)
ubuntu_gcc_mingw_x86_64 0.00% <ø> (ø)
ubuntu_gcc_no_avx2 75.91% <ø> (-0.82%) ⬇️
ubuntu_gcc_no_ctz 74.76% <ø> (ø)
ubuntu_gcc_no_ctzll 74.79% <ø> (ø)
ubuntu_gcc_no_pclmulqdq 75.51% <ø> (ø)
ubuntu_gcc_no_sse2 76.79% <ø> (ø)
ubuntu_gcc_no_sse4 76.32% <ø> (ø)
ubuntu_gcc_o1 76.03% <ø> (ø)
ubuntu_gcc_osb ∅ <ø> (∅)
ubuntu_gcc_pigz 38.90% <ø> (+0.05%) ⬆️
ubuntu_gcc_pigz_aarch64 39.38% <ø> (+0.05%) ⬆️
ubuntu_gcc_ppc 73.81% <ø> (ø)
ubuntu_gcc_ppc64 74.56% <ø> (ø)
ubuntu_gcc_ppc64le 74.53% <ø> (ø)
ubuntu_gcc_ppc_no_power8 74.73% <ø> (ø)
ubuntu_gcc_s390x 74.73% <ø> (ø)
ubuntu_gcc_s390x_dfltcc 72.03% <ø> (ø)
ubuntu_gcc_s390x_dfltcc_compat 73.64% <ø> (ø)
ubuntu_gcc_s390x_no_crc32 74.51% <ø> (ø)
ubuntu_gcc_sparc64 74.62% <ø> (ø)
ubuntu_gcc_sprefix 74.88% <ø> (+0.37%) ⬆️
win64_gcc 73.95% <ø> (ø)
win64_gcc_compat_no_opt 74.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
arch/arm/arm_features.c 100.00% <ø> (ø)
arch/x86/adler32_avx512.c 87.80% <0.00%> (-12.20%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb89b77...676a433. Read the comment docs.

# define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32
# endif
#elif defined(__APPLE__)
# define _DARWIN_C_SOURCE /* enable types aliases (eg u_int) */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This might break if zlib-ng is included by another project... Like other similar preprocessor defines, it should always be guarded.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sorry I missed your comment.

@nmoinvaz
Copy link
Copy Markdown
Member

What error does this fix?

@Dead2 Dead2 added bug Changes Requested Rebase needed Please do a 'git rebase develop yourbranch' labels Mar 21, 2022
@devnexen
Copy link
Copy Markdown
Contributor Author

devnexen commented Apr 24, 2022

What error does this fix?

It enables type aliases such as u_int .. etc

@nmoinvaz nmoinvaz removed Rebase needed Please do a 'git rebase develop yourbranch' Changes Requested labels Apr 25, 2022
@Dead2 Dead2 requested a review from mtl1979 April 26, 2022 08:33
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.

Preferred way would be to add _DARWIN_C_SOURCE to whole project, but we don't use regular expressions, so mixing source files with and without the define is considered safe. We also do the same with other similar defines. The relevant manual page would be compat.5 on affected systems.

@Dead2 Dead2 merged commit d41f8ea into zlib-ng:develop Apr 27, 2022
@Dead2 Dead2 mentioned this pull request Dec 27, 2022
Dead2 added a commit that referenced this pull request Mar 7, 2023
Changes since 2.0.6:
- Fix CVE-2022-37434 #1328
- Fix chunkmemset #1196
- Fix deflateBound too small #1236
- Fix Z_SOLO #1263
- Fix ACLE variant of crc32 #1274
- Fix inflateBack #1311
- Fix deflate_quick windowsize #1431
- Fix DFLTCC bugs related to adler32 #1349 and #1390
- Fix warnings #1194 #1312 #1362
- MacOS build fix #1198
- Add invalid windowBits handling #1293
- Support for Force TZCNT #1186
- Support for aligned_alloc() #1360
- Minideflate improvements #1175 #1238
- Dont use unaligned access for memcpy #1309
- Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365
- Test improvements #1208 #1227 #1241 #1353
- Cleanup #1266
- Documentation #1205 #1359
- Misc improvements #1294 #1297 #1306 #1344 #1348
- Backported zlib fixes
- Backported CI workflows from Develop branch
Dead2 added a commit that referenced this pull request Mar 17, 2023
Changes since 2.0.6:
- Fix CVE-2022-37434 #1328
- Fix chunkmemset #1196
- Fix deflateBound too small #1236
- Fix Z_SOLO #1263
- Fix ACLE variant of crc32 #1274
- Fix inflateBack #1311
- Fix deflate_quick windowsize #1431
- Fix DFLTCC bugs related to adler32 #1349 and #1390
- Fix warnings #1194 #1312 #1362
- MacOS build fix #1198
- Add invalid windowBits handling #1293
- Support for Force TZCNT #1186
- Support for aligned_alloc() #1360
- Minideflate improvements #1175 #1238
- Dont use unaligned access for memcpy #1309
- Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365
- Test improvements #1208 #1227 #1241 #1353
- Cleanup #1266
- Documentation #1205 #1359
- Misc improvements #1294 #1297 #1306 #1344 #1348
- Backported zlib fixes
- Backported CI workflows from Develop branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants