[Bug ada/20530] gnatlink does not respect -mno-cygwin

gerrit at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jun 8 12:40:00 GMT 2005


------- Additional Comments From gerrit at gcc dot gnu dot org  2005-06-08 12:40 -------
>> According to
>> http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Option-Index.html#Option-Index
>> 
>> -mno-cygwin is not a FSF option, so closing this PR.

This option just triggers gcc to use other lib and include paths, as they
are defined in the specs.  So it seems gnat doesn't use the specs when 
linking.  Note that it works quite well with include paths when compiling
the source? 


I will provide a workaround in the upcoming release of cygwin gcc-3.4.4,
in addition to -mno-cygwin another flag is needed then: --RTS=no-cygwin
This will cause gnat to pick up the right runtime if the gcc-mingw-ada 
package is correctly installed.  Then there is a new subdirectory in
i686-pc-cygwin/3.4.4 named no-cygwin with symlinks to the mingw runtime:

/---3.4.4
|   /---adainclude
|   /---adalib
|   /---no-cygwin
|       +---adainclude
|       +---adalib

 
$ gcc -v -c --RTS=no-cygwin -mno-cygwin hello_a.adb
Reading specs from /usr/lib/gcc/i686-pc-mingw32/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,java,objc --enable-nls
--without-included-gettext --enable-version-specific-runtime-libs --without-x
--enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter
--disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm
--disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization
--enable-libstdcxx-debug : (reconfigured) 
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/gnat1.exe -quiet -dumpbase hello_a.adb
-mno-cygwin -mtune=pentiumpro -fRTS=no-cygwin hello_a.adb -o /tmp/ccqn0PMb.s
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/bin/as.exe -o
hello_a.o /tmp/ccqn0PMb.s

$ gnatbind -v -aO./ --RTS=no-cygwin -I- -x hello_a.ali

GNATBIND 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) Copyright 1995-2004
Free Software Foundation, Inc.

Binding: hello_a.ali

No errors

$ gnatlink hello_a.ali -mno-cygwin -v

GNATLINK 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) Copyright 1995-2004
Free Software Foundation, Inc
gcc -c -gnatA -gnatWb -gnatiw -mno-cygwin -mtune=pentiumpro --RTS=no-cygwin
-gnatws b~hello_a.adb
/usr/bin/gcc.exe b~hello_a.o ./hello_a.o -mno-cygwin -o hello_a.exe -L./
-L/usr/lib/gcc/i686-pc-cygwin/3.4.4/no-cygwin/adalib/
/usr/lib/gcc/i686-pc-cygwin/3.4.4/no-cygwin/adalib/libgnat.a -Wl,--stack=0x2000000

$ cygcheck hello_a.exe
Found: h:\cygwin\gcc\gcc-test\hello_a.exe
h:/cygwin/gcc/gcc-test/hello_a.exe
  C:\WINNT\System32\msvcrt.dll
    C:\WINNT\System32\KERNEL32.dll
      C:\WINNT\System32\ntdll.dll
  C:\WINNT\System32\ADVAPI32.DLL
    C:\WINNT\System32\USER32.dll
      C:\WINNT\System32\GDI32.dll
    C:\WINNT\System32\RPCRT4.dll


Running this executable works fine.  I'll try to find a way to integrate
this in to the binary to make it work as one expect it to work.
 
Gerrit

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20530



More information about the Gcc-bugs mailing list