summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-12-01 17:49:42 +0000
committeremaste <emaste@FreeBSD.org>2014-12-01 17:49:42 +0000
commitc79f6538fe5b1fe35382903168b76167be44db9e (patch)
treeb5191de270f7e85906a95d316dda5b037968fa58 /usr.bin
parent1941346c9da7dde6f28d67d3053d7713294d012c (diff)
downloadFreeBSD-src-c79f6538fe5b1fe35382903168b76167be44db9e.zip
FreeBSD-src-c79f6538fe5b1fe35382903168b76167be44db9e.tar.gz
Build infrastructure for elftoolchain tools
Set WITH_ELFTOOLCHAIN_TOOLS in src.conf to use the elftoolchain version of the following tools: * addr2line * elfcopy (strip / mcs) * nm * size * strings Reviewed by: bapt (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1224
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/Makefile15
-rw-r--r--usr.bin/addr2line/Makefile16
-rw-r--r--usr.bin/elfcopy/Makefile24
-rw-r--r--usr.bin/nm/Makefile16
-rw-r--r--usr.bin/size/Makefile16
-rw-r--r--usr.bin/strings/Makefile15
6 files changed, 101 insertions, 1 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 298903e..88628fb 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -9,7 +9,8 @@
# Moved to secure: bdes
#
-SUBDIR= alias \
+SUBDIR= ${_addr2line} \
+ alias \
apply \
asa \
awk \
@@ -41,6 +42,7 @@ SUBDIR= alias \
du \
ee \
elf2aout \
+ ${_elfcopy} \
elfdump \
enigma \
env \
@@ -119,6 +121,7 @@ SUBDIR= alias \
nfsstat \
nice \
nl \
+ ${_nm} \
nohup \
opieinfo \
opiekey \
@@ -150,12 +153,14 @@ SUBDIR= alias \
seq \
shar \
showmount \
+ ${_size} \
sockstat \
soeliminate \
sort \
split \
stat \
stdbuf \
+ ${_strings} \
su \
systat \
tabs \
@@ -236,6 +241,14 @@ SUBDIR+= calendar
_clang= clang
.endif
+.if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
+_addr2line= addr2line
+_elfcopy= elfcopy
+_nm= nm
+_size= size
+_strings= strings
+.endif
+
.if ${MK_FMAKE} != "no"
SUBDIR+= make
.endif
diff --git a/usr.bin/addr2line/Makefile b/usr.bin/addr2line/Makefile
new file mode 100644
index 0000000..918707a
--- /dev/null
+++ b/usr.bin/addr2line/Makefile
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain
+ADDR2LINEDIR= ${ELFTCDIR}/addr2line
+
+.PATH: ${ADDR2LINEDIR}
+
+PROG= addr2line
+
+LIBADD= elftc dwarf elf
+
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/elfcopy/Makefile b/usr.bin/elfcopy/Makefile
new file mode 100644
index 0000000..8e7f31d
--- /dev/null
+++ b/usr.bin/elfcopy/Makefile
@@ -0,0 +1,24 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain
+ELFCOPYDIR= ${ELFTCDIR}/elfcopy
+
+.PATH: ${ELFCOPYDIR}
+
+PROG= elfcopy
+
+SRCS= archive.c ascii.c binary.c main.c sections.c segments.c symbols.c
+
+WARNS?= 5
+
+LIBADD= archive elftc elf
+
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
+
+MAN= elfcopy.1 strip.1
+
+LINKS= ${BINDIR}/elfcopy ${BINDIR}/strip
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/nm/Makefile b/usr.bin/nm/Makefile
new file mode 100644
index 0000000..5078e10
--- /dev/null
+++ b/usr.bin/nm/Makefile
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain
+NMDIR= ${ELFTCDIR}/nm
+
+.PATH: ${NMDIR}
+
+PROG= nm
+
+LIBADD= dwarf elftc elf
+
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/size/Makefile b/usr.bin/size/Makefile
new file mode 100644
index 0000000..6aba73d
--- /dev/null
+++ b/usr.bin/size/Makefile
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain
+SIZEDIR= ${ELFTCDIR}/size
+
+.PATH: ${SIZEDIR}
+
+PROG= size
+
+LIBADD= elftc elf
+
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/strings/Makefile b/usr.bin/strings/Makefile
new file mode 100644
index 0000000..8543dcf
--- /dev/null
+++ b/usr.bin/strings/Makefile
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain
+
+.PATH: ${ELFTCDIR}/strings
+
+PROG= strings
+
+LIBADD= elftc elf
+
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
+
+.include <bsd.prog.mk>
OpenPOWER on IntegriCloud