PDA

View Full Version : How to recompile for i686 CPU's?



arkaine23
11-10-2003, 09:27 PM
I'd like to recompile everything in knoppix to i686, and then delete the source and remaster it back into a CD. Is there an easy way to do this with apt?

Henk Poley
11-10-2003, 10:24 PM
I guess not, though are is apt-src repositories, if you add them to your /etc/apt/sources.list you can get them via apt-get sources packagename. There even seems to be some 'gentoo-like' automatic compilation going on. Though files downloaded and created this way are completely non-managed, aka apt-get won't keep a database about them. See the apt-get man page for more info, I never used it it this way.

I think you would be better of getting a Gentoo setup and maybe porting some of the Knoppix stuff to it.

arkaine23
04-01-2005, 05:58 PM
Well, actually there's apt-build, a front-end for apt-get to install source packages and wrap gcc to add your own flags. You don't get use flags like with gentoo, but can optimize for architecture/cpu and use Cflags.

I'm playing with this now, using

-mcpu=athlon-xp -march-i686 -O3 -fomit-frame-pointer -ffast-math

Now its got a few kinks in it. Some packages don't have source available in the sources.list I have. Others you might get yourself into trouble if you upgraded - libc6, knoppix-specific stuff, gcc, openoffice.....

Its great for installing single optimized packages. Its also got a world option to update from a list (which you need to create).

Using apt-get upgrade or dist-upgrade would replace your optimized packages, unless you pin them with a higher priority, but then pinned shared libraries might prevent upgrading other packages with apt-get, so that can give you a little trouble.

arkaine23
04-01-2005, 05:59 PM
Heh, answering my own question....