Building TCC with ELF support

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
scippie
Member
Member
Posts: 40
Joined: Wed Jun 27, 2012 3:57 am

Building TCC with ELF support

Post by scippie »

On the TCC wiki page, instructions are shown to build a TCC version that generates ELF binaries on Windows.
As after several years of Linux, I returned to Windows, I need this to continue my OS dev experiments.
But even when I stick to the tcc version mentioned on that page, it doesn't work.

First thing to fix in the batch file is .VERSION to VERSION.
But the next problem is when this is executed:

Code: Select all

tcc-0.9.26>win32\tiny_impdef win32\libtcc.dll -o win32\libtcc\libtcc.def
tiny_impdef: could not get exported function names.
After that nothing works, tcc says it can't find '-ltcc' while libtcc.dll is there and so on...

Can this page be reviewed by someone who is more capable of fixing it than me?
Maybe even update it to the latest version of tcc?
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: Building TCC with ELF support

Post by Octocontrabass »

Have you tried WSL?

Out of curiosity, why do you need TCC specifically and not some other C compiler?
scippie
Member
Member
Posts: 40
Joined: Wed Jun 27, 2012 3:57 am

Re: Building TCC with ELF support

Post by scippie »

Octocontrabass wrote:Have you tried WSL?
No I haven't and I just might :wink:
The reason is mostly because it is somewhat separated from Windows as my project files are in a Windows based directory (and I like it there because of easy editor access and things like that) while your WSL home folder is in some kind of inaccessible virtual disk. I know you can go to the Windows drive from WSL but then I have had some file security issues. I haven't investigated this enough however.
Octocontrabass wrote:Out of curiosity, why do you need TCC specifically and not some other C compiler?
Because it's so easy to use and I like it. I want it to generate the cleanest simplest possible binaries. If it were possible for me to not use ELF, I would prefer it. But it does solve some early issues about data/code management so I embraced it.

And then, apart from these paths, my question remains a valid one, because the instructions on the wiki page don't work.
Post Reply