This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin compiler and linker options


John Emmas skrev:
Guys,

Whilst I only signed up to this mailing list a couple of days ago, I can
naturally understand your frustration if this topic ( -mno-cygwin) is
dropping up over & over again and (apparently) being widely misunderstood.
What I don't accept is that you have any right to castigate people for not
understanding something which has clearly never been explained particularly
well.  Why am I arrogant enough to believe that it's never been explained
very well?  Well, that seems self-evident if there's such a widespread
misunderstanding of the topic.  Here's a link to the item that I read this
morning:-

http://www.mail-archive.com/cygwin@cygwin.com/msg49102.html

Note that it states:-
" Cygwin compilers normally create Cygwin executables, ie. executables that
require the Cygwin DLL to run. But they don't have to. The compilers that
come with the Cygwin package (gcc, g77 etc.) accept an "-mno-cygwin" switch.
This causes them to create executables that do *not* rely on the Cygwin DLL"


There's nothing at all there about cross-compilation and even if you read
the entire text, there's no indication that the writer himself had any
understanding that -mno-cygwin is applicable to cross-compilation. In fact,
any developer would probably conclude from the above that -mno-cygwin is
some kind of switch that invokes static, rather than dynamic linking (thus
dispensing with the need for cygwin1.dll). That was my first assumption and
I came to that conclusion because the writer's explanation was wholly
inadequate (which isn't actually MY fault).


In fact, that's precisely WHY I was asking if there was a more authoritative
resource.

Wholly inadequate???


Just for the record, did you actually read the whole message? Sure,
Mark did not mention the exact phrase "cross compiler" anywhere
in that message, but surely you can't blame him for anticipating
that you needed to know that? Some four years ago?
I think he has it just about right.

Here's an interesting quote from further down in that message
that you apparently didn't read:

	"I don't think that inserting the Cygwin run-time code into
	the executable is a feasible route (from a technical or
	licensing standpoint) but avoiding the Cygwin run-time code
	via the -mno-cygwin switch surely is."

I.e. Mark states pretty clearly that -mno-cygwin means that no
cygwin code is involved in the resulting binaries. He also
pretty clearly eliminates any static linking with the first
half of that sentence (if run-time somehow implies dll in your
world).

Cheers,
Peter (who does not know Mark)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]