]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Patch] Add to the libgfortran/newlib bodge to "detect" ftruncate support in ARM...
authorJames Greenhalgh <james.greenhalgh@arm.com>
Fri, 28 Aug 2015 15:13:21 +0000 (15:13 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Fri, 28 Aug 2015 15:13:21 +0000 (15:13 +0000)
Backport from gcc-5-branch.
* configure.ac: Define HAVE_FTRUNCATE for ARM/AArch64/SH newlib
builds.
* configure: Regenerate.

From-SVN: r227304

libgfortran/ChangeLog
libgfortran/configure
libgfortran/configure.ac

index 132f12c81a0ae7cb924ff29074db6d976671447f..5cdd8192e15b1ebf6674e566337194da34891819 100644 (file)
@@ -1,3 +1,12 @@
+2015-08-28  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       Backport from gcc-5-branch.
+       2015-08-28  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * configure.ac: Define HAVE_FTRUNCATE for ARM/AArch64/SH newlib
+       builds.
+       * configure: Regenerate.
+
 2015-08-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR libfortran/66936
index 542359798f5b648fd61e982ed74ddc7f85dae571..f90fbc507f946e8292ce9c1435139a4d5e783936 100755 (executable)
@@ -16485,6 +16485,15 @@ $as_echo "#define HAVE_STRTOK_R 1" >>confdefs.h
 $as_echo "#define HAVE_STRTOLD 1" >>confdefs.h
 
    fi
+
+  # ARM, AArch64 and SH also provide ftruncate.
+  case "${host}" in
+     arm* | aarch64* | sh*)
+
+$as_echo "#define HAVE_FTRUNCATE 1" >>confdefs.h
+
+       ;;
+  esac
 else
 
 
index e930123955286c15134e3c085225ebd3953a457d..438157a989ca0ca995954d40bd0255f006335371 100644 (file)
@@ -280,6 +280,13 @@ if test "x${with_newlib}" = "xyes"; then
    if test x"long_double_math_on_this_cpu" = x"yes"; then
      AC_DEFINE(HAVE_STRTOLD, 1, [Define if you have strtold.])
    fi
+
+  # ARM, AArch64 and SH also provide ftruncate.
+  case "${host}" in
+     arm* | aarch64* | sh*)
+       AC_DEFINE(HAVE_FTRUNCATE, 1, [Define if you have ftruncate.])
+       ;;
+  esac
 else
    AC_CHECK_FUNCS_ONCE(getrusage times mkstemp strtof strtold snprintf \
    ftruncate chsize chdir getlogin gethostname kill link symlink sleep ttyname \