diff options
author | Alan Modra <amodra@gmail.com> | 2013-11-21 06:12:35 -0500 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2013-11-21 21:24:56 -0500 |
commit | ab79d6e21992dd86139ba07530ff888833b78a04 (patch) | |
tree | 3ed261655ba53cd2269dba583d6f3bf561adb34d /configure.ac | |
parent | 69df91cfb4fa6bcb644350a80bff970f27478a6a (diff) | |
download | libffi-ab79d6e21992dd86139ba07530ff888833b78a04.tar.gz |
This separates the 32-bit sysv/linux/bsd code from the 64-bit linux
code, and makes it possible to link code compiled with different
options to those used to compile libffi. For example, a
-mlong-double-128 libffi can be used with -mlong-double-64 code.
Using the return value area as a place to pass parameters wasn't such
a good idea, causing a failure of cls_ulonglong.c. I didn't see this
when running the mainline gcc libffi testsuite because that version of
the test is inferior to the upstreamm libffi test.
Using NUM_FPR_ARG_REGISTERS rather than NUM_FPR_ARG_REGISTERS64 meant
that a parameter save area could be allocated before it was strictly
necessary. Wrong but harmless. Found when splitting apart ffi.c
into 32-bit and 64-bit support.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8246ee9..0d768c6 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,7 @@ dnl The -no-testsuite modules omit the test subdir. AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite) TARGETDIR="unknown" +HAVE_LONG_DOUBLE_VARIANT=0 case "$host" in aarch64*-*-*) TARGET=AARCH64; TARGETDIR=aarch64 @@ -226,6 +227,7 @@ case "$host" in powerpc*-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc + HAVE_LONG_DOUBLE_VARIANT=1 ;; powerpc-*-amigaos*) TARGET=POWERPC; TARGETDIR=powerpc @@ -241,6 +243,7 @@ case "$host" in ;; powerpc-*-freebsd* | powerpc-*-openbsd*) TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc + HAVE_LONG_DOUBLE_VARIANT=1 ;; powerpc64-*-freebsd*) TARGET=POWERPC; TARGETDIR=powerpc @@ -333,14 +336,20 @@ AC_CHECK_SIZEOF(long double) # Also AC_SUBST this variable for ffi.h. if test -z "$HAVE_LONG_DOUBLE"; then HAVE_LONG_DOUBLE=0 - if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then - if test $ac_cv_sizeof_long_double != 0; then + if test $ac_cv_sizeof_long_double != 0; then + if test $HAVE_LONG_DOUBLE_VARIANT != 0; then + AC_DEFINE(HAVE_LONG_DOUBLE_VARIANT, 1, [Define if you support more than one size of the long double type]) HAVE_LONG_DOUBLE=1 - AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double]) + else + if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then + HAVE_LONG_DOUBLE=1 + AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double]) + fi fi fi fi AC_SUBST(HAVE_LONG_DOUBLE) +AC_SUBST(HAVE_LONG_DOUBLE_VARIANT) AC_C_BIGENDIAN |