--- gforth/engine/threaded.h 2005/08/16 13:46:49 1.34 +++ gforth/engine/threaded.h 2007/12/31 17:34:59 1.37 @@ -1,6 +1,6 @@ /* This file defines a number of threading schemes. - Copyright (C) 1995, 1996,1997,1999,2003,2004 Free Software Foundation, Inc. + Copyright (C) 1995, 1996,1997,1999,2003,2004,2005,2007 Free Software Foundation, Inc. This file is part of Gforth. @@ -91,11 +91,24 @@ */ -#ifdef GCC_PR15242_WORKAROUND +#if !defined(GCC_PR15242_WORKAROUND) +#if __GNUC__ == 3 +/* various gcc-3.x version have problems (including PR15242) that are + solved with this workaround */ +#define GCC_PR15242_WORKAROUND 1 +#else +/* other gcc versions are better off without the workaround for + primitives that are not relocatable */ +#define GCC_PR15242_WORKAROUND 0 +#endif +#endif + +#if GCC_PR15242_WORKAROUND #define DO_GOTO goto before_goto #else #define DO_GOTO goto *real_ca #endif + #ifndef GOTO_ALIGN #define GOTO_ALIGN #endif