From owner-svn-src-all@FreeBSD.ORG Tue Apr 15 16:10:48 2014 Return-Path: Delivered-To: svn-src-all@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 2AD40FDE; Tue, 15 Apr 2014 16:10:48 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F178D1C88; Tue, 15 Apr 2014 16:10:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FGAlOD011215; Tue, 15 Apr 2014 16:10:47 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FGAlwW011214; Tue, 15 Apr 2014 16:10:47 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201404151610.s3FGAlwW011214@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 15 Apr 2014 16:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264506 - stable/9/lib/libelf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 16:10:48 -0000 Author: tijl Date: Tue Apr 15 16:10:47 2014 New Revision: 264506 URL: http://svnweb.freebsd.org/changeset/base/264506 Log: MFC r237528: Create a symlink to sys/elf32.h, sys/elf64.h, and sys/elf_common.h. When building libelf in the bootstrap stage this would include the tree versions of, for example, sys/_types.h. This would work as long as the tree's version of this file was close enough to the system's version of the file. If, however, there was a change in the tree such that the location of a typedef was moved this would cause problems. In this case the version of sys/_types.h in the tree no longer defines __wchar_t and expects it to to be defined in machine/_types.h, however we pick up machine/_types.h from the system and find it is not defined there. The solution is to restrict the parts of sys er include from the tree to those that are needed. This fixes the recent Tinderbox failure. MFC r237531: Add the sys directory we create to the list of items to clean. MFC r238741: Don't ever build files depending on the directory where they are placed in. It is obvious that its modification time will change with each such file builded. This bug cause whole libelf to rebuild itself each second make run (and relink that files on each first make run) in the loop. Modified: stable/9/lib/libelf/Makefile Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libelf/ (props changed) Modified: stable/9/lib/libelf/Makefile ============================================================================== --- stable/9/lib/libelf/Makefile Tue Apr 15 15:58:06 2014 (r264505) +++ stable/9/lib/libelf/Makefile Tue Apr 15 16:10:47 2014 (r264506) @@ -55,9 +55,22 @@ 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 +CLEANDIRS= sys +CFLAGS+= -I${.CURDIR} -I. + +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