[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Allow configuration of tcc libraries search path
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] Allow configuration of tcc libraries search path |
Date: |
Sun, 10 Jul 2011 14:54:37 +0200 |
User-agent: |
KMail/1.13.7 (Linux/2.6.39-2-amd64; KDE/4.6.4; x86_64; ; ) |
Le samedi 9 juillet 2011 20:44:47, grischka a écrit :
> 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.
Ah? Ok nevermind. Usually I talk about multiarch but that's not important.
Let's continue on multilib then.
>
> > 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.
True. That's why the first patch tried to do it that way. But it's a bit more
annoying than the current approach since you have to change all the search
paths by duplicating them (A:B:C would become
A/<triplet>:A:B/<triplet>:B:C/<triplet>:C) just to say you want for each
directory to also try first with <triplet> subdirectory.
>
> 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 ;).
I agree, it's ugly. I wanted to keep the / and /usr/local prefix in the tcc and
only specify the subdirectories. But I think this logic should still be needed
somewhere else anyway — most likely in configure — to make things less painful
with regards of sysroot. The user should only need to specify something like:
/lib/<triplet>:/lib:/usr/local/lib/<triplet>:/usr/local/lib and configure would
prepend $sysroot if needed.
>
> 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
Agreed.
>
> Plus you don't need CONFIG_TCC_EXTRA_LDDIR because you can simply
> override CONFIG_TCC_LIBPATH.
Agreed again.
But I'd still appreciate a --multilib=<triplet> switch in *complement*. This
way if you want to add multilib but don't change the default paths, you just
have to add one switch instead of a long --libpath=<colon_separated_path>.
I wrote the code yesterday. Please take a look. Still missing is the handling
of elf_interp but this must be added anyway without this option.
By the way, is this normal that only X86_64 ld.so uses CONFIG_TCC_LDDIR or
does the other ld.so also lack the use of this macro?
>
> --- grischka
Best regards.
Thomas Preud'homme
Add-multilib.patch
Description: Text Data
signature.asc
Description: This is a digitally signed message part.
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, (continued)
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Thomas Preud'homme, 2011/07/07
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Thomas Preud'homme, 2011/07/07
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Thomas Preud'homme, 2011/07/07
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, grischka, 2011/07/07
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Thomas Preud'homme, 2011/07/08
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Thomas Preud'homme, 2011/07/08
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, grischka, 2011/07/09
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path,
Thomas Preud'homme <=
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, grischka, 2011/07/10
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Thomas Preud'homme, 2011/07/11
- Re: [Tinycc-devel] Allow configuration of tcc libraries search path, grischka, 2011/07/11
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Rob Landley, 2011/07/08
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, grischka, 2011/07/09
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Ivo van Poorten, 2011/07/11
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Rob Landley, 2011/07/11
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, grischka, 2011/07/12
Re: [Tinycc-devel] Allow configuration of tcc libraries search path, Thomas Preud'homme, 2011/07/08