On my Raspberry PI computer I have compiled the tcc compiler from source (in /usr/local/src). When I link with a library in /usr/lib, tcc cannot find it so I need to add -L/usr/lib to the tcc command. How do I configure and make tcc to include /usr/lib in its 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
It turns out that we need to use the
libpaths
option and also specify the default library directories (output fromtcc -vv
). We can also add the standard directories/lib
and/usr/local/lib
: