gperftools: prevent operator delete build failure

Reverts upstream commit

  build sized delete aliases even when sized-delete is disabled
  782165fa7f

Prevents the following build failure when using Xcode >= 7.3:

  Undefined symbols for architecture x86_64:
    "operator delete(void*, unsigned long)", referenced from:
        ProcMapsIterator::~ProcMapsIterator() in libsysinfo.a(sysinfo.o)
        ProcMapsIterator::~ProcMapsIterator() in libsysinfo.a(sysinfo.o)
        tcmalloc::FillProcSelfMaps(char*, int, bool*) in libsysinfo.a(sysinfo.o)
        tcmalloc::DumpProcSelfMaps(int) in libsysinfo.a(sysinfo.o)

Workaround for https:/github.com/gperftools/gperftools/issues/794.

Closes #383.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2016-05-13 02:29:52 -07:00
parent d07396758c
commit 8106f04ce2

View file

@ -3,6 +3,7 @@ class Gperftools < Formula
homepage "https://github.com/gperftools/gperftools"
url "https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz"
sha256 "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173"
head "https://github.com/gperftools/gperftools.git"
bottle do
cellar :any
@ -11,13 +12,32 @@ class Gperftools < Formula
sha256 "6036aafcbbce98242174d9481b14112ec947598452f493878b1394d08e6ca275" => :mavericks
end
# Needed for stable due to the patch; otherwise, just head
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
fails_with :llvm do
build 2326
cause "Segfault during linking"
end
# Prevents build failure on Xcode >= 7.3:
# Undefined symbols for architecture x86_64:
# "operator delete(void*, unsigned long)", referenced from:
# ProcMapsIterator::~ProcMapsIterator() in libsysinfo.a(sysinfo.o)
# Reported 17 April 2016: gperftools/gperftools#794
patch do
url "https://raw.githubusercontent.com/Homebrew/patches/edb49c752c0c02eb9e47bd2ab9788d504fd5b495/gperftools/revert-sized-delete-aliases.patch"
sha256 "49eb4f2ac52ad38723d3bf371e7d682644ef09ee7c1e2e2098e69b6c085153b6"
end
def install
ENV.append_to_cflags "-D_XOPEN_SOURCE"
# Needed for stable due to the patch; otherwise, just head
system "autoreconf", "-fiv"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make"