From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: CEDET calls cpp -E -dM -x c++ /dev/null Date: Thu, 2 Jul 2009 20:13:06 +0200 Message-ID: References: <83ws6s2oss.fsf@gnu.org> <83vdmc2o1t.fsf@gnu.org> <83tz1v3gz3.fsf@gnu.org> <1246505665.21630.7.camel@projectile.siege-engine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1246558404 5560 80.91.229.12 (2 Jul 2009 18:13:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jul 2009 18:13:24 +0000 (UTC) Cc: alexott@gmail.com, Eli Zaretskii , emacs-devel@gnu.org To: eric@siege-engine.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 02 20:13:17 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MMQmZ-0005XL-ST for ged-emacs-devel@m.gmane.org; Thu, 02 Jul 2009 20:13:16 +0200 Original-Received: from localhost ([127.0.0.1]:40101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMQmZ-0007jp-5i for ged-emacs-devel@m.gmane.org; Thu, 02 Jul 2009 14:13:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMQmU-0007jc-KL for emacs-devel@gnu.org; Thu, 02 Jul 2009 14:13:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMQmT-0007iy-JV for emacs-devel@gnu.org; Thu, 02 Jul 2009 14:13:09 -0400 Original-Received: from [199.232.76.173] (port=35838 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMQmT-0007iv-FB for emacs-devel@gnu.org; Thu, 02 Jul 2009 14:13:09 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.155]:24346) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MMQmR-0002Sr-SS; Thu, 02 Jul 2009 14:13:08 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l27so1119524fgb.7 for ; Thu, 02 Jul 2009 11:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=BmHXT8avYqcQUOWOUECFQWmQhgzgeGb8C1RsHwNDDes=; b=XBUnA0znPjZ5pvgmF6vzrmeBCG1GndHRUnLTOqvzPluFonGNLY76RdeUx5QKYRGXvl DhA2tOl/rpNvU8Sn9iiNbAwbYV+Q3Yt+nmeloG9vutRdLIVc5K/eyO7lur741G9khkgw LoeZb3v9NTSdNVM3yHMWqNFynwZE8SpX/E7y8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=eecwRIYcseU6YSMAeClLkmgb9TgU9sIlm63izc/wTxTBhf3cNSK0w3nTTIMnt7poWT +skJ8RpvpH7S0ZZQ2F6YntqxEbCelQlqfJqknOyN4KyR2j7Q1anTj6ll9Nr1d2mG8ZJk XZ/FcOUcP3w6rzfeg0wcPuA27QdHc0pncyZlo= Original-Received: by 10.239.181.10 with SMTP id k10mr29264hbg.166.1246558386832; Thu, 02 Jul 2009 11:13:06 -0700 (PDT) In-Reply-To: <1246505665.21630.7.camel@projectile.siege-engine.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111918 Archived-At: On Thu, Jul 2, 2009 at 5:34 AM, Eric M. Ludlam wrote= : > On Thu, 2009-07-02 at 06:24 +0300, Eli Zaretskii wrote: >> > Date: Wed, 1 Jul 2009 22:25:32 +0200 >> > From: Lennart Borgman >> > Cc: emacs-devel@gnu.org, alexott@gmail.com, eric@siege-engine.com >> > >> > I see another problem in semantic-gcc-setup. It tries to guess the >> > include paths and does this >> > >> > =C2=A0 (let* ((try-paths (list "/usr/include" (concat prefix "/include= ") >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (concat prefix "/include/c++/" ver) >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (concat prefix "/include/c++/" ver "/" host ) >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 ))) >> > >> > Can't gcc or cpp give some better information about include paths that >> > semantic can use? Where is this information? >> >> I thought one of the -print-* options could show the place of the >> headers, but I cannot get them to do this. =C2=A0This is the closest: >> >> =C2=A0 =C2=A0 D:\usr\eli\data>cpp -print-file-name=3Dlibmingwex.a >> =C2=A0 =C2=A0 D:/usr/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a >> >> I guess the place where the headers live should be customizable >> instead of being hardcoded. > > Hi, > > =C2=A0The code that is looking up header directories that Lennart quoted = is > attempting to find a reasonable default because the customization step > can be confusing. =C2=A0There are many possible paths that need to be > identified and setup, so this code is just trying to remove one set of > customizations that might be needed. =C2=A0A side effect is a desire to m= ake > it "perfect" for all situations. =C2=A0Making the list of dirs for this c= ode > to test customizable is moot, since it is just as easy to customize the > system include path for headers instead. > > =C2=A0Getting better output from gcc, such as -print-file-name, would be > helpful. Eric, I looked at your code again and realize that you are using "gcc -v" to get info. On w32 it gives "--prefix=3D/mingw" which lacks the drive letter and therefore is useless. I have filed a bug report http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D40624 However for now a workaround must be used and I suggest on w32 using the information from (let* ((gcc-exe (locate-file "gcc" exec-path exec-suffixes 'executable)) (gcc-root (expand-file-name ".." (file-name-directory gcc-e= xe))) I believe gcc-root contains the info that --prefix should have given.