I_M4_DEPS9=$(I_M4_DEPS) m4/ifindloc2.m4
kinds.h: $(srcdir)/mk-kinds-h.sh
- $(SHELL) $(srcdir)/mk-kinds-h.sh '$(FCCOMPILE)' > $@ || rm $@
+ $(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
kinds.inc: kinds.h
grep '^#' < kinds.h > $@
grep '^#' < $(srcdir)/c99_protos.h > $@
selected_int_kind.inc: $(srcdir)/mk-sik-inc.sh
- $(SHELL) $(srcdir)/mk-sik-inc.sh '$(FCCOMPILE)' > $@ || rm $@
+ $(SHELL) $(srcdir)/mk-sik-inc.sh '@LIBGOMP_CHECKED_INT_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
selected_real_kind.inc: $(srcdir)/mk-srk-inc.sh
- $(SHELL) $(srcdir)/mk-srk-inc.sh '$(FCCOMPILE)' > $@ || rm $@
+ $(SHELL) $(srcdir)/mk-srk-inc.sh '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
fpu-target.h: $(srcdir)/$(FPU_HOST_HEADER)
cp $(srcdir)/$(FPU_HOST_HEADER) $@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBGOMP_CHECKED_INT_KINDS = @LIBGOMP_CHECKED_INT_KINDS@
+LIBGOMP_CHECKED_REAL_KINDS = @LIBGOMP_CHECKED_REAL_KINDS@
LIBOBJS = @LIBOBJS@
LIBQUADINCLUDE = @LIBQUADINCLUDE@
LIBQUADLIB = @LIBQUADLIB@
@onestep_TRUE@ $(LTCOMPILE) -c -o $@ $^ -combine
kinds.h: $(srcdir)/mk-kinds-h.sh
- $(SHELL) $(srcdir)/mk-kinds-h.sh '$(FCCOMPILE)' > $@ || rm $@
+ $(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
kinds.inc: kinds.h
grep '^#' < kinds.h > $@
grep '^#' < $(srcdir)/c99_protos.h > $@
selected_int_kind.inc: $(srcdir)/mk-sik-inc.sh
- $(SHELL) $(srcdir)/mk-sik-inc.sh '$(FCCOMPILE)' > $@ || rm $@
+ $(SHELL) $(srcdir)/mk-sik-inc.sh '@LIBGOMP_CHECKED_INT_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
selected_real_kind.inc: $(srcdir)/mk-srk-inc.sh
- $(SHELL) $(srcdir)/mk-srk-inc.sh '$(FCCOMPILE)' > $@ || rm $@
+ $(SHELL) $(srcdir)/mk-srk-inc.sh '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
fpu-target.h: $(srcdir)/$(FPU_HOST_HEADER)
cp $(srcdir)/$(FPU_HOST_HEADER) $@
FGREP
SED
SECTION_FLAGS
+LIBGOMP_CHECKED_REAL_KINDS
+LIBGOMP_CHECKED_INT_KINDS
LIBGFOR_MINIMAL_FALSE
LIBGFOR_MINIMAL_TRUE
LIBGFOR_USE_SYMVER_SUN_FALSE
fi
+# Some compiler target support may have limited support for integer
+# or floating point numbers – or may want to reduce the libgfortran size
+# although they do have the support.
+LIBGOMP_CHECKED_INT_KINDS="1 2 4 8 16"
+LIBGOMP_CHECKED_REAL_KINDS="4 8 10 16"
+
+if test "x${target_cpu}" = xamdgcn; then
+ # amdgcn only has limited support for __int128.
+ LIBGOMP_CHECKED_INT_KINDS="1 2 4 8"
+fi
+
+
+
# Figure out whether the compiler supports "-ffunction-sections -fdata-sections",
# similarly to how libstdc++ does it
ac_test_CFLAGS="${CFLAGS+set}"
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12727 "configure"
+#line 12742 "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 12833 "configure"
+#line 12848 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
AM_CONDITIONAL(LIBGFOR_MINIMAL, [test "x${target_cpu}" = xnvptx])
+# Some compiler target support may have limited support for integer
+# or floating point numbers – or may want to reduce the libgfortran size
+# although they do have the support.
+LIBGOMP_CHECKED_INT_KINDS="1 2 4 8 16"
+LIBGOMP_CHECKED_REAL_KINDS="4 8 10 16"
+
+if test "x${target_cpu}" = xamdgcn; then
+ # amdgcn only has limited support for __int128.
+ LIBGOMP_CHECKED_INT_KINDS="1 2 4 8"
+fi
+AC_SUBST(LIBGOMP_CHECKED_INT_KINDS)
+AC_SUBST(LIBGOMP_CHECKED_REAL_KINDS)
+
# Figure out whether the compiler supports "-ffunction-sections -fdata-sections",
# similarly to how libstdc++ does it
ac_test_CFLAGS="${CFLAGS+set}"
LC_ALL=C
export LC_ALL
-compile="$1"
-
-# Possible types must be listed in ascending order
-possible_integer_kinds="1 2 4 8 16"
-possible_real_kinds="4 8 10 16"
+if test "$#" -ne 3; then
+ echo "Usage $0 int_kinds real_kinds compile"
+ exit 1
+fi
+# Possible kinds must be listed in ascending order
+possible_integer_kinds="$1"
+possible_real_kinds="$2"
+compile="$3"
largest=""
smallest=""
done
-# After this, we include a header that can override some of the
+# After this, we include a header that can override some of the
# autodetected settings.
echo '#include "kinds-override.h"'
#!/bin/sh
-compile="$1"
+if test "$#" -ne 2; then
+ echo "Usage $0 int_kinds compile"
+ exit 1
+fi
+
+# Possible kinds must be listed in ascending order
+possible_integer_kinds="$1"
+compile="$2"
+
kinds=""
-possible_kinds="1 2 4 8 16"
c=0
-for k in $possible_kinds; do
+for k in $possible_integer_kinds; do
echo " integer (kind=$k) :: x" > tmp$$.f90
echo " x = 1_$k" >> tmp$$.f90
echo " end" >> tmp$$.f90
#!/bin/sh
-compile="$1"
+if test "$#" -ne 2; then
+ echo "Usage $0 real_kinds compile"
+ exit 1
+fi
+
+# Possible kinds must be listed in ascending order
+possible_real_kinds="$1"
+compile="$2"
+
kinds=""
-possible_kinds="4 8 10 16"
c=0
-for k in $possible_kinds; do
+for k in $possible_real_kinds; do
echo " real (kind=$k) :: x" > tmp$$.f90
echo " x = 1.0_$k" >> tmp$$.f90
echo " end" >> tmp$$.f90