makefile - How do I make tcc search for libraries in /usr/lib? -
on raspberry pi computer have compiled tcc compiler source (in /usr/local/src). when link library in /usr/lib, tcc cannot find need add -l/usr/lib tcc command. how configure , make tcc include /usr/lib in library path?
pi@raspberrypi /usr/local/src/tcc-0.9.26 $ tcc -vv tcc version 0.9.26 (arm hard float linux) install: /usr/local/lib/tcc/ crt: /usr/lib/arm-linux-gnueabihf libraries: /usr/lib/arm-linux-gnueabihf /lib/arm-linux-gnueabihf /usr/local/lib/arm-linux-gnueabihf include: /usr/local/include /usr/local/include/arm-linux-gnueabihf /usr/include /usr/include/arm-linux-gnueabihf /usr/local/lib/tcc/include elfinterp: /lib/ld-linux-armhf.so.3
this configuration option when compiling tcc itself. if want use binary tcc distribution, have continue using -l option.
however, compiling tcc should easy. these rough steps:
% git clone git://repo.or.cz/tinycc.git % cd tinycc % ./configure --libpaths=/usr/lib % make
there more options. see:
% ./configure --help usage: configure [options] options: [defaults in brackets after descriptions] standard options: --help print message --prefix=prefix install in prefix [/usr/local] --exec-prefix=eprefix install architecture-dependent files in eprefix [same prefix] --bindir=dir user executables in dir [eprefix/bin] --libdir=dir object code libraries in dir [eprefix/lib] --tccdir=dir installation directory [eprefix/lib/tcc] --includedir=dir c header files in dir [prefix/include] --sharedir=dir documentation root dir [prefix/share] --docdir=dir documentation in dir [sharedir/doc/tcc] --mandir=dir man documentation in dir [sharedir/man] --infodir=dir info documentation in dir [sharedir/info] advanced options (experts only): --source-path=path path of source code [/users/miki/projects/tinycc-so] --cross-prefix=prefix use prefix compile tools [] --sysroot=prefix prepend prefix library/include paths [] --cc=cc use c compiler cc [gcc] --extra-cflags= specify compiler flags [-wall -g -o2] --extra-ldflags= specify linker options [] --strip-binaries strip symbol tables resulting binaries --disable-static make libtcc.so instead of libtcc.a --disable-rpath disable use of -rpath above --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a --enable-mingw32 build windows version on linux mingw32 --enable-cygwin build windows version on windows cygwin --enable-cross build cross compilers --enable-assert enable debug assertions --with-selinux use mmap exec mem [needs writable /tmp] --sysincludepaths=... specify system include paths, colon separated --libpaths=... specify system library paths, colon separated --crtprefix=... specify locations of crt?.o, colon separated --elfinterp=... specify elf interpreter
you want install tcc configured directories.
% make install
Comments
Post a Comment