[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] macOS Big Sur M1 port status

From: Christian JULLIEN
Subject: Re: [Tinycc-devel] macOS Big Sur M1 port status
Date: Wed, 24 Feb 2021 19:11:34 +0100 (CET)

libSystem.dylib no longer exists as a file on file system,

see https://github.com/pyinstaller/pyinstaller/issues/5107

Le : 24 février 2021 à 18:24 (GMT +01:00)
De : "Michael Matz" <matz.tcc@frakked.de>
À : "jullien@eligis.com" <jullien@eligis.com>, "tinycc-devel@nongnu.org" <tinycc-devel@nongnu.org>
Objet : Re: [Tinycc-devel] macOS Big Sur M1 port status


On Mon, 22 Feb 2021, Christian Jullien wrote:

> I started to adapt mob to compile tcc natively on M1 (which is a damn
> cool and fast CPU, really).
> With my few latest changes already pushed on mod, I’m able to build tcc
> and its libs.
> I’m facing an important issue with Big Sur, libc.dylib (or libc.a) no
> longer exist as file on disk!
> After googling a lot, I’ve found it exists “magically” for dlopen.
> dlopen(“libc.dylib”, RTLD_NOW) => ok
> With few simple (uncommitted) changes I have been able to let tcc succeed
> searching for libc (using dlopen instead of fopen) but it finally failed at
> macho_load_dll which reads from opened fd.
> I’m don’t know how macho_load_dll could use dlopen instead of read.
> For those wo. macOS, I think you can do the same on linux using dlopen.
> I’m afraid, with my limited knowledge, I can’t go further on this port.

dlopen is not the answer, it's not the right interface for what TCC needs
doing. (it's basically the difference between -run mode (dlopen) and
compile-to-file mode ((f)read)).

The file that is necessary surely is somewhere. But it's possbile that
Apple got rid of the libc name and only retained libSystem (which already
exists on x86-64 MacOS and libc is basically just a symlink).

When I find time and motivation I'll have a look, as someone I know also
bought a new macbook.

Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]