New gcc/binutils available for testing
Dale Goudey
goudey@earthlink.net
Thu Jun 15 20:00:00 GMT 2000
I have used the new binutils/gcc, testing not complete by any means but it
looks good so far (after some fixes are applied). Builds are still ongoing.
fixes required:
1. default library search path is broken, it still seems to be
looking in /usr/i686-pc-cygwin/lib
The workaround is to define the LIBRARY_PATH environment variable to
/usr/lib
2. For true mingw support (is there such a thing?), you will need to
install the complete
mingw header/library set and modify the specs file (see below).
>>Chris Faylor wrote:
>>> Oops. It looks like I had an environment variable set from an ancient
>>> version of CYGWIN -- LIBRARY_PATH. If you set that to /usr/lib it
>>> seems to find things correctly.
>>
>>
>>OK, I gave this a try and trivial programs compile correctly.
Works for me too
>Yup. Sorry. I see why this is happening. I'll fix it.
>>However, when "-mno-cygwin" is used, it doesn't find any of the standard
>>header files (stdio.h, windows.h, etc.). I have attached output from "gcc
>>-v" .
>>
>>Also, it i linking with both crtdll.dll and msvcrt.dll. Programs should
be
>>linked against one or the other, but not both. msvcrt.dll is preferred
>>because it is more stable and better tested.
>I just blindly followed the specs file that was in the URL that I quoted.
>I thought I saw positive comments about this.
The specs file requires that the mingw headers are used when the mingw
libraries are used. If they are not installed, you will get an error
message. This is by design. To do otherwise is INCORRECT, since the
headers must remain consistent with the libraries. Hope this is clear.
But this means that the complete libraries/headers must be installed in the
proper locations. Since these files were never part of the regular cygwin
package (though I thing they should be), they must be obtained separately.
retrieve bin-msvcrt-2000-03-27.zip from
ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/runtime/
retrieve gcc-2.95.2-1-msvcrt.zip from
ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-
1/
I really don't know if these files are "officially" the latest, but they do
work well for me.
Install as described below (repeating my previous note with modifications
for the new gcc), and use the specs file attached here (rather than the
previous one posted). To see where the specs file belongs, do a gcc -v
Note that with this configuration we can use the cygwin toolset with
optionally the cygwin or the mingw libraries. The above mingw complications
are not necessary for cygwin builds only. For those who need to build for
both (such as myself), this seems to be the best setup.
>Anyway, I'll remove the crtdll entry, though. It looks like I should
>have been more discerning with a few other entries, too.
>cgf
A note for Chris: the enclosed specs file has some VERY MINOR mods so that
it works correctly with the latest mingw libraries (I think). Thanks for
your update. This cygwin package is really quite good, but "early adopters"
must understand that this is a work-in-progress. Well, maybe they need
reminding on occasion.
Further notes on installing the mingw headers/libraries
from gcc-2.95.2-1-msvcrt.zip
(use the lib/gcc-lib/i386-mingw32msvc therein by moving or copying
it into /usr/lib/gcc-lib to make it parallel to
/usr/lib/gcc-lib/i686-pc-cygwin
(this gives you /usr/lib/gcc-lib/i386-mingw32msvc)
use the include/g++-3 therein by moving or copying it
into /usr/mingw/include (this directory must be created)
This gives you /usr/mingw/include/g++-3
and use the files i386-mingw32msvc/include/*.h therein by moving or
copying them into /usr/mingw/include
)
from bin-msvcrt-2000-03-27.zip
(
unpack into an empty directory
move or copy the resulting i386-mingw32msvc directory into /usr
this gives you /usr/i386-mingw32msvc
move or copy the resulting bin/mingwm10.dll file into /bin
copy the files
crt2.o
gcrt2.o
dllcrt2.o
from the i386-mingw32msvc/lib directory
into /usr/lib (or into /usr/i686-pc-cygwin/lib if you are using
gcc-2.95.2-1 rather than -2)
)
As usual, no warranties
Hope this helps
Dale Goudey
-------------- next part --------------
*asm:
*asm_final:
*cpp:
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix} %{!mno-win32:-D_WIN32 -DWINNT} %{mno-cygwin:-DWIN32 -D__WIN32__ -D__MSVCRT__ -D__MINGW32__=0.2} %{mthreads: %{mno-cygwin:-D_MT}} %{mno-cygwin:-nostdinc -nostdinc++} %{mno-cygwin:-iwithprefixbefore ../../../../mingw/include/g++-3 } %{mno-cygwin:-iwithprefixbefore ../../../../i386-mingw32msvc/include/mingw32 } %{mno-cygwin:-iwithprefixbefore ../../../../mingw/include } %{mno-cygwin:-iwithprefixbefore ../../../../i386-mingw32msvc/include } %{mno-cygwin:-iwithprefixbefore ../../i386-mingw32msvc/2.95.2/include }
*cc1:
%(cc1_spec)
*cc1plus:
*endfile:
*link:
%{mwindows:--subsystem windows} %{mconsole:--subsystem console} %{shared: %{mdll: %eshared and mdll are not compatible}} %{shared: --shared} %{mdll:--dll} %{static:-Bstatic} %{!static:-Bdynamic} %{shared|mdll: -e %{mno-cygwin:_DllMainCRTStartup@12} %{!mno-cygwin:__cygwin_dll_entry@12}}
*lib:
%{pg:-lgmon} %{!mno-cygwin:-lcygwin} %{mthreads:%{mno-cygwin:-lmingwthrd}} %{mno-cygwin:-lmingw32 -lmoldname -lcrtdll} %{mwindows:-lgdi32 -lcomdlg32} -luser32 -lkernel32 -ladvapi32 -lshell32
*libgcc:
%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin: -lmoldname -lmsvcrt}
*startfile:
%{shared|mdll: %{mno-cygwin:dllcrt2%O%s}} %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:crt2%O%s} %{pg:gcrt2%O%s}}}
*switches_need_spaces:
*signed_char:
%{funsigned-char:-D__CHAR_UNSIGNED__}
*predefines:
-Di386 -D_X86=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -Asystem(winnt) -Acpu(i386) -Amachine(i386)
*cross_compile:
1
*version:
2.95.2
*multilib:
. ;
*multilib_defaults:
*multilib_extra:
*multilib_matches:
*linker:
collect2 %{mno-cygwin:-L/usr/lib/gcc-lib/i386-mingw32msvc/2.95.2 -L/usr/i386-mingw32msvc/lib}
*cpp_486:
%{!ansi:-Di486} -D__i486 -D__i486__
*cpp_586:
%{!ansi:-Di586 -Dpentium} -D__i586 -D__i586__ -D__pentium -D__pentium__
*cpp_k6:
%{!ansi:-Di586 -Dk6} -D__i586 -D__i586__ -D__k6 -D__k6__
*cpp_686:
%{!ansi:-Di686 -Dpentiumpro} -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
*cpp_cpu_default:
%(cpp_686)
*cpp_cpu:
-Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} %{mcpu=k6:%(cpp_k6)} %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
*cc1_cpu:
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
*mingw_include_path:
i686-pc-cygwin
*link_command:
%{!fsyntax-only: %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %D %o %{!nostdlib:%{!nodefaultlibs:%G %L %G}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*}
}}}}}}
More information about the Cygwin
mailing list