aboutsummaryrefslogtreecommitdiff
path: root/lib/libelftc
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-06-05 23:05:14 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-06-05 23:05:14 +0000
commit94bb24b38701354b6a34607982483227823de864 (patch)
tree3a83a4cae9bd6509e05ca1cc1b2870ee113f848f /lib/libelftc
parent4d40df1bffec25621eecee14019873e8b66752e0 (diff)
downloadsrc-94bb24b38701354b6a34607982483227823de864.tar.gz
src-94bb24b38701354b6a34607982483227823de864.zip
Use the in-tree sys/elf_common.h to build libelftc.
This fixes build failures on older releases that lack various definitions such as EM_AARCH64 (which was unfixed before this). Revert all of the recent compatibility changes that worked around this problem. This uses the same method of using the in-tree header as lib/libelf, lib/libdwarf and usr.bin/readelf. Reviewed by: emaste Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D6734
Notes
Notes: svn path=/head/; revision=301471
Diffstat (limited to 'lib/libelftc')
-rw-r--r--lib/libelftc/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libelftc/Makefile b/lib/libelftc/Makefile
index eed7acf19f0e..5a9d17d37c28 100644
--- a/lib/libelftc/Makefile
+++ b/lib/libelftc/Makefile
@@ -29,4 +29,17 @@ CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
MAN=
+# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
+# We need to link against the correct version of these files. One
+# solution is to include ../../sys in the include path. This causes
+# problems when a header file in sys depends on a file in another
+# part of the tree, e.g. a machine dependent header.
+#
+SRCS+= sys/elf_common.h
+CLEANDIRS= sys
+CFLAGS+= -I.
+sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
+ mkdir -p ${.OBJDIR}/sys
+ ln -sf ${.ALLSRC} ${.TARGET}
+
.include <bsd.lib.mk>