Hello community, here is the log from the commit of package zlib for openSUSE:Factory checked in at Mon Aug 29 09:12:25 CEST 2011. -------- --- zlib/zlib.changes 2011-06-27 13:07:04.000000000 +0200 +++ /mounts/work_src_done/STABLE/zlib/zlib.changes 2011-08-26 20:39:55.000000000 +0200 @@ -1,0 +2,8 @@ +Fri Aug 26 18:36:11 UTC 2011 - crrodriguez@opensuse.org + +- Use __attribute__ target in SSE optimized functions + so the compiler defines __MMX__ __SSE__ etc, this probably + only matters in 32 bit. what version to use is still + determined at runtime by cpuid. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- zlib-adler-target-attr.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zlib.spec ++++++ --- /var/tmp/diff_new_pack.0gXJsX/_old 2011-08-29 09:11:01.000000000 +0200 +++ /var/tmp/diff_new_pack.0gXJsX/_new 2011-08-29 09:11:01.000000000 +0200 @@ -28,7 +28,7 @@ %endif # Version: 1.2.5_git201105272030 -Release: 15 +Release: 17 Summary: Data Compression Library Url: http://www.zlib.net/ # git://github.com/kaffeemonster/zlib_adler32_vec.git @@ -43,6 +43,7 @@ Patch2: zlib-parallel.patch # PATCH-FIX-UPSTREAM: bnc#679345 --return NULL checks from 1.2.3 removed by upstream Patch3: zlib-1.2.5-gzopen-null-check.patch +Patch4: zlib-adler-target-attr.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pkgconfig @@ -88,8 +89,10 @@ %patch1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build +export LDFLAGS="-Wl,-z,relro,-z,now" # Marcus: breaks example64 in 32bit builds. %define do_profiling 0 %if %{do_profiling} @@ -141,7 +144,7 @@ %files devel %defattr(-,root,root) %doc README ChangeLog -%doc %{_mandir}/man3/zlib.3.gz +%{_mandir}/man3/zlib.3.gz %{_includedir}/zlib.h %{_includedir}/zconf.h %{_includedir}/zutil.h ++++++ zlib-adler-target-attr.patch ++++++ diff --git a/x86/adler32.c b/x86/adler32.c index 3f66f54..a941438 100644 --- a/x86/adler32.c +++ b/x86/adler32.c @@ -20,6 +20,19 @@ # define VEC_NO_GO #endif +#if GCC_VERSION_GE(404) +#define GCC_ATTR_MMX __attribute__((__target__("mmx"))) +#define GCC_ATTR_SSE __attribute__((__target__("sse"))) +#define GCC_ATTR_SSE2 __attribute__((__target__("sse2"))) +#define GCC_ATTR_SSSE3 __attribute__((__target__("ssse3"))) +#else +#define GCC_ATTR_MMX +#define GCC_ATTR_SSE +#define GCC_ATTR_SSE2 +#define GCC_ATTR_SSSE3 +#endif + + /* inline asm, so only on GCC (or compatible) */ #if defined(__GNUC__) && !defined(VEC_NO_GO) # define HAVE_ADLER32_VEC @@ -240,7 +253,7 @@ local noinline const Bytef *adler32_jumped(buf, s1, s2, k) #endif /* ========================================================================= */ -local uLong adler32_SSSE3(adler, buf, len) +local GCC_ATTR_SSSE3 uLong adler32_SSSE3(adler, buf, len) uLong adler; const Bytef *buf; uInt len; @@ -383,7 +396,7 @@ local uLong adler32_SSSE3(adler, buf, len) } /* ========================================================================= */ -local uLong adler32_SSE2(adler, buf, len) +local GCC_ATTR_SSE2 uLong adler32_SSE2(adler, buf, len) uLong adler; const Bytef *buf; uInt len; @@ -604,7 +617,7 @@ local noinline uLong adler32_SSE2_no_oooe(adler, buf, len) /* * SSE version to help VIA-C3_2, P2 & P3 */ -local uLong adler32_SSE(adler, buf, len) +local GCC_ATTR_SSE uLong adler32_SSE(adler, buf, len) uLong adler; const Bytef *buf; uInt len; @@ -740,7 +753,7 @@ local uLong adler32_SSE(adler, buf, len) * (maybe except AMD K6, Cyrix, Winchip/VIA). * I did my best to get at least 1 instruction between result -> use */ -local uLong adler32_MMX(adler, buf, len) +local GCC_ATTR_MMX uLong adler32_MMX(adler, buf, len) uLong adler; const Bytef *buf; uInt len; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org