This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch/RFC] Enable PCH for mingw32


Danny Smith wrote:

> There is still a bug that I tripped over when testing the libstdc++
> pch file.
> 
> On targets that HAVE_TARGET_EXECUTABLE_SUFFIX the command
>  gcc foo.h -ofoo
> creates foo.{TARGET_EXEXUTABLE_SUFFIX) not foo.  The problem arise in
> the call to convert_filename in gcc.c.

I think this macro and its behaviour is heavily influenced
by Windows - on Windows, renaming "foo.exe" to "foo" makes
Windows reject the program as a non-executable. (In fact,
are there any other platforms that require executables to
have a well-known suffix?)

You might want to think of TARGET_EXECUTABLE_SUFFIX as "thing
to always add to the output executable file name, if not
present already".

Looked at this way, it's not a bug but a feature. 8-)

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT gmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]