diff --git a/bench/Makefile b/bench/Makefile index 9c5d0210..07df23fc 100644 --- a/bench/Makefile +++ b/bench/Makefile @@ -5,9 +5,9 @@ include ../build-aux/version.mak include ../build-aux/dirs.mak OPTLEVEL?=$(DEFAULT_OPTLEVEL) -CXXFLAGS?=$(OPTLEVEL) +CFLAGS?=$(OPTLEVEL) -CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti +CFLAGS:=$(CFLAGS) -Wall -Wextra BINARIES:=\ benchsyscall \ @@ -21,8 +21,8 @@ install: all mkdir -p $(DESTDIR)$(BINDIR) install $(BINARIES) $(DESTDIR)$(BINDIR) -%: %.cpp - $(CXX) -std=gnu++11 $(CPPFLAGS) $(CXXFLAGS) $< -o $@ +%: %.c + $(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< -o $@ clean: rm -f $(BINARIES) *.o diff --git a/bench/benchctxswitch.cpp b/bench/benchctxswitch.c similarity index 96% rename from bench/benchctxswitch.cpp rename to bench/benchctxswitch.c index b3777f7d..6b3f419e 100644 --- a/bench/benchctxswitch.cpp +++ b/bench/benchctxswitch.c @@ -15,12 +15,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - benchctxswitch.cpp + benchctxswitch.c Benchmarks the speed of context switches. *******************************************************************************/ #include +#include #include #include #include @@ -37,7 +38,7 @@ static int uptime(uintmax_t* usecs) return 0; } -int main(int /*argc*/, char* /*argv*/[]) +int main(void) { pid_t slavepid = fork(); if ( slavepid < 0 ) diff --git a/bench/benchsyscall.cpp b/bench/benchsyscall.c similarity index 95% rename from bench/benchsyscall.cpp rename to bench/benchsyscall.c index 274ae117..89c384ea 100644 --- a/bench/benchsyscall.cpp +++ b/bench/benchsyscall.c @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - - benchsyscall.cpp + benchsyscall.c Benchmarks the speed of system calls. *******************************************************************************/ @@ -35,7 +34,7 @@ static int uptime(uintmax_t* usecs) return 0; } -int main(int /*argc*/, char* /*argv*/[]) +int main(void) { uintmax_t start; if ( uptime(&start) )