On Sat, Dec 31, 2011 at 5:37 AM, Teng-Feng Yang <[email protected]>wrote:

> Hello
>
> Recently I try to parallelize the out-or-order pipeline of marss-0.2.1,
> which I have already done before on marss-0.1.2.
> I need to add some global variables in ooo.h which will be used in
> ptlsim/sim/machine.cpp and ptlsim/core/ooo-core/*.
> So I declare these global variables as "*extern* *(global variables
> definition)*" in *ooo.h* and define "*(global variable definitions)*" in *
> ooo.cpp*
> However, the linker keeps complaining about the multiple definition errors
> of all those newly added global variables.
> The error message is:
>
> ptlsim/build/core/ooo-core/ooo-pipe_ooo_2.o: In function
> `ooo_2::PhysicalRegister::unspecref(int, unsigned char)':
> /home/iris/Work/marss-0.2.1/ptlsim/core/ooo-core/ooo.h:957: multiple
> definition of `*(global variables)*'
> ptlsim/build/core/ooo-core/ooo-pipe_ooo.o:/home/iris/Work/marss-0.2.1/ptlsim/core/ooo-core/ooo.h:957:
> first defined here
>
> Since the SCONS omits the details of program compilation and linking info,
> I have nearly no clue to resolve these errors.
> Any help would be grateful!
>
> All cores are compiled multiple times because of the configuration
mechanism.  Because of that you'r getting this error.  If you want any
global variable place it in machine.cpp/h files.

- Avadh

> Dennis
>
>
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to