google/benchmark

Build fails on ppc64le

Open

#449 geöffnet am 27. Sept. 2017

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (1.539 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (7.968 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (19 gemergte PRs in 30 T)

Beschreibung

Hi, I've tried building this on a ppc64le machine (power8) and it fails in src/cycleclock.h:

In file included from /tmp/build/protobuf/third_party/benchmark/src/sysinfo.cc:44:0: /tmp/build/protobuf/third_party/benchmark/src/cycleclock.h: In function 'int64_t benchmark::cycleclock::Now()': /tmp/build/protobuf/third_party/benchmark/src/cycleclock.h:82:23: error: 'int64' does not name a type tbl &= -static_cast(tbu0 == tbu1);

It looks like there is no 64bit ppc timebase instructions. The needed instruction is 'mfspr'. It returns a 64bit unsigned int and no need for low/high bit wrangling.

I'd submit a patch, but I haven't signed the CLA yet. Please let me know if you need a patch and I can get that started.

Contributor Guide