Date: Wed, 17 Apr 2013 21:38:58 +0200 From: Tijl Coosemans <tijl@FreeBSD.org> To: Dimitry Andric <dim@freebsd.org> Cc: Ed Schouten <ed@80386.nl>, src-committers@freebsd.org, Juli Mallett <jmallett@FreeBSD.org>, svn-src-all@freebsd.org, Tim Kientzle <kientzle@freebsd.org>, svn-src-head@freebsd.org Subject: Re: svn commit: r249484 - head/lib Message-ID: <516EFA52.1020509@FreeBSD.org> In-Reply-To: <1FEABB1B-ADDE-412A-9D40-F9FB2822B654@freebsd.org> References: <201304141913.r3EJDqPI095965@svn.freebsd.org> <516D54F5.4010501@FreeBSD.org> <2A0FC59F-E043-4B4E-BABE-E16C6A1FBF5C@freebsd.org> <CACVs6=9QA_wiittSR2HGcOFaDj4VASgLHOimEGWyEcSt8UdBjA@mail.gmail.com> <475555FA-DF6A-42FA-990D-4224ECAEAE52@FreeBSD.org> <516E900B.9090300@FreeBSD.org> <BE32E940-D519-4B0B-B33F-8A8F33388EA9@freebsd.org> <1FEABB1B-ADDE-412A-9D40-F9FB2822B654@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2PVDBTXUOHUXKPNDTHPTS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-04-17 19:33, Dimitry Andric wrote: > On Apr 17, 2013, at 17:58, Tim Kientzle <kientzle@freebsd.org> wrote: >> On Apr 17, 2013, at 5:05 AM, Tijl Coosemans wrote: >>> So you compile with -ffreestanding -nostdinc? >>> And then add the include path returned by -print-file-name=3Dinclude?= >> >> That's what the U-Boot sources do, yes. >=20 > Why would U-Boot want to build for a freestanding environment, then > include standard headers? Isn't that a bit backwards? :-) There's a list of headers in the standard that freestanding programs are allowed to include. If they drop -nostdinc it should build on FreeBSD. I suppose they use it to prevent accidental use of non-freestanding stuff in the headers. >>>> The -print-file-name=3Dinclude option works on Linux, works >>>> on MacOS, and --- with this one symlink --- can work on >>>> FreeBSD as well. I've been using it to cross-build U-Boot >>>> using the FreeBSD xdev toolchain with both GCC and Clang. >>> >>> "clang -E -v - </dev/null" shows it passes "-resource-dir >>> /usr/bin/../lib/clang/3.3" to cc1 stage which then complains about >>> nonexistent directory "/usr/bin/../lib/clang/3.3/include". >>> >>> So how about moving /usr/include/clang/3.3 to >>> /usr/lib/clang/3.3/include? That seems to be the location clang >>> expects and what lang/clang port uses (in /usr/local). >> >> I would certainly like to see that. I presumed that there >> was some reason this wasn't done in the initial import. >=20 > Probably because headers belong under /usr/include, not in a library > directory? I do not really agree with upstream's decision to place > their internal headers in that location. Third-party software dependin= g > on their exact location is just a little braindead IMHO. It doesn't really depend on the exact location. It relies on -print-file-name=3Dinclude to return the location which our clang doesn't. I agree that headers don't belong under lib/, but that's something to discuss upstream. FreeBSD doing little things like this differently than everybody else just makes it harder to use imho. ------enig2PVDBTXUOHUXKPNDTHPTS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlFu+lcACgkQfoCS2CCgtit3zAD/euMtxrfGhBft/9CTyimsbPEq 7v4SescnPjGXg+FujOwA/0Qw8QwIQTiHJ3L0lAufJRZfCtXBclyjXspKJbJARafI =3sLp -----END PGP SIGNATURE----- ------enig2PVDBTXUOHUXKPNDTHPTS--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?516EFA52.1020509>