Skip to content

Commit

Permalink
gperftools: enable tests; fix for Rosetta
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 authored and harens committed Jan 28, 2023
1 parent c528b91 commit 418232e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devel/gperftools/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ checksums rmd160 54e35f78813b5409bc6f82e0894b0b8e42ad711a \
sha256 83e3bfdd28b8bcf53222c3798d4d395d52dadbbae59e8730c4a6d31a9c3732d8 \
size 1616679

patchfiles patch-rosetta.diff

compiler.cxx_standard \
2011

test.run yes
test.target check
15 changes: 15 additions & 0 deletions devel/gperftools/files/patch-rosetta.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- src/libc_override_osx.h.orig 2021-12-13 14:28:06.000000000 +0800
+++ src/libc_override_osx.h 2023-01-19 20:14:36.000000000 +0800
@@ -276,9 +276,11 @@
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
// Switch to version 6 on OSX 10.6 to support memalign.
tcmalloc_zone.version = 6;
- tcmalloc_zone.free_definite_size = &mz_free_definite_size;
tcmalloc_zone.memalign = &mz_memalign;
+#ifndef __POWERPC__
+ tcmalloc_zone.free_definite_size = &mz_free_definite_size;
tcmalloc_introspection.zone_locked = &mi_zone_locked;
+#endif

// Request the default purgable zone to force its creation. The
// current default zone is registered with the purgable zone for

0 comments on commit 418232e

Please sign in to comment.