Many thanks for you attempt. - the patch uses DOS format and it took me some time to understand why it failed.
- even after dos2unix, I get ~/tinycc $ git rev-parse --short=7 HEAD e3a0eb5 ~/tinycc $ git apply ../dyld_shared_cache.patch error: patch failed: tcc.h:274 error: tcc.h: patch does not apply error: patch failed: tccmacho.c:934 error: tccmacho.c: patch does not apply jullien@sims4:~/tinycc $ git version - I manually patched the 3 files and was able to build a tcc executable but ~/tinycc $ ./tcc -B. foo.c && ./a.out FIXME: handle reloc type 9 at 1052 [0x14f606d62] to 1050 Bus error: 10 Do you know you can request a free access to macOS Big Sur M1 on https://cfarm.tetaneutral.net/ -----Original Message----- From: Tinycc-devel [mailto:[email protected]] On Behalf Of Sushant Pandurangi Sent: Sunday, July 04, 2021 00:59 To: [email protected] Subject: [Tinycc-devel] Linking system dylibs on macOS 11+ Hello all, I made some small additions to tccmacho.c to get it to work with system libraries on Big Sur that are in the shared linker cache. Only x86-64 for now; I don't have any M1 mac to test. I haven't contributed to tcc before. Do I push straight to mob or would anyone like to take a look first? Some points to know: -- SDK paths are hardcoded as "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" and "/Applications/Xcode.app/Developer/SDKs/MacOSX.sdk" in that order. -- I pulled in <sys/stat.h> because I need to get the size of the tbd file. Hopefully it won't break the build for any other OSs. -- Works only for building executables, not (yet) with `tcc -run`. A patch on top of commit e3a0eb50899 (mob as of today) is attached if you would like a preview. Regards, Sushant _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
