Skip to content

Issues running under FreeBSD 11 #14

@snigel

Description

@snigel

Tried running tinymembench under FreeBSD 11.

Firstly:

$ make
make: "/home/adam/tinymembench-master/Makefile" line 3: Need an operator
make: "/home/adam/tinymembench-master/Makefile" line 5: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /home/adam/tinymembench-master`

The solution to this was running gmake instead of make.

Secondly:

$ gmake
cc -O2 -c util.c
cc -O2 -c asm-opt.c
cc -O2 -c x86-sse2.S
cc -O2 -c arm-neon.S
:2:1: error: unknown directive
.func aligned_block_read_neon
^
arm-neon.S:43:1: note: while in macro instantiation
asm_function aligned_block_read_neon
^
arm-neon.S:69:1: error: unknown directive
.endfunc`

This is due to clang not supporting those directives.
https://llvm.org/bugs/show_bug.cgi?id=20424

The solution to that was just setting CC = gcc in the make file, but maybe it's possible to omit the .func directives.

After this tinymembench compiles and runs, but it does not run the NEON/VFP/ARM benchmarks.

The problem is in asm-opt.c. The parse_proc_cpuinfo function cannot return sane results on FreeBSD since there is no proc filesystem, so the CPU defaults to ARMv4.
Hardcoding the bench_info *get_asm_benchmarks(void) function to return arm_neon indeed executes the asm benchmarks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions