File v86d.spec of Package v86d
#
# spec file for package bbswitch
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_with clang
Name: v86d
Version: 0.1.10+3~git.45e0d48
Release: 0
Summary: A x86 Emulation Daemon
License: GPL-2.0-or-later
Group: System/Kernel
URL: http://github.com/mjanusz/v86d
Source0: %{name}-%{version}.tar.xz
#BuildRequires: %{kernel_module_package_buildreqs}
BuildRequires: glibc-devel
#Supplements: packageand(kernel-%1:%{name})
ExclusiveArch: %{ix86} x86_64
%description
v86d provides a backend for kernel drivers that need to execute
x86 BIOS code. The code is executed in a controlled environment
and the results are passed back to the kernel via the netlink
interface.
It's required for uvesafb kernel module to run proper FB on non-EFI systems.
%prep
%autosetup -p1
%build
export CFLAGS="-fPIC -O2 -fno-strict-aliasing"
export CXXFLAGS="${CFLAGS} -fpermissive"
export LDFLAGS="-fPIC -Wl,--sort-common -Wl,-O1"
export MAKE_ARGS="$MAKE_ARGS %{?_smp_mflags}"
%if %{with clang}
export CC=clang CPP='clang -E' CXX=clang++ LD=ld.lld AR=llvm-ar AS=llvm-as NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump RANLIB=llvm-ranlib
export MAKE_ARGS="$MAKE_ARGS LLVM=1 LLVM_IAS=1 CC=clang LD=ld.lld AR=llvm-ar AS=llvm-as NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump RANLIB=llvm-ranlib"
export HOST_EXTRACFLAGS="-v -fPIC -O3 -fno-fast-math -fglobal-isel -fuse-ld=lld"
%endif
./configure --with-debug
%{__make} $MAKE_ARGS
%install
%{__make} install DESTDIR=%{buildroot}
%files
/sbin/testvbe
/sbin/v86d
%changelog