unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* diverse double compilation: using $ORIGIN?
@ 2017-11-01 16:46 Ricardo Wurmus
  2017-11-02  8:41 ` Fwd: " Ricardo Wurmus
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2017-11-01 16:46 UTC (permalink / raw)
  To: guix-devel; +Cc: bootstrappable

Hi Guix,
hi bootstrappers!

When building packages, Guix embeds the absolute file name of the output
directory in the resulting binary.  That’s usually fine and what we
want.

Now let’s assume that we’d like to build the GCC sources with diverse
double compilation: we’d have a “gcc” package that’s built with
“gcc-core”; we’d also have a “gcc-from-clang” package that uses Clang as
its input.  Since the GCC build procedure is performed at least two
times (once with the bootstrap compiler, and then again with the GCC
variant this produces), the resulting GCC binaries should be identical.

Except that they are not.  One of the reasons is that the binaries that
Guix produces embed the target output directories.  This means that the
two compiler binaries that result from diverse double compilation will
*always* differ in at least the embedded paths, such as paths to itself
(e.g. to binaries in the libexec directory) and paths to.

I wonder if we can use $ORIGIN in the compiler binaries, so that we can
avoid (most) references to the output directories, thereby making the
equality check between the diversely built compiler binaries simpler.

Is this at all possible?  Or do we need to accept that the equality
check for diverse double compilation for binaries built with Guix must
be aware of /gnu/store references and ignore those?

Alternatively, could we move all of these store references into a
wrapper script that would tell the binary about them via environment
variables?  The equality check would only need to exclude the wrapper
script then and compare the two sets of compiler binaries naively.

Does this make any sense?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-11 21:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-01 16:46 diverse double compilation: using $ORIGIN? Ricardo Wurmus
2017-11-02  8:41 ` Fwd: " Ricardo Wurmus
2017-11-02  8:46 ` [bootstrappable] " Jan Nieuwenhuizen
2017-11-05 16:09   ` Ludovic Courtès
2017-11-05 16:27     ` Jan Nieuwenhuizen
2017-11-10 19:19       ` Jan Nieuwenhuizen
2017-11-05 16:11 ` Ludovic Courtès
2017-11-10  4:53 ` Chris Marusich
2017-11-11 21:56   ` Ludovic Courtès

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).