On Tue, 27 May 2003, Dhruba Bandopadhyay wrote: > On Tue, 2003-05-27 at 05:29, Joshua J. Berry wrote: > > I'm going to be getting a new (Pentium 4) laptop relatively soon...and I was > > wondering if it's possible to pre-build P4-optimized packages on my Pentium 3 > > desktop. > > I doubt this is possible. However, you might want to look at distcc > which will allow other machines to share the compilation load or bear it > entirely. >
It most certainly is possible. Their is a flag in emerge see emerge --help for building binary packages only... the problem with this flag is that it doesn't take care of dependencies.. to get round this you need a lot of space but you can do the chroot thing just as you did when you build your system example: mkdir /tmp/buildP4 cd /tmp/buildP4 tar xvjpf stage3-* (grab the latest stage3-* tarball) mount -o bind /proc /tmp/buildP4/proc cp /etc/resolv.conf /tmp/buildP4/etc chroot /tmp/buildP4 /bin/bash env-update source /etc/profile (most of this is just yanked form the install docs) Now update you make.conf with appropriate use flags and CFLAGS emerge sync emerge -u portage emerge -ueD world (build all the files with new CFLAGS/USE) This will give you the equivalent of a personalized stage3, next emerge whatever stuff you want. emerge package1 package2 ..... when you are done emerging everything you need: exit umount /tmp/buildP4/proc cd /tmp/build tar cvjpf --numeric-owner PersonalP4.tbz2 then when you do your install start from a stage 3 (except now you have more than that). Likely this won't fit on a CD unless you are a real minimalist but it doesn't really matter as you can save it to another hard drive or partition of new hard drive when you are installing. Hope this helps. Cheers, Jason > > I'm thinking something along the lines of: > > > > CFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -falign-functions=4 -mmmx -msse > > -msse2 -mfpmath=sse2" > > emerge -B xfree mozilla kde* ... > > > > I already have all the (P3-optimized) dependencies installed on my desktop, so > > deps won't be an issue. Will this work? > > If you are talking about generating binaries using one machine for > another machine then this process is error prone. As you say it doesn't > take care of deps and also the two machines if sharing binaries must > have the same make.conf settings which I doubt they will. Distcc is > recommended for what you are trying to do. It allows both machines to > have completely unique settings but still distribute the compilation. > My desktop for example does all the work for my laptop. > > > > Also, I'd heard rumors to the effect that gcc 3.2 can't generate P4-optimized > > code correctly. Is this just a rumor, or is there some fact to it? > > Gcc 3.2.2 is not to be used with pentium4 flags. However, 3.2.3 and 3.3 > are fine. You may have to wait a little for the latter two to be > released on stable. > > -- [EMAIL PROTECTED] mailing list