aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDaniel Glöckner <daniel-gl@gmx.net>2008-09-05 21:08:37 +0200
committergrischka <grischka>2008-09-12 22:22:58 +0200
commit15e0dc08a67003f72c59a1f06d762245824d2ae6 (patch)
tree3082b92909e6b7b9f99e6a8bcd6c684f511781e2 /configure
parent256f6e6200be1a73cbf663938213778624436cad (diff)
downloadtinycc-15e0dc08a67003f72c59a1f06d762245824d2ae6.tar.gz
tinycc-15e0dc08a67003f72c59a1f06d762245824d2ae6.tar.bz2
Allow to use libgcc instead of libtcc1
This patch adds a switch --with-libgcc to configure. When passed it prevents libtcc1.a from being built and links to /lib/libgcc_s.so.1 instead of PREFIX/lib/tcc/libtcc1.a. It will work on ARM when using libgcc from GCC >= 4.2.0. Prior versions don't have the __floatun[sd]i[sdx]f functions. It won't work on i386 because of two missing symbols emitted when floats are cast to integers, but users can provide those symbols (global short constants) in their code if needed. Daniel
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure b/configure
index 8517485..63328cc 100755
--- a/configure
+++ b/configure
@@ -19,6 +19,7 @@ TMPH="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.h"
# default parameters
build_cross="no"
+use_libgcc="no"
prefix=""
execprefix=""
bindir=""
@@ -127,6 +128,8 @@ for opt do
;;
--enable-cross) build_cross="yes"
;;
+ --with-libgcc) use_libgcc="yes"
+ ;;
esac
done
@@ -224,6 +227,7 @@ echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
echo " --sysroot=PREFIX prepend PREFIX to library/include paths []"
echo " --cc=CC use C compiler CC [$cc]"
echo " --make=MAKE use specified make [$make]"
+echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc1.a"
echo ""
#echo "NOTE: The object files are build at the place where configure is launched"
exit 1
@@ -279,6 +283,7 @@ echo "CPU $cpu"
echo "Big Endian $bigendian"
echo "gprof enabled $gprof"
echo "cross compilers $build_cross"
+echo "use libgcc $use_libgcc"
echo "Creating config.mak and config.h"
@@ -345,6 +350,10 @@ fi
if test "$build_cross" = "yes" ; then
echo "CONFIG_CROSS=yes" >> config.mak
fi
+if test "$use_libgcc" = "yes" ; then
+ echo "#define CONFIG_USE_LIBGCC" >> $TMPH
+ echo "CONFIG_USE_LIBGCC=yes" >> config.mak
+fi
version=`head $source_path/VERSION`
echo "VERSION=$version" >>config.mak
echo "#define TCC_VERSION \"$version\"" >> $TMPH