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
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}"
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
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
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
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
fi
ac_fn_c_check_type "$LINENO" "fp_except" "ac_cv_type_fp_except" "
+#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
+#endif
#include <math.h>
"
fi
ac_fn_c_check_type "$LINENO" "fp_except_t" "ac_cv_type_fp_except_t" "
+#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
+#endif
#include <math.h>
"
fi
ac_fn_c_check_type "$LINENO" "fp_rnd" "ac_cv_type_fp_rnd" "
+#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
+#endif
#include <math.h>
"
fi
ac_fn_c_check_type "$LINENO" "fp_rnd_t" "ac_cv_type_fp_rnd_t" "
+#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
+#endif
#include <math.h>
"
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