This is the mail archive of the mailing list for the Cygwin project.

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

RE: EGCS 1.0.2: weird include paths with gcc -b, specs, etc

Hi Dirk,

I found that if I set my directory structure similar to:


I put cygwinb19.dll, bash.exe and sh.exe in \root\bin
I put the other executables from the cygwin distribution in
I put the cygwin includes and libs in \root\usr\include and
I put the mingw32 distribution in \root\usr\local\bin ..\include ..\lib
I mount c:/root /

To execute with cygwin I make sure that the PATH has \root\usr\bin
first and point GCC_EXEC_PREFIX to \root\usr\lib\gcc-lib\

To execute with egcs-mingw32 I make sure that the PATH has
\root\usr\local\bin first and point GCC_EXEC_PREFIX to

I've been using it this way, mostly egcs-mingw32, for months now
without problems.

As an aside note, since I primarily use mingw32 I set my default
processing modes to text!=binary and the CYGWIN32=notty nobinmode.  If
you want to modify the file mode defaults for a particular package
then as the first executed statement within the main function add
`_fmode = _O_BINARY;', both of these are declared in fcntl.h.

Hope this helps,

-        \\||//

PS: I may be competent enough to modified the gcc source; however,
time, space limitations and other interests have kept me from it.

---"Fieldhouse, Dirk" <> wrote:
> On 21 August 1998 20:56, Mumit Khan[]
> > On Mon, 17 Aug 1998, Fieldhouse, Dirk wrote:
> > 
> > > ref: Earnie Boyd's
> > > 
> > > I'm trying to set up a dual cygwin32/mingw32 environment with
the egcs
> 1.0.2
> > > cygwin32 binaries and being defeated by some strange behaviour
> search
> > > paths.
> Thanks, Mumit, for your answer.
> So, for clarification, I want to be able to use the CYGWIN32
binaries to
> build CYGWIN32 or MINGW32 objects according to the environment
settings -
> ideally without having to do gcc -b i386-mingw32 ... 
> > > The binary distribution of egcs-1.0.2 for cygwin32 seems to have
> > > hard-wired directories built into it, specifically
> > > 
> > > 	../../../../../include
> > > and 
> > >  	../../../../i386-cygwin32/include
> > > 
> > 
> > Yeah, this is what I call the "Cygnus unlibsubdir" patch that is
> > with Cygnus built distributions. Basically, unlibsubdir patch
> > the entire GCC package with only one env variable --
> > and everything is accessed relative to that. This change affects the
> > language drivers, cpp and proto tools only.
> > 
> This seems like a good default but shouldn't explicit C_INCLUDE_PATH
> variables override it?
> >...
> > I need to weigh my time against other factors, and unless someone
> > a different mechanism, while keeping the "relocatability" feature,
> > afraid this feature (or bug, depending on who you are) is here to
> > 
> > What I *am* willing to do however is to build the drivers
(gcc.exe, etc) 
> > without this patch and put it in a separate archive so you can use
> > instead. The only programs affected are the language drivers, cpp,
> > protoize and unprotoize.
> That sounds great.
> > BTW, the --exec-prefix and --prefix settings are different for
> > (which use different values for these) and mingw32 (uses the same
> > for both), so what you see is consistent.
> What I don't understand is that my explicit C_INCLUDE_PATH (&c) are
> being used by the egcs tools _even as an addition_ to the built-in
> path. This becomes clear on studying the transcripts I posted before
> I'm wondering if this is some CYGWIN strangeness with W95 (failure to
> inherit environment, perhaps?) since the string "C_INCLUDE_PATH" is
> apparently known to cpp.exe. It's not the mingw32 problem in
> because I'm
using the
> cygwin32 build. And I'm sure it worked once!
> And again my 2nd question: does egcs gcc use anything apart from the
> built-in default, GCC_EXEC_PREFIX and the -b and --specs options to
find the
> specs file? - eg LIBRARY_PATH ?
> -- 
> Dirk Fieldhouse                 Logica UK Limited
>           75 Hampstead Road
> c=gb;a=attmail;p=logica;        London NW1 2PL
> o=lg;ou1=lgwct;s=fieldhouse     UK
> +44 (171) 637 9111
> -
> For help on using this list (especially unsubscribing), send a
message to
> "" with one line of text: "help".

Get your free address at

For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

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