From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: bug#22186: Use {C,CPLUS,OBJC}_INCLUDE_PATH instead of CPATH Date: Wed, 16 Dec 2015 22:18:37 +0200 Message-ID: <20151216221837.588bacf3@debian-netbook> References: <871tama22g.fsf@igalia.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/8sSYe7TdZg/TeSP5WmOW+Ks"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9IXR-0003xm-JA for bug-guix@gnu.org; Wed, 16 Dec 2015 15:19:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9IXO-0006MQ-DQ for bug-guix@gnu.org; Wed, 16 Dec 2015 15:19:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9IXO-0006MK-AL for bug-guix@gnu.org; Wed, 16 Dec 2015 15:19:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a9IXO-000670-7F for bug-guix@gnu.org; Wed, 16 Dec 2015 15:19:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <871tama22g.fsf@igalia.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andy Wingo Cc: 22186@debbugs.gnu.org --Sig_/8sSYe7TdZg/TeSP5WmOW+Ks Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 16 Dec 2015 14:41:11 +0000 Andy Wingo wrote: > Hi, >=20 > I am building GDB from git, because I want to hack on GDB. I have a few > build-related things in my profile, including GCC. I enter an > environment for GDB like this: >=20 > guix environment gdb --ad-hoc flex autoconf-2.64 >=20 > Cool. Very good. I build: >=20 > mkdir +2.0 > cd +2.0 > ../configure --prefix=3D/opt/gdb > make >=20 [...] > The answer is interesting! I quote the GCC manual, section "Environment > Variables": >=20 > Some additional environment variables affect the behavior of the > preprocessor. >=20 > 'CPATH' > 'C_INCLUDE_PATH' > 'CPLUS_INCLUDE_PATH' > 'OBJC_INCLUDE_PATH' [...] >=20 > So! CPATH is like -I but C_INCLUDE_PATH et al are like -isystem. > Here's the docs for -isystem ("Preprocessor Options"): >=20 > '-isystem DIR' > Search DIR for header files, after all directories specified by > '-I' but before the standard system directories. Mark it as a > system directory, so that it gets the same special treatment as = is > applied to the standard system directories. If DIR begins with > '=3D', then the '=3D' will be replaced by the sysroot prefix; see > '--sysroot' and '-isysroot'. >=20 > What is a system directory? Well, it's searched for after all -I > includes, but also header files in it are marked as system headers. > Many warnings are not issued for system headers; search the manual for > the phrase "system headers". For example: >=20 > '-Wsystem-headers' > Issue warnings for code in system headers. These are normally > unhelpful in finding bugs in your own code, therefore suppressed. > If you are responsible for the system library, you may want to s= ee > them. >=20 > So. We should be using C_INCLUDE_PATH instead of CPATH, to mark system > headers as system headers. Except that C_INCLUDE_PATH only works for C, > so we need to also set CPLUS_INCLUDE_PATH and OBJC_INCLUDE_PATH. And > that's the proposal of this bug :) >=20 > Andy >=20 Are there other ones that could be set? Every time I compile it I see optio= ns for java and go. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Sig_/8sSYe7TdZg/TeSP5WmOW+Ks Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJWcccdAAoJEPTB05F+rO6Tf9YP/0BCB26JpX01l+UHO0FUKpBJ K5OTBbL+tZJZ5+vTurb69QSoKrduYX8L3yhOXuTYmDj9vtxmxrdURW+OFKHFhTr6 BKk+B/4fWW0mNznr6ax8p/T28bvIncINF9Xn2C4JGouBr/+WqTD/otxtZQ2kovBi Agsx8/9D8bq7Pok+D0jx2dmriXGTXTi/iOW4hgdWlMVKJx+b31Ve6Q5dgsup2fa+ EUKc6LuatDwhM99wI1q0VmH6xQF16crpFBfEvqGqLbHm8vTXN/Bd30Qlqd+YyEut UKpO6xoz6ZFRUSUBzEE+6xKC2xCFH+qIxBA6PqKFEmwnnAbxoa9zA37/H23/Aj6Z oO8FXrWVfiH5dn76hWmlaCPsBjqCU0Vmc5fc1e8P2d3yKHCKLPQgCY6biWNzd+zw Wv3EvX+HoI54m+iFcIJeTEaCp4bk14sJ9HxIIxlIwSKzCaNpIK7SXMHm2BYNagHm NheGVaD6olKHVDRwmD7VHTHd0DITW0BeDVh82wB4OoMwuuczNlyXW9yT6TMcCj2x V2/AZ21fQ0rnaNtawvr5i6Hd1QWbhcOgAHWudd44gNUs7DogIS0zf8PhvdCdSy1l 39oy2OXNoK2Gshdl8DZGoNUYFwySwrz0yLBuPMTJrurOU57xPzdwuKMqwvxezNa4 fW8RjK98CnLWcMrNh0of =ye7D -----END PGP SIGNATURE----- --Sig_/8sSYe7TdZg/TeSP5WmOW+Ks--