This is an archive of the discontinued LLVM Phabricator instance.

[test-suite] Fix OpenBSD build
ClosedPublic

Authored by brad on Mar 18 2023, 7:55 PM.

Details

Summary
  • Some fixes or workarounds (JM) for not having sys/timeb.h / ftime().
  • Use rusage() in minisat.
  • Use termios in office-ispell.
  • Don't try to use memalign() in oourafft.
  • For 2005-05-11-Popcount-ffs-fls, OpenBSD does not have ffsl() yet.

Diff Detail

Repository
rT test-suite

Event Timeline

brad created this revision.Mar 18 2023, 7:55 PM
brad requested review of this revision.Mar 18 2023, 7:55 PM
dim accepted this revision.Mar 19 2023, 3:48 AM

LGTM

MultiSource/Applications/SPASS/clock.h
52

These CLOCK_NO_TIMING parts are because we don't really care about the actual timing, just if the program runs correctly, right?

SingleSource/Benchmarks/Misc/oourafft.c
6

Just a nit, but maybe this collection of #if statements should simply be ripped out and replaced by one #define ? :) Not terribly important though.

SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c
82

What's the XXX for? In FreeBSD we have ffsl() in <strings.h>, but maybe at some point OpenBSD will get that too?

This revision is now accepted and ready to land.Mar 19 2023, 3:48 AM
brad added inline comments.Mar 19 2023, 3:57 AM
SingleSource/Benchmarks/Misc/oourafft.c
6

Just a nit, but maybe this collection of #if statements should simply be ripped out and replaced by one #define ? :) Not terribly important though.

Well sometimes if there is room for simplifying or improving things like this I don't mind.

Looking at this from the other way around, what OS's do need memalign() as patching for this I know there are not a lot of OS's that do have memalign(). Solaris and Linux are not listed.

SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c
82

What's the XXX for? In FreeBSD we have ffsl() in <strings.h>, but maybe at some point OpenBSD will get that too?

As a reminder to be removed when OpenBSD does have the proper function.

brad edited the summary of this revision. (Show Details)Mar 19 2023, 4:02 AM
This revision was automatically updated to reflect the committed changes.