This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem when making a new target


Thanks Andreas for that.

I think i have a bigger problem so. The target files that I am using work on
gcc-2.95. I have modified these files slightly so suit my criteria and I
want to use these on gcc3.2.2.

Can I comment out the #pragmas in system.h and hence use the macros which
otherwise would have been poisoned? If not how am I going to implement my
function_epilogue and function_prologue?

Thanks

Rgds

Roger


> Hi all,
>
> I am trying to target a new architecture with gcc version 3.2.2. I have
> modified the configure scripts successfully to recognise my new target
> (called 'npe'). I have also written my target files, i.e npe.c, npe.h and
> npe.md and placed them in gcc-3.2.2/gcc/config/gcc.
>
> However when I  'make', I get the following error:
>
> In file included from /home/rgough/gcc-3.2.2/gcc/c-decl.c:30:
> /home/rgough/gcc-3.2.2/gcc/system.h:589:21: warning: poisoning existing
> macro "ASM_OPEN_PAREN"
> /home/rgough/gcc-3.2.2/gcc/system.h:589:36: warning: poisoning existing
> macro "ASM_CLOSE_PAREN"
> /home/rgough/gcc-3.2.2/gcc/system.h:590:9: warning: poisoning existing
macro
> "FUNCTION_PROLOGUE"
> /home/rgough/gcc-3.2.2/gcc/system.h:590:27: warning: poisoning existing
> macro "FUNCTION_EPILOGUE"
> /home/rgough/gcc-3.2.2/gcc/system.h:605:23: warning: poisoning existing
> macro "EASY_DIV_EXPR"
> /home/rgough/gcc-3.2.2/gcc/system.h:605:37: warning: poisoning existing
> macro "IMPLICIT_FIX_EXPR"
> /home/rgough/gcc-3.2.2/gcc/system.h:606:54: warning: poisoning existing
> macro "ASM_IDENTIFY_GCC"
> /home/rgough/gcc-3.2.2/gcc/system.h:609:9: warning: poisoning existing
macro
> "BLOCK_PROFILER"
> /home/rgough/gcc-3.2.2/gcc/system.h:609:44: warning: poisoning existing
> macro "FUNCTION_BLOCK_PROFILER"
> /home/rgough/gcc-3.2.2/gcc/c-decl.c: In function `get_parm_info':
> /home/rgough/gcc-3.2.2/gcc/c-decl.c:5360: parse error before '(' token
> /home/rgough/gcc-3.2.2/gcc/c-decl.c: In function `store_parm_decls':
> /home/rgough/gcc-3.2.2/gcc/c-decl.c:6710: parse error before '(' token
> make[1]: *** [c-decl.o] Error 1
> make: *** [all-gcc] Error 2
>
> From my limited knowledge of porting gcc, I would have thought that it
would
> not be necessary to touch this file. Indeed I presumed, that I would only
> need to modify my target files once gcc recognised my target after
> configuration.
>
> My question is will I have to modify this c-decl.c file or is the problem
> actually with my target files? How can I go about trouble shooting this?

The problem is with your target file.  You use the macros above,
e.g. BLOCK_PROFILER in your target files and those macros are
forbidden.  We explicitly have poisoned them so that you do not use
them ;)

Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]