From 3456e2d15bd813b18a8e16b7b309dd6ca35b8f5b Mon Sep 17 00:00:00 2001 From: bdrewery Date: Sun, 5 Jun 2016 23:05:14 +0000 Subject: 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 --- lib/libelftc/Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/libelftc') diff --git a/lib/libelftc/Makefile b/lib/libelftc/Makefile index eed7acf..5a9d17d 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 -- cgit v1.1