aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorStephen Twigg <sdtwigg@eecs.berkeley.edu>2015-01-09 15:56:28 -0800
committerStephen Twigg <sdtwigg@eecs.berkeley.edu>2015-01-09 15:56:28 -0800
commitbd97b5c9fddd30cafd5e84b229e3cf4a29d427ad (patch)
tree5a954476a225fbf695c3ad8a1e81e0e686739549 /configure
parent49805d2f178b02c4b89b99bf662c8429eb9e86b6 (diff)
downloadspike-bd97b5c9fddd30cafd5e84b229e3cf4a29d427ad.zip
spike-bd97b5c9fddd30cafd5e84b229e3cf4a29d427ad.tar.gz
spike-bd97b5c9fddd30cafd5e84b229e3cf4a29d427ad.tar.bz2
Fix bug where C compiler used instead of C++ for autoconf tests
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure24
1 files changed, 16 insertions, 8 deletions
diff --git a/configure b/configure
index e789a13..7748d5c 100755
--- a/configure
+++ b/configure
@@ -1562,10 +1562,10 @@ fi
} # ac_fn_c_try_run
-# ac_fn_c_try_link LINENO
-# -----------------------
+# ac_fn_cxx_try_link LINENO
+# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
@@ -1585,7 +1585,7 @@ $as_echo "$ac_try_echo"; } >&5
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
+ test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
@@ -1606,7 +1606,7 @@ fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_c_try_link
+} # ac_fn_cxx_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -4037,6 +4037,7 @@ CXXFLAGS="-Wall -Wno-unused -O2 -std=c++11"
+
# Add command line argument to enable all optional subprojects
# Check whether --enable-optional-subprojects was given.
@@ -4089,6 +4090,13 @@ $as_echo "$as_me: configuring default subproject : riscv" >&6;}
$as_echo "#define RISCV_ENABLED /**/" >>confdefs.h
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
# Check whether --with-fesvr was given.
if test "${with_fesvr+set}" = set; then :
@@ -4125,7 +4133,7 @@ return libfesvr_is_present ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_fesvr_libfesvr_is_present=yes
else
ac_cv_lib_fesvr_libfesvr_is_present=no
@@ -4173,7 +4181,7 @@ return pthread_create ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_pthread_pthread_create=yes
else
ac_cv_lib_pthread_pthread_create=no
@@ -4458,7 +4466,7 @@ for ac_lib in '' dl dld; do
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_dlopen=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \