Ok I got p4a compiled and installed. The trick was this patch, which needs to be applied twice (!), once to the main source tree and once to the additional gcc that gets downloaded and unpacked during the build process. Witrhout the patch, I got multiple symbol definition errors, as if the inline definitions weren't really inline....
diff --git a/packages/pips-gfc/gcc-4.4.5/gcc/toplev.h b/packages/pips-gfc/gcc-4.4.5/gcc/toplev.h
index 2324b068f7..b396ef72e4 100644
--- a/packages/pips-gfc/gcc-4.4.5/gcc/toplev.h
+++ b/packages/pips-gfc/gcc-4.4.5/gcc/toplev.h
@@ -186,6 +186,7 @@ extern int floor_log2 (unsigned HOST_WIDE_INT);
# define CTZ_HWI __builtin_ctz
# endif
+#if 0
extern inline int
floor_log2 (unsigned HOST_WIDE_INT x)
{
@@ -197,6 +198,7 @@ exact_log2 (unsigned HOST_WIDE_INT x)
{
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
}
+#endif
#endif /* GCC_VERSION >= 3004 */
/* Functions used to get and set GCC's notion of in what directory
needs to be applied to these files:
par4all/packages/pips-gfc/gcc-4.4.5/gcc/toplev.h
par4all/build/pips/src/Passes/fortran95/gcc-4.4.5/gcc/toplev.h
EDIT: but it doesn't work, syntax error in some pips python code...
$ p4a -vv --c99 --cuda --nvcc-flags="-gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20" pandel.c -o pandel-cuda
Traceback (most recent call last):
File "/home/pips/opt/p4a/bin/p4a", line 10, in <module>
import p4a_process
File "/home/pips/opt/p4a/lib/python2.7/site-packages/pips/p4a_process.py", line 15, in <module>
import p4a_processor
File "/home/pips/opt/p4a/lib/python2.7/site-packages/pips/p4a_processor.py", line 16, in <module>
import p4a_astrad
File "/home/pips/opt/p4a/lib/python2.7/site-packages/pips/p4a_astrad.py", line 14, in <module>
import pyps
File "/home/pips/opt/p4a/lib/python2.7/site-packages/pips/pyps.py", line 2, in <module>
from pypsbase import *
File "/home/pips/opt/p4a/lib/python2.7/site-packages/pips/pypsbase.py", line 3, in <module>
import pypips
File "/home/pips/opt/p4a/lib/python2.7/site-packages/pips/pypips.py", line 142
def user_log(arg1, arg1=None, arg2=None, arg3=None, arg4=None, arg5=None, arg6=None, arg7=None, arg8=None, arg9=None, arg10=None):
SyntaxError: duplicate argument 'arg1' in function definition