public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Craig Burley <burley@gnu.org>
To: carlo@runaway.xs4all.nl
Cc: egcs@cygnus.com
Subject: Re: egcs testsuite & dejagnu : A special case?
Date: Fri, 03 Jul 1998 15:29:00 -0000	[thread overview]
Message-ID: <199807032132.RAA20692@melange.gnu.org> (raw)
In-Reply-To: <199807031310.PAA24690@jolan.ppro>

>The way dejagnu `solves' this is as follows:
>It picks a foobar.cc file and collects all the gcc parameters it
>needs to compile it (the -B, -L etc).  From that it determines
>where the libstdc++ resides that apparently is wanted (from a
>-L.*stdc++/).  It remembers this path in a variable, compiles the
>program and then sets explicitly the LD_LIBRARY_PATH environment
>variable to this path before executing the test program.
>If you hide the -L paths from dejagnu, it won't be able anymore
>to determine where the wanted libstdc++ is and thus it won't be
>able to set the LD_LIBRARY_PATH environment variable.

Would not another driver option like --print-program-name=whatever
be more appropriate than this approach?  E.g. --print-library-path
or something?

This is yet another point in favor of a weird, old idea I've been
seeing other points in favor of lately.  Namely:

  gcc ("compilers" in general that preprocess/compile/link) should
  also be able to *run* programs!

That'd be pretty cool, and would make for an obvious place to
solve the dynamic-library-path problem.  And it hearkens back
to systems like TOPS-10, which I used to use.  Not sure what
other problems it'd bring, though.

In any case, it sure seems like there's a lot of investment in
the idea that dejagnu, and perhaps other packages, should have
intimate knowledge of gcc command-line options and internal
operations of the driver.  After seeing all the problems this
has caused over and over again for years, I'd have thought it was
a slam-dunk to convince everyone that taking the time and
trouble to define, publish, and implement a clean interface to
the revelant aspects of how gcc does its job would be worthwhile,
and would have saved a lot of trouble had it been done years ago.

But I guess I'm losing my enthusiasm for doing something that
would cause people concern.  Like significant tabs in makefiles,
perhaps we'll just learn to live with the problems that inevitably
result from design mistakes we're unwilling to correct because
of the "huge existing installed base".  :)

In case I haven't made myself clear: it is an outright design
*flaw* that gcc requires any *options* to invoke it properly,
regardless of where it lives.  That is, if you define "built
but not installed" is not invokable, then there's no bug,
except that any other package (or `make check') that tries
to invoke it there is, by definition, broken because it tries
to do so.

But if you say that -B, -L, etc. are required to invoke gcc
so it works as it was intended to (as built), then you're
talking about an outright design flaw.  A command is supposed
to be sufficient to specify the entire data base of whatever
the command needs to properly operate.  Environment variables
and options needed to effect that are simply work-arounds for
a buggy design.  And IMO that extends to dynamic libraries as
well.  So much time wasted because people are willing to live
with obviously bad designs, always resulting in lots of confusion,
subtle programming errors, and the like.  It's understandable
why Microsoft repeats the mistakes of 20 years ago when it
catches up on decades-old technology; I'm not so sure the rest
of us have any excuse for that.

        tq vm, (burley)

       reply	other threads:[~1998-07-03 15:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199807031310.PAA24690@jolan.ppro>
1998-07-03 15:29 ` Craig Burley [this message]
1998-07-01  0:54 Mike Stump
1998-07-01  7:26 ` Craig Burley
1998-07-01 20:20   ` Jeffrey A Law
1998-07-02 11:02   ` Carlo Wood
1998-07-03  0:12     ` Craig Burley
1998-07-03  0:50       ` Carlo Wood
1998-07-03  8:38         ` Craig Burley
1998-07-03  9:35           ` Carlo Wood
  -- strict thread matches above, loose matches on Subject: below --
1998-06-29 22:34 Mike Stump
1998-06-30 15:15 ` Craig Burley
1998-06-30 14:46   ` Jeffrey A Law
1998-06-25 18:53 Carlo Wood
1998-06-26  2:49 ` Manfred Hollstein

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=199807032132.RAA20692@melange.gnu.org \
    --to=burley@gnu.org \
    --cc=carlo@runaway.xs4all.nl \
    --cc=egcs@cygnus.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).