From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: gcc-ddc
Date: Tue, 21 Nov 2017 23:01:04 +0100 [thread overview]
Message-ID: <878tezi95r.fsf@gnu.org> (raw)
In-Reply-To: <CAE4v=pgkx5D8zc1-dnSajCbhJgxpcBQYYaAj3-z-yo=EmeHBjQ@mail.gmail.com> ("Gábor Boskovits"'s message of "Tue, 21 Nov 2017 17:48:21 +0100")
Gábor Boskovits writes:
> I just pushed what I have right now. It's on branch gcc-ddc on my github. Should I post a patch here?
Great!
Yes, that makes commenting on it an easy option. Also, please mention
the location to clone from. github is non-free, but cloning from it
is ok.
janneke
>
> 2017-11-21 0:16 GMT+01:00 Gábor Boskovits <boskovits@gmail.com>:
>
> The only problematic one seems to be standard_libexec_prefix, because that is used in line 3654 of gcc/
> gcc.c in a real assignment.
> It is also used in line 64 of gcc/gcc-ar.c.
>
> Other uses of all these other symbols could be calculated as compile time realitve paths, and if we can live
> with these paths staying in the same store directory, then it would be ok.
>
> This problematic use pattern is in the from:
>
> x=make_relative_prefix(y,standard_exec_prefix,standard_libexec_prefix);
> if(!x) x=standard_libexec_prefix;
>
> Code of make_relative_prefix is in libiberty/make-relative-prefix.c.
>
> Assuming sane values (not nulls, existing program name, valid GCC_EXEC_PREFIX) we get null in the following
> cases:
> 1. GCC_EXEC_PREFIX(or the program name directory component)==standard_exec_prefix
> 2. if the path present in standard_exec_prefix and standard_libexec_prefix has no common directories
> (starting from the beginning)
> 3. in case of allocation failure.
>
> We can safely assume that case 2 does not happen, as we at least have /gnu/store there, I think.
> Nothing can be done about case 3, I don't think we get too far in that case anyway...
>
> So, when this happens we simply have case 1: we are not relocated.
>
> In gcc/gcc.c this pattern is guarded by if(gcc_exec_prefix) basically.(it is in an else block)
> It is not so in gcc/gcc-ar.c.
>
> This is how far I could get with it by now.
>
> 2017-11-20 23:14 GMT+01:00 Ricardo Wurmus <rekado@elephly.net>:
>
> Jan Nieuwenhuizen <janneke@gnu.org> writes:
>
> > Gábor Boskovits writes:
> >
> > Hey Gábor!
> >
> > [cc: guix-devel]
> >
> >> I'm definietly making progress on this. Now I have a working debug build of gcc.
> >> Identified the critical symbols, they are:
> >
> >> static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
> >> static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
> >> static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
> >
> > Oh nice!
> >
> >> The problem fundamentally is that they are calculated from prefix passed to configure.
> >> I've checked, that that is the store location.
> >
> > Right.
> >
> >> How should we go on with this?
> >>
> >> Is it possible to pass other value as prefix, or should we keep prefix as is, and patch the makefile?
> >> It is set from line 2092 in gcc/Makefile.in by the way.
> >
> > Good question. I think we should try patching the Makefile.in.
>
> I’m just throwing this in, even though I suspect that it is a terrible
> idea: we could replace these symbols with calls to getenv and provide
> the values at runtime with a separate wrapper that would be excluded in
> the comparison.
>
> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
> https://elephly.net
>
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2017-11-21 22:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAE4v=phLKD_nOD2CeBB26H2wDcJuwQsg1Y09BprjMg_YQq2ahw@mail.gmail.com>
2017-11-20 18:24 ` gcc-ddc Jan Nieuwenhuizen
2017-11-20 22:14 ` gcc-ddc Ricardo Wurmus
2017-11-20 23:16 ` gcc-ddc Gábor Boskovits
2017-11-21 16:36 ` gcc-ddc Gábor Boskovits
2017-11-21 16:48 ` gcc-ddc Gábor Boskovits
2017-11-21 22:01 ` Jan Nieuwenhuizen [this message]
2017-11-22 14:42 ` gcc-ddc Gábor Boskovits
2017-11-23 4:11 ` gcc-ddc Jan Nieuwenhuizen
2017-11-23 7:14 ` gcc-ddc Ricardo Wurmus
2017-11-23 11:23 ` gcc-ddc Gábor Boskovits
2017-11-29 9:43 ` gcc-ddc Gábor Boskovits
2017-11-29 12:26 ` gcc-ddc Gábor Boskovits
2017-11-29 15:57 ` gcc-ddc Jan Nieuwenhuizen
2017-11-30 14:32 ` gcc-ddc Gábor Boskovits
2017-12-01 15:44 ` gcc-ddc Gábor Boskovits
2017-12-02 14:48 ` gcc-ddc Jan Nieuwenhuizen
2017-12-02 14:53 ` gcc-ddc Gábor Boskovits
2017-12-02 22:44 ` gcc-ddc Ricardo Wurmus
2018-01-29 8:46 ` gcc-ddc Gábor Boskovits
2018-01-29 14:14 ` gcc-ddc Ludovic Courtès
2018-01-29 14:25 ` gcc-ddc Ricardo Wurmus
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878tezi95r.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=boskovits@gmail.com \
--cc=guix-devel@gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).