summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2010-08-24 14:29:29 +0000
committerMichael Weber <xmw@gentoo.org>2010-08-24 14:29:29 +0000
commit82a8e20bfee7ab4d88429867dff7d4bc511abebb (patch)
tree0736174ec290e7e1df76426463aecd86b84ea2ce /dev-util/exmap
parentAutomated update of use.local.desc (diff)
downloadhistorical-82a8e20bfee7ab4d88429867dff7d4bc511abebb.tar.gz
historical-82a8e20bfee7ab4d88429867dff7d4bc511abebb.tar.bz2
historical-82a8e20bfee7ab4d88429867dff7d4bc511abebb.zip
Initial comit for exmap
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'dev-util/exmap')
-rw-r--r--dev-util/exmap/ChangeLog14
-rw-r--r--dev-util/exmap/Manifest10
-rw-r--r--dev-util/exmap/exmap-0.10.ebuild75
-rw-r--r--dev-util/exmap/files/exmap-0.10-as-needed.patch21
-rw-r--r--dev-util/exmap/files/exmap-0.10-fix64bit.patch24
-rw-r--r--dev-util/exmap/files/exmap-0.10-gcc.patch68
-rw-r--r--dev-util/exmap/files/exmap-0.10-gcc45.patch11
-rw-r--r--dev-util/exmap/files/exmap-0.10-kernel.patch50
-rw-r--r--dev-util/exmap/files/exmap-0.10-makefiles.patch115
-rw-r--r--dev-util/exmap/metadata.xml10
10 files changed, 398 insertions, 0 deletions
diff --git a/dev-util/exmap/ChangeLog b/dev-util/exmap/ChangeLog
new file mode 100644
index 000000000000..cbacab78f7b5
--- /dev/null
+++ b/dev-util/exmap/ChangeLog
@@ -0,0 +1,14 @@
+# ChangeLog for dev-util/exmap
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/exmap/ChangeLog,v 1.1 2010/08/24 14:29:29 xmw Exp $
+
+*exmap-0.10 (24 Aug 2010)
+
+ 24 Aug 2010; Michael Weber (xmw) <xmw@gentoo.org> +exmap-0.10.ebuild,
+ +files/exmap-0.10-as-needed.patch, +files/exmap-0.10-fix64bit.patch,
+ +files/exmap-0.10-gcc.patch, +files/exmap-0.10-gcc45.patch,
+ +files/exmap-0.10-kernel.patch, +files/exmap-0.10-makefiles.patch,
+ +metadata.xml:
+ Initial commit for exmap. Fixes bug #158382, thanks to Paul Pacheco and
+ all the other contributors there.
+
diff --git a/dev-util/exmap/Manifest b/dev-util/exmap/Manifest
new file mode 100644
index 000000000000..3d1caf4bb89b
--- /dev/null
+++ b/dev-util/exmap/Manifest
@@ -0,0 +1,10 @@
+AUX exmap-0.10-as-needed.patch 499 RMD160 f1b582f11e437740b4878c47f1df454b4927cc5c SHA1 f487eb98e279b5f265bdd98b95871fb238fbc2d7 SHA256 65bd41db5828ed9859fabf40db7c8e6e01e1b7bfe9d7c1aea8f2757b5b4ff7e0
+AUX exmap-0.10-fix64bit.patch 855 RMD160 9b6186788b3dae78ff50f1c23cf8139b48dd92a0 SHA1 95819ab3bd91a3fccb57c7cb2c529038c0e3c33c SHA256 89aae22c8450137dd3ebb88b2d3acbea7a04c08a1a075dbab7d265e7dd3277a0
+AUX exmap-0.10-gcc.patch 1827 RMD160 afbdefc11eeed6ba2818f237de374d7ed886bb5c SHA1 a7504340c54f9925699b83458b44a24e5e3cf282 SHA256 6a204d45dada0507b73214179cec6cbe62188f584e34ae6751769e2b32d89d89
+AUX exmap-0.10-gcc45.patch 318 RMD160 e4ec7c82dd1543d58858f8e2e7e0d3ea0dac3022 SHA1 5bdc78209927d2506831e426895ae0da22529f22 SHA256 3e8d02989339543b797ffe306f3d4c997869a5fa5edbfd8aefbe0afc6ea509ad
+AUX exmap-0.10-kernel.patch 1694 RMD160 b74aa4c04e1ecd7bc40c6255c3b6c3a7c6feb7fe SHA1 a8701cc8609f4157f9fc8c29ab0b2bb35d98e492 SHA256 d41e2296b063e7c982929deae8d23d2ee2099f249df7965f84c0ece9de81be92
+AUX exmap-0.10-makefiles.patch 3400 RMD160 a930b6401b1103d341ed76f073d27637a995843f SHA1 89e14d4e7ef39761bd65389281eef63ad0adecc9 SHA256 37203da662b807f98cf11dc1e32a2a0723c5dcfb212871b7b2b073e14be1d4b2
+DIST exmap-0.10.tgz 124620 RMD160 56b4fe3738c9aad8def0a445b8a3bb6e51eedef9 SHA1 e9549e39ab830b94941975c0e393e5ef0d8db6fb SHA256 f6d5feffa53afa3e1321df91b127cdf403f7239076539eeef9aab665286c007c
+EBUILD exmap-0.10.ebuild 1998 RMD160 d9e07e0a817a3cf9fc5740cda36ca3e74be77a46 SHA1 1803d69d367706176284aa2cb40a5f1b12536a35 SHA256 0c9b7580de07301a7a2f99059faa24e90364ecd1a4cc0d014cbee597f108d488
+MISC ChangeLog 627 RMD160 e2c9ea0e4e9b50f9bc0716651e58bf27a3f1ffed SHA1 c1db760292cafb0e064015e7374f097ae80556ce SHA256 53ae4cf5d32d689c918ca49a6c315cdf82d795b42ebafaecfd30c8e5b7d9bd67
+MISC metadata.xml 251 RMD160 41f1cd13c3e8d490821e3851b65bc9ae63fefd4d SHA1 777aaf72323d6ab574208f255222d0c79db13f58 SHA256 4fa54c21d7b0f911d48ebe655b51364f2dff42d2d906bf63752cad5e12b7b4a2
diff --git a/dev-util/exmap/exmap-0.10.ebuild b/dev-util/exmap/exmap-0.10.ebuild
new file mode 100644
index 000000000000..1998e1e661ae
--- /dev/null
+++ b/dev-util/exmap/exmap-0.10.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/exmap/exmap-0.10.ebuild,v 1.1 2010/08/24 14:29:29 xmw Exp $
+
+EAPI=2
+
+inherit eutils linux-mod
+
+DESCRIPTION="A memory analysis kernel module with userland tool"
+HOMEPAGE="http://www.berthels.co.uk/exmap/"
+SRC_URI="http://www.berthels.co.uk/${PN}/download/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk"
+
+RDEPEND="dev-libs/libpcre
+ gtk? ( x11-libs/gtk+:2 )"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ dev-util/pkgconfig"
+
+MODULE_NAMES="exmap(misc:${S}/kernel)"
+BUILD_TARGETS="clean kernel_modules"
+
+src_prepare() {
+ # patch find_task_by_pid to pid_task and &proc_root to NULL
+ epatch "${FILESDIR}/${P}-kernel.patch"
+
+ # use $(MAKE), remove -g on CXXFLAGS, clean up CXX/LD invocations
+ epatch "${FILESDIR}/${P}-makefiles.patch"
+
+ # somthing strange between linux-mod supplied ARCH and old kernels
+ # which leads to arch/x86/Makefile: file/dir x86 not found
+ if kernel_is lt 2 6 25 ; then
+ sed -i -e 's:\$(MAKE):unset ARCH ; \$(MAKE):' kernel/Makefile || die
+ fi
+
+ # new gcc include behavior
+ epatch "${FILESDIR}/${P}-gcc.patch"
+
+ # gcc4.5 fails on return false as std::string
+ epatch "${FILESDIR}/${P}-gcc45.patch"
+
+ # fix for 64bit from http://www.kdedevelopers.org/node/4166
+ epatch "${FILESDIR}/${P}-fix64bit.patch"
+
+ # fix underlinking with -Wl,--as-needed
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+
+ rm -v src/{*.so,munged-ls-threeloads,prelinked-amule} || die
+}
+
+src_compile() {
+ export KERNEL_DIR
+ linux-mod_src_compile
+
+ emake CXX="$(tc-getCXX)" LD="$(tc-getLD)" -C jutil || die
+ emake CXX="$(tc-getCXX)" LD="$(tc-getLD)" -C src $(use gtk || echo exmtool) || die
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dobin src/exmtool || die
+ use gtk && { dobin src/gexmap || die ; }
+ dodoc TODO README || die
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ elog "Please load the exmap kernel module before running exmtool or gexmap."
+}
diff --git a/dev-util/exmap/files/exmap-0.10-as-needed.patch b/dev-util/exmap/files/exmap-0.10-as-needed.patch
new file mode 100644
index 000000000000..72671b31fc70
--- /dev/null
+++ b/dev-util/exmap/files/exmap-0.10-as-needed.patch
@@ -0,0 +1,21 @@
+--- src/Makefile 2010-08-09 01:17:29.000000000 +0200
++++ src/Makefile 2010-08-09 01:21:13.000000000 +0200
+@@ -42,15 +42,15 @@
+ OBJS += $(TR_OBJ)
+ TESTS += t_range
+
+-TE_OBJ = t_elf.o Elf.o Range.o
++TE_OBJ = t_elf.o Elf.o Range.o ../jutil/Pcre.o
+ OBJS += $(TE_OBJ)
+ TESTS += t_elf
+
+-TP_OBJ = t_pcre.o
++TP_OBJ = t_pcre.o ../jutil/Pcre.o
+ OBJS += $(TP_OBJ)
+ TESTS += t_pcre
+
+-TX_OBJ = t_exmap.o $(EXMAP_OBJ)
++TX_OBJ = t_exmap.o ../jutil/Pcre.o $(EXMAP_OBJ)
+ OBJS += $(TX_OBJ)
+ TESTS += t_exmap
+
diff --git a/dev-util/exmap/files/exmap-0.10-fix64bit.patch b/dev-util/exmap/files/exmap-0.10-fix64bit.patch
new file mode 100644
index 000000000000..8f886f1fe9a7
--- /dev/null
+++ b/dev-util/exmap/files/exmap-0.10-fix64bit.patch
@@ -0,0 +1,24 @@
+I quite frankly don't entirely understand this code, but exmap's debug
+output on i586 and x86_64 pointed out these differences and this makes
+it work.
+
+--- exmap-0.10/src/Exmap.cpp.sav 2006-09-28 18:52:25.000000000 +0200
++++ exmap-0.10/src/Exmap.cpp 2010-01-02 17:45:49.787955568 +0100
+@@ -450,7 +450,7 @@ void Vma::add_pages(const list<Page> &pa
+
+ bool Vma::is_vdso()
+ {
+- return fname() == "[vdso]";
++ return fname() == "[vdso]" || fname() == "[vsyscall]";
+ }
+
+ bool Vma::is_file_backed()
+@@ -1495,7 +1495,7 @@ bool MapCalculator::calc_map_for_seg(con
+
+ filevmas.pop_front();
+ dbg << pref.str() << "consuming vma\n";
+- if (!filevmas.empty() && !filevmas.front()->is_file_backed()) {
++ while (!filevmas.empty() && !filevmas.front()->is_file_backed()) {
+ filevmas.pop_front();
+ dbg << pref.str() << "consuming anon vma\n";
+ }
diff --git a/dev-util/exmap/files/exmap-0.10-gcc.patch b/dev-util/exmap/files/exmap-0.10-gcc.patch
new file mode 100644
index 000000000000..fd73371529bc
--- /dev/null
+++ b/dev-util/exmap/files/exmap-0.10-gcc.patch
@@ -0,0 +1,68 @@
+diff -ru exmap-0.10/work/exmap-0.10/jutil/jutil.cpp exm/work/exmap-0.10/jutil/jutil.cpp
+--- jutil/jutil.cpp 2006-09-28 18:52:25.000000000 +0200
++++ jutil/jutil.cpp 2010-02-15 15:35:43.000000000 +0100
+@@ -3,6 +3,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <cstring>
+ #include <limits.h>
+ #include <dirent.h>
+
+diff -ru exmap-0.10/work/exmap-0.10/jutil/jutil.hpp exm/work/exmap-0.10/jutil/jutil.hpp
+--- jutil/jutil.hpp 2006-09-28 18:52:25.000000000 +0200
++++ jutil/jutil.hpp 2010-02-15 15:40:02.000000000 +0100
+@@ -3,6 +3,7 @@
+
+ #include <iostream>
+ #include <string>
++#include <cstdlib>
+ #include <list>
+ #include <map>
+
+diff -ru exmap-0.10/work/exmap-0.10/src/exmtool.cpp exm/work/exmap-0.10/src/exmtool.cpp
+--- src/exmtool.cpp 2006-09-28 18:52:25.000000000 +0200
++++ src/exmtool.cpp 2010-02-15 15:34:04.000000000 +0100
+@@ -5,6 +5,7 @@
+
+ #include <sstream>
+ #include <iostream>
++#include <cstring>
+ #include <vector>
+
+ using namespace std;
+@@ -19,9 +18,9 @@
+
+ struct command
+ {
+- char *command;
++ const char *command;
+ Handler handler;
+- char *usage;
++ const char *usage;
+ } cmd_handles[] = {
+ { "procs",
+ do_procs,
+
+diff -ru exmap-0.10/work/exmap-0.10/src/Elf.cpp norg/work/exmap-0.10/src/Elf.cpp
+--- src/Elf.cpp 2006-09-28 18:52:25.000000000 +0200
++++ src/Elf.cpp 2010-02-15 16:55:37.000000000 +0100
+@@ -4,6 +4,7 @@
+ #include "Elf.hpp"
+
+ #include <sstream>
++#include <cstring>
+ #include <unistd.h> // getpagesize()
+
+ using namespace std;
+
+diff -ru exmap-0.10/jutil/TestRunner.cpp.orig exmap-0.10/jutil/TestRunner.cpp
+--- jutil/TestRunner.cpp.orig 2010-02-15 22:00:03.000000000 +0100
++++ jutil/TestRunner.cpp 2010-02-15 22:00:19.000000000 +0100
+@@ -1,5 +1,6 @@
+ #include "TestRunner.hpp"
+ #include "Pcre.hpp"
++#include <cstdio>
+
+ using namespace std;
+
diff --git a/dev-util/exmap/files/exmap-0.10-gcc45.patch b/dev-util/exmap/files/exmap-0.10-gcc45.patch
new file mode 100644
index 000000000000..a9ed3419e774
--- /dev/null
+++ b/dev-util/exmap/files/exmap-0.10-gcc45.patch
@@ -0,0 +1,11 @@
+--- src/Elf.cpp 2010-05-14 01:40:27.000000000 +0200
++++ src/Elf.cpp 2010-05-14 01:46:06.000000000 +0200
+@@ -579,7 +579,7 @@
+ std::string Section::find_string(istream &is, int index)
+ {
+ if (!is_string_table() || index < 0) {
+- return false;
++ return NULL;
+ }
+
+ int offset = _sectstruct->offset() + index;
diff --git a/dev-util/exmap/files/exmap-0.10-kernel.patch b/dev-util/exmap/files/exmap-0.10-kernel.patch
new file mode 100644
index 000000000000..8bc58737b6d5
--- /dev/null
+++ b/dev-util/exmap/files/exmap-0.10-kernel.patch
@@ -0,0 +1,50 @@
+Tested with linux-2.6.16-gentoo-r13, linux-2.6.25-gentoo-r9, linux-2.6.26-gentoo-r4, linux-2.6.27-gentoo-r10,
+linux-2.6.28-gentoo-r6, linux-2.6.29-gentoo-r6, linux-2.6.30-gentoo-r9, linux-2.6.32-gentoo-r4, linux-2.6.32-gentoo-r5
+
+diff -ru exmap-0.10.orig/work/exmap-0.10/kernel/exmap.c exmap-0.10/work/exmap-0.10/kernel/exmap.c
+--- kernel/exmap.c 2006-09-28 18:52:25.000000000 +0200
++++ kernel/exmap.c 2010-02-17 16:15:04.000000000 +0100
+@@ -392,7 +392,11 @@
+ struct task_struct *tsk;
+ int errcode = -EINVAL;
+
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
++ tsk = pid_task(find_pid_ns(pid, &init_pid_ns), PIDTYPE_PID);
++ #else
+ tsk = find_task_by_pid(pid);
++ #endif
+ if (tsk == NULL) {
+ printk (KERN_ALERT
+ "/proc/%s: can't find task for pid %d\n",
+@@ -507,7 +511,11 @@
+ NULL);
+
+ if (exmap_proc_file == NULL) {
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++ remove_proc_entry (PROCFS_NAME, NULL);
++ #else
+ remove_proc_entry (PROCFS_NAME, &proc_root);
++ #endif
+ printk (KERN_ALERT "/proc/%s: could not initialize\n",
+ PROCFS_NAME);
+ return -ENOMEM;
+@@ -523,7 +523,9 @@
+
+ exmap_proc_file->read_proc = procfile_read;
+ exmap_proc_file->write_proc = procfile_write;
++ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,29)
+ exmap_proc_file->owner = THIS_MODULE;
++ #endif
+
+ /* exmap_proc_file->mode = S_IFREG | S_IRUGO; */
+ /* TODO - this is quite probably a security problem */
+@@ -532,5 +540,9 @@
+ void cleanup_module ()
+ {
+ printk (KERN_INFO "/proc/%s: remove\n", PROCFS_NAME);
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++ remove_proc_entry (PROCFS_NAME, NULL);
++ #else
+ remove_proc_entry (PROCFS_NAME, &proc_root);
++ #endif
+ }
diff --git a/dev-util/exmap/files/exmap-0.10-makefiles.patch b/dev-util/exmap/files/exmap-0.10-makefiles.patch
new file mode 100644
index 000000000000..e3841c60566d
--- /dev/null
+++ b/dev-util/exmap/files/exmap-0.10-makefiles.patch
@@ -0,0 +1,115 @@
+diff -ru exmap-0.10.orig/work/exmap-0.10/jutil/Makefile exmap-0.10/work/exmap-0.10/jutil/Makefile
+--- jutil/Makefile 2006-09-28 18:52:25.000000000 +0200
++++ jutil/Makefile 2010-02-17 17:31:56.000000000 +0100
+@@ -12,21 +12,20 @@
+ OBJ += $(ETOBJ)
+ EXES += egtest
+
+-CXX=g++
+-CXXFLAGS=-Wall -Werror -g -I.
+-LD=g++
+-LDFLAGS=-lpcre
++CXX = g++
++CXXFLAGS += -Wall -Werror -I.
++LD = ld
+
+ build: $(LIBS) $(EXES)
+
+ trun: $(TROBJ) $(JLIB)
+- $(LD) $(TROBJ) -o trun $(LDFLAGS) -ljutil -L.
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(TROBJ) -o trun -ljutil -lpcre -L.
+
+ $(JLIB): $(JOBJ)
+ ar rs $(JLIB) $(JOBJ)
+
+ egtest: $(ETOBJ)
+- $(LD) $(ETOBJ) -o egtest $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(ETOBJ) -o egtest $(LDFLAGS)
+
+ clean:
+ rm -f $(OBJ) $(EXES) $(JLIB) *~
+diff -ru exmap-0.10.orig/work/exmap-0.10/kernel/Makefile exmap-0.10/work/exmap-0.10/kernel/Makefile
+--- kernel/Makefile 2006-09-28 18:52:25.000000000 +0200
++++ kernel/Makefile 2010-02-17 17:30:06.000000000 +0100
+@@ -7,7 +7,7 @@
+ build: kernel_modules
+
+ kernel_modules:
+- make -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) modules
++ $(MAKE) -C ${KERNEL_DIR} M=$(CURDIR) modules
+
+ clean:
+- make -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) clean
++ $(MAKE) -C ${KERNEL_DIR} M=$(CURDIR) clean
+Only in exmap-0.10/work/exmap-0.10/kernel/.tmp_versions: exmap.mod
+diff -ru exmap-0.10.orig/work/exmap-0.10/src/Makefile exmap-0.10/work/exmap-0.10/src/Makefile
+--- src/Makefile 2006-09-28 18:52:25.000000000 +0200
++++ src/Makefile 2010-02-17 17:33:38.000000000 +0100
+@@ -1,5 +1,5 @@
+ CXX=g++
+-LD=g++
++LD=ld
+ JUTILDIR=../jutil
+
+ #CXXFLAGS += -pg
+@@ -11,11 +11,12 @@
+
+ EXMAP_OBJ=Exmap.o Range.o Elf.o
+
+-CXXFLAGS += -g -Wall -Werror -I$(JUTILDIR)
+-LDFLAGS += -lpcre -ljutil -L$(JUTILDIR)
++CXXFLAGS += -Wall -Werror -I$(JUTILDIR)
++LDFLAGS += -L$(JUTILDIR)
++LIBS += -lpcre -ljutil
+
+ GTKCXXFLAGS = `pkg-config --cflags gtkmm-2.4`
+-GTKLDFLAGS = `pkg-config --libs gtkmm-2.4`
++GTKLIBS = `pkg-config --libs gtkmm-2.4`
+
+ # ------------------------------------------------------------
+
+@@ -76,34 +77,34 @@
+ $(JUTILDIR)/trun $(TESTS)
+
+ gexmap: $(GEM_OBJ)
+- $(LD) -o gexmap $(GEM_OBJ) $(LDFLAGS) $(GTKLDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o gexmap $(GEM_OBJ) $(LIBS) $(GTKLIBS)
+
+ gexmap.o: gexmap.cpp
+- $(CC) $(CXXFLAGS) $(GTKCXXFLAGS) -c $<
++ $(CXX) $(CXXFLAGS) $(GTKCXXFLAGS) -c $<
+
+ exmtool: $(CL_OBJ)
+- $(LD) -o exmtool $(CL_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o exmtool $(CL_OBJ) $(LIBS)
+
+ elftool: $(ET_OBJ)
+- $(LD) -o elftool $(ET_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o elftool $(ET_OBJ) $(LIBS)
+
+ showproc: $(SP_OBJ)
+- $(LD) -o showproc $(SP_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o showproc $(SP_OBJ) $(LIBS)
+
+ t_range: $(TR_OBJ)
+- $(LD) -o t_range $(TR_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o t_range $(TR_OBJ) $(LIBS)
+
+ t_elf: $(TE_OBJ)
+- $(LD) -o t_elf $(TE_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o t_elf $(TE_OBJ) $(LIBS)
+
+ t_pcre: $(TP_OBJ)
+- $(LD) -o t_pcre $(TP_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o t_pcre $(TP_OBJ) $(LIBS)
+
+ t_exmap: $(TX_OBJ)
+- $(LD) -o t_exmap $(TX_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o t_exmap $(TX_OBJ) $(LIBS)
+
+ t_artsd: $(TA_OBJ)
+- $(LD) -o t_artsd $(TA_OBJ) $(LDFLAGS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o t_artsd $(TA_OBJ) $(LIBS)
+
+ clean: cleantags cleandoc
+ rm -f $(OBJS) $(EXES) $(SHLIBS) $(EXTRA_DEL_FILES)
diff --git a/dev-util/exmap/metadata.xml b/dev-util/exmap/metadata.xml
new file mode 100644
index 000000000000..3cce2cd0af2f
--- /dev/null
+++ b/dev-util/exmap/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber (xmw)</name>
+</maintainer>
+</pkgmetadata>
+