aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJames Lyon <jamesly0n@hotmail.com>2013-04-27 20:39:34 +0100
committerJames Lyon <jamesly0n@hotmail.com>2013-04-27 22:58:52 +0100
commit41b3c7a50727f715111d09af982e2e9a0deeb688 (patch)
tree0192d5295fd3cfca625ba769be2188ef72b15d64 /configure
parent6ee366e765483f6b48537d97fc81ae56f13d1b7f (diff)
downloadtinycc-41b3c7a50727f715111d09af982e2e9a0deeb688.tar.gz
tinycc-41b3c7a50727f715111d09af982e2e9a0deeb688.tar.bz2
Improved variable length array support.
VLA storage is now freed when it goes out of scope. This makes it possible to use a VLA inside a loop without consuming an unlimited amount of memory. Combining VLAs with alloca() should work as in GCC - when a VLA is freed, memory allocated by alloca() after the VLA was created is also freed. There are some exceptions to this rule when using goto: if a VLA is in scope at the goto, jumping to a label will reset the stack pointer to where it was immediately after the last VLA was created prior to the label, or to what it was before the first VLA was created if the label is outside the scope of any VLA. This means that in some cases combining alloca() and VLAs will free alloca() memory where GCC would not.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure b/configure
index 72d48af..b513cc1 100755
--- a/configure
+++ b/configure
@@ -19,6 +19,7 @@ TMPH=$TMPN.h
# default parameters
build_cross="no"
use_libgcc="no"
+enable_assert="no"
prefix=""
execprefix=""
bindir=""
@@ -165,6 +166,8 @@ for opt do
;;
--enable-cross) build_cross="yes"
;;
+ --enable-assert) enable_assert="yes"
+ ;;
--disable-static) disable_static="yes"
;;
--disable-rpath) disable_rpath="yes"
@@ -274,6 +277,7 @@ Advanced options (experts only):
--enable-mingw32 build windows version on linux with mingw32
--enable-cygwin build windows version on windows with cygwin
--enable-cross build cross compilers
+ --enable-assert enable debug assertions
--with-selinux use mmap for exec mem [needs writable /tmp]
--sysincludepaths=... specify system include paths, colon separated
--libpaths=... specify system library paths, colon separated
@@ -484,6 +488,9 @@ if test "$have_selinux" = "yes" ; then
echo "#define HAVE_SELINUX" >> $TMPH
echo "HAVE_SELINUX=yes" >> config.mak
fi
+if test "$enable_assert" = "yes" ; then
+ echo "#define CONFIG_TCC_ASSERT" >> $TMPH
+fi
version=`head $source_path/VERSION`
echo "VERSION=$version" >>config.mak