aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-11-18 00:15:38 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-11-18 00:15:38 +0000
commit5302cd025063e00bde7d102284f638977dde5f27 (patch)
tree67be8f93c3e7e9a2a592f5932622a54083146948 /libgo/configure
parentf97db488a6ad72106426990653fa397d690d1654 (diff)
downloadgcc-5302cd025063e00bde7d102284f638977dde5f27.zip
gcc-5302cd025063e00bde7d102284f638977dde5f27.tar.gz
gcc-5302cd025063e00bde7d102284f638977dde5f27.tar.bz2
runtime, reflect: rewrite Go to FFI type conversion in Go
As we move toward the Go 1.7 garbage collector, it's essential that all allocation of values that can contain Go pointers be done using the correct type descriptor. That is simplest if we do all such allocation in Go code. This rewrites the code that converts from a Go type to a libffi CIF into Go. Reviewed-on: https://go-review.googlesource.com/33353 From-SVN: r242578
Diffstat (limited to 'libgo/configure')
-rwxr-xr-xlibgo/configure16
1 files changed, 15 insertions, 1 deletions
diff --git a/libgo/configure b/libgo/configure
index d4ed950..868adcd 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -665,6 +665,8 @@ LIBGO_IS_DARWIN_FALSE
LIBGO_IS_DARWIN_TRUE
go_include
LIBATOMIC
+USE_LIBFFI_FALSE
+USE_LIBFFI_TRUE
LIBFFIINCS
LIBFFI
nover_glibgo_toolexeclibdir
@@ -11098,7 +11100,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11101 "configure"
+#line 11106 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13466,6 +13468,14 @@ $as_echo "#define USE_LIBFFI 1" >>confdefs.h
fi
+ if test "$with_liffi" != "no"; then
+ USE_LIBFFI_TRUE=
+ USE_LIBFFI_FALSE='#'
+else
+ USE_LIBFFI_TRUE='#'
+ USE_LIBFFI_FALSE=
+fi
+
# See if the user wants to configure without libatomic. This is useful if we are
# on an architecture for which libgo does not need an atomic support library and
@@ -15596,6 +15606,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${USE_LIBFFI_TRUE}" && test -z "${USE_LIBFFI_FALSE}"; then
+ as_fn_error "conditional \"USE_LIBFFI\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${LIBGO_IS_DARWIN_TRUE}" && test -z "${LIBGO_IS_DARWIN_FALSE}"; then
as_fn_error "conditional \"LIBGO_IS_DARWIN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5