diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2014-11-28 17:39:15 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2014-11-28 17:39:15 +0000 |
commit | ee95f9288a029478f1fbf9741db51855ac9a552b (patch) | |
tree | 0e296527e984f03d733bdbf9031d556f5292b19a /libgfortran/configure | |
parent | 8760be8546edd0941c1d62dd47e5130fae5df953 (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')
-rwxr-xr-x | libgfortran/configure | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index a19cb9e1069..e1592f73249 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -641,6 +641,8 @@ RANLIB AR AS SECTION_FLAGS +LIBGFOR_MINIMAL_FALSE +LIBGFOR_MINIMAL_TRUE LIBGFOR_USE_SYMVER_SUN_FALSE LIBGFOR_USE_SYMVER_SUN_TRUE LIBGFOR_USE_SYMVER_GNU_FALSE @@ -5895,6 +5897,25 @@ else fi +# 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 + + if test "x${target_cpu}" = xnvptx; then + LIBGFOR_MINIMAL_TRUE= + LIBGFOR_MINIMAL_FALSE='#' +else + LIBGFOR_MINIMAL_TRUE='#' + LIBGFOR_MINIMAL_FALSE= +fi + + # Figure out whether the compiler supports "-ffunction-sections -fdata-sections", # similarly to how libstdc++ does it ac_test_CFLAGS="${CFLAGS+set}" @@ -12355,7 +12376,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12358 "configure" +#line 12379 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12461,7 +12482,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12464 "configure" +#line 12485 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -26822,6 +26843,10 @@ if test -z "${LIBGFOR_USE_SYMVER_SUN_TRUE}" && test -z "${LIBGFOR_USE_SYMVER_SUN as_fn_error "conditional \"LIBGFOR_USE_SYMVER_SUN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${LIBGFOR_MINIMAL_TRUE}" && test -z "${LIBGFOR_MINIMAL_FALSE}"; then + as_fn_error "conditional \"LIBGFOR_MINIMAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LIBGFOR_BUILD_QUAD_TRUE}" && test -z "${LIBGFOR_BUILD_QUAD_FALSE}"; then as_fn_error "conditional \"LIBGFOR_BUILD_QUAD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |