[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets a
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system |
Date: |
Tue, 17 Jul 2018 16:15:53 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Follow-up Comment #6, bug #53853 (project octave):
Is there a way to use existing Autoconf macros to help change the test for
integer size?
I see AC_C_BIGENDIAN which could be used to determine the endianness of the
system. Maybe then one uses
dnl
dnl Check if the default Fortran INTEGER is 64 bits wide.
dnl If cross-compiling, assume 4 bytes unless the cache value
dnl is already set.
dnl
AC_DEFUN([OCTAVE_CHECK_SIZEOF_FORTRAN_INTEGER], [
AC_CACHE_CHECK([default size of Fortran INTEGER],
[octave_cv_sizeof_fortran_integer],
[ac_octave_save_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS $F77_INTEGER_8_FLAG"
AC_LANG_PUSH(Fortran 77)
if test -z "$WORDS_BIGENDIAN"; then
AC_RUN_IFELSE([AC_LANG_PROGRAM(,[[
integer*8 n8
integer n
c Generate -2**33 + 1.
n8 = 2
n8 = -4 * (n8 ** 30)
n8 = n8 + 1
c Convert to default integer type. If the values are no longer equal,
c assume the default integer size is 32-bits.
n = n8
if (n .ne. n8) stop 1
]])],
octave_cv_sizeof_fortran_integer=8,
octave_cv_sizeof_fortran_integer=4,
octave_cv_sizeof_fortran_integer=4)
else
AC_RUN_IFELSE([AC_LANG_PROGRAM(,[[
c *** program that works on a big endian system ***
]])],
octave_cv_sizeof_fortran_integer=8,
octave_cv_sizeof_fortran_integer=4,
octave_cv_sizeof_fortran_integer=4)
fi
AC_LANG_POP(Fortran 77)
FFLAGS="$ac_octave_save_FFLAGS"
])
])
Just trying to move the ball forward on this bug.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53853>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system,
Rik <=
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, John W. Eaton, 2018/07/17
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, Mike Miller, 2018/07/17
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, Rik, 2018/07/17
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, Mike Miller, 2018/07/17
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, John W. Eaton, 2018/07/17
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, Mike Miller, 2018/07/17
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, John W. Eaton, 2018/07/18
- [Octave-bug-tracker] [bug #53853] configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system, Mike Miller, 2018/07/18