emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CEDET calls cpp -E -dM -x c++ /dev/null


From: Lennart Borgman
Subject: Re: CEDET calls cpp -E -dM -x c++ /dev/null
Date: Fri, 3 Jul 2009 02:31:46 +0200

On Thu, Jul 2, 2009 at 9:29 PM, Eli Zaretskii<address@hidden> wrote:
>> Date: Thu, 2 Jul 2009 20:13:06 +0200
>> From: Lennart Borgman <address@hidden>
>> Cc: Eli Zaretskii <address@hidden>, address@hidden, address@hidden
>>
>> Eric, I looked at your code again and realize that you are using "gcc
>> -v" to get info. On w32 it gives "--prefix=/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=40624
>
> 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.  It is only helpful if your GCC was built on the
> same machine it is used.  So 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
>>
>>          (let* ((gcc-exe (locate-file "gcc" exec-path exec-suffixes
>> 'executable))
>>                 (gcc-root (expand-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.  So I think CEDET needs to inspect those variables first.

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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]