public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/20530] New: gnatlink does not respect -mno-cygwin
@ 2005-03-18 10:04 rolf dot ebert dot gcc at gmx dot de
2005-03-19 9:47 ` [Bug ada/20530] " laurent at guerby dot net
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rolf dot ebert dot gcc at gmx dot de @ 2005-03-18 10:04 UTC (permalink / raw)
To: gcc-bugs
despite passing -mno-cygwin as a gnatmake option and additionally as a gnatlink
option, gnatlink adds the cygwin path to adalib to the link command. The libgnat
is found first in the cygwin path and not in the mingw path. The link
consequently fails.
The problem is present on both gcc-3.3.3 and gcc-3.4.1
$ gnatmake -mno-cygwin hello -largs -v -v -mno-cygwin
gcc -c -mno-cygwin hello.adb
gnatbind -x hello.ali
gnatlink -v -v -mno-cygwin hello.ali
GNATLINK 3.3.3 (cygwin special) Copyright 1996-2002 Free Software Foundation, In
c.
gcc -c -gnatA -gnatWb -gnatiw -mno-cygwin -v -gnatws b~hello.adb
Reading specs from /usr/lib/gcc-lib/i686-pc-mingw32/3.3.3/specs
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefi
x=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/s
hare/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,
pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zli
b --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sj
lj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)
/usr/lib/gcc-lib/i686-pc-mingw32/3.3.3/gnat1.exe -quiet -dumpbase b~hello.adb -
gnatA -gnatWb -gnatiw -gnatws -mno-cygwin b~hello.adb -o /c/DOKUME~1/EBERT/LOKAL
E~1/Temp/ccsNrn8f.s
/usr/lib/gcc-lib/i686-pc-mingw32/3.3.3/../../../../i686-pc-mingw32/bin/as.exe -
-traditional-format -o b~hello.o /c/DOKUME~1/EBERT/LOKALE~1/Temp/ccsNrn8f.s
/usr/bin/gcc.exe b~hello.o ./hello.o -v -mno-cygwin -o hello.exe -L./ -L/usr/lib
/gcc-lib/i686-pc-cygwin/3.3.3/adalib/ /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adal
ib/libgnat.a
Reading specs from /usr/lib/gcc-lib/i686-pc-mingw32/3.3.3/specs
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefi
x=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/s
hare/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,
pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zli
b --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sj
lj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)
/usr/lib/gcc-lib/i686-pc-mingw32/3.3.3/collect2.exe -Bdynamic -o hello.exe /usr
/lib/gcc-lib/i686-pc-mingw32/3.3.3/../../../../i686-pc-mingw32/lib/crt2.o /usr/l
ib/gcc-lib/i686-pc-mingw32/3.3.3/crtbegin.o -L./ -L/usr/lib/gcc-lib/i686-pc-cygw
in/3.3.3/adalib/ -L/usr/lib/gcc-lib/i686-pc-mingw32/3.3.3 -L/usr/lib/gcc-lib/i68
6-pc-mingw32/3.3.3/../../../../i686-pc-mingw32/lib -L/usr/lib/gcc-lib/i686-pc-mi
ngw32/3.3.3/../../.. b~hello.o ./hello.o /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/a
dalib/libgnat.a -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -lmingw32 -luser32
-lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt /
usr/lib/gcc-lib/i686-pc-mingw32/3.3.3/crtend.o
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(cio.o)(.text+0x7): undefi
ned reference to `___getreent'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(cio.o)(.text+0x67): undef
ined reference to `___getreent'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(cio.o)(.text+0x97): undef
ined reference to `___getreent'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(cio.o)(.text+0xc7): undef
ined reference to `___getreent'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(cstreams.o)(.text+0x97):
undefined reference to `___getreent'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(cstreams.o)(.text+0xb7):
more undefined references to `___getreent' follow
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(sysdep.o)(.text+0xd4): un
defined reference to `_tcgetattr'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(sysdep.o)(.text+0xfe): un
defined reference to `_tcsetattr'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(sysdep.o)(.text+0x156): u
ndefined reference to `_tcsetattr'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(sysdep.o)(.text+0x25): un
defined reference to `_ttyname'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(sysdep.o)(.text+0x1e5): u
ndefined reference to `_localtime_r'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(adaint.o)(.text+0x7e7): u
ndefined reference to `_fork'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(adaint.o)(.text+0x81b): u
ndefined reference to `_waitpid'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(adaint.o)(.text+0x860): u
ndefined reference to `_fork'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(adaint.o)(.text+0x8c2): u
ndefined reference to `_waitpid'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(adaint.o)(.text+0x901): u
ndefined reference to `_waitpid'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(adaint.o)(.text+0xa5): un
defined reference to `_readlink'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/adalib/libgnat.a(adaint.o)(.text+0xb5): un
defined reference to `_symlink'
collect2: ld returned 1 exit status
gnatlink: cannot call /usr/bin/gcc.exe
gnatmake: *** link failed.
--
Summary: gnatlink does not respect -mno-cygwin
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rolf dot ebert dot gcc at gmx dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20530
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/20530] gnatlink does not respect -mno-cygwin
2005-03-18 10:04 [Bug ada/20530] New: gnatlink does not respect -mno-cygwin rolf dot ebert dot gcc at gmx dot de
@ 2005-03-19 9:47 ` laurent at guerby dot net
2005-03-19 14:18 ` ericw at evcohs dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: laurent at guerby dot net @ 2005-03-19 9:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From laurent at guerby dot net 2005-03-19 09:47 -------
Out of curiosity, does it still happen with GCC 4.0?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20530
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/20530] gnatlink does not respect -mno-cygwin
2005-03-18 10:04 [Bug ada/20530] New: gnatlink does not respect -mno-cygwin rolf dot ebert dot gcc at gmx dot de
2005-03-19 9:47 ` [Bug ada/20530] " laurent at guerby dot net
@ 2005-03-19 14:18 ` ericw at evcohs dot com
2005-03-30 10:28 ` charlet at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ericw at evcohs dot com @ 2005-03-19 14:18 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ericw at evcohs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20530
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/20530] gnatlink does not respect -mno-cygwin
2005-03-18 10:04 [Bug ada/20530] New: gnatlink does not respect -mno-cygwin rolf dot ebert dot gcc at gmx dot de
2005-03-19 9:47 ` [Bug ada/20530] " laurent at guerby dot net
2005-03-19 14:18 ` ericw at evcohs dot com
@ 2005-03-30 10:28 ` charlet at gcc dot gnu dot org
2005-06-08 12:22 ` gerrit at gcc dot gnu dot org
2005-06-08 12:40 ` gerrit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: charlet at gcc dot gnu dot org @ 2005-03-30 10:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From charlet at gcc dot gnu dot org 2005-03-30 10:27 -------
Right, gnatmake has never supported -mno-cygwin. Instead, I'd suggest
configuring gcc for mingw to start with.
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.
Arno
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|minor |enhancement
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20530
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/20530] gnatlink does not respect -mno-cygwin
2005-03-18 10:04 [Bug ada/20530] New: gnatlink does not respect -mno-cygwin rolf dot ebert dot gcc at gmx dot de
` (2 preceding siblings ...)
2005-03-30 10:28 ` charlet at gcc dot gnu dot org
@ 2005-06-08 12:22 ` gerrit at gcc dot gnu dot org
2005-06-08 12:40 ` gerrit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: gerrit at gcc dot gnu dot org @ 2005-06-08 12:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gerrit at gcc dot gnu dot org 2005-06-08 12:22 -------
(In reply to comment #2)
> Right, gnatmake has never supported -mno-cygwin. Instead, I'd suggest
> configuring gcc for mingw to start with.
>
> 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.
>
> Arno
Many thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20530
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/20530] gnatlink does not respect -mno-cygwin
2005-03-18 10:04 [Bug ada/20530] New: gnatlink does not respect -mno-cygwin rolf dot ebert dot gcc at gmx dot de
` (3 preceding siblings ...)
2005-06-08 12:22 ` gerrit at gcc dot gnu dot org
@ 2005-06-08 12:40 ` gerrit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: gerrit at gcc dot gnu dot org @ 2005-06-08 12:40 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-08 12:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-18 10:04 [Bug ada/20530] New: gnatlink does not respect -mno-cygwin rolf dot ebert dot gcc at gmx dot de
2005-03-19 9:47 ` [Bug ada/20530] " laurent at guerby dot net
2005-03-19 14:18 ` ericw at evcohs dot com
2005-03-30 10:28 ` charlet at gcc dot gnu dot org
2005-06-08 12:22 ` gerrit at gcc dot gnu dot org
2005-06-08 12:40 ` gerrit at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).