aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure56
1 files changed, 27 insertions, 29 deletions
diff --git a/configure b/configure
index c75d460..318b788 100755
--- a/configure
+++ b/configure
@@ -46,8 +46,7 @@ tcc_crtprefix=""
tcc_elfinterp=""
tcc_lddir=
confvars=
-
-cpu=`uname -m`
+cpu=
# OS specific
targetos=`uname -s`
@@ -166,7 +165,7 @@ for opt do
;;
--extra-libs=*) extralibs=${opt#--extra-libs=}
;;
- --cpu=*) build_cpu=`echo $opt | cut -d '=' -f 2`
+ --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
;;
--enable-gprof) gprof="yes"
;;
@@ -195,6 +194,13 @@ for opt do
esac
done
+if test -z "$cpu" ; then
+ if test -n "$ARCH" ; then
+ cpu="$ARCH"
+ else
+ cpu=`uname -m`
+ fi
+fi
classify_cpu "$cpu"
# Checking for CFLAGS
@@ -357,24 +363,24 @@ else
esac
fi
-cat <<EOF
-Binary directory $bindir
-TinyCC directory $tccdir
-Library directory $libdir
-Include directory $includedir
-Manual directory $mandir
-Info directory $infodir
-Doc directory $docdir
-Target root prefix $sysroot
-Source path $source_path
-C compiler $cc
-Build CPU $cpu
-Target OS $targetos
-Big Endian $bigendian
-gprof enabled $gprof
-cross compilers $build_cross
-use libgcc $use_libgcc
-EOF
+echo "Binary directory $bindir"
+echo "TinyCC directory $tccdir"
+echo "Library directory $libdir"
+echo "Include directory $includedir"
+echo "Manual directory $mandir"
+echo "Info directory $infodir"
+echo "Doc directory $docdir"
+echo "Target root prefix $sysroot"
+echo "Source path $source_path"
+echo "C compiler $cc"
+echo "cross compilers $build_cross"
+if test "$build_cross" = "no"; then
+echo "Target CPU $cpu"
+fi
+echo "Target OS $targetos"
+echo "Big Endian $bigendian"
+echo "gprof enabled $gprof"
+echo "use libgcc $use_libgcc"
echo "Creating config.mak and config.h"
@@ -430,29 +436,21 @@ echo "#define GCC_MINOR $gcc_minor" >> $TMPH
if test "$cpu" = "x86" ; then
echo "ARCH=i386" >> config.mak
- echo "#define HOST_I386 1" >> $TMPH
elif test "$cpu" = "x86-64" ; then
echo "ARCH=x86-64" >> config.mak
- echo "#define HOST_X86_64 1" >> $TMPH
elif test "$cpu" = "armv4l" ; then
echo "ARCH=arm" >> config.mak
- echo "#define HOST_ARM 1" >> $TMPH
echo "#define TCC_ARM_VERSION $cpuver" >> $TMPH
elif test "$cpu" = "aarch64" ; then
echo "ARCH=arm64" >> config.mak
- echo "#define HOST_ARM64 1" >> $TMPH
elif test "$cpu" = "powerpc" ; then
echo "ARCH=ppc" >> config.mak
- echo "#define HOST_PPC 1" >> $TMPH
elif test "$cpu" = "mips" ; then
echo "ARCH=mips" >> config.mak
- echo "#define HOST_MIPS 1" >> $TMPH
elif test "$cpu" = "s390" ; then
echo "ARCH=s390" >> config.mak
- echo "#define HOST_S390 1" >> $TMPH
elif test "$cpu" = "alpha" ; then
echo "ARCH=alpha" >> config.mak
- echo "#define HOST_ALPHA 1" >> $TMPH
else
echo "Unsupported CPU"
exit 1