Accepting request 805364 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/805364
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/Vc?expand=0&rev=13
This commit is contained in:
Dominique Leuenberger 2020-05-13 20:56:54 +00:00 committed by Git OBS Bridge
commit 575345606a
6 changed files with 16 additions and 104 deletions

View File

@ -1,31 +0,0 @@
From 8c722c8eaf6972ac21b44df7decb24c7059cf91c Mon Sep 17 00:00:00 2001
From: adra0 <36550102+adra0@users.noreply.github.com>
Date: Fri, 16 Feb 2018 22:45:18 +0200
Subject: [PATCH] Fix i686 build
Otherwise build fails with the following error:
"
CMake Error at CMakeLists.txt:152 (message):
Unsupported target architecture 'i686'. No support_???.cpp file exists for
this architecture.
"
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41772295..8b915dc7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ include (OptimizeForArchitecture)
vc_determine_compiler()
-if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86|AMD64|amd64)")
+if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(i686|x86|AMD64|amd64)")
set(Vc_X86 TRUE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(arm|aarch32|aarch64)")
message(WARNING "No optimized implementation of the Vc types available for ${CMAKE_SYSTEM_PROCESSOR}")
--
2.19.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e6cfc056eb3a72a57751e768ba63236ebf2711d267fbd1dc0acfee0ac16fdf68
size 628333

3
Vc-1.4.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:68e609a735326dc3625e98bd85258e1329fb2a26ce17f32c432723b750a4119f
size 638797

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed May 13 07:10:56 UTC 2020 - Martin Pluskal <mpluskal@suse.com>
- Update to version 1.4.1:
* No upstream changelog available
- Drop upstreamed patches:
* 0001-Fix-i686-build.patch
* handle-missing-libmvec.patch
-------------------------------------------------------------------
Fri Jul 12 10:11:20 UTC 2019 - Wolfgang Bauer <wbauer@tmo.at>

13
Vc.spec
View File

@ -1,7 +1,7 @@
#
# spec file for package Vc
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2018 Asterios Dramis <asterios.dramis@gmail.com>.
#
# All modifications and additions to the file contributed by third parties
@ -18,17 +18,13 @@
Name: Vc
Version: 1.4.0
Version: 1.4.1
Release: 0
Summary: Collection of SIMD Vector Classes
License: BSD-3-Clause
Group: System/Libraries
Url: https://github.com/VcDevel/Vc/
URL: https://github.com/VcDevel/Vc/
Source0: https://github.com/VcDevel/Vc/releases/download/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM handle-missing-libmvec.patch
Patch0: handle-missing-libmvec.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-Fix-i686-build.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
@ -79,14 +75,13 @@ This package provides the Vc static library.
%prep
%setup -q
%autopatch -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_TESTING=OFF
make %{?_smp_mflags}
%cmake_build
cd ../doc
doxygen

View File

@ -1,61 +0,0 @@
commit 81b3b1ad007766c87a4b99cd0070df97e749b513
Author: Matthias Kretz <kretz@kde.org>
Date: Mon Oct 15 14:19:47 2018 +0200
CMake: Handle missing libmvec and less var pollution
* If libmvec doesn't exist better just skip the rest of the libmvec code
* If it exists, don't keep the libmvec dependency in
CMAKE_REQUIRED_LIBRARIES, but use a temporary variable to restore the
variable after the CHECK_CXX_SOURCE_COMPILES calls.
Fixes: gh-215
Signed-off-by: Matthias Kretz <kretz@kde.org>
diff --git a/cmake/VcMacros.cmake b/cmake/VcMacros.cmake
index 9f4a50ed..684b4ac9 100644
--- a/cmake/VcMacros.cmake
+++ b/cmake/VcMacros.cmake
@@ -174,8 +174,10 @@ macro(vc_set_preferred_compiler_flags)
# Look for libmvec, which provides vectorized implementations of libm
find_library(Vc_LIB_MVEC mvec)
- set(CMAKE_REQUIRED_LIBRARIES ${Vc_LIB_MVEC})
- CHECK_CXX_SOURCE_COMPILES("
+ if(Vc_LIB_MVEC)
+ set(SAFE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
+ set(CMAKE_REQUIRED_LIBRARIES ${Vc_LIB_MVEC})
+ CHECK_CXX_SOURCE_COMPILES("
#include <x86intrin.h>
extern \"C\" {
__m128 _ZGVbN4v_sinf(__m128);
@@ -188,7 +190,7 @@ __m128 f0(__m128 x) { return _ZGVbN4v_cosf(_ZGVbN4v_sinf(x)); }
__m128d f1(__m128d x) { return _ZGVbN2v_cos(_ZGVbN2v_sin(x)); }
int main() { return 0; }
" Vc_HAVE_SSE_SINCOS)
- CHECK_CXX_SOURCE_COMPILES("
+ CHECK_CXX_SOURCE_COMPILES("
#include <x86intrin.h>
extern \"C\" {
__m256 _ZGVdN8v_sinf(__m256);
@@ -201,12 +203,14 @@ __m256 f0(__m256 x) { return _ZGVdN8v_cosf(_ZGVdN8v_sinf(x)); }
__m256d f1(__m256d x) { return _ZGVdN4v_cos(_ZGVdN4v_sin(x)); }
int main() { return 0; }
" Vc_HAVE_AVX_SINCOS)
- if(Vc_LIB_MVEC AND Vc_HAVE_SSE_SINCOS AND Vc_HAVE_AVX_SINCOS)
- option(USE_LIBMVEC "Use GNU's libmvec for vectorized sine and cosine" OFF)
- if(USE_LIBMVEC)
- set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -DVc_HAVE_LIBMVEC=1")
+ set(CMAKE_REQUIRED_LIBRARIES "${SAFE_CMAKE_REQUIRED_LIBRARIES}")
+ if(Vc_HAVE_SSE_SINCOS AND Vc_HAVE_AVX_SINCOS)
+ option(USE_LIBMVEC "Use GNU's libmvec for vectorized sine and cosine" OFF)
+ if(USE_LIBMVEC)
+ set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -DVc_HAVE_LIBMVEC=1")
+ endif()
endif()
- endif()
+ endif(Vc_LIB_MVEC)
set(_add_warning_flags false)
set(_add_buildtype_flags false)