summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-07-29 18:45:38 +0000
committeremaste <emaste@FreeBSD.org>2015-07-29 18:45:38 +0000
commit32e34ac2b595f7fda4fd60eb068119b02dfce0a7 (patch)
tree1dd80db28960f1762946a615398f646b34178730 /tools
parent4829edcacf3d5dc06981744eb6ae9d3faf755697 (diff)
downloadFreeBSD-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 'tools')
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc7
-rw-r--r--tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY4
-rw-r--r--tools/build/options/WITH_ELFCOPY_AS_OBJCOPY4
3 files changed, 14 insertions, 1 deletions
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 55631e7..48dbdf5 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -184,7 +184,9 @@ OLD_DIRS+=usr/share/examples/bhyve
.if ${MK_BINUTILS} == no
OLD_FILES+=usr/bin/as
OLD_FILES+=usr/bin/ld
+.if ${MK_ELFTOOLCHAIN_TOOLS} != no && ${MK_ELFCOPY_AS_OBJCOPY} == no
OLD_FILES+=usr/bin/objcopy
+.endif
OLD_FILES+=usr/bin/objdump
OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.x
OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xbn
@@ -201,7 +203,9 @@ OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xu
OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xw
OLD_FILES+=usr/share/man/man1/as.1.gz
OLD_FILES+=usr/share/man/man1/ld.1.gz
+.if ${MK_ELFTOOLCHAIN_TOOLS} != no && ${MK_ELFCOPY_AS_OBJCOPY} == no
OLD_FILES+=usr/share/man/man1/objcopy.1.gz
+.endif
OLD_FILES+=usr/share/man/man1/objdump.1.gz
OLD_FILES+=usr/share/man/man7/as.7.gz
OLD_FILES+=usr/share/man/man7/ld.7.gz
@@ -1646,7 +1650,8 @@ OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat
OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat
.endif
-.if ${MK_ELFTOOLCHAIN_TOOLS} == no
+.if ${MK_ELFTOOLCHAIN_TOOLS} == no || \
+ (${MK_ELFTOOLCHAIN_TOOLS} != no && MK_ELFCOPY_AS_OBJCOPY != no)
OLD_FILES+=usr/bin/elfcopy
OLD_FILES+=usr/share/man/man1/elfcopy.1.gz
.endif
diff --git a/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY b/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY
new file mode 100644
index 0000000..f06a606
--- /dev/null
+++ b/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to build and install
+.Xr objcopy 1
+from GNU Binutils, instead of the one from ELF Tool Chain.
diff --git a/tools/build/options/WITH_ELFCOPY_AS_OBJCOPY b/tools/build/options/WITH_ELFCOPY_AS_OBJCOPY
new file mode 100644
index 0000000..eabaac3
--- /dev/null
+++ b/tools/build/options/WITH_ELFCOPY_AS_OBJCOPY
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to build and install ELF Tool Chain's elfcopy as
+.Xr objcopy 1 ,
+instead of the one from GNU Binutils.
OpenPOWER on IntegriCloud