[PTLsim-devel] error while compiling gcc benchmark with ptlcall_switch_to_sim()
ibhagat at ac.upc.edu
Mon Mar 24 15:26:21 EDT 2008
Have you tried with -D_STRING_H for compiling the benchmark? I recommend you to
try this first.
If that doesnt work, try this:
Basically, the problem arises because of the different definition of strchr used
in gcc itself (gcc as benchmark uses some other definition). However, note that
ptlcalls.h needs the string.h only in case of PTLSIM_HYPERVISOR. So if you are
using user-space PTLsim/X, just use the minimal includes (put the rest = [...,
<string.h>, ...] in a #ifdef PTLSIM_HYPERVISOR #endif) and try to compile.
This should be sufficient in theory.
regards
Indu
Quoting Manabi <samiramanabi at gmail.com>:
> Hello,
> I want to compile benchmark gcc with ptlcall_switch_to_sim(). I have
> inserted this call in toplev.c at line 2217
> // Instrumented for PTLsim:
> ptlcall_switch_to_sim();
>
> /* Initialize yet another pass. */
>
> if (!output_bytecode)
> init_final (main_input_filename);
>
> But when I compile including ptlcalls.h I get this error
> c-typeck.c:42:21: error: macro "strchr" requires 2 arguments, but only 1
> given
> c-typeck.c:42: error: 'strchr' redeclared as different kind of symbol
>
>
> By the way it compiles fine without the ptlcall_switch_to_sim() call. Other
> benchmarks also compile fine. Can anyone help me with this matter?
>
> Thank you
>
More information about the PTLsim-devel mailing list