2013-09-05 Nathan Sidwell <nathan@codesourcery.com>
* configure.ac: Add --enable-accelerator.
* configure: Rebuilt.
===================================================================
@@ -286,6 +286,26 @@ case ${with_newlib} in
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
+# Handle --enable-accelerator. This is in top-level because both libgoacc and
+# GCC proper need this information.
+# --disable-accelerator
+# Default. Do not build accelerator pieces, only support host execution.
+# --enable-accelerator=device-triplet
+# Build accelerator pieces for 'device-triplet'
+AC_ARG_ENABLE(accelerator,
+[AS_HELP_STRING([[--enable-accelerator[=ARG]]],
+ [build accelerator @<:@ARG={no,device-triplet}@:>@])],
+ENABLE_ACCELERATOR=$enableval,
+ENABLE_ACCELERATOR=no)
+case "${ENABLE_ACCELERATOR}" in
+ yes) AC_MSG_ERROR([--enable-accelerators must name accelerator]) ;;
+ no) ;;
+ nvptx)
+ # validate target ok here?
+ ;;
+ *) AC_MSG_ERROR([unrecognized accelerator]) ;;
+esac
+
# Handle --enable-gold, --enable-ld.
# --disable-gold [--enable-ld]
# Build only ld. Default option.