aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authormob <mob>2012-02-26 19:02:51 -0600
committermob <mob>2012-02-26 19:02:51 -0600
commitd7a7c3769d0a1dcb8400258cd8adf78a8566de61 (patch)
tree1333ad336c0626f41ec5690ea9e34c908c967d60 /configure
parent6e13c35334200e7ef918308aeb820404d7b35283 (diff)
downloadtinycc-d7a7c3769d0a1dcb8400258cd8adf78a8566de61.tar.gz
tinycc-d7a7c3769d0a1dcb8400258cd8adf78a8566de61.tar.bz2
Multiple fixes for 64 bit sections
This changeset attempts to fix a few problems when giving using the high 32bits of a 64bit section offset. There are likely more issues (or perhaps regressions) lurking in the muck here. In general, this moves a few data type declarations to use uplong. Also, add support for 64bit mingw32 building under cygwin. Because native types are used for 64 bit offsets, this won't fix challenges with cross compiling from 32bit -> 64bit. Tested under cygwin, against binary compiled with -Wl,-Ttext=0xffffff8000000000 Signed-off-by: Andrew Mulbrook <andrew262@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure b/configure
index 188c360..ed6ca6f 100755
--- a/configure
+++ b/configure
@@ -154,6 +154,8 @@ for opt do
;;
--enable-cygwin) mingw32="yes" ; cygwin="yes" ; cross_prefix="mingw32-" ; cpu=x86
;;
+ --enable-cygwin64) mingw32="yes" ; cygwin="yes" ; cross_prefix="x86_64-w64-mingw32-" ; cpu="x86-64"
+ ;;
--enable-cross) build_cross="yes"
;;
--disable-static) disable_static="yes"
@@ -431,14 +433,18 @@ if test "$noldl" = "yes" ; then
echo "CONFIG_NOLDL=yes" >> config.mak
fi
if test "$mingw32" = "yes" ; then
- echo "CONFIG_WIN32=yes" >> config.mak
- echo "#define CONFIG_WIN32 1" >> $TMPH
+ if test "$cpu" = "x86-64" ; then
+ echo "CONFIG_WIN64=yes" >> config.mak
+ echo "#define CONFIG_WIN64 1" >> $TMPH
+ else
+ echo "CONFIG_WIN32=yes" >> config.mak
+ echo "#define CONFIG_WIN32 1" >> $TMPH
+ fi
fi
if test "$cygwin" = "yes" ; then
echo "#ifndef _WIN32" >> $TMPH
echo "#define _WIN32" >> $TMPH
echo "#endif" >> $TMPH
- echo "AR=ar" >> config.mak
fi
if test "$bigendian" = "yes" ; then
echo "WORDS_BIGENDIAN=yes" >> config.mak