Migration of cross compiler to GCC 3.4.6

Ian Lance Taylor iant@google.com
Thu Aug 24 17:47:00 GMT 2006

Mohamed Shafi <shafitvm@yahoo.com> writes:

> I am upgrading a cross compiler from 3.2 to 3.4.6
> I had to change some of the TARGET description macros in target.h file
> for otherwise while building i am getting "attempt to use poisoned" errors

It's OK to send this kind of question to gcc@gcc.gnu.org, since it
concerns doing development with gcc rather than merely using gcc.

> 2.	#define CONST_COSTS(RTX, CODE, OUTER_CODE)      \
>   		case CONST_INT:				\
>     			return target_const_costs (RTX, OUTER_CODE);   \
>   		case CONST: 					\
>     			return 5;                                   \
>   		case LABEL_REF:				\
>     			return 1;                                   \
>   		case SYMBOL_REF:				\
>     			return ((TARGET_SMALL_MODEL)? 2: 3);        \
>   		case CONST_DOUBLE:				\
>       			return 10;
>       	i dont know the corresponding macro in 3.4.6

This is also part of TARGET_RTX_COSTS.

>   except for TARGET_CPU_CPP_BUILTINS i dont know how to rewrite the existing
> macros for 3.4.6

The macros are now functions in the CPU.c file.  Define the TARGET_XXX
macro in your CPU.c file to be the name of the static function in that
file which implements the functionality.  See the many examples in the
existing backends.


More information about the Gcc-help mailing list