Cross-compiling and dist-cc (Was: Let's remove mips, mipsel, s390, ... (Was: [Fwd: Re: GTK+2.0 2.6.2-3 and buildds running out of space]))
On Tue, Feb 22, 2005 at 12:44:27PM +0100, Wouter Verhelst wrote: On Tue, Feb 22, 2005 at 08:48:48PM +1300, Nick Phillips wrote: Running such a system in parallel with the current systems (and comparing the outputs) might be a good test for gcc-as-cross-compiler, then... And a hell of a lot of work. You can't just create checksums of the resulting binaries and compare those; it's not as if any difference between the two compiled binaries would constitute an error... Why not? Is there something non-deterministic in the compilation process? Ideally, version x of gcc should produce the same output natively as when cross-compiling. Or have I missed something important? (I'm actually quite fond of the idea of dist-cc sending pre-processed C code to remote (faster) machines and getting unlinked object code back. I haven't got a good use for it yet, but the _idea_ is neat.) -- --- Paul TBBle Hampson, MCSE 8th year CompSci/Asian Studies student, ANU The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361) [EMAIL PROTECTED] No survivors? Then where do the stories come from I wonder? -- Capt. Jack Sparrow, Pirates of the Caribbean This email is licensed to the recipient for non-commercial use, duplication and distribution. --- signature.asc Description: Digital signature
Re: Cross-compiling and dist-cc (Was: Let's remove mips, mipsel, s390, ... (Was: [Fwd: Re: GTK+2.0 2.6.2-3 and buildds running out of space]))
Paul Hampson wrote: On Tue, Feb 22, 2005 at 12:44:27PM +0100, Wouter Verhelst wrote: On Tue, Feb 22, 2005 at 08:48:48PM +1300, Nick Phillips wrote: Running such a system in parallel with the current systems (and comparing the outputs) might be a good test for gcc-as-cross-compiler, then... And a hell of a lot of work. You can't just create checksums of the resulting binaries and compare those; it's not as if any difference between the two compiled binaries would constitute an error... Why not? Is there something non-deterministic in the compilation process? Yes. Ideally, version x of gcc should produce the same output natively as when cross-compiling. Or have I missed something important? gcc -fno-guess-branch-probability Thiemo signature.asc Description: Digital signature
Re: Cross-compiling and dist-cc
Wouter Verhelst wrote: And a hell of a lot of work. You can't just create checksums of the resulting binaries and compare those; it's not as if any difference between the two compiled binaries would constitute an error... The idea is to cross-compile and native-compile _for_ _the_ _same_ _target_ _architecture_ and then compare the binaries. I don't see why they should differ. -- John Hasler -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Cross-compiling and dist-cc
On Tuesday 22 February 2005 14:01, John Hasler wrote: Wouter Verhelst wrote: And a hell of a lot of work. You can't just create checksums of the resulting binaries and compare those; it's not as if any difference between the two compiled binaries would constitute an error... The idea is to cross-compile and native-compile _for_ _the_ _same_ _target_ _architecture_ and then compare the binaries. I don't see why they should differ. A suprising number of programs embed the current date, time, hostname etc. in their user visible version strings. The Linux kernel for example, does not compile identically twice unless you hack it slightly. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Cross-compiling and dist-cc
* Will Newton | A suprising number of programs embed the current date, time, hostname etc. in | their user visible version strings. The Linux kernel for example, does not | compile identically twice unless you hack it slightly. Even with the same preprocessed source? -- Tollef Fog Heen,''`. UNIX is user friendly, it's just picky about who its friends are : :' : `. `' `- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Cross-compiling and dist-cc (Was: Let's remove mips, mipsel, s390, ... (Was: [Fwd: Re: GTK+2.0 2.6.2-3 and buildds running out of space]))
[EMAIL PROTECTED] (Paul Hampson) writes: Or have I missed something important? Yes. There are a jillion different machine code programs that do the same thing and a compiler could generate any one of them in response to the same source. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Cross-compiling and dist-cc
John Hasler [EMAIL PROTECTED] writes: Wouter Verhelst wrote: And a hell of a lot of work. You can't just create checksums of the resulting binaries and compare those; it's not as if any difference between the two compiled binaries would constitute an error... The idea is to cross-compile and native-compile _for_ _the_ _same_ _target_ _architecture_ and then compare the binaries. I don't see why they should differ. A compiler is allowed to generate any machine code that correctly does what the source program does. But there are many such machine code programs possible (bajillions, in fact), and a compiler can generate any one of them. There is no reason to think that two successive versions of the same compiler, let alone different compilers, would produce the same machine code. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Cross-compiling and dist-cc (Was: Let's remove mips, mipsel, s390, ... (Was: [Fwd: Re: GTK+2.0 2.6.2-3 and buildds running out of space]))
On Wed, Feb 23, 2005 at 12:38:46AM +1100, Paul Hampson wrote: Why not? Is there something non-deterministic in the compilation process? Ideally, version x of gcc should produce the same output natively as when cross-compiling. Or have I missed something important? -frandom-seed=string This option provides a seed that GCC uses when it would otherwise use random numbers. At present, this is used to generate certain symbol names that have to be different in every compiled file. The string should be different for every file you compile. -fno-guess-branch-probability Do not guess branch probabilities using a randomized model. Sometimes gcc will opt to use a randomized model to guess branch probabilities, when none are available from either profiling feedback (-fprofile-arcs) or __builtin_expect. This means that different runs of the compiler on the same program may produce different object code. Also, the first 16 bytes will differ in an ELF format .o, see http://lists.debian.org/debian-devel/2004/09/msg00201.html -- Petri Latvala signature.asc Description: Digital signature
Re: Cross-compiling and dist-cc (Was: Let's remove mips, mipsel, s390, ... (Was: [Fwd: Re: GTK+2.0 2.6.2-3 and buildds running out of space]))
Petri Latvala wrote: [snip] Also, the first 16 bytes will differ in an ELF format .o, see http://lists.debian.org/debian-devel/2004/09/msg00201.html That's incorrect, strictly speaking. The first (magic) bytes have to be identical, only the padding bytes could be different (but are usually zeroed). Thiemo signature.asc Description: Digital signature