aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/configure.ac
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2014-11-28 17:39:15 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2014-11-28 17:39:15 +0000
commitee95f9288a029478f1fbf9741db51855ac9a552b (patch)
tree0e296527e984f03d733bdbf9031d556f5292b19a /libgfortran/configure.ac
parent8760be8546edd0941c1d62dd47e5130fae5df953 (diff)
Add support for a minimal version of libgfortran for accelerator targets.
* Makefile.am (AM_CFLAGS): Add -DLIBGFOR_MINIMAL if LIBGFOR_MINIMAL. (gfor_io_src, gfor_heper_src, gfor_src): Split into minimal and always included sources. * Makefile.in: Regenerate. * configure.ac (LIBGFOR_MINIMAL): New AM_CONDITIONAL. * configure: Regenerate. * caf/single.c (caf_runtime_error): Don't print messages if LIBGFOR_MINIMAL. * runtime/compile_options.c (fatal_error_in_progress, show_signal, backtrace_handler, maybe_find_addr2line): Guard with !defined LIBGFOR_MINIMAL. (set_options): Likewise for the backtrace code. * runtime/minimal.c: New file. From-SVN: r218170
Diffstat (limited to 'libgfortran/configure.ac')
-rw-r--r--libgfortran/configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index b9386c2c5ec..35a8b395885 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -189,6 +189,18 @@ AM_CONDITIONAL(LIBGFOR_USE_SYMVER, [test "x$gfortran_use_symver" != xno])
AM_CONDITIONAL(LIBGFOR_USE_SYMVER_GNU, [test "x$gfortran_use_symver" = xgnu])
AM_CONDITIONAL(LIBGFOR_USE_SYMVER_SUN, [test "x$gfortran_use_symver" = xsun])
+# For GPU offloading, not everything in libfortran can be supported.
+# Currently, the only target that has this problem is nvptx. The
+# following is a (partial) list of features that are unsupportable on
+# this particular target:
+# * Constructors
+# * alloca
+# * C library support for I/O, with printf as the one notable exception
+# * C library support for other features such as signal, environment
+# variables, time functions
+
+AM_CONDITIONAL(LIBGFOR_MINIMAL, [test "x${target_cpu}" = xnvptx])
+
# Figure out whether the compiler supports "-ffunction-sections -fdata-sections",
# similarly to how libstdc++ does it
ac_test_CFLAGS="${CFLAGS+set}"