tpoechtrager / cctools-port

Apple cctools port for Linux and *BSD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Killed: 9

Un1Gfn opened this issue · comments

test.c

#include <stdio.h>

int main(){
  puts("lorem ipsum");
  return 0;
}

build on PC

$ clang \
-v \
-target aarch64-apple-darwin \
-L/opt/theos/sdks/iPhoneOS14.4.sdk/usr/lib \
-F/opt/theos/sdks/iPhoneOS14.4.sdk/System/Library/Frameworks \
-Wall \
-Wextra \
test.c

build output

clang version 11.1.0
Target: aarch64-apple-darwin
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/clang-11" -cc1 -triple arm64-apple-ios5.0.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-rounding-math -munwind-tables -faligned-alloc-unavailable -fcompatibility-qualified-id-block-type-checking -target-cpu apple-a7 -target-feature +fp-armv8 -target-feature +neon -target-feature +crypto -target-feature +zcm -target-feature +zcz -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -debugger-tuning=lldb -v -resource-dir /usr/lib/clang/11.1.0 -F/opt/theos/sdks/iPhoneOS14.4.sdk/System/Library/Frameworks -internal-isystem /usr/local/include -internal-isystem /usr/lib/clang/11.1.0/include -internal-externc-isystem /usr/include -Wall -Wextra -fdebug-compilation-dir /tmp -ferror-limit 19 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcolor-diagnostics -o /tmp/test-e600ef.o -x c test.c
clang -cc1 version 11.1.0 based upon LLVM 11.1.0 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/System/Library/Frameworks"
ignoring nonexistent directory "/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /opt/theos/sdks/iPhoneOS14.4.sdk/System/Library/Frameworks (framework directory)
 /usr/local/include
 /usr/lib/clang/11.1.0/include
 /usr/include
End of search list.
 "/usr/bin/aarch64-apple-darwin-ld" -dynamic -arch arm64 -iphoneos_version_min 5.0.0 -o a.out -L/opt/theos/sdks/iPhoneOS14.4.sdk/usr/lib /tmp/test-e600ef.o -lSystem -F/opt/theos/sdks/iPhoneOS14.4.sdk/System/Library/Frameworks
ld: warning: directory not found for option '-F/System/Library/Frameworks/'
ld: warning: OS version (5.0.0) too small, changing to 7.0.0

Scp to iPad

$ uname
Darwin iPad-von-Melanie 20.3.0 Darwin Kernel Version 20.3.0: Tue Jan  5 18:34:49 PST 2021; root:xnu-7195.80.35~2/RELEASE_ARM64_T7000 iPad5,1 arm64 J96AP Darwin
$ ldid a.out
$ ./a.out
Killed: 9

Theos works.

Don't care for now.