-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build: Change MAC_OSX macro to __APPLE__ in crypto #29834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Change MAC_OSX macro to __APPLE__ in crypto #29834
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a71eadf
I whipped up a minimal test-case locally to verify that this code at least compiles using the iOS sdk. Not that we support iOS, but I wanted to prove to myself that generically "APPLE" really is what we mean here.
#include <sys/types.h>
#include <sys/sysctl.h>
int main()
{
int val = 0;
int have_arm_shani;
size_t len = sizeof(val);
if (sysctlbyname("hw.optional.arm.FEAT_SHA256", &val, &len, nullptr, 0) == 0) {
have_arm_shani = val != 0;
}
return have_arm_shani;
}
clang -target arm64-apple-ios test.cpp --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk -o testing
The includes are found and no complaints about the use of sysctlbyname()
.
Guix Build (aarch64): bdbdd644be801bd72472a94e878076406e63e8bc39c55f5a6e3bc28e23a72c81 guix-build-a71eadf66bed/output/aarch64-linux-gnu/SHA256SUMS.part
cf1eb27df84f25149a743be33f037eac960c1a943da2750b9030315593df4192 guix-build-a71eadf66bed/output/aarch64-linux-gnu/bitcoin-a71eadf66bed-aarch64-linux-gnu-debug.tar.gz
732f794906af544c3c0e41ff3cdc8fc0253fbef96d5572998286ad19ecbc5a9e guix-build-a71eadf66bed/output/aarch64-linux-gnu/bitcoin-a71eadf66bed-aarch64-linux-gnu.tar.gz
a50f89f989cdf042f22dba0429ef45cd8117a8a4c79834257aa8e538da209405 guix-build-a71eadf66bed/output/arm-linux-gnueabihf/SHA256SUMS.part
48fbd0b784b3bcca4bdbb27e47616b663f06ee37f9650e66efe24d5c4f5f5875 guix-build-a71eadf66bed/output/arm-linux-gnueabihf/bitcoin-a71eadf66bed-arm-linux-gnueabihf-debug.tar.gz
d24c06d901a01d7d6824807ac5d81f6dc9c10d117845fd8c6f5e27e66b195ecb guix-build-a71eadf66bed/output/arm-linux-gnueabihf/bitcoin-a71eadf66bed-arm-linux-gnueabihf.tar.gz
dc7afb67046d6d7be1cedec4dea47236ad80bd11933556396105dced3324e651 guix-build-a71eadf66bed/output/arm64-apple-darwin/SHA256SUMS.part
6f89fe75b36c61988d691a3f7fe05d0c9a09549202da84027e3ed5b03d48affb guix-build-a71eadf66bed/output/arm64-apple-darwin/bitcoin-a71eadf66bed-arm64-apple-darwin-unsigned.tar.gz
4cbd9bec1ae78a8c65a6cf41c6fadede74960eb8125096b82a628fc2915112a1 guix-build-a71eadf66bed/output/arm64-apple-darwin/bitcoin-a71eadf66bed-arm64-apple-darwin-unsigned.zip
c290de9551c2cce5e905e548f6042c257a1a6581e1934e4c8a236ea7b5116bfb guix-build-a71eadf66bed/output/arm64-apple-darwin/bitcoin-a71eadf66bed-arm64-apple-darwin.tar.gz
92398831c728983358361d4c80f3dfd6b7e6adeb93d268d6f7704b9d66795fed guix-build-a71eadf66bed/output/dist-archive/bitcoin-a71eadf66bed.tar.gz
14bae2daaa66bcc57e6466c5884ad5314386e0a5263bbd4ccb759a2928e32415 guix-build-a71eadf66bed/output/powerpc64-linux-gnu/SHA256SUMS.part
c15b04aafd3dd6c4cc97de0bde13469a7216a1d4750b77652c7d76872e91bd74 guix-build-a71eadf66bed/output/powerpc64-linux-gnu/bitcoin-a71eadf66bed-powerpc64-linux-gnu-debug.tar.gz
be84ae16fc4079d8aa6ca3b39cb105d8cb219d224aacbdc497c01d18dd6cc567 guix-build-a71eadf66bed/output/powerpc64-linux-gnu/bitcoin-a71eadf66bed-powerpc64-linux-gnu.tar.gz
d79b4c61edac51777d89e6d668cf795cfbe8b250327d5c2e70d929c15ef3f646 guix-build-a71eadf66bed/output/riscv64-linux-gnu/SHA256SUMS.part
cc8d88bef01fc6c3580eb26efcdff8409c3ab651bcc18c1c8a09b4608b554f5d guix-build-a71eadf66bed/output/riscv64-linux-gnu/bitcoin-a71eadf66bed-riscv64-linux-gnu-debug.tar.gz
4f44f71363e26b7c61644d3ab238a4d6932411a4fac9e0a9ece7cb0ad656ff35 guix-build-a71eadf66bed/output/riscv64-linux-gnu/bitcoin-a71eadf66bed-riscv64-linux-gnu.tar.gz
f96f57097ed44e09c5d30ab5b8854a354abac65cb8912ca957e35c5868157833 guix-build-a71eadf66bed/output/x86_64-apple-darwin/SHA256SUMS.part
b0d336d1b7ed57ab49f48e848dd66d6a3ccc042cdcca732e87c5a982f927d8fd guix-build-a71eadf66bed/output/x86_64-apple-darwin/bitcoin-a71eadf66bed-x86_64-apple-darwin-unsigned.tar.gz
ad32c875875d5df5f2697e854ba5f557a834006a1626f753121bb03bdd18c39e guix-build-a71eadf66bed/output/x86_64-apple-darwin/bitcoin-a71eadf66bed-x86_64-apple-darwin-unsigned.zip
3af7ccb2bc06b7620e5d0fe971fff1d08b0964c900e9499cc3dbb95dc87feae6 guix-build-a71eadf66bed/output/x86_64-apple-darwin/bitcoin-a71eadf66bed-x86_64-apple-darwin.tar.gz
ae60d7ee7d160b83b89438fc4db98e0d0fd4e0182681d7e7a37b049dc99f66ba guix-build-a71eadf66bed/output/x86_64-linux-gnu/SHA256SUMS.part
0da535d2817dc0cb47834c6ded8937a8dc96f6991dc893bb1f78f6b4c8dffc67 guix-build-a71eadf66bed/output/x86_64-linux-gnu/bitcoin-a71eadf66bed-x86_64-linux-gnu-debug.tar.gz
6e7c1d7cce8049d0e773a35a53a5d91726a984b5f6fe4a0db7d12f06afa90b12 guix-build-a71eadf66bed/output/x86_64-linux-gnu/bitcoin-a71eadf66bed-x86_64-linux-gnu.tar.gz
9b8dc1381484eaf9c7bdd70348a63bc3c2bb0ea5fecb6ed8a4666c3d3b709aa3 guix-build-a71eadf66bed/output/x86_64-w64-mingw32/SHA256SUMS.part
dd7ed37d893a9e5bc9f799c12e9199738fc8fba01db73335f76d917f8def9237 guix-build-a71eadf66bed/output/x86_64-w64-mingw32/bitcoin-a71eadf66bed-win64-debug.zip
d37bb63980156149eaa0a8f3d6fa100a8dfdd29947cd33c9c7b2955a65a37a11 guix-build-a71eadf66bed/output/x86_64-w64-mingw32/bitcoin-a71eadf66bed-win64-setup-unsigned.exe
ae23fb616a8390dae2241c8e117ca15c90d0e8db1131d5a85287c908fb7da049 guix-build-a71eadf66bed/output/x86_64-w64-mingw32/bitcoin-a71eadf66bed-win64-unsigned.tar.gz
cd5e60d21f4f12740c9ec659cf9b3bd956bd2ac6e068695733d74185a2f6512d guix-build-a71eadf66bed/output/x86_64-w64-mingw32/bitcoin-a71eadf66bed-win64.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a71eadf
Split out from #29450 (comment) to avoid the uncertainties and simplify review.