Accepting request 515971 from home:matz2:branches:Base:System

- Add dd_rescue-i586-sse2.diff to fix dd_rescue compile and
  runtime problems when GCC defaults to SSE2 also on i586
  like with SLE-15.

OBS-URL: https://build.opensuse.org/request/show/515971
OBS-URL: https://build.opensuse.org/package/show/Base:System/dd_rescue?expand=0&rev=33
This commit is contained in:
Ruediger Oertel 2017-08-11 09:19:05 +00:00 committed by Git OBS Bridge
parent 8f229e54bf
commit e6692ee4a4
3 changed files with 41 additions and 1 deletions

31
dd_rescue-i586-sse2.diff Normal file
View File

@ -0,0 +1,31 @@
--- find_nonzero.c.mm 2016-12-28 21:17:50.000000000 +0000
+++ find_nonzero.c 2017-08-10 15:15:27.000000000 +0000
@@ -137,8 +137,8 @@ size_t find_nonzero_rep(const unsigned c
#define TEST_SIMD2(a,b,c,d) TESTC(a,b,c*2,d)
#define TEST2_SIMD2(a,b,c,d) TEST2C(a,b,c*2,d)
#else
-#define TEST_SIMD2(a,b,c,d) if (have_simd) { TESTC(a,b,c*2,d); }
-#define TEST2_SIMD2(a,b,c,d) if (have_simd) { TEST2C(a,b,c*2,d); }
+#define TEST_SIMD2(a,b,c,d) if (have_sse2) { TESTC(a,b,c*2,d); }
+#define TEST2_SIMD2(a,b,c,d) if (have_sse2) { TEST2C(a,b,c*2,d); }
#endif
#else
#define TEST_SIMD2(a,b,c,d) do {} while (0)
--- libddr_hash.c.mm 2015-05-26 08:52:40.000000000 +0000
+++ libddr_hash.c 2017-08-10 15:55:43.000000000 +0000
@@ -108,7 +108,14 @@ int do_pbkdf2(hash_state *state, char* p
int hash_plug_init(void **stat, char* param, int seq, const opt_t *opt)
{
int err = 0;
- hash_state *state = (hash_state*)malloc(sizeof(hash_state));
+ void *buf = 0;
+ hash_state *state; /* = (hash_state*)malloc(sizeof(hash_state));*/
+ if (posix_memalign(&buf, 64, sizeof(hash_state))) {
+ FPLOG(FATAL, "No enough memory for hash state!\n");
+ --err;
+ return err;
+ }
+ state = (hash_state*)buf;
*stat = (void*)state;
memset(state, 0, sizeof(hash_state));
state->seq = seq;

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Aug 10 16:05:11 UTC 2017 - matz@suse.com
- Add dd_rescue-i586-sse2.diff to fix dd_rescue compile and
runtime problems when GCC defaults to SSE2 also on i586
like with SLE-15.
-------------------------------------------------------------------
Tue May 30 13:52:48 UTC 2017 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package dd_rescue
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -27,6 +27,7 @@ Source0: http://garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.bz2
Source1: http://garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.bz2.asc
Source2: %{name}.keyring
Source99: %{name}.changes
Patch0: dd_rescue-i586-sse2.diff
BuildRequires: autoconf
BuildRequires: libattr-devel
BuildRequires: libfallocate-devel
@ -112,6 +113,7 @@ data to the decompressor; the plugin is still young and might expose bugs.
%prep
%setup -q
%patch0
# Remove build time references so build-compare can do its work
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{SOURCE99} '+%%H:%%M')