jemalloc/jemalloc.spec
Ismail Dönmez 2957130e12 - 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 12:22:56 +00:00

116 lines
3.1 KiB
RPMSpec

#
# spec file for package jemalloc
#
# Copyright (c) 2014 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
# 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/
#
Name: jemalloc
Version: 3.5.0
Release: 0
%define lname libjemalloc1
Summary: General-purpose scalable concurrent malloc implementation
License: BSD-2-Clause
Group: Development/Libraries/C and C++
Url: http://canonware.com/jemalloc/
#Git-Clone: git://canonware.com/jemalloc
Source: http://www.canonware.com/download/jemalloc/jemalloc-%{version}.tar.bz2
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
Requires: %lname = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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
Summary: General-purpose scalable concurrent malloc implementation
Group: System/Libraries
%description -n %lname
General-purpose scalable concurrent malloc(3) implementation.
This distribution is the stand-alone "portable" version of jemalloc.
%package devel
Summary: Development files for jemalloc
Group: Development/Libraries/C and C++
Requires: %lname = %{version}
%description devel
Headers for jemalloc, general-purpose scalable concurrent malloc(3)
implementation.
%package devel-static
Summary: Static libraries for jemalloc
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
%description devel-static
Static libraries of jemalloc, general-purpose scalable concurrent
malloc(3) implementation.
%prep
%setup -q
%build
export CFLAGS="%{optflags} -g2 -std=gnu99"
%configure --enable-cc-silence \
--enable-prof
make %{?_smp_mflags}
%install
b=%{buildroot};
make install DESTDIR="$b"
chmod -x "%{buildroot}/%{_libdir}"/*.a
if [ "%_docdir" != "%{_datadir}/doc" ]; then
# stupid Makefile does not allow to set it
mkdir -p "$b/%_docdir";
mv "$b/%{_datadir}/doc/jemalloc" "$b/%_docdir/%{name}";
fi;
mv %{buildroot}/%{_bindir}/pprof %{buildroot}/%{_bindir}/pprof-jemalloc
%check
make check
%files
%defattr(-,root,root)
%{_bindir}/jemalloc.sh
%{_bindir}/pprof-jemalloc
%{_mandir}/man*/*
%_docdir/%{name}
%files -n %lname
%defattr(-,root,root)
%{_libdir}/libjemalloc.so.1*
%files devel
%defattr(-,root,root,-)
%{_includedir}/jemalloc
%{_libdir}/libjemalloc.so
%files devel-static
%defattr(-,root,root,-)
%{_libdir}/libjemalloc*.a
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%changelog