[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Re: Naming confusion
From: |
Christoph Gärtner |
Subject: |
[Tinycc-devel] Re: Naming confusion |
Date: |
Mon, 22 Nov 2010 21:52:21 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
This is in reply to
<http://lists.gnu.org/archive/html/tinycc-devel/2010-11/msg00023.html>,
sorry for the inconvenince.
> libXcc1.s is somehow standard for the compiler support library, gcc
has libgcc1.a AFAIK.
As far as my google-fu can tell, the gcc low-level runtime-library is
called "libgcc.a"[1]; however, the files "libgcc1.c", "libgcc2.c" and
"libgcc2.a" are part of its build process[2].
Similarly, the corresponding library for the Portable C Compiler is
called "libpcc.a". If we're aiming for consistency, we'd actually have
to drop the 1 and rename the current "libtcc.a" to something else.
---- snip ---
> I agree that it is mildly confusing but "tcclibc.h" doesn't look
any better to me. Other suggestions?
I'll have to think about it. As far as I'm concerned, the file can be
removed completely ;)
---- snip ---
>> It seems that `tcc_set_lib_path()` serves no useful purpose and
could be removed during a round of API cleanup.
> Geez, I just added it. ;)
Sorry ;)
> tcc_set_lib_path() sets tcc_lib_path which is where tcc finds:
> 1) libtcc1.a
> 2) bcheck.o
> 3) compiler specific standard header stddef.h, stdarg.h, ...
> 4) entire lib and include directories on win32
>
> 3)4) can be done by tcc_add_library_path() /
tcc_add_sysinclude_path() but not 1)2).
"bcheck.o" is included in "libtcc1.a" in my (not recent Windows-)build.
Is this no longer the case?
> So it seems that if you want to link your application with libtcc.a
and run it on a system that does not have tcc installed you need
tcc_set_lib_path() to tell libtcc.a where is libtcc1.a. No?
My test case actually was flawed before, but as far as I can tell,
tcc_set_lib_path(state, "<TCC-DIR>/win32");
is equivalent to
tcc_add_sysinclude_path(state, "<TCC-DIR>/win32/include");
tcc_add_library_path(state, "<TCC-DIR>/win32/lib");
Do we really need a dedicated API for that, or is there something I'm
missing again?
Christoph
[1] http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
[2] http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_23.html