diff options
author | Erlang/OTP <[email protected]> | 2010-02-10 09:20:00 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-02-10 09:20:00 +0000 |
commit | 7c0ca6e0bd1025c06358a154c26dd59629e94162 (patch) | |
tree | 54e5ff7a43a06a1baa0832c3733121f2ea994b09 /configure.in | |
parent | 29262ef2477ac656bf19073f90a742c23a7bb789 (diff) | |
parent | cad901a54fa7d0eb3ad17270a08d4824d50cfd51 (diff) | |
download | otp-7c0ca6e0bd1025c06358a154c26dd59629e94162.tar.gz otp-7c0ca6e0bd1025c06358a154c26dd59629e94162.tar.bz2 otp-7c0ca6e0bd1025c06358a154c26dd59629e94162.zip |
Merge branch 'pan/enable_m32_build' into ccase/r13b04_dev
* pan/enable_m32_build:
Teach configure --enable-m32-build for forcing a 32-bit build
OTP-8415 configure learned the option --enable-m32-build to force the
building of a 32-bit run-time on systems where the default C
compiler generates 64-bit executables by default.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 20 insertions, 0 deletions
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) |