Open welbonwang opened 4 years ago
I am not able to reproduce this problem. Can you provide more details, such as: how exactly are you building? What is the exact compiler error output you are seeing?
reproduce command as following:
clang -D__KERNEL_ARM_ARCH__=7 -arch armv7 -isysroot /Applications/Xcode10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -Wall -Wundef -Werror -c -o fishhook.o fishhook.c
and errors
fishhook.c:89:5: error: '__LP64__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if __LP64__
^
I use Xcode 10.0.1
$ clang --version Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Applications/Xcode10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
LP64 is not defined default when build for armv7. line 89 causes a error. It might be
#ifdef __LP64__
instead of#if __LP64__