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: Fri, 3 Jul 2009 02:31:46 +0200 Message-ID: References: <83ws6s2oss.fsf@gnu.org> <83vdmc2o1t.fsf@gnu.org> <83tz1v3gz3.fsf@gnu.org> <1246505665.21630.7.camel@projectile.siege-engine.com> <83ocs23muc.fsf@gnu.org> 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 1246581127 965 80.91.229.12 (3 Jul 2009 00:32:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jul 2009 00:32:07 +0000 (UTC) Cc: alexott@gmail.com, emacs-devel@gnu.org, eric@siege-engine.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 03 02:32:00 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 1MMWh5-00022L-AC for ged-emacs-devel@m.gmane.org; Fri, 03 Jul 2009 02:31:59 +0200 Original-Received: from localhost ([127.0.0.1]:54333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMWh4-0001CR-I2 for ged-emacs-devel@m.gmane.org; Thu, 02 Jul 2009 20:31:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMWh0-0001CM-BD for emacs-devel@gnu.org; Thu, 02 Jul 2009 20:31:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMWgv-0001CA-Uv for emacs-devel@gnu.org; Thu, 02 Jul 2009 20:31:53 -0400 Original-Received: from [199.232.76.173] (port=47033 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMWgv-0001C7-Py for emacs-devel@gnu.org; Thu, 02 Jul 2009 20:31:49 -0400 Original-Received: from mail-bw0-f210.google.com ([209.85.218.210]:41283) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MMWgu-0000w4-67; Thu, 02 Jul 2009 20:31:48 -0400 Original-Received: by bwz6 with SMTP id 6so702307bwz.42 for ; Thu, 02 Jul 2009 17:31:47 -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=LMySJGllCeLtt6nhqIXnxqVhjvNflfBC36ZzMeFhQ60=; b=rHkc/Mr51qa2BMS3CodYFVojAhyOdTRu42eBzhs40hYrXfiYKVOD+ZBozfHzDgwhvl Er2z38uV/PR0Hlt55BWzCgbuec87gG6M6umA+T6UwypeJ+pQHX57UMvg9yMjsSv8y/mO /CbF5Nf6WUEGtFMVvNqvBZSRMPhnXLa3krGAs= 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=Wc9Hbshzj6JvMO7nQh6RbnI9rKdFJIbFVV0M25PNYXN/R5KtA0oWhEWqe6Iffd5Z/4 KDcaN1IKiUHP9or7OpxXySZ9oOOMx+JHRdcIIl8rk40v7bblslwi5g1B112t3W2aCj71 ekJ2VZhAUA7q4kMk42vBsiRI+X0z8ILMBpRNU= Original-Received: by 10.239.137.201 with SMTP id m9mr61907hbm.86.1246581106977; Thu, 02 Jul 2009 17:31:46 -0700 (PDT) In-Reply-To: <83ocs23muc.fsf@gnu.org> 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:111926 Archived-At: On Thu, Jul 2, 2009 at 9:29 PM, Eli Zaretskii wrote: >> Date: Thu, 2 Jul 2009 20:13:06 +0200 >> From: Lennart Borgman >> Cc: Eli Zaretskii , emacs-devel@gnu.org, alexott@gmail.com >> >> 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 >> >> =C2=A0 =C2=A0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D40624 > > As you already saw in the responses there, the value of --prefix > cannot be helpful when you install precompiled binaries in a different > directory anyway. =C2=A0It is only helpful if your GCC was built on the > same machine it is used. =C2=A0So I think it's futile to pursue this line > of fixing the problem. > >> However for now a workaround must be used and I suggest on w32 using >> the information from >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((gcc-exe (locate-file "gcc" exe= c-path exec-suffixes >> 'executable)) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (gcc-root (expan= d-file-name ".." (file-name-directory gcc-exe))) >> >> I believe gcc-root contains the info that --prefix should have given. > > Only if none of the *_INCLUDE_PATH variables is set in the > environment. =C2=A0So I think CEDET needs to inspect those variables firs= t. Thanks, there are more env vars for this, see http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html >From the page http://www.mingw.org/wiki/IncludePathHOWTO it looks like the way to get the include path used by gcc is something like touch temp.c gcc -v -c temp.c -o NUL (or /dev/null) I believe this works on all os:es with gcc. It seems to include CPATH and C_INCLUDE_PATH etc. However do not quite understand the output and how to parse it. Could someone explain?