From cad901a54fa7d0eb3ad17270a08d4824d50cfd51 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 8 Dec 2009 09:02:14 +0100 Subject: Teach configure --enable-m32-build for forcing a 32-bit build --- configure.in | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 19ef304a1a..2a9a2c50b2 100644 --- a/configure.in +++ b/configure.in @@ -272,6 +272,19 @@ AC_ARG_ENABLE(m64-build, esac ],enable_m64_build=no) +AC_ARG_ENABLE(m32-build, +[ --enable-m32-build build 32bit binaries using the -m32 flag to (g)cc], +[ case "$enableval" in + no) enable_m32_build=no ;; + *) + if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes; + then + AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ; + fi ; + enable_m32_build=yes ;; + esac +],enable_m32_build=no) + dnl OK, we might have darwin switches off different kinds, lets dnl check it all before continuing. TMPSYS=`uname -s`-`uname -m` @@ -315,6 +328,13 @@ if test X${enable_m64_build} = Xyes; then LDFLAGS="-m64 $LDFLAGS" export LDFLAGS fi +if test X${enable_m32_build} = Xyes; then + enable_hipe=no + CFLAGS="-m32 $CFLAGS" + export CFLAGS + LDFLAGS="-m32 $LDFLAGS" + export LDFLAGS +fi export ERL_TOP AC_CONFIG_SUBDIRS(lib erts) -- cgit v1.2.3