Add libptmalloc3 from #2667
git-svn-id: svn://svn.openwrt.org/openwrt/packages@13159 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d0b3033883
commit
9b9f08047d
45
libs/libptmalloc3/Makefile
Normal file
45
libs/libptmalloc3/Makefile
Normal file
@ -0,0 +1,45 @@
|
||||
# Copyright (C) 2008 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id: $
|
||||
#
|
||||
# Sample usage:
|
||||
# env LD_PRELOAD="/usr/lib/libptmalloc3.so" <application>
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libptmalloc3
|
||||
PKG_VERSION:=20060531
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/ptmalloc3
|
||||
|
||||
PKG_SOURCE:=ptmalloc3-current.tar.gz
|
||||
PKG_SOURCE_URL:=http://www.malloc.de/malloc/
|
||||
PKG_MD5SUM:=c0b9dd5f16f8eae979166dc74b60015c
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libptmalloc3
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Efficient malloc implementation
|
||||
URL:=http://www.malloc.de/en/
|
||||
endef
|
||||
|
||||
# flags: taken from ptmalloc3/Makefile by combining
|
||||
# 'linux-shared' and 'linux-nothreads' targets
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
SYS_FLAGS="$(TARGET_CFLAGS)" \
|
||||
linux-shared-nothreads
|
||||
endef
|
||||
|
||||
define Package/libptmalloc3/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libptmalloc3.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libptmalloc3))
|
20
libs/libptmalloc3/patches/100-nothreads.patch
Normal file
20
libs/libptmalloc3/patches/100-nothreads.patch
Normal file
@ -0,0 +1,20 @@
|
||||
This patch adds an additional target to build a shared library without pthreads
|
||||
(should this be the default? or is the ulibc malloc threadsafe? or should we
|
||||
build two separate packages?)
|
||||
|
||||
--- ptmalloc3/Makefile.orig 2007-11-08 09:10:46.000000000 +0000
|
||||
+++ ptmalloc3/Makefile 2007-11-08 09:17:09.000000000 +0000
|
||||
@@ -150,6 +150,13 @@
|
||||
INC_FLAGS='-Isysdeps/pthread -Isysdeps/generic -I.' M_FLAGS='$(M_FLAGS)' \
|
||||
LIB_MALLOC=libptmalloc3.so
|
||||
|
||||
+linux-shared-nothreads:
|
||||
+ $(MAKE) SYS_FLAGS='-D_GNU_SOURCE=1 -fpic' \
|
||||
+ WARN_FLAGS='-Wall -Wstrict-prototypes' \
|
||||
+ OPT_FLAGS='$(OPT_FLAGS)' THR_FLAGS='' THR_LIBS='' \
|
||||
+ INC_FLAGS='-Isysdeps/generic -I.' M_FLAGS='$(M_FLAGS)' \
|
||||
+ LIB_MALLOC=libptmalloc3.so
|
||||
+
|
||||
sproc:
|
||||
$(MAKE) THR_FLAGS='' THR_LIBS='' OPT_FLAGS='$(OPT_FLAGS)' CC='$(CC)' \
|
||||
INC_FLAGS='-Isysdeps/sproc -Isysdeps/generic -I.' \
|
Loading…
x
Reference in New Issue
Block a user