[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: |
Sat, 9 Jul 2011 00:12:03 +0200 |
User-agent: |
KMail/1.13.7 (Linux/2.6.39-2-amd64; KDE/4.6.4; x86_64; ; ) |
Le vendredi 8 juillet 2011 18:42:01, Thomas Preud'homme a écrit :
[SNIP]
>
> === Sketch for a (hopefully) better solution ===
>
> One thing to remember though is that almost all files (headers, object,
> archive, but not ld.so) are included via
> tcc_add_file_internal(s1,filename,flags). So if tcc_add_file_internal was
> modified to check for dirname(filename)/<triplet> and filename it would
> solve the problem. Only one option of configure and one macro would then
> be enough: --with-multilib-subdir=triplet and CONFIG_TCC_MULTILIB_SUBDIR
> would do the job.
>
> Of course we don't want to search all directories for file by trying with
> multilib subdir, only system directories. But fortunetely the difference is
> pretty easy to do. Everything from the command line is user specify and
> should be searched strictly, all the rest can be tried with multilib
> subdir. So all what would be needed is to split paths in two variables and
> change the functions using it, eg. library_paths would become
> system_library_paths and user_library_paths and tcc_add_library would then
> use both these dynarray differently. Same for other search paths. The
> distinction is even already done for includes.
tcc_add_file_internal which I mentionned above also need to be modified for
system files which are linked, like crt*.o files. The default action would be
to
not search in multilib subdir but if flags & multilib it would be searched.
Also I forgot about ld.so which is not searched currently. However, instead of
using blindly the tcc_interp variable whenever there is no LD_SO key in the
environment, we could tcc_open both the multiarch subdir and the normal dir to
detect where it is.
I'll write a patch implementing this solution this sunday and post it here for
review before committing it, unless you tell me this design is crapy before
then.
>
> So, what do you think?
>
> Remains that tcc use its own system search path which are different from
> the one used by references tools (cpp, ld and ld.so). But this is
> completely orthogonal to multilib support and could be done later since we
> lived with this since a long time.
>
> > Thanks,
> >
> > --- grischka
>
> Best regards,
>
> Thomas Preud'homme
Best regards,
Thomas Preud'homme
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 <=
- 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, 2011/07/10
- 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