|Subject:||Re: [Tinycc-devel] Problem With Configured Search Directories|
|Date:||Thu, 12 Sep 2013 16:39:30 -0500|
Le mardi 3 septembre 2013 16:32:41 Cayce Pollard a écrit :
> I believe I found the problem, but I don't know what the solution is.That is because tcc does the linking itself. Thus, it only recognize a handful
> Running tcc -print-search-dirs on my target device lists the wrong
> directories; the search directories added to the executable are from my
> build machine...which don't exist on my target device.
> Further examination reveals that the directories are added from the
> --libpaths and --sysincludepaths options and not from the -Wl options
> referenced in the documentation for my standalone toolchain and specified
> by using the --extraldflags.
of options that ld provides. Take a look at the function tcc_set_linker in
libtcc.c to have the complete list. --libpaths and --sysincludepaths set the
paths where tcc will search for libs and include on the host (in GNU
terminology) machine. The search order for the build machine is handled by the
compiler that compiles tcc (gcc most likely).
The right way is with libpath, sysincludepath, crtpath. I've just noted there
> What is the right way to add lib and include paths to the binary? Why is
> the path to the elf interpreter included in the binary?
is no libgccpath while there should be one as well. The reason it is included
in the binary is that all these paths are a property of the compiler and the
linker (for libpath). Since tcc is both a compiler and a linker, it all makes
|[Prev in Thread]||Current Thread||[Next in Thread]|