使用 NDK 构建 Android openssl 无法正确生成 arm4 汇编文件
openssl 包含在 Android 操作系统中,Google 也包含在其构建中包含一些arm4/thumb汇编程序代码(aes/asm/aes-armv4.s、bn/asm/armv4-mont.s、sha/asm/sha1-armv4-large.s、sha/asm/sha256-armv4 .s,sha/asm/sha512-armv4.s)。我有 Android openssl 构建 和 ndk-build
但它只会使用纯 C aes_core.c(而不是 arm4 文件)正确构建。它甚至创建了 .o 文件,但找不到 *.odorg 文件,我不知道它们来自哪里。
对此有什么想法吗?
<代码> /usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /Users/hans/code/eighthave /openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.odorg -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/Users/hans/code/eighthave/openssl-android -I /Users/hans/code/eighthave/openssl-android/crypto/asn1 -I/Users/hans/code/eighthave/openssl-android/crypto/evp -I/Users/hans/code/eighthave/openssl-android/include -I/Users/hans/code/eighthave/openssl-android/include/openssl -Iexternal/zlib -I/Users/hans/code/eighthave/openssl-android/crypto -DANDROID -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3第779章,--noexecstack -O2 -DNDEBUG -g -I/usr/local/android-ndk/platforms/android-8/arch-arm/usr/include -c /Users/hans/code/eighthave/openssl-android/crypto /aes/asm/aes-armv4.s -o /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o && rm -f /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.od && mv /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.odorg /Users/hans/code/eighthave/openssl-android/obj/local/ armeabi/objs/crypto/aes/asm/aes-armv4.od mv:无法统计`/Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.odorg':没有这样的文件或目录 make:* [/Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o] 错误 1
openssl is included in the Android operating system, and Google also includes some arm4/thumb assembler code in their builds (aes/asm/aes-armv4.s, bn/asm/armv4-mont.s, sha/asm/sha1-armv4-large.s, sha/asm/sha256-armv4.s, sha/asm/sha512-armv4.s). I have the Android openssl building with ndk-build
but it will only builds properly with the plain C aes_core.c, not the arm4 files. It even creates the .o files, but it can't find the *.o.d.org files, which I have no idea where they come from.
Any ideas on this?
/usr/local/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o.d.org -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/Users/hans/code/eighthave/openssl-android -I/Users/hans/code/eighthave/openssl-android/crypto/asn1 -I/Users/hans/code/eighthave/openssl-android/crypto/evp -I/Users/hans/code/eighthave/openssl-android/include -I/Users/hans/code/eighthave/openssl-android/include/openssl -Iexternal/zlib -I/Users/hans/code/eighthave/openssl-android/crypto -DANDROID -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_STORE -DOPENSSL_NO_WHIRLPOOL -DOPENSSL_NO_HW -DOPENSSL_NO_ENGINE -DZLIB -DNO_WINDOWS_BRAINDEATH -DOPENSSL_BN_ASM_MONT -DAES_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -Wa,--noexecstack -O2 -DNDEBUG -g -I/usr/local/android-ndk/platforms/android-8/arch-arm/usr/include -c /Users/hans/code/eighthave/openssl-android/crypto/aes/asm/aes-armv4.s -o /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o && rm -f /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o.d && mv /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o.d.org /Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o.d
mv: cannot stat `/Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o.d.org': No such file or directory
make: * [/Users/hans/code/eighthave/openssl-android/obj/local/armeabi/objs/crypto/aes/asm/aes-armv4.o] Error 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有完全相同的问题,我正在寻找解决方法。我正在使用这个版本: https://github.com/fries/android-external-openssl< /a>
我使用的是 Android NDK r5b
I have the exact same problem, and I am looking for a workaround. I am using this version instead: https://github.com/fries/android-external-openssl
I am using the Android NDK r5b