2017-02-13 12:09:45 +00:00
|
|
|
#
|
|
|
|
# spec file for package klee
|
|
|
|
#
|
2021-01-12 05:27:56 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2017-02-13 12:09:45 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-10-29 16:28:45 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-02-13 12:09:45 +00:00
|
|
|
#
|
|
|
|
|
2018-10-27 07:35:21 +00:00
|
|
|
|
2021-01-12 05:27:56 +00:00
|
|
|
%define llvm_version_major 11
|
2017-06-08 12:15:29 +00:00
|
|
|
%define llvm_version %{llvm_version_major}
|
2017-02-13 12:09:45 +00:00
|
|
|
|
2021-01-12 05:27:56 +00:00
|
|
|
%ifarch x86_64
|
2017-03-02 14:12:24 +00:00
|
|
|
%define with_uclibc 1
|
2017-03-02 14:13:43 +00:00
|
|
|
%else
|
|
|
|
%define with_uclibc 0
|
|
|
|
%endif
|
2017-03-02 14:12:24 +00:00
|
|
|
|
2021-01-12 05:27:56 +00:00
|
|
|
%define runtime_variants Debug,Debug+Asserts,Release,Release+Asserts,Release+Debug,Release+Debug+Asserts
|
|
|
|
|
2017-02-13 12:09:45 +00:00
|
|
|
Name: klee
|
|
|
|
Summary: LLVM Execution Engine
|
|
|
|
License: NCSA
|
|
|
|
Group: Development/Languages/Other
|
2021-02-19 07:19:04 +00:00
|
|
|
Version: 2.2+20210216
|
2017-02-13 12:09:45 +00:00
|
|
|
Release: 0
|
2020-01-24 07:55:33 +00:00
|
|
|
URL: http://klee.github.io/
|
2021-02-19 07:19:04 +00:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
2017-02-13 13:05:59 +00:00
|
|
|
Source1: %{name}-rpmlintrc
|
2020-04-27 05:34:10 +00:00
|
|
|
Source2: https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-%{llvm_version_major}.0.0/llvm/utils/not/not.cpp
|
|
|
|
Source3: https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-%{llvm_version_major}.0.0/llvm/utils/FileCheck/FileCheck.cpp
|
2021-02-19 07:19:04 +00:00
|
|
|
Patch0: 0001-runtime-POSIX-fix-failures-with-glibc-2.33.patch
|
2017-02-13 12:09:45 +00:00
|
|
|
BuildRequires: clang%{llvm_version}
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gperftools-devel
|
2017-03-02 14:12:24 +00:00
|
|
|
%if %{with_uclibc}
|
2017-06-08 12:25:10 +00:00
|
|
|
BuildRequires: klee-uclibc-devel-static(llvm%{llvm_version})
|
2017-03-02 14:12:24 +00:00
|
|
|
%endif
|
2017-02-13 12:09:45 +00:00
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libcap-devel
|
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: llvm%{llvm_version}-devel
|
|
|
|
BuildRequires: ninja
|
2020-01-24 07:55:33 +00:00
|
|
|
BuildRequires: python3
|
2018-06-16 09:13:58 +00:00
|
|
|
BuildRequires: python3-lit
|
2018-01-08 07:19:09 +00:00
|
|
|
BuildRequires: python3-setuptools
|
2019-05-27 09:52:01 +00:00
|
|
|
BuildRequires: python3-tabulate
|
2020-09-24 05:41:11 +00:00
|
|
|
# tests need sqlite3
|
2019-05-27 09:52:01 +00:00
|
|
|
BuildRequires: sqlite3-devel
|
2017-02-13 12:09:45 +00:00
|
|
|
BuildRequires: stp-devel
|
|
|
|
BuildRequires: xz
|
|
|
|
BuildRequires: zlib-devel
|
2020-09-24 05:41:11 +00:00
|
|
|
# 32 bit doesn't build and won't be fixed
|
|
|
|
ExcludeArch: %{ix86} %{arm}
|
2017-02-13 12:09:45 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
KLEE is a symbolic virtual machine built on top of the LLVM compiler
|
|
|
|
infrastructure, and available under the UIUC open source license. For more
|
|
|
|
information on what KLEE is and what it can do, see the OSDI 2008 paper.
|
|
|
|
|
|
|
|
%prep
|
2021-02-19 07:19:04 +00:00
|
|
|
%autosetup -p1
|
2018-01-24 07:59:22 +00:00
|
|
|
|
2017-03-17 12:47:13 +00:00
|
|
|
mkdir -p build/test/
|
|
|
|
cp %{SOURCE2} build/test/
|
2017-06-08 12:15:29 +00:00
|
|
|
cp %{SOURCE3} build/test/
|
2017-02-13 12:09:45 +00:00
|
|
|
|
2019-02-25 10:31:13 +00:00
|
|
|
sed -i '1s@/usr/bin/env python3*@/usr/bin/python3@' \
|
|
|
|
test/Concrete/ConcreteTest.py \
|
2018-01-15 07:50:21 +00:00
|
|
|
tools/klee-stats/klee-stats \
|
2020-09-23 08:07:25 +00:00
|
|
|
tools/klee-zesti/klee-zesti \
|
2018-01-15 07:50:21 +00:00
|
|
|
tools/ktest-tool/ktest-tool
|
|
|
|
|
2017-02-13 12:09:45 +00:00
|
|
|
%build
|
2019-07-15 05:31:47 +00:00
|
|
|
# Make _lto_cflags compatible with Clang. On some arches, it doesn't work.
|
|
|
|
%ifarch x86_64 %{ix86} ppc64le s390x
|
|
|
|
%define _lto_cflags "-flto=thin"
|
|
|
|
%else
|
|
|
|
%define _lto_cflags %{nil}
|
|
|
|
%endif
|
2017-02-13 12:09:45 +00:00
|
|
|
%define __builder ninja
|
|
|
|
# they use -DNDEBUG, but we cannot, hence setting CMAKE_C*_FLAGS
|
|
|
|
# SHARED libs do not work at all yet
|
|
|
|
%cmake \
|
|
|
|
-DCMAKE_C_COMPILER=clang \
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
2019-07-15 05:31:47 +00:00
|
|
|
-DCMAKE_AR=%{_bindir}/llvm-ar \
|
|
|
|
-DCMAKE_RANLIB=%{_bindir}/llvm-ranlib \
|
2020-04-27 05:34:10 +00:00
|
|
|
-DENABLE_KLEE_ASSERTS=OFF \
|
2017-02-13 12:09:45 +00:00
|
|
|
-DENABLE_DOXYGEN=OFF \
|
|
|
|
-DENABLE_SOLVER_STP=ON \
|
|
|
|
-DENABLE_TCMALLOC=ON \
|
|
|
|
-DENABLE_UNIT_TESTS=OFF \
|
2017-03-17 12:47:13 +00:00
|
|
|
-DENABLE_SYSTEM_TESTS=ON \
|
2017-02-13 12:09:45 +00:00
|
|
|
-DCMAKE_C_FLAGS="%optflags" \
|
|
|
|
-DCMAKE_CXX_FLAGS="%optflags" \
|
2017-03-02 14:12:24 +00:00
|
|
|
%if %{with_uclibc}
|
|
|
|
-DENABLE_POSIX_RUNTIME=ON \
|
|
|
|
-DENABLE_KLEE_UCLIBC=ON \
|
|
|
|
-DKLEE_UCLIBC_PATH=%{_libdir}/klee-uclibc/ \
|
|
|
|
%endif
|
2017-02-13 12:09:45 +00:00
|
|
|
-DBUILD_SHARED_LIBS:BOOL=OFF
|
2020-01-24 07:55:33 +00:00
|
|
|
%cmake_build
|
2017-02-13 12:09:45 +00:00
|
|
|
|
2017-03-17 12:47:13 +00:00
|
|
|
%check
|
2017-03-18 12:33:31 +00:00
|
|
|
%ifarch x86_64
|
2017-03-17 12:47:13 +00:00
|
|
|
cd build
|
|
|
|
ninja check
|
2017-03-18 12:33:31 +00:00
|
|
|
%endif
|
2017-03-17 12:47:13 +00:00
|
|
|
|
2017-02-13 12:09:45 +00:00
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2019-05-27 09:52:01 +00:00
|
|
|
%doc NEWS README.md
|
2018-10-29 16:29:13 +00:00
|
|
|
%license LICENSE.TXT
|
2018-10-27 12:07:05 +00:00
|
|
|
%{_bindir}/gen-bout
|
2017-02-13 12:09:45 +00:00
|
|
|
%{_bindir}/gen-random-bout
|
|
|
|
%{_bindir}/kleaver
|
|
|
|
%{_bindir}/klee
|
|
|
|
%{_bindir}/klee-replay
|
|
|
|
%{_bindir}/klee-stats
|
2020-09-23 08:07:25 +00:00
|
|
|
%{_bindir}/klee-zesti
|
2017-02-13 12:09:45 +00:00
|
|
|
%{_bindir}/ktest-tool
|
|
|
|
%{_includedir}/klee/
|
|
|
|
%{_libdir}/libkleeRuntest.so*
|
|
|
|
%dir %{_libdir}/klee/
|
|
|
|
%dir %{_libdir}/klee/runtime/
|
2021-01-12 05:27:56 +00:00
|
|
|
%{_libdir}/klee/runtime/libkleeRuntimeFortify*_{%{runtime_variants}}.bca
|
|
|
|
%{_libdir}/klee/runtime/libkleeRuntimeFreestanding*_{%{runtime_variants}}.bca
|
|
|
|
%{_libdir}/klee/runtime/libkleeRuntimeIntrinsic*_{%{runtime_variants}}.bca
|
|
|
|
%{_libdir}/klee/runtime/libkleeRuntimeKLEELibc*_{%{runtime_variants}}.bca
|
2017-03-02 14:16:34 +00:00
|
|
|
%if %{with_uclibc}
|
|
|
|
%{_libdir}/klee/runtime/klee-uclibc.bca
|
2021-01-12 05:27:56 +00:00
|
|
|
%{_libdir}/klee/runtime/libkleeRuntimePOSIX*_{%{runtime_variants}}.bca
|
2017-03-02 14:16:34 +00:00
|
|
|
%endif
|
2017-02-13 12:09:45 +00:00
|
|
|
|
|
|
|
%changelog
|