| Commit message (Collapse) | Author | Age |
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5074 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5043 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
This checks whether the GCC extension __builtin_assume_aligned is
available, which can generate more efficient code when accessing data
via pointers.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5033 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
Check whether static_assert is supported by C++. Define a work-around
if it is not supported.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5014 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
Correct autodetection of __builtin_unreachable()
Correct fallback implementation of CCTK_BUILTIN_UNREACHABLE
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4976 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4972 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4962 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
m4 uses square brackets as quotation characters and removes one set of them per
argument call. This affects regular expressions that contain character ranges.
This in turn affect some HAVE_XXX macros where XXX contains invalid characters
eg. XXX=math.h . The attached patch adds an extra level of [] around where the
result is passed to a function. Also it seems as if the system provided
AC_CHECK_FUNCS does not properly quote its third argument when passing it to
AC_CHECK_FUNC. Hence I add an extra round of [] whenever it is used.
This is a mess.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4953 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
Instead of assuming that CCTK_REAL16 is real*16 in Fortran, allow any
real*N for user-specified values of N. This enables using CCTK_REAL16
e.g. with gcc versions that call it real*10.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4935 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
Add autoconf test for __attribute__((__always_inline__)).
Improve autoconf test for _Pragma syntax.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4934 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4883 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
Check availability of isnan in C++.
Introduce autoconf macros specifying how to call a good version of
isnan in any language.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4881 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
See https://trac.einsteintoolkit.org/ticket/443
Patch by Roland Haas
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4726 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
"inline" keyword works as is.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4715 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update and improve the auto-detection of the "restrict" keyword; add
more test cases to detect more possible failures. Disable testing the
array syntax
void foo (double A[restrict]);
where the "restrict" keyword is given within the square brackets;
instead, one can use the pointer syntax
void foo (double *restrict const A);
which is tested.
Add support for the gcc built-in function "builtin_expect", which
tells the compiler the value that an expression is most likely to
have.
Re-enable the (currently commented out) definitions for attribute(hot)
and attribute(cold).
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4702 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
gcc' __attribute__(__aligned__(...)) if present. This is necessary for
vectorisation.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4662 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
__attribute__((noinline)) if that is supported by the compiler.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4658 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
const
pure
unused
cold
hot
These attributes can be used to annotate declarations of variables,
functions, and member functions to avoid warnings or enable additional
optimisations.
Detect whether the _Pragma directive is recognised. _Pragma can be
used instead of #pragma, but works also inside macros.
Update the detection of the static, inline, and restrict qualifiers to
catch certain compiler errors, and avoids using these attributes with
these compilers.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4578 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
process is now aborted with an error message.
To create a cross compiled configuration the new configure option CROSS_COMPILE
must be set to "yes".
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4512 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the inline keyword very similarly to AC_C_INLINE. CCTK_CHECK_C_INLINE
works in the following way:
Do nothing if the compiler accepts the inline keyword. Otherwise
define inline to __inline__ or __inline if one of those work,
otherwise define inline to be empty.
The setting '__inline__ __attribute__((__gnu_inline__))' is for gcc
4.3 and later. By default this version of gcc follows the new ANSI
standard for "static inline" and "extern inline", which is
incompatible with many libraries (e.g. GSL), leading to linker errors
about duplicate symbols. This is because "static inline" now
generates an externally visible symbol. The setting above makes gcc
fall back to the old meaning, which does not generate an externally
visible symbol for "static inline".
Use CCTK_CHECK_C_INLINE instead of AC_C_INLINE in configure.in.
Re-generate configure.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4429 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
always detects it as "not present", even if the message printed to the
screen during configuration says "present". The enclosed patch
corrects this:
Rename the detecting autoconf macro from CCTK_PROG_FORTRAN_REAL16 to
CCTK_FORTRAN_REAL16. This follows the usual autoconf naming
conventions; see e.g. CCTK_CXX_BOOL. Also rename the return value (a
global variable) from fortran_does_real16 to
cctk_cv_have_fortran_real16.
In this macro, use the function AC_TRY_COMPILE instead of
AC_TRY_COMPILER. The difference is that this then only compiles, it
does not try to link and execute. Executing would require handling
cross-compiling in a special way.
Replace the autoconf macro AC_TRY_COMPILE by CCTK_TRY_COMPILE,
correcting an error in handling Fortran programmes. AC_TRY_COMPILE
does not work for Fortran in autoconf 2.13.
Move setting the compiler debug and warning flags further up in
configure.in, so that the Fortran 77 compiler flags, which may be
copied from the Fortran 90 compiler flags, are correct when the
Fortran types are detected. Otherwise the wrong Fortran 77 compiler
may be used for this test.
Add autodetection for all the Fortran types real*4, real*8, real*16,
complex*8, complex*16, and complex*32. Make this result available to
thorns as HAVE_CCTK_FORTRAN_xxx.
Define the CCTK_REALxxx and HAVE_CCTK_REALxxx macros only if the
corresponding real and complex types are available in both C and
Fortran.
Remove some leftover debugging statements.
Tested on Darwin-x86 with gcc and Linux-x86 with Intel.
Touche force-reconfigure.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4351 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fortran REAL*16 detection
http://www.cactuscode.org/old/pipermail/patches/2006-April/000164.html
... a patch that makes Cactus directly detect Fortran support
for a REAL*16 type.
The problem has been that Cactus based CCTK_REAL16 on support for the C type
'long double'. This would cause it to create Fortran code for REAL*16, a
type which was sometimes not supported.
In particular, on a 64-bit Athlon machine with Gnu 4.1.0, gfortran
defines REAL*8 but not REAL*16, while gcc defines 'long double'.
This caused thorn AEIThorns/Fortran to fail to compile.
This patch causes the configuration to directly compile Fortran code that
features REAL*16, and define CCTK_REAL16 only if that compiles *and* C's
'long double' is supported.
When you make config, you will see a new line about Fortran REAL*16.
I have tested the enclosed patch on
my laptop with Gnu 4.10 and Intel 9.0 compilers
64-bit AMD Athlon with same compilers
POWER4 with IBM XL compilers
BUT NOTE: I have severe doubts about using REAL*16 on any of these
architectures. That 16-byte (128-bit) type is not natively supported
on the Xeon, Athlon, or POWER machines. While some compilers support
such types, calculation is done in software, not on the FPU.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4314 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
(old versions of g++) don't support restrict in arrays which are
structure members.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4282 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
buggy compilers (e.g. old versions of gcc) do not support "restrict"
on arrays which are function arguments. On these compilers, we now
disable "restrict".
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4280 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compile something. It seems as if AC_PROG_*_GNU does not clean up
after itself.
On case-insensitive file systems, having a file "conftest.c" around
while using cat to write to a file "conftest.C" means that the
resulting file is still "conftest.c", so that it is compiled as C and
not as C++ programme.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4279 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declare and initialise local variables. They also add the necessary
magic to prevent compiler warnings about unused variables.
If the compiler supports __attribute__((unused)), then use this.
Otherwise, use the existing fallback of taking the variable's
address. In Fortran, use the variable's kind as fallback.
Use these macros in autogenerated code and in "cctk.h".
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4146 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3959 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
HAVE_CCTK_<datatype> to be consistent with other configure macros.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3794 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added #define of SIZEOF_LONG_LONG to cctk_Config.h.in
Added macros which detect the presence of bool in C and restrict in C++.
Currently these define CCTK_... macros but don't #define bool in C or
restrict in C++ as these would be non-standard features which might
conflict with user-written macros or code.
Moved AC_C_RESTRICT macro to aclocal.m4 and renamed it to CCTK_C_RESTRICT to
conform with autoconf naming conventions.
Created macro for detecting presence of bool in CXX and changed to use the
macro.
A little bit of tidying up of cctk_Config.h.in to make the file a bit easier to
read.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3173 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In CCTK_Functions.sh:
CCTK_AddPrefix(prefix, list)
CCTK_AddSuffix(suffix, list)
CCTK_Wrap(prefix, suffix, list)
which manipulate the list in the obvious way.
In aclocal.m4:
CCTK_CHECK_FUNCS
CCTK_CHECK_LIB
with same functionality as the equivalent AC ones, except they use LIBS and LIBDIRS
as used in the rest of the cactus make system.
CCTK_CHECK_LIB_FUNC
which checks for a function in a particular library, and defined both HAVE_LIB[LIB]
and HAVE_FUNC.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1881 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
be placed before #include <...> in the test program. E.g. to make sure something
else is included first.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1818 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
| |
restoring value later
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1803 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
| |
not, eg.). Set CCTK_SOCKLEN_T to socklen_t or int otherwise
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1799 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
if they don't exist it sets the make variables BUILD_REGEX and BUILD_GETOPT
to no, otherwise they are yes.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1659 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting BUILD=, or HOST=, or TARGET= will pass --build=, ... to the
configure process.
If cross compiling you need to set
ENDIAN - either big or little
SIZEOF_LONG_INT
SIZEOF_INT
SIZEOF_SHORT_INT
SIZEOF_LONG_DOUBLE
SIZEOF_DOUBLE
SIZEOF_SHORT
SIZEOF_POINTER
otherwise you'll get an error.
You may also set
NULL_DEVICE
to tell it the location of the null device. If you don't set this you'll
just get a warning, and it will default to /dev/null.
This is weakly tested, as I am limited in what I can cross compile for.
Fixed semantics for DEBUG to be as in previous commit, except DEBUG=DEFINES
define CCTK_DEBUG and not DEBUG in the header files.
Partially dealt with PR 340 -- -g -O2 no longer automatically appear as
the compilation flags.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1652 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
the standard timing stuff.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1077 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
into an aclocal.m4 file.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1075 17b73243-c579-4c4c-a9d2-2d5706c11dac
|