From owner-freebsd-current@FreeBSD.ORG Sat Sep 14 17:50:10 2013 Return-Path: Delivered-To: freebsd-current@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 ESMTP id 1E2312D3; Sat, 14 Sep 2013 17:50:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E61A021AE; Sat, 14 Sep 2013 17:50:09 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VKtyy-0003X7-FY; Sat, 14 Sep 2013 17:50:08 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r8EHo5Fk010827; Sat, 14 Sep 2013 11:50:05 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/mJww22C/fFql3Vq7SzTZA Subject: aicasm build error From: Ian Lepore To: freebsd-current@FreeBSD.org Content-Type: multipart/mixed; boundary="=-RdR77MEbvpQRXzS+iCfF" Date: Sat, 14 Sep 2013 11:50:05 -0600 Message-ID: <1379181005.1197.24.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: Dimitry Andric X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2013 17:50:10 -0000 --=-RdR77MEbvpQRXzS+iCfF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit For a while I've been getting a build error on aicasm during the early steps of the build. Today I finally dug into it and discovered it's because the build is using a mix of header files, some from /usr/include on the build host, and some from obj/... for the target being built. It happens because dev/aic7xxx/aicasm/Makefile contains CFLAGS+= -I. and the current directory when aicasm builds is obj/.../. In my case it was picking up machine/_types.h from objdir. Apparently this is usually harmless, but if the build host system and the target versions are far enough apart, or with a cross-build where the host and target are different architectures, you can get problems. After a little digging, I just now discovered Marcel fixed this long ago in r70000, but then it got undone in r236578 a couple months ago. Is there any reason not to restore Marcel's fix, such as with the attached patch? -- Ian --=-RdR77MEbvpQRXzS+iCfF Content-Disposition: inline; filename="aicasm_build.diff" Content-Type: text/x-patch; name="aicasm_build.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit diff -r 00739d74c495 sys/dev/aic7xxx/aicasm/Makefile --- sys/dev/aic7xxx/aicasm/Makefile Sat Sep 14 09:55:04 2013 -0600 +++ sys/dev/aic7xxx/aicasm/Makefile Sat Sep 14 11:44:09 2013 -0600 @@ -24,7 +24,8 @@ WARNS?= 5 DEPENDFILE= .depend_aicasm .endif -CFLAGS+= -I. +# Tool runs on the build host, must prefer /usr/include headers over obj/... +CFLAGS+= -I/usr/include -I. .ifdef MAKESRCPATH CFLAGS+= -I${MAKESRCPATH} .endif --=-RdR77MEbvpQRXzS+iCfF--