configure: detect tcc if in PATH; fix tcc build.

Adding -pthread to CFLAGS is unnecessary because the bins don't need
it explicitly, so that it's removed and we only need to use -lpthread
on libxbps.
This commit is contained in:
Juan RP 2019-04-22 16:18:41 +02:00
parent e013e0169f
commit cb0bf6d914

6
configure vendored
View File

@ -165,7 +165,7 @@ echo "ETCDIR ?= $ETCDIR" >>$CONFIG_MK
if [ -z "$CC" ]; then if [ -z "$CC" ]; then
printf "Looking for compiler ... " printf "Looking for compiler ... "
for b in $TARGET- ""; do for b in $TARGET- ""; do
for cc in gcc pcc icc cc clang; do for cc in gcc icc clang tcc pcc cc; do
if type $b$cc >/dev/null 2>&1; then if type $b$cc >/dev/null 2>&1; then
CC=$b$cc CC=$b$cc
echo "$CC" echo "$CC"
@ -183,8 +183,8 @@ else
echo "Using compiler $CC" echo "Using compiler $CC"
fi fi
echo "CC = $CC" >>$CONFIG_MK echo "CC = $CC" >>$CONFIG_MK
echo "CFLAGS = -O2 -pthread" >>$CONFIG_MK echo "CFLAGS = -O2" >>$CONFIG_MK
echo "LDFLAGS = -L\$(TOPDIR)/lib" >>$CONFIG_MK echo "LDFLAGS = -L\$(TOPDIR)/lib" >>$CONFIG_MK
echo "CPPFLAGS = -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK echo "CPPFLAGS = -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK