diff options
author | Sam James <sam@gentoo.org> | 2023-12-05 15:01:10 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-06 05:40:50 +0000 |
commit | 4c5b72836640446142a12a312df01c1986cc4e0a (patch) | |
tree | 2d6e09764a1acfde505f045e39fdc38227de5b07 /dev-libs | |
parent | dev-vcs/git-absorb: drop 0.6.9 (diff) | |
download | gentoo-4c5b72836640446142a12a312df01c1986cc4e0a.tar.gz gentoo-4c5b72836640446142a12a312df01c1986cc4e0a.tar.bz2 gentoo-4c5b72836640446142a12a312df01c1986cc4e0a.zip |
dev-libs/dmalloc: add 5.6.5
Bug: https://bugs.gentoo.org/577032
Closes: https://bugs.gentoo.org/758848
Closes: https://bugs.gentoo.org/899774
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/dmalloc/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/dmalloc/dmalloc-5.6.5.ebuild | 73 | ||||
-rw-r--r-- | dev-libs/dmalloc/files/dmalloc-5.6.5-Makefile.in.patch | 343 | ||||
-rw-r--r-- | dev-libs/dmalloc/files/dmalloc-5.6.5-configure-c99.patch | 61 |
4 files changed, 478 insertions, 0 deletions
diff --git a/dev-libs/dmalloc/Manifest b/dev-libs/dmalloc/Manifest index d9041342e6c1..9f669702ee43 100644 --- a/dev-libs/dmalloc/Manifest +++ b/dev-libs/dmalloc/Manifest @@ -1 +1,2 @@ DIST dmalloc-5.5.2.tgz 666608 BLAKE2B 9371b35b9a39706215ff2fc4e31510dafa30a86dccb2290563a2c8a0e7211372dca419dd7d549011548853f1e168fe15c55361d763d27230c547c93113de823e SHA512 96bb94aeb2bc3220f652b5294bdf8592b984cb2a53e5f02b2b8d52450c3396d18651f334644cdfff9c85a8c0d0cedc7f6a18b9d70497b2c6b5f85dbd1e827b93 +DIST dmalloc-5.6.5.tgz 322310 BLAKE2B 43ba8cdef73423f2e3d6fa5dea34f1653d890c95dcd4ea13e9317d85d1991d0e68e80192860c7bdaf4ee33b36c892b9df31340ddde808b7d60ee00f21d532976 SHA512 17090378b763dd3eaf5ff196298f08982ad593d4c3a0104a67866b88793b612307f3ce9ef0aa7dfef2df6c8eb050e2be06513b29ca912e916c0bfd882a0f4bf1 diff --git a/dev-libs/dmalloc/dmalloc-5.6.5.ebuild b/dev-libs/dmalloc/dmalloc-5.6.5.ebuild new file mode 100644 index 000000000000..75f5f823673e --- /dev/null +++ b/dev-libs/dmalloc/dmalloc-5.6.5.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +DESCRIPTION="A Debug Malloc Library" +HOMEPAGE="https://dmalloc.com" +SRC_URI="https://dmalloc.com/releases/${P}.tgz" + +LICENSE="CC-BY-SA-3.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="threads" + +BDEPEND="sys-apps/texinfo" + +PATCHES=( + # - Build objects twice, once -fPIC for shared. + # - Use DESTDIR. + # - Fix SONAME and NEEDED. + "${FILESDIR}"/${PN}-5.6.5-Makefile.in.patch + # - Broken test, always returns false. + "${FILESDIR}"/${PN}-5.5.2-cxx.patch + "${FILESDIR}"/${PN}-5.6.5-configure-c99.patch +) + +src_prepare() { + default + + # - Add threads support. + use threads && eapply "${FILESDIR}"/${PN}-5.5.2-threads.patch + + # Respect CFLAGS/LDFLAGS. #337429 + sed -i \ + -e '/libdmalloc/ s:$(CC):& $(CFLAGS) $(LDFLAGS):g' \ + -e 's|ar cr|$(AR) cr|g' \ + Makefile.in || die + + # Run autoconf for -cxx.patch. + eautoconf +} + +src_configure() { + tc-export AR + + econf \ + --enable-cxx \ + --enable-shlib \ + $(use_enable threads) +} + +src_test() { + emake heavy +} + +src_install() { + default + + # add missing symlinks, lazy + dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so + dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV%%.*} + + local lib + for lib in cxx th thcxx; do + dosym lib${PN}${lib}.so.${PV} /usr/$(get_libdir)/lib${PN}${lib}.so + dosym lib${PN}${lib}.so.${PV} \ + /usr/$(get_libdir)/lib${PN}${lib}.so.${PV%%.*} + done + + rm "${ED}"/usr/$(get_libdir)/lib${PN}*.a || die +} diff --git a/dev-libs/dmalloc/files/dmalloc-5.6.5-Makefile.in.patch b/dev-libs/dmalloc/files/dmalloc-5.6.5-Makefile.in.patch new file mode 100644 index 000000000000..2f28c6159218 --- /dev/null +++ b/dev-libs/dmalloc/files/dmalloc-5.6.5-Makefile.in.patch @@ -0,0 +1,343 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -42,7 +42,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) +@@ -51,8 +51,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) +@@ -62,7 +62,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) +@@ -77,7 +77,7 @@ LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@ + @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) +@@ -150,9 +150,14 @@ SHELL = /bin/sh + + HFLS = dmalloc.h + OBJS = append.o 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 user_malloc.o ++NORMAL_OBJS_SL = chunk_sl.o error_sl.o user_malloc_sl.o + THREAD_OBJS = chunk_th.o error_th.o user_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 +@@ -165,9 +170,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 + +@@ -182,65 +187,65 @@ distclean : clean + docs : $(DOCS) LICENSE.txt + + 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 $(libdir) +- $(INSTALL_PROGRAM) $(LIB_TH_SL) $(libdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL_PROGRAM) $(DESTDIR)$(LIB_TH_SL) $(DESTDIR)$(libdir) + + installth : $(INSTALL_THREADS) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_TH) $(libdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL_PROGRAM) $(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_PROGRAM) $(LIB_TH_CXX_SL) $(shlibdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir) ++ $(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(DESTDIR)$(shlibdir) + + installthcxx : $(INSTALL_TH_CXX) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_TH_CXX) $(libdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL_PROGRAM) $(LIB_TH_CXX) $(DESTDIR)$(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 $(DESTDIR)$(libdir) ++ $(INSTALL_PROGRAM) $(LIB_CXX_SL) $(DESTDIR)$(libdir) + + installcxx : $(INSTALL_CXX) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_CXX) $(libdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL_PROGRAM) $(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_PROGRAM) $(LIB_SL) $(shlibdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir) ++ $(INSTALL_PROGRAM) $(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_PROGRAM) $(LIBRARY) $(libdir) +- @RANLIB@ $(libdir)/$(LIBRARY) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL_PROGRAM) $(LIBRARY) $(DESTDIR)$(libdir) ++ @RANLIB@ $(DESTDIR)$(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" + @TH_OFF@ @echo "Enter 'make installth' to install thread library" + + # see notes about why we need the FILE2 entries below + installdocs : $(INSTALL_FILE2) $(HTML_FILE2) $(INFO_FILE) +- $(srcdir)/mkinstalldirs $(docdir) +- $(INSTALL_DATA) $(INSTALL_FILE2) $(docdir)/$(INSTALL_FILE) +- $(INSTALL_DATA) $(HTML_FILE2) $(docdir)/$(HTML_FILE) +- $(INSTALL_DATA) $(INFO_FILE) $(docdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir) ++ $(INSTALL_DATA) $(INSTALL_FILE2) $(DESTDIR)$(docdir)/$(INSTALL_FILE) ++ $(INSTALL_DATA) $(HTML_FILE2) $(DESTDIR)$(docdir)/$(HTML_FILE) ++ $(INSTALL_DATA) $(INFO_FILE) $(DESTDIR)$(docdir) + + install : installincs installlib $(UTIL) +- $(srcdir)/mkinstalldirs $(bindir) +- $(INSTALL_PROGRAM) $(UTIL) $(bindir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) ++ $(INSTALL_PROGRAM) $(UTIL) $(DESTDIR)$(bindir) + @echo "Enter 'make installdocs' to install $(DOCS) in $(docdir)" + + dmalloc.h.2 conf.h settings.h version.h : $(srcdir)/configure $(srcdir)/settings.dist $(srcdir)/conf.h.in +@@ -297,10 +302,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 +-$(LIB_SL) : $(LIBRARY) +- rm -f $@ $@.t +- @shlinkargs@ $(LIBRARY) +- 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 $@ $? +@@ -310,32 +313,26 @@ $(LIB_TH) : $(OBJS) $(THREAD_OBJS) + ar cr $@ $? + @RANLIB@ $@ + +-$(LIB_TH_SL) : $(LIB_TH) +- rm -f $@ $@.t +- @shlinkargs@ $(LIB_TH) +- 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) +- 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) +- 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" +@@ -344,7 +341,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" +@@ -404,6 +401,11 @@ heavy : $(TEST) light + rm -f $@ + $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + ++dmallocc_sl.o : $(srcdir)/dmallocc.cc dmalloc.h ++ rm -f $@ ++ $(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \ ++ -o ./$@ ++ + # + # .cc.o auto-target doesn't work on some systems. + # also, $? did not work on OSF for the -c, grrr +@@ -434,39 +436,108 @@ append.o: append.c conf.h settings.h dmalloc.h append.h compat.h \ + dmalloc_loc.h + 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 append.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 append.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 append.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 append.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 ++ 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 append.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 append.h chunk.h compat.h \ + dmalloc.h dmalloc_loc.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 append.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 append.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 append.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 ./$@ + 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 ./$@ + user_malloc.o: user_malloc.c conf.h settings.h dmalloc.h append.h chunk.h \ + compat.h debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ + user_malloc.h return.h ++user_malloc_sl.o: user_malloc.c conf.h settings.h dmalloc.h append.h chunk.h \ ++ compat.h debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ ++ user_malloc.h return.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + dmallocc.o: dmallocc.cc dmalloc.h return.h conf.h settings.h + chunk_th.o: chunk.c conf.h settings.h dmalloc.h append.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 append.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 ./$@ + user_malloc_th.o: user_malloc.c conf.h settings.h dmalloc.h append.h chunk.h \ + compat.h debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ + user_malloc.h return.h ++user_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 ./$@ diff --git a/dev-libs/dmalloc/files/dmalloc-5.6.5-configure-c99.patch b/dev-libs/dmalloc/files/dmalloc-5.6.5-configure-c99.patch new file mode 100644 index 000000000000..f4c4904a235e --- /dev/null +++ b/dev-libs/dmalloc/files/dmalloc-5.6.5-configure-c99.patch @@ -0,0 +1,61 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -482,19 +482,20 @@ AC_MSG_RESULT([$ac_cv_pnt_arith_type]) + AC_CHECK_FUNCS(abort) + AC_MSG_CHECKING([abort safe]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include <stdlib.h> + static int main_b = 0; + static char heap_mem[102400], *heap_p = heap_mem; +-free () { if (main_b) _exit(0); } ++void free () { if (main_b) exit(0); } + char *malloc (int size) { + char *pnt; +- if (main_b) _exit(0); ++ if (main_b) exit(0); + pnt = heap_p; + heap_p += size; + return pnt; + } + char *calloc (int number, int size) { + char *start, *pnt, *end; +- if (main_b) _exit(0); ++ if (main_b) exit(0); + /* it should be already 0s */ + start = malloc (number * size); + pnt = start; +@@ -504,7 +505,7 @@ char *calloc (int number, int size) { + } + char *realloc (char *old_pnt, int new_size) { + char *start, *pnt, *end; +- if (main_b) _exit(0); ++ if (main_b) exit(0); + start = malloc (new_size); + pnt = start; + end = start + new_size; +@@ -647,6 +648,7 @@ fi + # + AC_MSG_CHECKING([constructor attribute]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include <stdlib.h> + /* if we call the loc_con constructor then exit with error code 0 */ + static void loc_con() __attribute__((constructor)); + static void loc_con() { exit(0); } +@@ -662,6 +664,7 @@ int main() { return 1; } + # + AC_MSG_CHECKING([destructor attribute]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include <stdlib.h> + /* if we call the loc_decon destructor then exit with error code 0 */ + static void loc_decon() __attribute__((destructor)); + static void loc_decon() { exit(0); } +--- a/configure.ac ++++ b/configure.ac +@@ -546,6 +546,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + AC_CHECK_FUNCS(getenv) + AC_MSG_CHECKING([getenv safe]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include <stdlib.h> + static char heap_mem[102400], *heap_p = heap_mem; + free (char *pnt) { + } |