public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Geoffrey Keating <geoffk@redhat.com>
Cc: sid@sources.redhat.com
Subject: Re: patch for location-independence
Date: Tue, 13 Nov 2001 13:49:00 -0000	[thread overview]
Message-ID: <20011121165918.F30770@redhat.com> (raw)
In-Reply-To: <200111212133.fALLXlp11797@thief.cygnus.com>; from geoffk@cygnus.com on Wed, Nov 21, 2001 at 01:33:47PM -0800

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

Hi -

On Wed, Nov 21, 2001 at 01:33:47PM -0800, Geoffrey Keating wrote:
: The attached patch causes SID to look at argv[0] to determine its
: location, so that the installed sid tree can be moved anywhere and
: there is no need to set SID_EXEC_PREFIX (to run the sid executable,
: at least).
: 
: OK to commit?

Thank you for giving this a try, however, I have a few
reservations though about the propriety of this approach.

For one thing, global variables such as sidutil::argv0[] are
generally unwelcome in sid, among other reasons for interfering
with shared library mechanisms.  For another, it is necessary to
use systematic C++ namespace prefixing on ~all the identifiers;
testing with gcc 3.0+ helps uncover problems like that.  The code
also does too much (all) work anew for each file search.

It would be better to put this logic into sid/main/mainDynamic.cxx
itself; if getenv(SID_EXEC_PREFIX) is unset, it could endavour to
compute a plausible value and put it into the environment.  (It could
do the same to a hypothetical SID_PREFIX while at it.)  The sidutil
code could then go unchanged, or even simplified.

Does this make sense?

(I wonder too to what extent the code in question was begat by gcc;
sid is (C) Red Hat, not (C) FSF; is there a reason for concern?)

- FChE

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

WARNING: multiple messages have this Message-ID
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Geoffrey Keating <geoffk@redhat.com>
Cc: sid@sources.redhat.com
Subject: Re: patch for location-independence
Date: Wed, 21 Nov 2001 13:59:00 -0000	[thread overview]
Message-ID: <20011121165918.F30770@redhat.com> (raw)
Message-ID: <20011121135900.l-DYqCxxP2d1S3DmrcPSltHQktX5Bd-_Ra257URBD3s@z> (raw)
In-Reply-To: <200111212133.fALLXlp11797@thief.cygnus.com>

Hi -

On Wed, Nov 21, 2001 at 01:33:47PM -0800, Geoffrey Keating wrote:
: The attached patch causes SID to look at argv[0] to determine its
: location, so that the installed sid tree can be moved anywhere and
: there is no need to set SID_EXEC_PREFIX (to run the sid executable,
: at least).
: 
: OK to commit?

Thank you for giving this a try, however, I have a few
reservations though about the propriety of this approach.

For one thing, global variables such as sidutil::argv0[] are
generally unwelcome in sid, among other reasons for interfering
with shared library mechanisms.  For another, it is necessary to
use systematic C++ namespace prefixing on ~all the identifiers;
testing with gcc 3.0+ helps uncover problems like that.  The code
also does too much (all) work anew for each file search.

It would be better to put this logic into sid/main/mainDynamic.cxx
itself; if getenv(SID_EXEC_PREFIX) is unset, it could endavour to
compute a plausible value and put it into the environment.  (It could
do the same to a hypothetical SID_PREFIX while at it.)  The sidutil
code could then go unchanged, or even simplified.

Does this make sense?

(I wonder too to what extent the code in question was begat by gcc;
sid is (C) Red Hat, not (C) FSF; is there a reason for concern?)

- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7/CO2VZbdDOm/ZT0RAgcgAJ9Fwi8yubKZiLo1WrPfeXfd9lApQwCfeXUx
IGZUl0CSNjv4+GKD00ga0l0=
=vjpK
-----END PGP SIGNATURE-----

  reply	other threads:[~2001-11-21 21:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-13 13:24 Geoffrey Keating
2001-11-13 13:49 ` Frank Ch. Eigler [this message]
2001-11-21 13:59   ` Frank Ch. Eigler
2001-11-21 13:33 ` Geoffrey Keating

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=20011121165918.F30770@redhat.com \
    --to=fche@redhat.com \
    --cc=geoffk@redhat.com \
    --cc=sid@sources.redhat.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).