[cfarm-users] New Apple Mac M1 machine (gcc304)

Christian Jullien eligis at orange.fr
Mon Mar 22 06:51:18 CET 2021


> I second Jeff''s thanks to those who've made this system available.

+1 (in the meanwhile I bought my own MacBook Air and I don't regret).

To port TinyCC on Silicon we facing a major issue: libc.dylib (link to libSystem.dylib) no longer exists on the filesystem, it is cached and hidden somewhere in the system.
You can still dlopen libSystem.dylib and then dlsym any symbols you like but you can't fopen libSystem.dylib and then fread the archive as tcc does.
On Linux, dlopen returns in fact link_map which could be used but it's not the case whith macOS.

Port is currently on hold.

Christian

-----Original Message-----
From: cfarm-users [mailto:cfarm-users-bounces at lists.tetaneutral.net] On Behalf Of Bruno Haible via cfarm-users
Sent: Monday, March 22, 2021 01:41
To: cfarm-users at lists.tetaneutral.net
Cc: Bruno Haible
Subject: Re: [cfarm-users] New Apple Mac M1 machine (gcc304)

> I second Jeff''s thanks to those who've made this system available.

+1

> .zprofile (which should be made executable)

No, ~/.zprofile does not need to be made executable.

> 5. Finally a note from my earlier efforts to port to this target:
> If using config.{sub,guess} (such as w/ autoconf) one needs versions from
> (IIRC) Dec 2020 or later.

The config.guess from July 2020 works fine as well.

Not all older released tarballs are affected by this problem. Yes, the
older config.guess returns 'arm-apple-darwin20.3.0' instead of
'aarch64-apple-darwin20.3.0'. But for many packages (including those that
use libtool to install shared libraries) the $host_cpu does not matter.

6. There is no way to do interactive debugging, AFAICS:
  * lldb refuses interactive debugging:

    (lldb) run
    error: process exited with status -1 (developer mode is not enabled on this machine and this is a non-interactive debug session.)

  * gdb is not installed, and if it were installed, it would require
    that you use 'sudo gdb' instead of 'gdb' — which of course is not
    appropriate on a shared machine in the compilefarm.

  See also [1]. (Btw, the attack description [2] would apply to Linux and
  *BSD platforms as well.)

7. Documentation from Apple regarding porting issues:
https://developer.apple.com/documentation/apple-silicon/addressing-architectural-differences-in-your-macos-code

Bruno

[1] https://stackoverflow.com/questions/27238931/lldb-attaching-to-a-process-on-os-x-from-an-ssh-session
[2] https://attack.mitre.org/techniques/T1055/008/

_______________________________________________
cfarm-users mailing list
cfarm-users at lists.tetaneutral.net
https://lists.tetaneutral.net/listinfo/cfarm-users



More information about the cfarm-users mailing list