From owner-freebsd-hackers@FreeBSD.ORG Sun May 22 22:39:34 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE181106564A for ; Sun, 22 May 2011 22:39:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8194D8FC12 for ; Sun, 22 May 2011 22:39:34 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MMZ691094405 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 16:35:07 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 22 May 2011 16:35:05 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <8854CF36-7B6D-4918-ADF8-6A16CCB2F307@bsdimp.com> References: To: Benjamin Kaduk X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 16:35:07 -0600 (MDT) Cc: freebsd-hackers@FreeBSD.org Subject: Re: porting third-party build system to bsd.kmod.mk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:39:35 -0000 The usual reason that vnode_if.h doesn't build for me when I'm doing = in-tree hacking is because make depend hasn't run to generate it yet. = Or more precisely, the arc in the dependency graph from osi_crypto.c to = vnode_if.h. I didn't see that as part of the log, so you might try this = first (and make setup dependent on depend somehow, as long as it is = idempotent. But many of the things that are being setup with the setup target = shouldn't be necessary. depend does that based on the setting of = SYSDIR. and the @ symlink should be enough to make the ufs and other = symlinks unnecessary. Warner On May 21, 2011, at 12:14 AM, Benjamin Kaduk wrote: > After getting a few pointers from jhb at BSDCan on what a = bsd.kmod.mk-using Makefile should look like, I have been trying my hand = at porting the OpenAFS kernel module build system to use it. (The main = thing this gets us is not having to manually track version- and = architecture-dependent CFLAGS and the like.) However, the path is not = exactly smooth. >=20 > A lot of the difficulty is in getting an autogenerated vnode_if.h = while using a list of files to include in the module(from the common = OpenAFS code) that's given as a list of object files. If there's = already a vnode_if.h sitting around, I can just use OBJS and things = progress quite nicely; however, if I have to get back to SRCS for the = use of sys/conf/kmod.mk's vnode_if.h logic, I get this sort of build = failure (full log attached) with the attached Makefile: > gcc -I. -I.. -I../nfs [more includes and defines] = -I/usr/devel/openafs/git/openafs/include/afs -I@/sys -Imachine -I. -I@ = -I@/contrib/altq -finline-limit=3D8000 --param inline-unit-growth=3D100 = --param large-function-growth=3D1000 -fno-common -fno-omit-frame-pointer = -mcmodel=3Dkernel -mno-red-zone -mfpmath=3D387 -mno-mmx -mno-3dnow = -mno-sse -mno-sse2 -mno-sse3 -msoft-float = -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector = -std=3Diso9899:1999 -fstack-protector -Wno-redundant-decls = -Wsystem-headers -Werror -Wno-pointer-sign -o osi_crypto.o -c = /usr/devel/openafs/git/openafs/src/afs/FBSD/osi_crypto.c = /usr/devel/openafs/git/openafs/src/libafs/MODLOAD/../../afs/FBSD/osi_crypt= o.c vnode_if.h > gcc: cannot specify -o with -c or -S with multiple files >=20 > That last bit, "-o osi_crypto.o -c /path/to/osi_crypto.c = /path/to/osi_crypto.c vnode_if.h" is quite troublesome. Any thoughts on = what is causing those extra files to be listed would be greatly = appreciated. (Comments on other issues in the Makefile are welcome, too = -- it's still in pretty rough shape.) >=20 > I should note that though Makefile.common does define a osi_crypto.o = target, "make -d A" reports: > using existing source = /usr/devel/openafs/git/openafs/src/afs/FBSD/osi_crypto.c > applying .c -> .o to "osi_crypto.o" >=20 >=20 > Thanks, >=20 > Ben = Kaduk____________________________________________= ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org"