OpenCores
Issue List
Or1ksim 0.3.0rc1 --enable-range-stats fails compilation #30
Closed jeremybennett opened this issue about 16 years ago
jeremybennett commented about 16 years ago

Reported by Frank Storm Frank.Storm@gmx.net

Used gcc version is 4.3.1 (Linux OpenSuse 11.0).

If I try to use the option --enable-range-stats then I get the following error message:

gcc -DHAVE_CONFIG_H -I. -I../.. -I../../cpu/or32 -I../.. -I../../cpu/common -I../../cpu/or1k -I../../cache -I../../mmu -I../../bpb -I../../peripheral -I../../tick -I../../peripheral/channels -I../../pm -I../../pic -I../../debug -I../../vapi -I../../support -I../../cuc -I../../port -I../../argtable2 -g -O2 -MT stats.lo -MD -MP -MF .deps/stats.Tpo -c stats.c -fPIC -DPIC -o .libs/stats.o stats.c: In function 'printstats': stats.c:402: error: 'MAX_RANGE' undeclared (first use in this function) stats.c:402: error: (Each undeclared identifier is reported only once stats.c:402: error: for each function it appears in.)

The constant MAX_RANGE is defined nowhere.

jeremybennett commented about 16 years ago

It looks to me like the code may be incomplete, so try it at your peril! I find the constant variously declared as RAW_RANGE (in stats.c) and used as MAX_RAW_RANGE and MAX_RANGE in stats.c and execute.c respectively.<br> <br> The workaround is to declare RAW_RANGE in stats.h (which is included by stats.c and execute.c) and change the references to MAX_RAW_RANGE and MAX_RANGE to RAW_RANGE.<br> <br> In addition the declaration of raw_stats (the variable, not the struct) in stats.c has to be made non-static:<br> <br> struct raw_stats raw_stats; /!< RAW hazard stats /<br> <br> And it has to be declared as external in stats.h:<br> <br> extern struct raw_stats raw_stats;<br> <br> It will be fixed in the next release.

jeremybennett commented about 16 years ago

Fixed in Or1ksim 0.3.0rc2.<br> <br> Marked as CLOSED.

jeremybennett was assigned about 16 years ago
jeremybennett closed this about 16 years ago

Assignee
jeremybennett
Labels
Bug