Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bench: Fix multiple problems and issues in bench
There are multiple issues in bench compilation as follows. First, the baz does not return a value although its return type is int so set it to void. uftrace/misc/bench.c:12:1: warning: non-void function does not return a value [-Wreturn-type] Second, the bench.sh script uses bash syntax, but its shebang is /bin/sh so it makes the following error in some environments. $ make bench ... ./bench.sh: 11: Syntax error: "(" unexpected make: *** [Makefile:390: bench] Error 2 Lastly, the bench executable requires it to be compiled with -pg, but android build doesn't support -pg build so it shows the following error. clang-14: warning: argument unused during compilation: '-pg' [-Wunused-command-line-argument] ld: error: undefined symbol: _mcount It seems there is no reason to build bench image in default build, so it'd be better to opt it out and build it only in 'make bench'. This patch fixes all the problems and issues above. Signed-off-by: Honggyu Kim <[email protected]>
- Loading branch information