I am new in using benchmarks and makefiles. I have downloaded Dhrystone benchmark from the below link and I am trying to compile it, but I am facing weird errors. I tried to solve it,but I am unsuccessful. Can someone help me in running the dhrystone benchmark?
Below are the 2 different ways that I tried to compile. But both are giving the same error result 🙁
Link: http://fossies.org/unix/privat/old/dhrystone-2.1.tar.gz/
compile commands tried:
gcc -g dhry.h dhry_1.c dhry_2.c -o dhrystonex
make all
error:
gcc -O -DTIMES -DHZ=60 dhry_1.c dhry_2.c -o gcc_dry2
dhry_1.c:31:18: warning: conflicting types for built-in function ‘malloc’ [enabled by default]
dhry_1.c:48:17: error: conflicting types for ‘times’
/usr/include/i386-linux-gnu/sys/times.h:49:16: note: previous declaration of ‘times’ was here
dhry_1.c: In function ‘main’:
dhry_1.c:98:3: warning: incompatible implicit declaration of built-in function ‘strcpy’ [enabled by default]
dhry_1.c:124:11: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
make: *** [gcc_dry2] Error 1
Make the following changes. A line with a
-before it indicates one you should remove. A line with a+before it indicates one you should add. In total, you will replace two lines (by preceding them with//) and add one new line (a#include):