From: Ross S. <ro...@ih...> - 2001-03-30 10:34:29
|
Paul Garceau wrote: > > All the you do when you are setting the $PATH variable is telling the > sytem which directories/folders it needs to search for executables, or > any other files you have a regular need for. If you put mingw/bin > first, then the system assumes that you first want to search mingw/bin > for any necessary executables. > > If the system can't find the necessary binutil (executable) under > mingw/bin, it will then attempt to search your entire path until it > finds a matching executable name. > > If the directory search finds, after searching through the rest of the > $PATH var, a reference to say Cygwin/bin and has yet to find the > executable (or other file it is searching for) such as sed.exe, then > the win32 system will use the sed.exe it finds in Cygwin/bin directory > (assuming of course you have the Cygwin/bin directory referenced as > part of your $PATH var in addition to the mingw/bin directory). Yes, I know all that. That's what I intended to do. Are you saying there's some reason why I shouldn't do that? If so, what? If not, then ... er ... what _was_ your point? > > From what little I understood of the above, am I right in thinking I > > need to set $GCC_EXEC_PREFIX as well? > > If and only if you are trying to run the two development tools > concurrently. What exactly do you mean by "concurrently"? What I'm trying to do is have both compilers available, while continuing to use the normal Cygwin environment for non-compiler-related stuff. My intention was to have a shell script looking something like this: #!/bin/sh export PATH="/mingw/bin:$PATH" # other environment variables e.g. CPLUS_LIBRARY_PATH # insert GCC_EXEC_PREFIX here? make $@ So I can compile for Cygwin using normal make, and for Mingw using the script above as a wrapper to make. > > What should it be set to? > > For Mingw, you can find that in the mingw.bat file, substituting your > directory references for the ones set as default GCC_EXEC_PREFIX for > mingw.bat. What mingw.bat file? There's no file by that name in any of the Mingw packages. The download page gives a suggested mingw.bat, but the only thing it changes is the PATH, i.e. exactly what I was already trying. > Bear in mind that you're messing with the compiler > functionality if you decide you need to do this. In what way? You keep hinting that this is going to cause some unspecified Dire Consequences, but you never give any details. The GCC manual just says that it will prefix GCC_EXEC_PREFIX to the names of subprograms and files used for linking, which sounds like it should do exactly what I want (if only I knew what to set it to). So what's this horrible problem you keep saying it's going to cause? -- Ross Smith <ro...@ih...> The Internet Group, Auckland, New Zealand ======================================================================== "Hungarian notation is the tactical nuclear weapon of source code obfuscation techniques." -- Roedy Green |