This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4] Accelerator configury and paths changes 1/3


This adds the --enable-accelerator option. This isn't too useful yet as there's no nvptx target so far, but it's part of the other changes to the configury that allows for offloading/accelerator targets.

Committed on gomp-4_0-branch.


Bernd
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 208706)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2014-03-20  Bernd Schmidt  <bernds@codesourcery.com>
+
+	From Nathan Sidwell and Thomas Schwinge.
+	* configure.ac: Add --enable-accelerator.
+	* configure: Rebuilt.
+
 2014-03-04  Jonathan Wakely  <jwakely@redhat.com>
 
 	* MAINTAINERS: Update my email address.
Index: configure.ac
===================================================================
--- configure.ac	(revision 208706)
+++ configure.ac	(working copy)
@@ -286,6 +286,37 @@ case ${with_newlib} in
   yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
 esac
 
+# Handle --enable-accelerator.  This is in top-level because both libgomp and
+# GCC proper need this information.
+# --disable-accelerator
+#   Default.  Do not build accelerator pieces, only support host execution.
+# --enable-accelerator=auto-device-triplet
+#   If possible, build accelerator pieces for 'device-triplet'.
+# --enable-accelerator=device-triplet
+#   Build accelerator pieces for 'device-triplet'.
+AC_ARG_ENABLE(accelerator,
+[AS_HELP_STRING([[--enable-accelerator[=ARG]]],
+		[build accelerator @<:@ARG={no,auto-device-triplet,device-triplet}@:>@])],
+ENABLE_ACCELERATOR=$enableval,
+ENABLE_ACCELERATOR=no)
+accel_target_noncanonical=NONE
+case "${ENABLE_ACCELERATOR}" in
+  yes)
+    AC_MSG_ERROR([--enable-accelerators must name accelerator])
+    skipdirs="${skipdirs} accel-gcc"
+    ;;
+  no)
+    skipdirs="${skipdirs} accel-gcc"
+    ;;
+  auto-nvptx*|nvptx*)
+    accel_target_noncanonical=`echo "$ENABLE_ACCELERATOR" | sed -e s/auto-//g`
+    ;;
+  *)
+    AC_MSG_ERROR([unrecognized accelerator])
+    skipdirs="${skipdirs} accel-gcc"
+    ;;
+esac
+
 # Handle --enable-gold, --enable-ld.
 # --disable-gold [--enable-ld]
 #     Build only ld.  Default option.
Index: configure
===================================================================
--- configure	(revision 208706)
+++ configure	(working copy)
@@ -744,6 +744,7 @@ ospace_frag'
 ac_user_opts='
 enable_option_checking
 with_build_libsubdir
+enable_accelerator
 enable_gold
 enable_ld
 enable_libquadmath
@@ -1460,6 +1461,9 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-accelerator[=ARG]
+                          build accelerator
+                          [ARG={no,auto-device-triplet,device-triplet}]
   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
   --enable-ld[=ARG]       build ld [ARG={default,yes,no}]
   --disable-libquadmath   do not build libquadmath directory
@@ -2922,6 +2926,39 @@ case ${with_newlib} in
   yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
 esac
 
+# Handle --enable-accelerator.  This is in top-level because both libgomp and
+# GCC proper need this information.
+# --disable-accelerator
+#   Default.  Do not build accelerator pieces, only support host execution.
+# --enable-accelerator=auto-device-triplet
+#   If possible, build accelerator pieces for 'device-triplet'.
+# --enable-accelerator=device-triplet
+#   Build accelerator pieces for 'device-triplet'.
+# Check whether --enable-accelerator was given.
+if test "${enable_accelerator+set}" = set; then :
+  enableval=$enable_accelerator; ENABLE_ACCELERATOR=$enableval
+else
+  ENABLE_ACCELERATOR=no
+fi
+
+accel_target_noncanonical=NONE
+case "${ENABLE_ACCELERATOR}" in
+  yes)
+    as_fn_error "--enable-accelerators must name accelerator" "$LINENO" 5
+    skipdirs="${skipdirs} accel-gcc"
+    ;;
+  no)
+    skipdirs="${skipdirs} accel-gcc"
+    ;;
+  auto-nvptx*|nvptx*)
+    accel_target_noncanonical=`echo "$ENABLE_ACCELERATOR" | sed -e s/auto-//g`
+    ;;
+  *)
+    as_fn_error "unrecognized accelerator" "$LINENO" 5
+    skipdirs="${skipdirs} accel-gcc"
+    ;;
+esac
+
 # Handle --enable-gold, --enable-ld.
 # --disable-gold [--enable-ld]
 #     Build only ld.  Default option.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]