diff options
author | emaste <emaste@FreeBSD.org> | 2015-07-29 18:45:38 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-07-29 18:45:38 +0000 |
commit | 32e34ac2b595f7fda4fd60eb068119b02dfce0a7 (patch) | |
tree | 1dd80db28960f1762946a615398f646b34178730 /usr.bin | |
parent | 4829edcacf3d5dc06981744eb6ae9d3faf755697 (diff) | |
download | FreeBSD-src-32e34ac2b595f7fda4fd60eb068119b02dfce0a7.zip FreeBSD-src-32e34ac2b595f7fda4fd60eb068119b02dfce0a7.tar.gz |
Allow ELF Tool Chain elfcopy to be installed as objcopy
ELF Tool Chain elfcopy is nearly a drop-in replacement for GNU objcopy,
but does not currently support PE output which is needed for building
x86 UEFI bits.
Add a src.conf knob to allow installing it as objcopy and set it by
default for aarch64 only, where we don't have a native binutils.
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2887
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/elfcopy/Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/elfcopy/Makefile b/usr.bin/elfcopy/Makefile index 8e7f31d..dc6dd47 100644 --- a/usr.bin/elfcopy/Makefile +++ b/usr.bin/elfcopy/Makefile @@ -7,7 +7,15 @@ ELFCOPYDIR= ${ELFTCDIR}/elfcopy .PATH: ${ELFCOPYDIR} +.if ${MK_ELFCOPY_AS_OBJCOPY} != "no" +PROG= objcopy +objcopy.1: elfcopy.1 + sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \ + -e 's/\.Nm elfcopy/.Nm objcopy/' < ${.ALLSRC} > ${.TARGET} +CLEANFILES+= objcopy.1 +.else PROG= elfcopy +.endif SRCS= archive.c ascii.c binary.c main.c sections.c segments.c symbols.c @@ -17,8 +25,8 @@ LIBADD= archive elftc elf CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common -MAN= elfcopy.1 strip.1 +MAN= ${PROG}.1 strip.1 -LINKS= ${BINDIR}/elfcopy ${BINDIR}/strip +LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip .include <bsd.prog.mk> |