tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Naming confusion


From: Christoph Gärtner
Subject: [Tinycc-devel] Naming confusion
Date: Mon, 22 Nov 2010 17:37:32 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

Hi.

I'm planning to use tinyCC as a JIT compiler. For that, I link against "libtcc.a" and include "libtcc.h".

Apparently, tinyCC also needs to link "libtcc1.a" before running code, which is no suprise as it contains tinyCC's C runtime.

Then, there is another file called "tcclib.h", which actually isn't used by tinyCC at all, and is, according to the comments, just a dumping ground for various libc declarations.

This naming scheme is somewhat confusing. My suggestion would be to

  1. rename "libtcc1.a" to something like "libtccrt.a"

  2. rename "tcclib.h" to "tcclibc.h" (or any other name that doesn't
     suggests a close relationship to libtcc)

The example code in "tests/libtcc_test.c" also claim that `tcc_set_lib_path()` should be called to tell tinyCC where "tcclib.h" (why?) and "libtcc1.a" are located.

However, everything seems to work if you do not call `tcc_set_lib_path()` and just move "libtcc1.a" into a library directory (ie a directory added via `tcc_add_library_path()`).

It seems that `tcc_set_lib_path()` serves no useful purpose and could be removed during a round of API cleanup.

Christoph



reply via email to

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