tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Allow configuration of tcc libraries search path


From: grischka
Subject: Re: [Tinycc-devel] Allow configuration of tcc libraries search path
Date: Sat, 09 Jul 2011 20:44:47 +0200
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

Thomas Preud'homme wrote:
First let's focus on multilib as you said.

Actually I said "multilib" because you said "multilib".  Which
means that I've no idea really what it means.

The requirement for multilib is suffix all path from search paths (whatever are these search paths: include search path, library search paths, etc…) by the multilib subdirectory,

Okay, but then I think that tcc doesn't really have to know all
that either.  It is just a matter that you can configure as many
paths as you want in one CONFIG_option.

Which you have now with the colon separated strings.

There is also the addition of certain prefixes in tcc_split_path,
which you don't really need, I assume (and as such would conflict
with the spirit of tinyness ;).

So then it is just a matter of integrating the new feature into
existing code.

For example instead of

    tcc_add_library_path(s, CONFIG_TCC_CRT_PREFIX);
    tcc_add_library_path(s, CONFIG_SYSROOT CONFIG_TCC_LDDIR);
    tcc_add_library_path(s, CONFIG_SYSROOT "/usr/local"CONFIG_TCC_LDDIR);

I'd suggest:

    tcc_add_library_paths(s, CONFIG_TCC_LIBPATH);

with in tcc.h:

    #ifndef CONFIG_TCC_LIBPATH
    # define CONFIG_TCC_LIBPATH \
       CONFIG_TCC_CRT_PREFIX ":" \
       CONFIG_SYSROOT CONFIG_TCC_LDDIR ":" \
       CONFIG_SYSROOT "/usr/local"CONFIG_TCC_LDDIR);
    #endif

which brings us further to have all data in one place (and closer
to Rob Landley's approach from several years ago which is maybe or
maybe not a coincidence :).
    http://lists.gnu.org/archive/html/tinycc-devel/2011-07/msg00013.html

Plus you don't need CONFIG_TCC_EXTRA_LDDIR because you can simply
override CONFIG_TCC_LIBPATH.

--- grischka




reply via email to

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