This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: regex.c not found, but it clearly exists
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Andrew STUBBS'" <andrew dot stubbs at st dot com>, "'NightStrike'" <nightstrike at gmail dot com>
- Cc: "'Binutils'" <binutils at sourceware dot org>
- Date: Wed, 2 Jan 2008 16:13:48 -0000
- Subject: RE: regex.c not found, but it clearly exists
- References: <b609cb3b0712132305p762ae688r769b7ff8feaf94b6@mail.gmail.com> <47622E9F.17989C5C@dessent.net> <47624FE5.8090003@st.com> <b609cb3b0712171522y10c7bf38r6d9977daa3b383a6@mail.gmail.com> <477B86AD.6050506@st.com>
On 02 January 2008 12:42, Andrew STUBBS wrote:
> NightStrike wrote:
>>> Or you could try "gcc -mno-cygwin" where gcc is the standard Cygwin gcc.
>>>
>>> That's a Cygwin program so it understands the POSIX paths, but it
>>> produced MinGW programs (which don't).
>>
>> Are programs compiled in this fashion identical to programs that are
>> compiled with the actual i686-pc-mingw-gcc program?
>
> Since nobody more qualified has responded ...
>
> I don't know if they are perfectly identical, but they certainly have
> the same general properties. That is, in order to build a UNIX program
> you have to apply the exact same patches as you would for the MinGW
> compiler.
This is basically it, but there are some problems. The -mno-cygwin flag and
the cross-compile mode of the cygming-targeted compiler are somewhat kludgey.
The major purpose for which they are packaged is so that you can rebuild the
cygwin dll itself from within the cygwin environment. It's not really
intended for general cross-development, and although it'll just about do,
there is a problem: it doesn't correctly switch over /all/ the default search
paths; if you compare the output of "gcc -v -E -xc - < /dev/null" and "gcc
-mno-cygwin -v -E -xc - < /dev/null", you'll see that gcc -mno-cygwin still
searches the cygwin compiler-specific include dir
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include
when it should be looking in:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include
I don't know - and couldn't say for sure without doing a thorough audit -
how serious this could be, but from running a very quick diff over it, I can
see that it might in particular affect C++. (It could easily break passing
std::strings across DLL boundaries, which cygwin has some custom mods to the
c++ stl header files relating to).
> Note that you must have installed the right Cygwin package for it to
> work - it uses a different set of libraries in -mno-cygwin mode.
Yes, the packages required for -mno-cygwin are w32api and mingw-runtime
IIRC.
cheers,
DaveK
--
Can't think of a witty .sigline today....