2011-10-13 18:05:06 +02:00
|
|
|
#
|
|
|
|
# spec file for package jemalloc
|
|
|
|
#
|
2015-09-16 10:53:50 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-10-13 18:05:06 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2013-01-24 12:03:44 +01:00
|
|
|
|
2011-10-23 09:02:58 +02:00
|
|
|
Name: jemalloc
|
2015-10-24 20:10:39 +02:00
|
|
|
Version: 4.0.4
|
2011-10-23 09:02:58 +02:00
|
|
|
Release: 0
|
2015-09-16 10:53:50 +02:00
|
|
|
%define lname libjemalloc2
|
2011-10-23 09:02:58 +02:00
|
|
|
Summary: General-purpose scalable concurrent malloc implementation
|
2013-01-24 12:03:44 +01:00
|
|
|
License: BSD-2-Clause
|
2011-10-23 09:02:58 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2013-01-24 12:03:44 +01:00
|
|
|
Url: http://canonware.com/jemalloc/
|
2012-09-04 10:28:27 +02:00
|
|
|
|
|
|
|
#Git-Clone: git://canonware.com/jemalloc
|
2013-01-24 12:03:44 +01:00
|
|
|
Source: http://www.canonware.com/download/jemalloc/jemalloc-%{version}.tar.bz2
|
2011-10-23 09:02:58 +02:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
BuildRequires: libxslt
|
2015-09-16 10:53:50 +02:00
|
|
|
BuildRequires: pkgconfig
|
2011-10-23 09:02:58 +02:00
|
|
|
Requires: %lname = %{version}
|
2013-01-24 12:03:44 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
jemalloc is a general-purpose scalable concurrent malloc(3) implementation.
|
|
|
|
This package provides a shell wrapper script to run programs using jemalloc.
|
|
|
|
|
|
|
|
%package -n %lname
|
2011-10-23 09:02:58 +02:00
|
|
|
Summary: General-purpose scalable concurrent malloc implementation
|
|
|
|
Group: System/Libraries
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
General-purpose scalable concurrent malloc(3) implementation.
|
|
|
|
This distribution is the stand-alone "portable" version of jemalloc.
|
|
|
|
|
|
|
|
%package devel
|
2011-10-23 09:02:58 +02:00
|
|
|
Summary: Development files for jemalloc
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname = %{version}
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Headers for jemalloc, general-purpose scalable concurrent malloc(3)
|
|
|
|
implementation.
|
|
|
|
|
|
|
|
%package devel-static
|
2011-10-23 09:02:58 +02:00
|
|
|
Summary: Static libraries for jemalloc
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name}-devel = %{version}
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%description devel-static
|
|
|
|
Static libraries of jemalloc, general-purpose scalable concurrent
|
|
|
|
malloc(3) implementation.
|
|
|
|
|
|
|
|
%prep
|
2012-09-04 10:28:27 +02:00
|
|
|
%setup -q
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%build
|
2014-01-30 13:10:40 +01:00
|
|
|
export EXTRA_CFLAGS="%{optflags} -std=gnu99"
|
2014-03-31 11:27:21 +02:00
|
|
|
%configure --enable-cc-silence \
|
|
|
|
--enable-prof
|
- Update to version 3.5.0
* Add the *allocx() API, which is a successor to the experimental *allocm()
API. The *allocx() functions are slightly simpler to use because they have
fewer parameters, they directly return the results of primary interest, and
mallocx()/rallocx() avoid the strict aliasing pitfall that
allocm()/rallocx() share with posix_memalign(). Note that *allocm() is
slated for removal in the next non-bugfix release.
* Add support for LinuxThreads.
* Unless heap profiling is enabled, disable floating point code and don't link
with libm. This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64
systems, makes it possible to completely disable floating point register
use. Some versions of glibc neglect to save/restore caller-saved floating
point registers during dynamic lazy symbol loading, and the symbol loading
code uses whatever malloc the application happens to have linked/loaded
with, the result being potential floating point register corruption.
* Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling
backtrace creation in imemalign(). This bug impacted posix_memalign() and
aligned_alloc().
* Fix a file descriptor leak in a prof_dump_maps() error path.
* Fix prof_dump() to close the dump file descriptor for all relevant error
paths.
* Fix rallocm() to use the arena specified by the ALLOCM_ARENA(s) flag for
allocation, not just deallocation.
* Fix a data race for large allocation stats counters.
* Fix a potential infinite loop during thread exit. This bug occurred on
Solaris, and could affect other platforms with similar pthreads TSD
implementations.
* Don't junk-fill reallocations unless usable size changes. This fixes a
violation of the *allocx()/*allocm() semantics.
* Fix growing large reallocation to junk fill new space.
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jemalloc?expand=0&rev=17
2014-01-24 13:22:56 +01:00
|
|
|
make %{?_smp_mflags}
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%install
|
2011-10-23 09:02:58 +02:00
|
|
|
b=%{buildroot};
|
- Update to version 3.5.0
* Add the *allocx() API, which is a successor to the experimental *allocm()
API. The *allocx() functions are slightly simpler to use because they have
fewer parameters, they directly return the results of primary interest, and
mallocx()/rallocx() avoid the strict aliasing pitfall that
allocm()/rallocx() share with posix_memalign(). Note that *allocm() is
slated for removal in the next non-bugfix release.
* Add support for LinuxThreads.
* Unless heap profiling is enabled, disable floating point code and don't link
with libm. This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64
systems, makes it possible to completely disable floating point register
use. Some versions of glibc neglect to save/restore caller-saved floating
point registers during dynamic lazy symbol loading, and the symbol loading
code uses whatever malloc the application happens to have linked/loaded
with, the result being potential floating point register corruption.
* Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling
backtrace creation in imemalign(). This bug impacted posix_memalign() and
aligned_alloc().
* Fix a file descriptor leak in a prof_dump_maps() error path.
* Fix prof_dump() to close the dump file descriptor for all relevant error
paths.
* Fix rallocm() to use the arena specified by the ALLOCM_ARENA(s) flag for
allocation, not just deallocation.
* Fix a data race for large allocation stats counters.
* Fix a potential infinite loop during thread exit. This bug occurred on
Solaris, and could affect other platforms with similar pthreads TSD
implementations.
* Don't junk-fill reallocations unless usable size changes. This fixes a
violation of the *allocx()/*allocm() semantics.
* Fix growing large reallocation to junk fill new space.
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jemalloc?expand=0&rev=17
2014-01-24 13:22:56 +01:00
|
|
|
make install DESTDIR="$b"
|
|
|
|
|
|
|
|
chmod -x "%{buildroot}/%{_libdir}"/*.a
|
2013-06-06 12:53:25 +02:00
|
|
|
|
2011-10-23 09:02:58 +02:00
|
|
|
if [ "%_docdir" != "%{_datadir}/doc" ]; then
|
2011-10-13 18:05:06 +02:00
|
|
|
# stupid Makefile does not allow to set it
|
|
|
|
mkdir -p "$b/%_docdir";
|
2011-10-23 09:02:58 +02:00
|
|
|
mv "$b/%{_datadir}/doc/jemalloc" "$b/%_docdir/%{name}";
|
2011-10-13 18:05:06 +02:00
|
|
|
fi;
|
|
|
|
|
2013-03-07 21:58:42 +01:00
|
|
|
%check
|
2014-01-30 13:10:40 +01:00
|
|
|
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
|
2013-03-07 21:58:42 +01:00
|
|
|
make check
|
|
|
|
|
2011-10-13 18:05:06 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2011-10-23 09:02:58 +02:00
|
|
|
%{_bindir}/jemalloc.sh
|
2015-09-16 10:53:50 +02:00
|
|
|
%{_bindir}/jemalloc-config
|
|
|
|
%{_bindir}/jeprof
|
2011-10-23 09:02:58 +02:00
|
|
|
%{_mandir}/man*/*
|
|
|
|
%_docdir/%{name}
|
2011-10-13 18:05:06 +02:00
|
|
|
|
2015-09-16 10:53:50 +02:00
|
|
|
%files -n %{lname}
|
2011-10-13 18:05:06 +02:00
|
|
|
%defattr(-,root,root)
|
2015-09-16 10:53:50 +02:00
|
|
|
%doc ChangeLog COPYING README
|
|
|
|
%{_libdir}/libjemalloc.so.2*
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
2011-10-23 09:02:58 +02:00
|
|
|
%{_includedir}/jemalloc
|
|
|
|
%{_libdir}/libjemalloc.so
|
2015-09-16 10:53:50 +02:00
|
|
|
%{_libdir}/pkgconfig/jemalloc.pc
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root,-)
|
2011-10-23 09:02:58 +02:00
|
|
|
%{_libdir}/libjemalloc*.a
|
2011-10-13 18:05:06 +02:00
|
|
|
|
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
2012-09-04 10:28:27 +02:00
|
|
|
|
|
|
|
%changelog
|