On Mon, Sep 9, 2013 at 3:47 PM, Thomas Preud'homme <[email protected]> wrote: > Le lundi 9 septembre 2013 15:20:52 Vittorio Giovara a écrit : >> Hello, >> I'm trying to use tcc to compile my application but I get linking >> errors because of conflicting directories. >> In my current setup I have the main source file in the source root and >> then a few libraries inside subfolders. >> At link time I pass -Lsubfolder -lthelib as first arguments. >> Everything goes smooth if I run this in a clean install. >> However if I have libthelib.a in one of the default search path (eg in >> /usr/local/lib) the local one will not be picked, and instead the one >> present in the default search path will be linked. >> I fear that tcc is not respecting the user library search order, but I >> found no flags that allow modifying it. > > Indeed. Tcc add directories to search for libraries at the end of the existing > list. Since there is only one global list, they are searched after the default > directories. What should be done is to separate search path between default > and non default like is done for includes. Search path need to be added in > order (think -Ldir1 -Ldir2) but user provided path should be searched first. > > This should be an easy patch so if somebody is looking for a way to contribute > to tcc that's a good way to start.
Is something like this acceptable? Thanks, Vittorio > >> Can anyone help me in this problem? >> Thank you, >> Vittorio > > Best regards, > > Thomas
0001-set-the-user-defined-library-search-paths-before-the.patch
Description: Binary data
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
