From owner-svn-src-projects@FreeBSD.ORG Mon Apr 9 01:37:58 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 312DF1065670; Mon, 9 Apr 2012 01:37:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D0298FC1D; Mon, 9 Apr 2012 01:37:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q391bv6m036948; Mon, 9 Apr 2012 01:37:57 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q391bv27036946; Mon, 9 Apr 2012 01:37:57 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201204090137.q391bv27036946@svn.freebsd.org> From: Andrew Turner Date: Mon, 9 Apr 2012 01:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234048 - projects/arm_eabi/lib/libelf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 09 Apr 2012 01:37:58 -0000 Author: andrew Date: Mon Apr 9 01:37:57 2012 New Revision: 234048 URL: http://svn.freebsd.org/changeset/base/234048 Log: We only need a subset of the header files from sys. We can link to the three header files we need rather than everything under sys. This fixes an issue where, while bootstrapping, a header file in sys/ includes a machine dependent header that has changed from the FreeBSD version we are bootstrapping from. Modified: projects/arm_eabi/lib/libelf/Makefile Modified: projects/arm_eabi/lib/libelf/Makefile ============================================================================== --- projects/arm_eabi/lib/libelf/Makefile Mon Apr 9 01:20:50 2012 (r234047) +++ projects/arm_eabi/lib/libelf/Makefile Mon Apr 9 01:37:57 2012 (r234048) @@ -55,9 +55,23 @@ SRCS= elf_begin.c \ ${GENSRCS} 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} -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys +CFLAGS+= -I${.CURDIR} -I. + +sys/elf32.h sys/elf64.h sys/elf_common.h: sys + ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET} + +sys: + mkdir -p ${.OBJDIR}/sys SHLIB_MAJOR= 1