From owner-svn-src-all@FreeBSD.ORG Wed Apr 17 06:00:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 291A6BB2; Wed, 17 Apr 2013 06:00:43 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id EF777CE0; Wed, 17 Apr 2013 06:00:42 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r3H60aUa067760; Wed, 17 Apr 2013 06:00:36 GMT (envelope-from kientzle@freebsd.org) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id e345h6zqhwgn4ugxjtkrgnkwaa; Wed, 17 Apr 2013 06:00:36 +0000 (UTC) (envelope-from kientzle@freebsd.org) Subject: Re: svn commit: r249484 - head/lib Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/signed; boundary="Apple-Mail=_C5B7AA32-82D9-4A21-A2B9-8A1EF782368B"; protocol="application/pgp-signature"; micalg=pgp-sha1 From: Tim Kientzle In-Reply-To: <516D54F5.4010501@FreeBSD.org> Date: Tue, 16 Apr 2013 23:00:34 -0700 Message-Id: <2A0FC59F-E043-4B4E-BABE-E16C6A1FBF5C@freebsd.org> References: <201304141913.r3EJDqPI095965@svn.freebsd.org> <516D54F5.4010501@FreeBSD.org> To: Tijl Coosemans X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 17 Apr 2013 06:00:43 -0000 --Apple-Mail=_C5B7AA32-82D9-4A21-A2B9-8A1EF782368B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 16, 2013, at 6:41 AM, Tijl Coosemans wrote: > On 2013-04-14 21:13, Tim Kientzle wrote: >> Author: kientzle >> Date: Sun Apr 14 19:13:51 2013 >> New Revision: 249484 >> URL: http://svnweb.freebsd.org/changeset/base/249484 >>=20 >> Log: >> Install a symlink >> /usr/lib/include =3D=3D> /usr/include >>=20 >> This fixes -print-file-name=3Dinclude in clang (and is >> arguably a better way to fix the same issue in GCC than >> the change I made in r231336). >>=20 >> MFC after: 1 week >>=20 >> Modified: >> head/lib/Makefile >>=20 >> Modified: head/lib/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/Makefile Sun Apr 14 18:36:30 2013 = (r249483) >> +++ head/lib/Makefile Sun Apr 14 19:13:51 2013 = (r249484) >> @@ -252,4 +252,7 @@ _libusbhid=3D libusbhid >> _libusb=3D libusb >> .endif >>=20 >> +afterinstall: >> + ln -fs ../include ${DESTDIR}/usr/lib/include >> + >> .include >=20 > This breaks with -DNO_CLEAN defined, because then > ${DESTDIR}/usr/lib/include/include is created. That's a good point. Would this work better? afterinstall: if [ ! -e $(DESTDIR)/usr/lib/include ]; then ln -fs ../include $(DESTDIR)/usr/lib/include fi > I'm not that fond of this patch by the way, but I don't fully > understand the problem it's trying to solve so I won't object. > It just looks too much like a hack to me It's a subtle issue and I'm not surprised that it raised some eyebrows. I spent a long time looking for a better solution. In short, both GCC and Clang make some assumptions about the layout of headers used for freestanding compiles. (My earlier commit said these assumptions were "undocumented", but that's not quite true, they're just rather obscure.) This symlink is the simplest way I've found to reconcile those assumptions with the FreeBSD directory layout. I'm happy to consider alternatives. Tim --Apple-Mail=_C5B7AA32-82D9-4A21-A2B9-8A1EF782368B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) iQEcBAEBAgAGBQJRbjqDAAoJEGMNyGo0rfFBegQIALW3pBzjml5NRyfd+pRjEePr H1xLELuQOFcNRMuNFuO1Kvky/p8QBrqqoa73GLcj15/3z1wWWv5wJQSHKp6WasbJ 8kByp2FYVb/GOaydBPGB3+ijlFh/rsUZBYIEsWg5WU2YhwdE2Oc5Y6+3jIAu2STJ yNy0uz9wN6GGlmPgf3GdTMEq00f0iOOGxflWPjJIblmDJm64YEN6pqnUVWwkJ5Wu MB77IdUNGq/bjOSeoXLtdy6kjShALuw25yAKibFL+NlAInHx0IE2Az/bGKqNM1d6 /ZW2ZFGjKFMxkFPQcMEbNB28PhlrANvrZ3G7aipYmenhRS//2IgFPJXvycwVHpc= =dgEC -----END PGP SIGNATURE----- --Apple-Mail=_C5B7AA32-82D9-4A21-A2B9-8A1EF782368B--