Skip to content
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

iOS ARM64 support issue #13

Closed
ipfans opened this issue Aug 4, 2014 · 1 comment
Closed

iOS ARM64 support issue #13

ipfans opened this issue Aug 4, 2014 · 1 comment

Comments

@ipfans
Copy link

ipfans commented Aug 4, 2014

With clang in Xcode5.1:

➜  Developer  clang -arch arm64 main.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include -o main

It's working fine.

But when use ollvm-3.4, I got a error about ARM64 arch definition:

ollvm/bin/clang -arch arm64 main.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include
clang-3.4: error: invalid arch name '-arch arm64'

or

➜  Developer  ollvm/bin/clang --target=aarch64 main.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include
In file included from main.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/stdio.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/sys/cdefs.h:655:2: error:
      Unsupported architecture
#error Unsupported architecture
...(lots of error)

example main.c:

#include <stdio.h>

static void hello(){
    printf("hello world!\n");
}

int main() {
    hello();
    return 0;
}

So how can I build a arm64 binary with ollvm-3.4?

@cryptopathe
Copy link
Collaborator

The problem is the following: Apple's version of clang supports arm64, but no obfuscation. Obfuscator-LLVM supports aarch64, but the iPhone SDK not.

According to http://www.phoronix.com/scan.php?page=news_item&px=MTY5ODk, both backends have been merged in LLVM 3.5, which will be released in the coming weeks. As soon as LLVM 3.5 is officially released, we will release Obfuscator-LLVM 3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants