tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Tinycc on Apple M1 is creating x64 binaries


From: Christian Jullien
Subject: Re: [Tinycc-devel] Tinycc on Apple M1 is creating x64 binaries
Date: Wed, 20 Apr 2022 06:52:01 +0200

Hi,

 

Tcc on M1 only supports x86_64 which works with rosetta.

Here is how I compile tcc on my M1 machine:

 

./configure --cpu=x86_64 --config-bcheck=no --config-backtrace=no

 

It then works well with only two test suite failures. I use it almost daily on my MakBook Air M1.

 

We are probably not too far from true aarch64 support as it detects two reloc issues (as far I understand) but I’ve no idea on how to implement them, esp because I unable to find info on those reloc types anywhere.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On Behalf Of Antoine Champion
Sent: Tuesday, April 19, 2022 20:53
To: tinycc-devel@nongnu.org
Subject: [Tinycc-devel] Tinycc on Apple M1 is creating x64 binaries

 

Hi list,

 

I’ve installed tinycc from mob branch without configure options.

 

When I try to compile any piece of code, the produced output is for x86_64 architecture :

 

% echo "int main(int argc, char** argv) { return 0 ; }" > test.c

% tcc test.c

% lipo -info a.out

Non-fat file: a.out is architecture: x86_64

% ./a.out

illegal hardware instruction: ./a.out

 

Alternatively, I can’t either compile a dynamic library with -shared, with the compilation error "tcc: error: _main not defined".

 

Am I missing something or is tcc not yet ready for Apple M1?

 

Best,

Antoine


reply via email to

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