From c32d8a5e2ffc36373545aa5ed1a346a49d4a0e31d698a434e5744372ac6a700b Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 15 Jul 2019 05:31:47 +0000 Subject: [PATCH] Accepting request 715017 from home:aaronpuchert:branches:devel:tools:statica - Use -flto=thin instead of -flto= for Clang. OBS-URL: https://build.opensuse.org/request/show/715017 OBS-URL: https://build.opensuse.org/package/show/devel:tools:statica/klee?expand=0&rev=71 --- klee.changes | 5 +++++ klee.spec | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/klee.changes b/klee.changes index 16ef08f..67158d0 100644 --- a/klee.changes +++ b/klee.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 12 23:35:27 UTC 2019 - Aaron Puchert + +- Use -flto=thin instead of -flto= for Clang. + ------------------------------------------------------------------- Mon Jul 1 23:16:30 UTC 2019 - Aaron Puchert diff --git a/klee.spec b/klee.spec index bca5760..6b22edb 100644 --- a/klee.spec +++ b/klee.spec @@ -81,12 +81,20 @@ sed -i '1s@/usr/bin/env python3*@/usr/bin/python3@' \ tools/ktest-tool/ktest-tool %build +# 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 %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++ \ + -DCMAKE_AR=%{_bindir}/llvm-ar \ + -DCMAKE_RANLIB=%{_bindir}/llvm-ranlib \ -DENABLE_DOXYGEN=OFF \ -DENABLE_SOLVER_STP=ON \ -DENABLE_TCMALLOC=ON \