From: Mumit Khan <khan@xraylith.wisc.edu>
To: Michael Fonte <mikef@sensor.com>
Cc: cygwin@sourceware.cygnus.com
Subject: To use or not to use -lc [RE: in execvp.c undefined ...]
Date: Thu, 22 Apr 1999 14:33:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.93.990422161103.24617E-100000@modi.xraylith.wisc.edu> (raw)
In-Reply-To: <001c01be8d03$47177310$23ed6bc0@hawk.sensor.com>
On Thu, 22 Apr 1999, Michael Fonte wrote:
> Reply I caught this about 30 minutes later. I am not sure why 'most' of the
> source code distributions out there explicitly add -lc as well. Anyone have
> a historical perspective on this. I suppose there are apps out there that
> don't use libc, they either write their own or don't need it. In these
> cases it would be nice to not have to link against libc. In either case for
> compatibility reasons explicitly adding -lc should not cause a fatal error
> (IMHO).
Historically speaking, it was usually to deal with systems which had
multiple C runtime libraries, and the compiler drivers didn't handle
it as well as you'd like or at all. eg., lots of systems had libc.a,
libc_s.a, libc_g.a and so on where each library had some special meaning
(profile, debugging, static-vs-dynamic, some-other-feature, etc); more
often than not, there was no switch to pass to "cc" that will pick the
right one, and so you'll have to do it yourself. I don't recall having
to do this since the late 80's however.
Currently, there is absolutely no reason to do this in general; it's just
a bad habit folks pick up from old packages and perpetuate the whole
mess ;-)
This is also another reason one should not use low-level linkers etc
unless there is a special reason. You need to know way too much about
the target system to use ld etc directly.
> The makefile was generated via a configure script from the standard tcl8.0.5
> source distribution.
You're using the Makefile.in in tcl8.0.5/unix directory, which is one
problem right there (unless of course you really mean to build a Cygwin
Tcl that doesn't use Win32 API); the other is a bug in Tcl Makefile.in
-- it should not have the -lc in the first place (see ``LIBS = ').
You can pretty much use my patches for 8.0.4 and import it into a 8.0.5
CVS tree. Might need a few minor adjustments however. it's available from
http://www.xraylith.wisc.edu/~khan/software/tcl/ . I'll try to get 8.0.5
patches out sometime soon.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
WARNING: multiple messages have this Message-ID
From: Mumit Khan <khan@xraylith.wisc.edu>
To: Michael Fonte <mikef@sensor.com>
Cc: cygwin@sourceware.cygnus.com
Subject: To use or not to use -lc [RE: in execvp.c undefined ...]
Date: Fri, 30 Apr 1999 18:32:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.93.990422161103.24617E-100000@modi.xraylith.wisc.edu> (raw)
Message-ID: <19990430183200.ZKHW3PUjYBy4yzfXopOCz43pbLxJO9ZnQVX9hKdfeDI@z> (raw)
In-Reply-To: <001c01be8d03$47177310$23ed6bc0@hawk.sensor.com>
On Thu, 22 Apr 1999, Michael Fonte wrote:
> Reply I caught this about 30 minutes later. I am not sure why 'most' of the
> source code distributions out there explicitly add -lc as well. Anyone have
> a historical perspective on this. I suppose there are apps out there that
> don't use libc, they either write their own or don't need it. In these
> cases it would be nice to not have to link against libc. In either case for
> compatibility reasons explicitly adding -lc should not cause a fatal error
> (IMHO).
Historically speaking, it was usually to deal with systems which had
multiple C runtime libraries, and the compiler drivers didn't handle
it as well as you'd like or at all. eg., lots of systems had libc.a,
libc_s.a, libc_g.a and so on where each library had some special meaning
(profile, debugging, static-vs-dynamic, some-other-feature, etc); more
often than not, there was no switch to pass to "cc" that will pick the
right one, and so you'll have to do it yourself. I don't recall having
to do this since the late 80's however.
Currently, there is absolutely no reason to do this in general; it's just
a bad habit folks pick up from old packages and perpetuate the whole
mess ;-)
This is also another reason one should not use low-level linkers etc
unless there is a special reason. You need to know way too much about
the target system to use ld etc directly.
> The makefile was generated via a configure script from the standard tcl8.0.5
> source distribution.
You're using the Makefile.in in tcl8.0.5/unix directory, which is one
problem right there (unless of course you really mean to build a Cygwin
Tcl that doesn't use Win32 API); the other is a bug in Tcl Makefile.in
-- it should not have the -lc in the first place (see ``LIBS = ').
You can pretty much use my patches for 8.0.4 and import it into a 8.0.5
CVS tree. Might need a few minor adjustments however. it's available from
http://www.xraylith.wisc.edu/~khan/software/tcl/ . I'll try to get 8.0.5
patches out sometime soon.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
next prev parent reply other threads:[~1999-04-22 14:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-22 11:20 in execvp.c undefined reference to 'posix_path_list_p' Michael Fonte
1999-04-22 13:54 ` Mumit Khan
1999-04-22 14:01 ` Michael Fonte
1999-04-22 14:33 ` Mumit Khan [this message]
1999-04-30 18:32 ` To use or not to use -lc [RE: in execvp.c undefined ...] Mumit Khan
1999-04-30 18:32 ` in execvp.c undefined reference to 'posix_path_list_p' Michael Fonte
1999-04-30 18:32 ` Mumit Khan
1999-04-30 18:32 ` Michael Fonte
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=Pine.SUN.3.93.990422161103.24617E-100000@modi.xraylith.wisc.edu \
--to=khan@xraylith.wisc.edu \
--cc=cygwin@sourceware.cygnus.com \
--cc=mikef@sensor.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).