[package] add dmalloc, patch from Raphael Huck
git-svn-id: svn://svn.openwrt.org/openwrt/packages@20300 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5043dff865
commit
0e1f2d8e30
77
devel/dmalloc/Makefile
Normal file
77
devel/dmalloc/Makefile
Normal file
@ -0,0 +1,77 @@
|
||||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dmalloc
|
||||
PKG_VERSION:=5.5.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
|
||||
PKG_SOURCE_URL:=http://dmalloc.com/releases/
|
||||
PKG_MD5SUM:=f92e5606c23a8092f3d5694e8d1c932e
|
||||
|
||||
PKG_FIXUP:=libtool
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dmalloc/Default
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=Dmalloc
|
||||
URL:=http://www.dmalloc.com/
|
||||
endef
|
||||
|
||||
define Package/libdmalloc
|
||||
$(call Package/dmalloc/Default)
|
||||
TITLE+= (library)
|
||||
endef
|
||||
|
||||
define Package/dmalloc-utils
|
||||
$(call Package/dmalloc/Default)
|
||||
DEPENDS:=+libdmalloc
|
||||
TITLE+= (utilities)
|
||||
endef
|
||||
|
||||
define Package/dmalloc/description
|
||||
The debug memory allocation or dmalloc library has been designed as a drop in
|
||||
replacement for the system's malloc, realloc, calloc, free and other memory
|
||||
management routines while providing powerful debugging facilities configurable
|
||||
at runtime. These facilities include such things as memory-leak tracking,
|
||||
fence-post write detection, file/line number reporting, and general logging of
|
||||
statistics.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-cxx \
|
||||
--with-pagesize=12
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
|
||||
MAKE_INSTALL_FLAGS += installsl
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dmalloc.h $(1)/usr/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.{a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libdmalloc/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/dmalloc-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmalloc $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libdmalloc))
|
||||
$(eval $(call BuildPackage,dmalloc-utils))
|
44
devel/dmalloc/patches/100-configure_pagesize.patch
Normal file
44
devel/dmalloc/patches/100-configure_pagesize.patch
Normal file
@ -0,0 +1,44 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -857,6 +857,11 @@ Optional Features:
|
||||
--enable-threads build in thread support (disabled by default)
|
||||
--enable-shlib build shared libraries (disabled by default)
|
||||
|
||||
+Optional Packages:
|
||||
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
+ --with-pagesize=nbits log base 2 of machine page size
|
||||
+
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
@@ -5307,6 +5312,14 @@ done
|
||||
echo "$as_me:$LINENO: checking basic-block size" >&5
|
||||
echo $ECHO_N "checking basic-block size... $ECHO_C" >&6
|
||||
ac_cv_page_size=0
|
||||
+
|
||||
+# Check whether --with-pagesize or --without-pagesize was given.
|
||||
+if test "${with_pagesize+set}" = set; then
|
||||
+ withval="$with_pagesize"
|
||||
+ case "$withval" in ?|1?) ac_cv_page_size=$withval; esac
|
||||
+else
|
||||
+ : # default to probing, set above
|
||||
+fi;
|
||||
if test $ac_cv_page_size = 0; then
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -349,6 +349,12 @@ AC_MSG_RESULT([$ac_cv_use_mmap])
|
||||
AC_CHECK_FUNCS(getpagesize)
|
||||
AC_MSG_CHECKING([basic-block size])
|
||||
ac_cv_page_size=0
|
||||
+AC_ARG_WITH(pagesize,
|
||||
+ [ AC_HELP_STRING([--with-pagesize=nbits],
|
||||
+ [log base 2 of machine page size] ) ],
|
||||
+ [ case "$withval" in ?|1?) ac_cv_page_size=$withval; esac ],
|
||||
+ [ : # default to probing, set above ],
|
||||
+)
|
||||
if test $ac_cv_page_size = 0; then
|
||||
AC_RUN_IFELSE([main() { if (getpagesize()<=2048) exit(0); else exit(1); }],
|
||||
[ ac_cv_page_size=11 ] )
|
38
devel/dmalloc/patches/110-configure_cxx.patch
Normal file
38
devel/dmalloc/patches/110-configure_cxx.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -56,10 +56,11 @@ AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
# see if we actually have a CXX program
|
||||
-if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then
|
||||
- AC_MSG_WARN(could not find C++ compiler $ac_cv_prog_CXX)
|
||||
- enable_cxx=no
|
||||
-fi
|
||||
+# FIXME: always returns no
|
||||
+#if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then
|
||||
+# AC_MSG_WARN(could not find C++ compiler $ac_cv_prog_CXX)
|
||||
+# enable_cxx=no
|
||||
+#fi
|
||||
|
||||
# hopefully we have a stdc c-compiler
|
||||
if test "$ac_cv_prog_cc_stdc" = "no" ; then
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -2648,11 +2648,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
# see if we actually have a CXX program
|
||||
-if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then
|
||||
- { echo "$as_me:$LINENO: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&5
|
||||
-echo "$as_me: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&2;}
|
||||
- enable_cxx=no
|
||||
-fi
|
||||
+# FIXME: always returns no
|
||||
+#if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then
|
||||
+# { echo "$as_me:$LINENO: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&5
|
||||
+#echo "$as_me: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&2;}
|
||||
+# enable_cxx=no
|
||||
+#fi
|
||||
|
||||
# hopefully we have a stdc c-compiler
|
||||
if test "$ac_cv_prog_cc_stdc" = "no" ; then
|
305
devel/dmalloc/patches/120-makefile_shared.patch
Normal file
305
devel/dmalloc/patches/120-makefile_shared.patch
Normal file
@ -0,0 +1,305 @@
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -41,7 +41,7 @@ LIBRARY = lib$(MODULE).a
|
||||
|
||||
# thread version of the library
|
||||
LIB_TH = lib$(MODULE)th.a
|
||||
-LIB_TH_SL = lib$(MODULE)th.@shlibext@
|
||||
+LIB_TH_SL = lib$(MODULE)th.@shlibext@.5.5.2
|
||||
@TH_ON@BUILD_ALL_1 = threads
|
||||
@TH_ON@INSTALL_LIB_1 = installth
|
||||
@SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL)
|
||||
@@ -50,8 +50,8 @@ LIB_TH_SL = lib$(MODULE)th.@shlibext@
|
||||
@TH_ON@@SL_ON@INSTALL_LIB_2 = installthsl
|
||||
|
||||
# C++ version of the library
|
||||
-LIB_CXX = lib$(MODULE)xx.a
|
||||
-LIB_CXX_SL = lib$(MODULE)xx.@shlibext@
|
||||
+LIB_CXX = lib$(MODULE)cxx.a
|
||||
+LIB_CXX_SL = lib$(MODULE)cxx.@shlibext@.5.5.2
|
||||
@CXX_ON@BUILD_ALL_3 = $(LIB_CXX)
|
||||
@CXX_ON@INSTALL_LIB_3 = installcxx
|
||||
@SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL)
|
||||
@@ -61,7 +61,7 @@ LIB_CXX_SL = lib$(MODULE)xx.@shlibext@
|
||||
|
||||
# threads + C++
|
||||
LIB_TH_CXX = lib$(MODULE)thcxx.a
|
||||
-LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@
|
||||
+LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@.5.5.2
|
||||
@TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX)
|
||||
@TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx
|
||||
@TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX)
|
||||
@@ -76,7 +76,7 @@ LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlib
|
||||
@CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl
|
||||
|
||||
# shared versions of the libraries
|
||||
-LIB_SL = lib$(MODULE).@shlibext@
|
||||
+LIB_SL = lib$(MODULE).@shlibext@.5.5.2
|
||||
@SL_ON@BUILD_ALL_7 = $(LIB_SL)
|
||||
@SL_ON@INSTALL_LIB_7 = installsl
|
||||
@SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL)
|
||||
@@ -145,9 +145,13 @@ SHELL = /bin/sh
|
||||
|
||||
HFLS = dmalloc.h
|
||||
OBJS = arg_check.o compat.o dmalloc_rand.o dmalloc_tab.o env.o heap.o
|
||||
+OBJS_SL = arg_check_sl.o compat_sl.o dmalloc_rand_sl.o dmalloc_tab_sl.o env_sl.o heap_sl.o
|
||||
NORMAL_OBJS = chunk.o error.o malloc.o
|
||||
+NORMAL_OBJS_SL = chunk_sl.o error_sl.o malloc_sl.o
|
||||
THREAD_OBJS = chunk_th.o error_th.o malloc_th.o
|
||||
+THREAD_OBJS_SL = chunk_th_sl.o error_th_sl.o malloc_th_sl.o
|
||||
CXX_OBJS = dmallocc.o
|
||||
+CXX_OBJS_SL = dmallocc_sl.o
|
||||
|
||||
CFLAGS = $(CCFLAGS)
|
||||
TEST = $(MODULE)_t
|
||||
@@ -160,9 +164,9 @@ all : $(BUILD_ALL)
|
||||
|
||||
clean :
|
||||
rm -f $(A_OUT) core *.o *.t
|
||||
- rm -f $(LIBRARY) $(LIB_TH) $(LIB_CXX) $(LIB_TH_CXX) $(TEST) $(TEST_FC)
|
||||
- rm -f $(LIB_TH_SL) $(LIB_CXX_SL) $(LIB_TH_CXX_SL) $(LIB_SL)
|
||||
+ rm -f $(TEST) $(TEST_FC)
|
||||
rm -f $(UTIL) dmalloc.h
|
||||
+ rm -f lib$(MODULE)*.*
|
||||
|
||||
realclean : clean
|
||||
|
||||
@@ -181,43 +185,43 @@ installincs : $(HFLS)
|
||||
$(INSTALL_DATA) $(HFLS) $(includedir)
|
||||
|
||||
installthsl : $(LIB_TH_SL)
|
||||
- $(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL_PROGRAM) $(LIB_TH_SL) $(libdir)
|
||||
+ $(srcdir)/mkinstalldirs $(shlibdir)
|
||||
+ $(INSTALL) $(LIB_TH_SL) $(shlibdir)
|
||||
|
||||
installth : $(INSTALL_THREADS)
|
||||
$(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL_PROGRAM) $(LIB_TH) $(libdir)
|
||||
+ $(INSTALL) $(LIB_TH) $(libdir)
|
||||
@CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
|
||||
@SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library"
|
||||
|
||||
installthcxxsl : $(LIB_TH_CXX_SL)
|
||||
$(srcdir)/mkinstalldirs $(shlibdir)
|
||||
- $(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(shlibdir)
|
||||
+ $(INSTALL) $(LIB_TH_CXX_SL) $(shlibdir)
|
||||
|
||||
installthcxx : $(INSTALL_TH_CXX)
|
||||
$(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL_PROGRAM) $(LIB_TH_CXX) $(libdir)
|
||||
+ $(INSTALL) $(LIB_TH_CXX) $(libdir)
|
||||
@SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library"
|
||||
|
||||
installcxxsl : $(LIB_CXX_SL)
|
||||
- $(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL_PROGRAM) $(LIB_CXX_SL) $(libdir)
|
||||
+ $(srcdir)/mkinstalldirs $(shlibdir)
|
||||
+ $(INSTALL) $(LIB_CXX_SL) $(shlibdir)
|
||||
|
||||
installcxx : $(INSTALL_CXX)
|
||||
$(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL_PROGRAM) $(LIB_CXX) $(libdir)
|
||||
+ $(INSTALL) $(LIB_CXX) $(libdir)
|
||||
@TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
|
||||
@SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
|
||||
|
||||
installsl : $(LIB_SL)
|
||||
$(srcdir)/mkinstalldirs $(shlibdir)
|
||||
- $(INSTALL_PROGRAM) $(LIB_SL) $(shlibdir)
|
||||
+ $(INSTALL) $(LIB_SL) $(shlibdir)
|
||||
@CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
|
||||
@TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library"
|
||||
|
||||
installlib : $(INSTALL_LIB)
|
||||
$(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL_PROGRAM) $(LIBRARY) $(libdir)
|
||||
+ $(INSTALL) $(LIBRARY) $(libdir)
|
||||
@RANLIB@ $(libdir)/$(LIBRARY)
|
||||
@SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
|
||||
@CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library"
|
||||
@@ -255,10 +259,8 @@ shlib : $(BUILD_SL)
|
||||
# NOTE: you may have to edit the configure.ac script to get this to
|
||||
# work on your operating system. Please send feedback to the author
|
||||
# via: http://256.com/gray/email.html
|
||||
-$(LIB_SL) : $(LIBRARY)
|
||||
- rm -f $@ $@.t
|
||||
- @shlinkargs@ $(LIBRARY) $(OBJS) $(NORMAL_OBJS)
|
||||
- mv $@.t $@
|
||||
+$(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL)
|
||||
+ $(CC) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL)
|
||||
|
||||
$(LIBRARY) : $(OBJS) $(NORMAL_OBJS)
|
||||
ar cr $@ $?
|
||||
@@ -268,32 +270,26 @@ $(LIB_TH) : $(OBJS) $(THREAD_OBJS)
|
||||
ar cr $@ $?
|
||||
@RANLIB@ $@
|
||||
|
||||
-$(LIB_TH_SL) : $(LIB_TH)
|
||||
- rm -f $@ $@.t
|
||||
- @shlinkargs@ $(LIB_TH) $(OBJS) $(THREAD_OBJS)
|
||||
- mv $@.t $@
|
||||
+$(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL)
|
||||
+ $(CC) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL)
|
||||
|
||||
$(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
|
||||
ar cr $@ $?
|
||||
@RANLIB@ $@
|
||||
|
||||
-$(LIB_CXX_SL) : $(LIB_CXX)
|
||||
- rm -f $@ $@.t
|
||||
- @shlinkargs@ $(LIB_CXX) $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
|
||||
- mv $@.t $@
|
||||
+$(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)
|
||||
+ $(CC) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)
|
||||
|
||||
$(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
|
||||
ar cr $@ $?
|
||||
@RANLIB@ $@
|
||||
|
||||
-$(LIB_TH_CXX_SL) : $(LIB_TH_CXX)
|
||||
- rm -f $@ $@.t
|
||||
- @shlinkargs@ $(LIB_TH_CXX) $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
|
||||
- mv $@.t $@
|
||||
+$(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)
|
||||
+ $(CC) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)
|
||||
|
||||
-threadssl : $(LIB_TH_SL)
|
||||
+threadssl : $(LIB_TH_SL)$(ver)
|
||||
|
||||
-threadscxxsl : $(LIB_TH_CXX_SL)
|
||||
+threadscxxsl : $(LIB_TH_CXX_SL)$(ver)
|
||||
|
||||
threadscxx : $(BUILD_TH_CXX)
|
||||
@SL_OFF@ @echo "Enter 'make threadscxxsl' to build the threaded C++ shared-library"
|
||||
@@ -302,7 +298,7 @@ threads : $(BUILD_THREADS)
|
||||
@CXX_OFF@ @echo "Enter 'make threadscxx' to build the threaded C++ library"
|
||||
@SL_OFF@ @echo "Enter 'make threadssl' to build the threaded shared library"
|
||||
|
||||
-cxxsl : $(LIB_CXX_SL)
|
||||
+cxxsl : $(LIB_CXX_SL)$(ver)
|
||||
|
||||
cxx : $(BUILD_CXX)
|
||||
@SL_OFF@ @echo "Enter 'make cxxsl' to build the cxx shared library"
|
||||
@@ -371,6 +367,11 @@ dmallocc.o : $(srcdir)/dmallocc.cc
|
||||
$(CXX) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
|
||||
-o ./$@
|
||||
|
||||
+dmallocc_sl.o : $(srcdir)/dmallocc.cc
|
||||
+ rm -f $@
|
||||
+ $(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
|
||||
+ -o ./$@
|
||||
+
|
||||
#
|
||||
# auto configure settings - uncomment if you are doing configure
|
||||
# development on the library
|
||||
@@ -395,38 +396,109 @@ dmallocc.o : $(srcdir)/dmallocc.cc
|
||||
|
||||
arg_check.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
|
||||
dmalloc_loc.h error.h arg_check.h
|
||||
+arg_check_sl.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
|
||||
+ dmalloc_loc.h error.h arg_check.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
chunk.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
|
||||
dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
|
||||
error_val.h heap.h
|
||||
+chunk_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
|
||||
+ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
|
||||
+ error_val.h heap.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
|
||||
+compat_sl.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
|
||||
debug_tok.h dmalloc_loc.h env.h error_val.h version.h
|
||||
+dmalloc_sl.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
|
||||
+ debug_tok.h dmalloc_loc.h env.h error_val.h version.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
dmalloc_argv.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
|
||||
dmalloc_argv_loc.h compat.h
|
||||
+dmalloc_argv_sl.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
|
||||
+ dmalloc_argv_loc.h compat.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
|
||||
dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
|
||||
+dmalloc_fc_t_sl.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
|
||||
+ dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
dmalloc_rand.o: dmalloc_rand.c dmalloc_rand.h
|
||||
+dmalloc_rand_sl.o: dmalloc_rand.c dmalloc_rand.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
dmalloc_t.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
|
||||
dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
|
||||
error_val.h heap.h
|
||||
+dmalloc_t_sl.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
|
||||
+ dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
|
||||
+ error_val.h heap.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
dmalloc_tab.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
|
||||
dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
|
||||
+dmalloc_tab_sl.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
|
||||
+ dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
env.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
|
||||
debug_tok.h env.h error.h
|
||||
+env_sl.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
|
||||
+ debug_tok.h env.h error.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
error.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
|
||||
dmalloc_loc.h env.h error.h error_val.h version.h
|
||||
+error_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
|
||||
+ dmalloc_loc.h env.h error.h error_val.h version.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
heap.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
|
||||
dmalloc_loc.h error.h error_val.h heap.h
|
||||
+heap_sl.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
|
||||
+ dmalloc_loc.h error.h error_val.h heap.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
malloc.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
|
||||
debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
|
||||
malloc_funcs.h return.h
|
||||
+malloc_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
|
||||
+ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
|
||||
+ malloc_funcs.h return.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
protect.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
|
||||
heap.h protect.h
|
||||
+protect_sl.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
|
||||
+ heap.h protect.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
chunk_th.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
|
||||
dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
|
||||
error_val.h heap.h
|
||||
+chunk_th_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
|
||||
+ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
|
||||
+ error_val.h heap.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
error_th.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
|
||||
dmalloc_loc.h env.h error.h error_val.h version.h
|
||||
+error_th_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
|
||||
+ dmalloc_loc.h env.h error.h error_val.h version.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
||||
malloc_th.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
|
||||
debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
|
||||
malloc_funcs.h return.h
|
||||
+malloc_th_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
|
||||
+ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
|
||||
+ malloc_funcs.h return.h
|
||||
+ rm -f $@
|
||||
+ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
|
97
devel/dmalloc/patches/130-makefile_destdir.patch
Normal file
97
devel/dmalloc/patches/130-makefile_destdir.patch
Normal file
@ -0,0 +1,97 @@
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -178,66 +178,66 @@ distclean : clean
|
||||
# rm -f configure
|
||||
|
||||
installdirs :
|
||||
- $(srcdir)/mkinstalldirs $(includedir) $(libdir) $(bindir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir)
|
||||
|
||||
installincs : $(HFLS)
|
||||
- $(srcdir)/mkinstalldirs $(includedir)
|
||||
- $(INSTALL_DATA) $(HFLS) $(includedir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir)
|
||||
+ $(INSTALL_DATA) $(HFLS) $(DESTDIR)$(includedir)
|
||||
|
||||
installthsl : $(LIB_TH_SL)
|
||||
- $(srcdir)/mkinstalldirs $(shlibdir)
|
||||
- $(INSTALL) $(LIB_TH_SL) $(shlibdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
|
||||
+ $(INSTALL) $(LIB_TH_SL) $(DESTDIR)$(shlibdir)
|
||||
|
||||
installth : $(INSTALL_THREADS)
|
||||
- $(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL) $(LIB_TH) $(libdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
||||
+ $(INSTALL) $(LIB_TH) $(DESTDIR)$(libdir)
|
||||
@CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
|
||||
@SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library"
|
||||
|
||||
installthcxxsl : $(LIB_TH_CXX_SL)
|
||||
- $(srcdir)/mkinstalldirs $(shlibdir)
|
||||
- $(INSTALL) $(LIB_TH_CXX_SL) $(shlibdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
|
||||
+ $(INSTALL) $(LIB_TH_CXX_SL) $(DESTDIR)$(shlibdir)
|
||||
|
||||
installthcxx : $(INSTALL_TH_CXX)
|
||||
- $(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL) $(LIB_TH_CXX) $(libdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
||||
+ $(INSTALL) $(LIB_TH_CXX) $(DESTDIR)$(libdir)
|
||||
@SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library"
|
||||
|
||||
installcxxsl : $(LIB_CXX_SL)
|
||||
- $(srcdir)/mkinstalldirs $(shlibdir)
|
||||
- $(INSTALL) $(LIB_CXX_SL) $(shlibdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
|
||||
+ $(INSTALL) $(LIB_CXX_SL) $(DESTDIR)$(shlibdir)
|
||||
|
||||
installcxx : $(INSTALL_CXX)
|
||||
- $(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL) $(LIB_CXX) $(libdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
||||
+ $(INSTALL) $(LIB_CXX) $(DESTDIR)$(libdir)
|
||||
@TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
|
||||
@SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
|
||||
|
||||
installsl : $(LIB_SL)
|
||||
- $(srcdir)/mkinstalldirs $(shlibdir)
|
||||
- $(INSTALL) $(LIB_SL) $(shlibdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
|
||||
+ $(INSTALL) $(LIB_SL) $(DESTDIR)$(shlibdir)
|
||||
@CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
|
||||
@TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library"
|
||||
|
||||
installlib : $(INSTALL_LIB)
|
||||
- $(srcdir)/mkinstalldirs $(libdir)
|
||||
- $(INSTALL) $(LIBRARY) $(libdir)
|
||||
- @RANLIB@ $(libdir)/$(LIBRARY)
|
||||
-@SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
||||
+ $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)
|
||||
+ @RANLIB@ $(DESTDIR)$(libdir)/$(LIBRARY)
|
||||
+@SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(DESTDIR)$(shlibdir)"
|
||||
@CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library"
|
||||
@TH_OFF@ @echo "Enter 'make installth' to install thread library"
|
||||
|
||||
installdocs : $(srcdir)/docs/$(HTMLFILE) $(srcdir)/docs/$(TEXIFILE) \
|
||||
$(srcdir)/docs/$(PDFFILE)
|
||||
- $(srcdir)/mkinstalldirs $(docdir)
|
||||
- $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(docdir)
|
||||
- $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(docdir)
|
||||
- $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(docdir)
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir)
|
||||
+ $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(DESTDIR)$(docdir)
|
||||
+ $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(DESTDIR)$(docdir)
|
||||
+ $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(DESTDIR)$(docdir)
|
||||
|
||||
install : installincs installlib $(UTIL)
|
||||
- $(srcdir)/mkinstalldirs $(bindir)
|
||||
- $(INSTALL_PROGRAM) $(UTIL) $(bindir)
|
||||
- @echo "Enter 'make installdocs' to install $(DOCFILES) in $(docdir)"
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
|
||||
+ $(INSTALL_PROGRAM) $(UTIL) $(DESTDIR)$(bindir)
|
||||
+ @echo "Enter 'make installdocs' to install $(DOCFILES) in $(DESTDIR)$(docdir)"
|
||||
|
||||
dmalloc.h.2 : $(srcdir)/configure
|
||||
$(SHELL) $(srcdir)/configure
|
45
devel/dmalloc/patches/200-fix_return_address.patch
Normal file
45
devel/dmalloc/patches/200-fix_return_address.patch
Normal file
@ -0,0 +1,45 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7120,7 +7120,7 @@ echo "$as_me:$LINENO: checking return.h
|
||||
echo $ECHO_N "checking return.h macros work... $ECHO_C" >&6
|
||||
if test "$cross_compiling" = yes; then
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
-#define RETURN_MACROS_WORK 0
|
||||
+#define RETURN_MACROS_WORK 1
|
||||
_ACEOF
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
--- a/return.h
|
||||
+++ b/return.h
|
||||
@@ -106,25 +106,19 @@
|
||||
/*************************************/
|
||||
|
||||
/*
|
||||
- * For DEC Mips machines running Ultrix
|
||||
+ * For Mips machines running Linux
|
||||
*/
|
||||
#if __mips
|
||||
|
||||
/*
|
||||
- * I have no idea how to get inline assembly with the default cc.
|
||||
- * Anyone know how?
|
||||
- */
|
||||
-
|
||||
-#if 0
|
||||
-
|
||||
-/*
|
||||
* NOTE: we assume here that file is global.
|
||||
*
|
||||
- * $31 is the frame pointer. $2 looks to be the return address but maybe
|
||||
- * not consistently.
|
||||
+ * $31 is the return address.
|
||||
*/
|
||||
-#define GET_RET_ADDR(file) asm("sw $2, file")
|
||||
-
|
||||
+#if (_MIPS_SZLONG == 32)
|
||||
+#define GET_RET_ADDR(file) asm("sw $31, %0" : "=m" (file))
|
||||
+#else
|
||||
+#define GET_RET_ADDR(file) asm("sd $31, %0" : "=m" (file))
|
||||
#endif
|
||||
|
||||
#endif /* __mips */
|
11
devel/dmalloc/patches/210-fix_threads.patch
Normal file
11
devel/dmalloc/patches/210-fix_threads.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/settings.dist
|
||||
+++ b/settings.dist
|
||||
@@ -409,7 +409,7 @@
|
||||
*/
|
||||
|
||||
#ifndef LOCK_THREADS
|
||||
-#define LOCK_THREADS 0
|
||||
+#define LOCK_THREADS 1
|
||||
#endif
|
||||
|
||||
#if LOCK_THREADS
|
8
devel/dmalloc/patches/300-fix_summarize_script.patch
Normal file
8
devel/dmalloc/patches/300-fix_summarize_script.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- a/contrib/dmalloc_summarize.pl
|
||||
+++ b/contrib/dmalloc_summarize.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl5 -w
|
||||
+#!/usr/bin/perl -w
|
||||
#
|
||||
# dmalloc_summarize -- summarizes dmalloc log files
|
||||
#
|
Loading…
x
Reference in New Issue
Block a user