I have spotted some issues in the configure script.

- Some undocumented configure flags
   --cpu = { .. }
       not all handled architectures by the configure script are
       supported by the compiler
       -> needs to cleanup
   --enable-cross
       fails to build the mingw32 compiler in linux32 bits
       - does it builds arm crosscompiler?
       - does it builds a different .a for each cpu? or only the tcc binary?
   --enable-mingw32
   --enable-gprof
       undocumented
   --extra-cflags, ldflags, libs
       those options can be taken from the environment, no need to
       have multiple ways to do the same

In the patch I have removed the --extra-* flags and documented in --help
the supported configure options.

The list of supported CPUs should be reviewed. Do we really support IL, MIPS, 
ALPHA?

--pancake
diff --git a/configure b/configure
index 770ea70..4ddb901 100755
--- a/configure
+++ b/configure
@@ -114,12 +114,6 @@ for opt do
   ;;
   --cc=*) cc=`echo $opt | cut -d '=' -f 2`
   ;;
-  --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
-  ;;
-  --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}"
-  ;;
-  --extra-libs=*) extralibs=${opt#--extra-libs=}
-  ;;
   --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
   ;;
   --enable-gprof) gprof="yes"
@@ -228,6 +222,10 @@ echo "  --source-path=PATH       path of source code [$source_path]"
 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 "  --cpu=CPU                crosscompile to (x86 x86-64 c67 il armv4l powerpc mips s390 alpha) [$cpu]"
+echo "  --enable-cross           build crosscompiler for all supported platforms"
+echo "  --enable-mingw32         build crosscompiler for mingw32 (PREFIX=i386-mingw32)"
+echo "  --enable-gprof           use gprof"
 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"
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to