* Build GDB 7.0 with Cygwin -mno-cygwin option.
@ 2009-10-07 16:30 Dmitry Smirnov
2009-10-07 16:58 ` Joel Brobecker
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Smirnov @ 2009-10-07 16:30 UTC (permalink / raw)
To: gdb
Hi,
Is it possible to build GDB 7.0 using Cygwin (i686-pc-cygwin) but with Mingw compiler?
Usually, this requires -mno-cygwin option but I did not find this option in any file.
Should I use --build=i686-pc-mingw32 for configure? I had tried, but got the following error:
gcc -g -O2 -D__USE_MINGW_ACCESS -I. -I. -I./common -I./config -DLOCALEDIR="\"/
usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/
.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I.
/gnulib -Ignulib -DMI_OUT=1 -Wall -Wdeclaration-after-statement -Wpointer-arit
h -Wformat-nonliteral -Wno-unused -Wno-switch -Wno-char-subscripts -Wno-format
-c -o ser-base.o -MT ser-base.o -MMD -MP -MF .deps/ser-base.Tpo ser-base.c
In file included from gdb_select.h:30,
from ser-base.c:26:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:95:2: wa
rning: #warning "fd_set and associated macros have been defined in sys/types.
This may cause runtime problems with W32 sockets"
In file included from gdb_select.h:30,
from ser-base.c:26:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:101: err
or: redefinition of `struct timeval'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:611: err
or: conflicting types for 'select'
/usr/include/sys/select.h:31: error: previous declaration of 'select' was here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:611: err
or: conflicting types for 'select'
/usr/include/sys/select.h:31: error: previous declaration of 'select' was here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:614: err
or: conflicting types for 'gethostname'
/usr/include/sys/unistd.h:206: error: previous declaration of 'gethostname' was
here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:614: err
or: conflicting types for 'gethostname'
/usr/include/sys/unistd.h:206: error: previous declaration of 'gethostname' was
here
make[2]: *** [ser-base.o] Error 1
make[2]: Leaving directory `/cygdrive/d/Install/GDB/gdb-7.0/gdb-7.0/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/cygdrive/d/Install/GDB/gdb-7.0/gdb-7.0'
make: *** [all] Error 2
WBR,
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build GDB 7.0 with Cygwin -mno-cygwin option.
2009-10-07 16:30 Build GDB 7.0 with Cygwin -mno-cygwin option Dmitry Smirnov
@ 2009-10-07 16:58 ` Joel Brobecker
2009-10-07 17:12 ` Joel Brobecker
2009-10-07 17:14 ` Pedro Alves
0 siblings, 2 replies; 6+ messages in thread
From: Joel Brobecker @ 2009-10-07 16:58 UTC (permalink / raw)
To: Dmitry Smirnov; +Cc: gdb
> Should I use --build=i686-pc-mingw32 for configure? I had tried, but
> got the following error:
We build GDB under the same conditions all the time without any problem.
But our compiler is based on GCC 4.3.3, so you might want to try upgrading
your compiler. Just a guess.
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build GDB 7.0 with Cygwin -mno-cygwin option.
2009-10-07 16:58 ` Joel Brobecker
@ 2009-10-07 17:12 ` Joel Brobecker
2009-10-07 17:14 ` Pedro Alves
1 sibling, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2009-10-07 17:12 UTC (permalink / raw)
To: Dmitry Smirnov; +Cc: gdb
> > Should I use --build=i686-pc-mingw32 for configure? I had tried, but
> > got the following error:
>
> We build GDB under the same conditions all the time without any problem.
> But our compiler is based on GCC 4.3.3, so you might want to try upgrading
> your compiler. Just a guess.
Update on myself since I wasn't clear: We do *NOT* use -mno-cygwin.
We do build using "./configure ... i686-pc-mingw32". This form of
calling configure is deprecated and I've been meaning to fix that
for ages. I believe the right way of calling configure in this case
is to use --build=i686-pc-mingw32.
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build GDB 7.0 with Cygwin -mno-cygwin option.
2009-10-07 16:58 ` Joel Brobecker
2009-10-07 17:12 ` Joel Brobecker
@ 2009-10-07 17:14 ` Pedro Alves
2009-10-08 11:01 ` Re[2]: " Dmitry Smirnov
1 sibling, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2009-10-07 17:14 UTC (permalink / raw)
To: gdb; +Cc: Joel Brobecker, Dmitry Smirnov
On Wednesday 07 October 2009 17:58:18, Joel Brobecker wrote:
> We build GDB under the same conditions all the time without any problem.
> But our compiler is based on GCC 4.3.3, so you might want to try upgrading
> your compiler. Just a guess.
Joel tells me on IRC that he condition he refers to,
is the --build=... bit, not the use of -mno-cygwin.
On Wednesday 07 October 2009 17:30:02, Dmitry Smirnov wrote:
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:101: err
> or: redefinition of `struct timeval'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:611: err
> or: conflicting types for 'select'
> /usr/include/sys/select.h:31: error: previous declaration of 'select' was here
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:611: err
> or: conflicting types for 'select'
> /usr/include/sys/select.h:31: error: previous declaration of 'select' was here
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:614: err
> or: conflicting types for 'gethostname'
Cygwin's gcc is pulling Cygwin headers, while the build is assuming a mingw host.
Things are expected to break this way. I would assume at least you'd need
--host,build=i686-pc-mingw32 _and_ CC="gcc -mno-cygwin". A real mingw gcc
would be better.
--
Pedro Alves
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re[2]: Build GDB 7.0 with Cygwin -mno-cygwin option.
2009-10-07 17:14 ` Pedro Alves
@ 2009-10-08 11:01 ` Dmitry Smirnov
2009-10-08 21:33 ` Christopher Faylor
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Smirnov @ 2009-10-08 11:01 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb, Joel Brobecker
> Cygwin's gcc is pulling Cygwin headers, while the build is assuming a mingw host.
> Things are expected to break this way. I would assume at least you'd need
> --host,build=i686-pc-mingw32 _and_ CC="gcc -mno-cygwin". A real mingw gcc
> would be better.
Thank you, Pedro, this works well.
I had used
./configure --with-x=no --disable-tui --build=i686-pc-mingw32 CC="gcc -mno-cygwin"
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build GDB 7.0 with Cygwin -mno-cygwin option.
2009-10-08 11:01 ` Re[2]: " Dmitry Smirnov
@ 2009-10-08 21:33 ` Christopher Faylor
0 siblings, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2009-10-08 21:33 UTC (permalink / raw)
To: Dmitry Smirnov, Joel Brobecker, gdb, Pedro Alves
On Thu, Oct 08, 2009 at 03:01:27PM +0400, Dmitry Smirnov wrote:
>>Cygwin's gcc is pulling Cygwin headers, while the build is assuming a
>>mingw host. Things are expected to break this way. I would assume at
>>least you'd need --host,build=i686-pc-mingw32 _and_ CC="gcc
>>-mno-cygwin". A real mingw gcc would be better.
>
>Thank you, Pedro, this works well. I had used ./configure --with-x=no
>--disable-tui --build=i686-pc-mingw32 CC="gcc -mno-cygwin"
A heads up: The latest C compiler for Cygwin no longer supports the
-mno-cygwin option. It just generates too much confusion.
We will have a MinGW "cross compiler" at some point which should take
the place of that option but it is not available yet.
cgf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-10-08 21:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-07 16:30 Build GDB 7.0 with Cygwin -mno-cygwin option Dmitry Smirnov
2009-10-07 16:58 ` Joel Brobecker
2009-10-07 17:12 ` Joel Brobecker
2009-10-07 17:14 ` Pedro Alves
2009-10-08 11:01 ` Re[2]: " Dmitry Smirnov
2009-10-08 21:33 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox