diff --git a/dd_rescue-i586-sse2.diff b/dd_rescue-i586-sse2.diff new file mode 100644 index 0000000..8f2f694 --- /dev/null +++ b/dd_rescue-i586-sse2.diff @@ -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; diff --git a/dd_rescue.changes b/dd_rescue.changes index fbcf2a0..cb0b84f 100644 --- a/dd_rescue.changes +++ b/dd_rescue.changes @@ -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 diff --git a/dd_rescue.spec b/dd_rescue.spec index 7e67720..115c457 100644 --- a/dd_rescue.spec +++ b/dd_rescue.spec @@ -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')