On 05-Mar-01 18:17, Colin Watson wrote:
> On Mon, Feb 28, 2005 at 09:41:56AM +0100, Andreas Jochens wrote:
> I was going to NMU at Stephen's request, but this fails to build on
> powerpc/gcc-3.4:
> [...]
> Any idea what's going on?
Thank you for trying the patch.
I amended the patch a little (see below). With these amendments,
the pfe package now compiles with gcc-3.3, gcc-3.4 and gcc-4.0 on
amd64. I did not check it on powerpc.
I think that it is ugly to check for specific compiler versions in the
sources, but I do not know a better solution in this case.
Regards,
Andreas Jochens
diff -urN ../tmp-orig/pfe-0.33.34/pfe/def-comp.h ./pfe/def-comp.h
--- ../tmp-orig/pfe-0.33.34/pfe/def-comp.h 2003-09-26 19:16:12.000000000
+0200
+++ ./pfe/def-comp.h 2005-03-01 21:33:35.265395381 +0100
@@ -362,7 +362,7 @@
#if ! defined PFE_CALL_THREADING
#define FX_POP_BODY_ADDR (P4_WP_PFA)
#define FX_POP_BODY_ADDR_(VARNAME) register p4cell* VARNAME = FX_POP_BODY_ADDR
-#define FX_POP_BODY_ADDR_p4_BODY register p4cell* p4_BODY = FX_POP_BODY_ADDR
+#define FX_POP_BODY_ADDR_p4_BODY p4cell* p4_BODY = FX_POP_BODY_ADDR
#define FX_POP_BODY_ADDR_UNUSED
#elif ! defined PFE_SBR_CALL_THREADING
#define FX_POP_BODY_ADDR ((p4cell*)(*IP++))
diff -urN ../tmp-orig/pfe-0.33.34/pfe/def-macro.h ./pfe/def-macro.h
--- ../tmp-orig/pfe-0.33.34/pfe/def-macro.h 2003-03-19 16:50:34.000000000
+0100
+++ ./pfe/def-macro.h 2005-03-01 21:26:21.182181450 +0100
@@ -44,7 +44,7 @@
#endif
/* inc/decrement, push/pop of arbitrary types with arbitrary pointers */
-#if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus
+#if defined __GNUC__ && __GNUC__ <= 3 && !defined __STRICT_ANSI__ && !defined
__cplusplus
/* Use non-ANSI extensions avoiding address-of operator: */
#define P4_ADD(P,N) ((char *)(P) += (N))
#define P4_INC(P,T) (((T *)(P))++)
@@ -272,7 +272,7 @@
#define P4_IF_FP_(X)
#endif
-#if defined __WATCOMC__ || defined _AIX_CC
+#if ( defined __GNUC__ && __GNUC__ >= 4 ) || defined __WATCOMC__ || defined
_AIX_CC
#define P4_VAR(_TYPE,_VAR) (*((_TYPE*)&(_VAR)))
#else
#define P4_VAR(_TYPE,_VAR) ((_TYPE)(_VAR))
diff -urN ../tmp-orig/pfe-0.33.34/pfe/engine-set.c ./pfe/engine-set.c
--- ../tmp-orig/pfe-0.33.34/pfe/engine-set.c 2003-10-02 16:59:10.000000000
+0200
+++ ./pfe/engine-set.c 2005-03-01 21:29:20.467576061 +0100
@@ -601,7 +601,7 @@
p4_evaluate (p, n); /* directly from a C' based */
val = 0; /* application which did */
default: /* call InitVM before to get */
- /* an error occurred */ /* a new instance of a PFE */
+ break; /* an error occurred */ /* a new instance of a PFE */
} /* being put on hold for */
PFE_VM_LEAVE(th); /* being Exec'uted finally */
return val;
diff -urN ../tmp-orig/pfe-0.33.34/pfe/fpnostack-ext.c ./pfe/fpnostack-ext.c
--- ../tmp-orig/pfe-0.33.34/pfe/fpnostack-ext.c 2003-03-21 13:41:42.000000000
+0100
+++ ./pfe/fpnostack-ext.c 2005-03-01 21:32:24.639027573 +0100
@@ -670,7 +670,8 @@
*/
FCode (p4_nofp_f_trunc_to_s)
{
- double h = *FSP++;
+ double h = *FSP;
+ SP = (double *)SP + 1;
*--SP = (p4cell) h;
}
diff -urN ../tmp-orig/pfe-0.33.34/pfe/option-ext.c ./pfe/option-ext.c
--- ../tmp-orig/pfe-0.33.34/pfe/option-ext.c 2003-06-26 18:21:11.000000000
+0200
+++ ./pfe/option-ext.c 2005-03-01 21:29:57.615405844 +0100
@@ -274,7 +274,7 @@
xt = p4_create_option (nm, l, sizeof(p4cell), opt);
if (! xt) return 0;
P4_XT_VALUE(xt) = FX_GET_RT (p4_value);
- return ((p4cell*) OPT.dp = defval );
+ return ( OPT.dp = defval );
}
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]