diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-04-01 13:03:30 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-04-01 13:03:30 +0100 |
| commit | 229a2836045d102423688c3af259aab5dfbf520c (patch) | |
| tree | 897b8330b9bcdf124c4e0d43db292997eba104e9 /util/libreboot-utils | |
| parent | 4e72555ac70ecc4fd28624433294d58b6350086a (diff) | |
lbutils: portable options in Makefile
add options for building with urandom+openat and
arc4+openat. useful for emulating a bsd / old linux
environment in modern linux distros, for portability
testing.
these options are not recommended for everyday use.
just use make without any special options, and the
code has build-time OS detection for features like
randomisation/openat2.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils')
| -rw-r--r-- | util/libreboot-utils/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/util/libreboot-utils/Makefile b/util/libreboot-utils/Makefile index efa0aedc..ada729d8 100644 --- a/util/libreboot-utils/Makefile +++ b/util/libreboot-utils/Makefile @@ -14,6 +14,12 @@ DESTDIR = PREFIX = /usr/local INSTALL = install +# used for portability testing on linux: +# +PORT_OPENAT = -DUSE_OPENAT=1 +PORT_ARC4 = -DUSE_ARC4=1 +PORT_URANDOM = -DUSE_URANDOM=1 + .SUFFIXES: .c .o LDIR = @@ -149,3 +155,12 @@ distclean: clean strict: $(MAKE) CFLAGS="$(CFLAGS) $(HELLFLAGS)" CC_MODE="$(HELLCC)" + +# BSD-like portability test (openat + arc4random) +portable-bsd: + $(MAKE) CFLAGS="$(CFLAGS) $(PORT_OPENAT) $(PORT_ARC4)" CC_MODE="$(CC)" + +# fallback portability test (openat + urandom -- old linux mostly) +portable-urandom: + $(MAKE) CFLAGS="$(CFLAGS) $(PORT_OPENAT) $(PORT_URANDOM)" \ + CC_MODE="$(CC)" |
