public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: egor duda <deo@logos-m.ru>
To: Teun Burgers <a.rburgers@freeler.nl>
Cc: cygwin@cygwin.com
Subject: Re: gcc -mno-cygwin creates cygwin executables!
Date: Wed, 12 Dec 2001 12:30:00 -0000	[thread overview]
Message-ID: <33561504220.20011212231357@logos-m.ru> (raw)
In-Reply-To: <3C17B526.60915DD9@freeler.nl>

Hi!

Wednesday, 12 December, 2001 Teun Burgers a.rburgers@freeler.nl wrote:

TB> To sum up this thread:
TB> consider the following program:

TB> main () {
TB>         pthread_create();
TB> }

TB> gcc -mno-cygwin -o zz.exe zz.c -lpthread will compile and build.
TB> A cygcheck on zz.exe reveals that libcygwin.a is linked in. The
TB> problem with this is that a configure script with CC='gcc -mno-cygwin'
TB> will incorrectly find that libpthread.a is available with
TB> AC_SEARCH_LIBS(pthread_create, -lpthread)

TB> This comes about since gcc -mno-cygwin searches for libs in /usr/lib
TB> and libpthread.a is a symlink to libcygwin.a

you're fixing specific symptoms instead of the problem itself. this
had been discussed already and the general consensus (at least as i
understand it) is the following: -mno-cygwin is a _hack_. it's
supposed to be used only when absolutely necessary and when you
absolutely know what you're doing.

*** if you want to build executables for mingw platform you should use
mingw toolchain, either native or cross. ***

you don't suppose cygwin gcc to have -msolaris or -mdjgpp options, do
you? i believe mingw is no different.

the reason -mno-cygwin still exists in official cygwin gcc is that
cygwin contains several utilities that should not depend on
cygwin1.dll (setup, cygcheck, strace). those utilities are built with
-mno-cygwin and people maintaining them take special care to make sure
libcygwin.a won't creep in.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  reply	other threads:[~2001-12-12 20:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-11 13:43 a.rburgers
2001-12-12  4:27 ` Robert Collins
2001-12-12 12:15   ` Teun Burgers
2001-12-12 12:30     ` egor duda [this message]
2001-12-12 13:10       ` Teun Burgers
2001-12-12 13:42         ` Christopher Faylor
2001-12-12 14:01     ` Robert Collins
  -- strict thread matches above, loose matches on Subject: below --
2001-12-12 15:20 Teun Burgers
2001-12-12 14:31 Robinow, David
2001-12-12 13:54 Steve Jorgensen
2001-12-11 13:09 Teun Burgers
2001-12-11 13:22 ` Robert Collins
2001-12-11  9:48 Teun Burgers
2001-12-11 12:14 ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33561504220.20011212231357@logos-m.ru \
    --to=deo@logos-m.ru \
    --cc=a.rburgers@freeler.nl \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).