tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Fail to build binaries when an object file is compiled by


From: Levo D
Subject: [Tinycc-devel] Fail to build binaries when an object file is compiled by clang or gcc on arm mac
Date: Wed, 22 Feb 2023 07:36:14 +0000 (UTC)

I tried creating an account so I can submit a bug report but I didn't receive a 
confirmation email. tcc fails to build binaries when an object file is compiled 
by clang or gcc on arm mac

Using todays build of tcc I confirmed this problem on ARM mac 
(bdec3c534583066cf097543f265ad620a8baa30d, tcc version 0.9.27 mob:bdec3c5 
2023-02-03T18:04:56+01:00 (AArch64 Darwin), built using "./configure 
--config-new_macho --config-codesign")

Compile the below using `-c a.c` on either clang or gcc. I tried with Apple 
clang version 14.0.0 (clang-1400.0.29.202) and gcc version 12.2.0 (Homebrew GCC 
12.2.0) 

//a.c
int get() { return 1; }

Then compile the below using `tcc -g b.c a.o`. You get an "unrecognized file 
type" error. Following these steps on linux will create a working binary

a.o: error: a.o: unrecognized file type

//b.c
int get();
int main() {
        return get();
}





reply via email to

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