- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试为我们的 Xcode 交叉编译设置 CI。交叉编译测试 ARMv7 和 ARMv8。一切看起来都不错,除了链接 ARMv8 的时候:
clang++ -DNDEBUG -g2 -O3 -fPIC -pipe -Wall -miphoneos-version-min=7 -arch arm64 \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk \
-stdlib=libc++ -c cryptlib.cpp
clang++ -DNDEBUG -g2 -O3 -fPIC -pipe -Wall -miphoneos-version-min=7 -arch arm64 \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk \
-stdlib=libc++ -c cpu.cpp
...
clang++ -o cryptest.exe -DNDEBUG -g2 -O3 -fPIC -pipe -Wall -miphoneos-version-min=7 -arch arm64 \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk \
-stdlib=libc++ test.o bench1.o bench2.o ... ./libcryptopp.a
Undefined symbols for architecture arm64:
"CryptoPP::CRC32_Update_ARMV8(unsigned char const*, unsigned long, unsigned int&)", referenced from:
CryptoPP::CRC32::Update(unsigned char const*, unsigned long) in libcryptopp.a(crc.o)
"CryptoPP::CRC32C_Update_ARMV8(unsigned char const*, unsigned long, unsigned int&)", referenced from:
CryptoPP::CRC32C::Update(unsigned char const*, unsigned long) in libcryptopp.a(crc.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [cryptest.exe] Error 1
我们显然不运行输出工件 cryptest.exe
。我们只是编译和链接来测试东西。
代码在 LLVM Clang 下测试良好。
所有 ARMv8/Aarch64 机器都有 CRC-32 和 CRC-32C;但加密扩展是可选的。该错误没有多大意义。
Clang 是否缺少适用于 ARMv8/Aarch64 的 CRC32?
下面是导致错误的代码。
#if defined(__ARM_FEATURE_CRC32)
void CRC32_Update_ARMV8(const uint8_t *s, size_t n, uint32_t& c)
{
for(; !IsAligned<uint32_t>(s) && n > 0; s++, n--)
c = __crc32b(c, *s);
for(; n > 4; s+=4, n-=4)
c = __crc32w(c, *s);
for(; n > 0; s++, n--)
c = __crc32b(c, *s);
}
#endif
最佳答案
在 Xcode 8.3.3 下,我在 __crc32*() 处遇到了编译错误。然后我添加了命令行开关
-march=armv8-a+crc
在 this 找到链接,然后代码编译良好。我用 iphone7+/iOS10.3.1 测试过,它可以正常工作。
注意根据ARM's document (“ARM® 架构引用手册ARMv8, for ARMv8-A architecture profile"DDI0487B_a_armv8_arm.pdf: page A1-58), crc32 instructions are optional for v8 and mandatory for v8.1. 当我在 iphone6+/iOS9.3.3 上运行相同的程序时,它在 __crc32* 处崩溃()。我还用内联汇编程序对其进行了验证。因此,为了避免崩溃,需要进行某种运行时检查。我不完全理解如何做,但作为最后的手段,我们可以使用模型名称。
关于ios - Clang 是否缺少适用于 ARMv8/Aarch64 的 CRC32?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45625725/
我正在尝试在 map 上绘制一些疾病事件数据的位置。 我用它来导入数据: ByTown% addProviderTiles("CartoDB.Positron")%>% addPolygons
我有一个文件调用 find.js,我使用 node find.js 运行,我的节点是版本 10 我不知道为什么我无法使用 async await。 const axios = require("axi
我有一个项目作为引用添加到 System.Web。 但是,它似乎无法获取 HttpContext。这样做: Imports System.Web _ApplicationBase = HttpCont
在互联网上找到这段代码,出于某种原因它缺少 while 循环逻辑“while(i....)”,虽然我找到了 PigLatin* 问题的其他可行解决方案,但我真的很想了解这个正在工作。 *PigLati
我工作了一整天来运行 Xampp 并在其上安装 TYPO3。现在我登录到后端,但没有显示许多管理模块,例如模板、访问等。 - 一定是我做错了什么,但我不知道。 these are the module
你好 我有编译这个问题 \begin{equation} J = \sum_{j=1}^{C} \end{equation} 我不断收到错误 missing $ inserted 这很奇怪,因
我正在尝试使用 SQLite CLI,但无法获得 generate_series功能来工作。我可以按照文档中的建议使用递归 CTE 对其进行模拟,但我似乎无法获得该链接中的任何示例。这是我的 sess
我目前正在开发我想要的软件,而软件正在安装,它可以在后台为软件创建 native 图像。 我正在考虑使用 NGEN 并将进程优先级设置为低,因为我不希望它消耗 100% CPU。但是我发现我的计算机上
我想使用 Xcodes Instruments 进行 UI 自动化测试。但似乎缺少“自动化”。我怎样才能添加这个? 最佳答案 如果您想使用自动化仪器,请使用 Xcode 7.3。 Apple 在 Xc
我目前在 JS 开发中迈出了一小步,并编写了以下链接添加器: const button = document.getElementById('button') const listdiv = docu
此代码有什么问题: NSError *error = nil; [SFHFKeychainUtils deleteItemForUsername:@"IAPNoob01" andServiceName
出于某种原因,在安装和配置(我认为)一切之后,com.adobe.utils.AGALMiniAssembler 不见了,其他一切正常。 我认为我已尽一切努力让孵化器正常工作,但显然我错过了一步。 如
我有一个名为 new 的方法。调用 new 时,我传递了一个参数,但是当我运行应用程序时,出现没有参数或参数为空的错误。 StepReader.pm package StepReader; use s
安装 gtk 1.2(包名 gtk1)和 macports chokes 在最终的 make 中,在 libintl.h 的第 440 行。 extern locale_t libintl_newlo
我用按钮创建表格。 这是javascript代码: function layersListTable(layers) { var content =''; $.each($(layer
我在使用此 javascript 时遇到此错误,任何人都可以帮我弄清楚我做错了什么吗? $(this).prepend('Check availability »'); 它给我错误 mis
我有一个独立的工具链 NDK13b、api19、llvm 3.8 编译器、arm 32 位、带有 libcpp(llvm C++ 库) 我想避免依赖 libgcc,所以我构建了 compiler-rt
我按照一些教程使用 phonegap 的条形码扫描器插件。但是当我从现有源创建一个新的 android 项目来创建条码库时 (step 6 in this page)我收到错误:“AndroidMan
我现在尝试在 Eclipse 中打开我的布局 xml 文件。我只得到错误 No XML content. Please add a root view or layout to your docume
我的 android-sdk-windows\tools 目录中缺少层次结构查看器工具。 工具链接: http://developer.android.com/guide/developing/too
我是一名优秀的程序员,十分优秀!