against recommendations on 64bit compilation of certain packages...
Does anyone know why is not recommended to compile the critical linux packages like binutils, gcc and glibc with optimizations or a specific target?
maybe because... you lose the ability to cross-compile? or is it a more strange or cryptic reason? As posted before, I'm going for the 64 bit versions of linux but at least I would like to know why the LFS book encourage not to do that optimizations... creepy :scratch: Julio |
I always though it was because those packages could behave badly. Some code can behave differently with different optimizations.
Code:
#include <stdio.h> gives me an answer of 1073827936 gcc -O2 a.c && ./a.out gives me an answer of 1 This is with gcc 2.95.3, 3.3.3 and 3.4.2. It is a rather silly coding mistake to make but it is an example of different results for different -O levels. |
The reason optimisations have not been recommended in the past is mainly due to the support questions that arise when people push things too far ( -O3 -fcrazy-shit ).
None of this is really relevant for 64bit builds though. For 64bit builds you need a toolchain which targets 64bit, using this toolchain to compile glibc et al you don't need to generally supply any extra flags. You can usually get away with supplying -mtune= and -march= ( if you so desire ) At some point in the next few weeks I'll be updating cross-lfs in preparation for merging into lfs-unstable ( http://www.linuxfromscratch.org/~rya...pts/cross-lfs/ ), it should give you an idea on how to build your 64bit system (be it uni-arch or bi-arch 32/64 ) New scripts should be up for testing ~20041004 |
Quote:
Quote:
Quote:
Julio |
Quote:
RtCW, UT2k[34] and (soon on linux) Doom 3 ;-) |
hahahaha you're right... but if I want a mixed architecture, what packages can I compile in 64bit and which ones not?
Julio P.D. and you forget the most important... Quake3 :D |
For mixed architecture you firstly need a bi-arch toolchain.
Then you generally build any packages which provide libraries twice, first time 32bit ( CC=gcc -m32 ), second time 64bit (ensures you have 64 bit binaries, but both 32bit and 64bit libraries). Care has to be taken that 64bit libraries are installed to */lib64 (generally all that is required is passing --libdir=/blah/lib64 ) |
thought UT2K3/4 had 64bit versions... :scratch:
well... I'll try to make first a 64bit LFS uni-arch and later... maybe i'll redo all passes and make a mixed 64/32 LFS ;) Julio |
by the way...
doesn't building a mixed system means that the CPU will run in 'hybrid' mode? :scratch: (definitely, I think for my first test I will build a 'pure' 64bit system... step by step ;)) Julio |
Quote:
Anyway, I'm in the process of setting up a biarch LFS (32bit / x86_64 ), and would really like to use and/or test your newest versions. If you have something pretty much ready to go, please let me know. Thanks, Ben. |
Apologies, was AFK yesterday :-/
New scripts will be up in end of today. Scripts aren't based on any particular book version, it should build for whatever package versions you specify. Note my focus is predominately toolchain, you may want to go over the scripts for non-toolchain components and edit to taste. They will be under http://www.linuxfromscratch.org/~rya...pts/cross-lfs/ [R] |
Thanks man, I appriciate it :p !
Once they are up I will give it a go and post my results! Ben. |
New scripts are up. (v3.0.3)
Let me know how you go... You may want to consider joining the lfs-hackers mailing list if you need any help with them, I'll respond quicker there than here ;-) Note: documentation is pretty much non-existent, but the scripts are pretty well commented... Best Regards [R] |
All times are GMT -5. The time now is 08:13 PM. |