Reapply revisions r237528, r237531 and r238741 which make libelf
properly include sys/ headers from the source tree instead of the host. These patches are also applied to libdwarf since libdwarf requires the same sys/ headers as libelf.
This commit is contained in:
parent
a1abeb052e
commit
6eabfa9670
@ -75,14 +75,27 @@ SRCS= \
|
|||||||
|
|
||||||
INCS= dwarf.h libdwarf.h
|
INCS= dwarf.h libdwarf.h
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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/elf32.h sys/elf64.h sys/elf_common.h
|
||||||
|
|
||||||
GENSRCS= dwarf_pubnames.c dwarf_pubtypes.c dwarf_weaks.c \
|
GENSRCS= dwarf_pubnames.c dwarf_pubtypes.c dwarf_weaks.c \
|
||||||
dwarf_funcs.c dwarf_vars.c dwarf_types.c \
|
dwarf_funcs.c dwarf_vars.c dwarf_types.c \
|
||||||
dwarf_pro_pubnames.c dwarf_pro_weaks.c \
|
dwarf_pro_pubnames.c dwarf_pro_weaks.c \
|
||||||
dwarf_pro_funcs.c dwarf_pro_types.c \
|
dwarf_pro_funcs.c dwarf_pro_types.c \
|
||||||
dwarf_pro_vars.c
|
dwarf_pro_vars.c
|
||||||
CLEANFILES= ${GENSRCS}
|
CLEANFILES= ${GENSRCS}
|
||||||
|
CLEANDIRS= sys
|
||||||
CFLAGS+= -I. -I${SRCDIR} -I${TOP}/common -I${TOP}/libelf
|
CFLAGS+= -I. -I${SRCDIR} -I${TOP}/common -I${TOP}/libelf
|
||||||
|
|
||||||
|
sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
|
||||||
|
mkdir -p ${.OBJDIR}/sys
|
||||||
|
ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
|
||||||
|
|
||||||
LDADD+= -lelf
|
LDADD+= -lelf
|
||||||
DPADD+= ${LIBELF}
|
DPADD+= ${LIBELF}
|
||||||
|
|
||||||
|
@ -65,10 +65,23 @@ SRCS= elf.c \
|
|||||||
|
|
||||||
INCS= libelf.h gelf.h
|
INCS= libelf.h gelf.h
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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/elf32.h sys/elf64.h sys/elf_common.h
|
||||||
|
|
||||||
GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c
|
GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c
|
||||||
CLEANFILES= ${GENSRCS}
|
CLEANFILES= ${GENSRCS}
|
||||||
|
CLEANDIRS= sys
|
||||||
CFLAGS+= -I. -I${SRCDIR} -I${TOP}/common
|
CFLAGS+= -I. -I${SRCDIR} -I${TOP}/common
|
||||||
|
|
||||||
|
sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
|
||||||
|
mkdir -p ${.OBJDIR}/sys
|
||||||
|
ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
|
||||||
|
|
||||||
SHLIB_MAJOR= 1
|
SHLIB_MAJOR= 1
|
||||||
|
|
||||||
MAN= elf.3 \
|
MAN= elf.3 \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user