Merge pull request #5679 from t184256/optional-libcpuid
Document libcpuid dependency and make it optional
This commit is contained in:
commit
99804465af
11
configure.ac
11
configure.ac
|
@ -195,10 +195,17 @@ PKG_CHECK_MODULES([SODIUM], [libsodium], [CXXFLAGS="$SODIUM_CFLAGS $CXXFLAGS"])
|
||||||
PKG_CHECK_MODULES([LIBBROTLI], [libbrotlienc libbrotlidec], [CXXFLAGS="$LIBBROTLI_CFLAGS $CXXFLAGS"])
|
PKG_CHECK_MODULES([LIBBROTLI], [libbrotlienc libbrotlidec], [CXXFLAGS="$LIBBROTLI_CFLAGS $CXXFLAGS"])
|
||||||
|
|
||||||
# Look for libcpuid.
|
# Look for libcpuid.
|
||||||
|
have_libcpuid=
|
||||||
if test "$machine_name" = "x86_64"; then
|
if test "$machine_name" = "x86_64"; then
|
||||||
PKG_CHECK_MODULES([LIBCPUID], [libcpuid], [CXXFLAGS="$LIBCPUID_CFLAGS $CXXFLAGS"])
|
AC_ARG_ENABLE([cpuid],
|
||||||
|
AS_HELP_STRING([--disable-cpuid], [Do not determine microarchitecture levels with libcpuid (relevant to x86_64 only)]))
|
||||||
|
if test "x$enable_cpuid" != "xno"; then
|
||||||
|
PKG_CHECK_MODULES([LIBCPUID], [libcpuid],
|
||||||
|
[CXXFLAGS="$LIBCPUID_CFLAGS $CXXFLAGS"
|
||||||
have_libcpuid=1
|
have_libcpuid=1
|
||||||
AC_DEFINE([HAVE_LIBCPUID], [1], [Use libcpuid])
|
AC_DEFINE([HAVE_LIBCPUID], [1], [Use libcpuid])]
|
||||||
|
)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST(HAVE_LIBCPUID, [$have_libcpuid])
|
AC_SUBST(HAVE_LIBCPUID, [$have_libcpuid])
|
||||||
|
|
||||||
|
|
|
@ -58,3 +58,11 @@
|
||||||
`--disable-seccomp-sandboxing` option to the `configure` script (Not
|
`--disable-seccomp-sandboxing` option to the `configure` script (Not
|
||||||
recommended unless your system doesn't support `libseccomp`). To get
|
recommended unless your system doesn't support `libseccomp`). To get
|
||||||
the library, visit <https://github.com/seccomp/libseccomp>.
|
the library, visit <https://github.com/seccomp/libseccomp>.
|
||||||
|
|
||||||
|
- On 64-bit x86 machines only, `libcpuid` library
|
||||||
|
is used to determine which microarchitecture levels are supported
|
||||||
|
(e.g., as whether to have `x86_64-v2-linux` among additional system types).
|
||||||
|
The library is available from its homepage
|
||||||
|
<http://libcpuid.sourceforge.net>.
|
||||||
|
This is an optional dependency and can be disabled
|
||||||
|
by providing a `--disable-cpuid` to the `configure` script.
|
||||||
|
|
|
@ -48,7 +48,6 @@ nix_tests = \
|
||||||
flakes.sh \
|
flakes.sh \
|
||||||
flake-local-settings.sh \
|
flake-local-settings.sh \
|
||||||
build.sh \
|
build.sh \
|
||||||
compute-levels.sh \
|
|
||||||
repl.sh ca/repl.sh \
|
repl.sh ca/repl.sh \
|
||||||
ca/build.sh \
|
ca/build.sh \
|
||||||
ca/build-with-garbage-path.sh \
|
ca/build-with-garbage-path.sh \
|
||||||
|
@ -63,6 +62,10 @@ nix_tests = \
|
||||||
eval-store.sh
|
eval-store.sh
|
||||||
# parallel.sh
|
# parallel.sh
|
||||||
|
|
||||||
|
ifeq ($(HAVE_LIBCPUID), 1)
|
||||||
|
nix_tests += compute-levels.sh
|
||||||
|
endif
|
||||||
|
|
||||||
install-tests += $(foreach x, $(nix_tests), tests/$(x))
|
install-tests += $(foreach x, $(nix_tests), tests/$(x))
|
||||||
|
|
||||||
tests-environment = NIX_REMOTE= $(bash) -e
|
tests-environment = NIX_REMOTE= $(bash) -e
|
||||||
|
|
Loading…
Reference in a new issue