From owner-svn-src-projects@FreeBSD.ORG Tue Jan 21 20:42:16 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4D1D86C; Tue, 21 Jan 2014 20:42:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78E431706; Tue, 21 Jan 2014 20:42:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0LKgGwD050200; Tue, 21 Jan 2014 20:42:16 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0LKgGkx050198; Tue, 21 Jan 2014 20:42:16 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201401212042.s0LKgGkx050198@svn.freebsd.org> From: Kai Wang Date: Tue, 21 Jan 2014 20:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r260991 - in projects/elftoolchain/lib: libdwarf libelf X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jan 2014 20:42:16 -0000 Author: kaiw Date: Tue Jan 21 20:42:15 2014 New Revision: 260991 URL: http://svnweb.freebsd.org/changeset/base/260991 Log: 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. Modified: projects/elftoolchain/lib/libdwarf/Makefile projects/elftoolchain/lib/libelf/Makefile Modified: projects/elftoolchain/lib/libdwarf/Makefile ============================================================================== --- projects/elftoolchain/lib/libdwarf/Makefile Tue Jan 21 20:23:39 2014 (r260990) +++ projects/elftoolchain/lib/libdwarf/Makefile Tue Jan 21 20:42:15 2014 (r260991) @@ -75,14 +75,27 @@ SRCS= \ 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 \ dwarf_funcs.c dwarf_vars.c dwarf_types.c \ dwarf_pro_pubnames.c dwarf_pro_weaks.c \ dwarf_pro_funcs.c dwarf_pro_types.c \ dwarf_pro_vars.c CLEANFILES= ${GENSRCS} +CLEANDIRS= sys 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 DPADD+= ${LIBELF} Modified: projects/elftoolchain/lib/libelf/Makefile ============================================================================== --- projects/elftoolchain/lib/libelf/Makefile Tue Jan 21 20:23:39 2014 (r260990) +++ projects/elftoolchain/lib/libelf/Makefile Tue Jan 21 20:42:15 2014 (r260991) @@ -65,10 +65,23 @@ SRCS= elf.c \ 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 CLEANFILES= ${GENSRCS} +CLEANDIRS= sys 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 MAN= elf.3 \