We ought to decide what the minimum CPU requirements are for our distro.
Once we've decided, those of us responsible for compiling packages will need to figure out how to compile packages for a specific CPU. A lot of packages will default to compiling for whatever CPU you might have (which is usually higher than a 386) and will generate code incompatible with older CPU architectures.
Also note that when a package links in static libraries, it's pulling in code from those libraries which may or may not be compatible with older processors. To be fully compatible with a certain CPU architecture, any static libraries a package compiles against must also be compatible with that CPU architecture.
Also note that by default, gcc leaves extra symbols in executables and libraries for the purpose of debugging, profiling, etc. It's good for static libraries to have this (for the sake of developers), but the symbols add up to a fair amount of disk space once all is installed. I'd suggest that ELF executables and shared libraries have these symbols stripped out via the strip utility. Everything else should be left unstripped.
There are four things I know to do for packages in general:
Set your CFLAGS and CXXFLAGS environment variable to "-mcpu=i386 -march=i386". A lot of source packages will read these variables and stick them in the options they pass to GCC. Adding "-O3" tells a package to compile for optimization level 3 (default is 2, which is not as good as 3) but is not compatible with all source packages. Whether to include "-O3" in the CFLAGS/CXXFLAGS is debatable. I set it in CFLAGS/CXXFLAGS, but if a package doesn't look at these variables, I don't try to force -O3 on it. I've had no problems with that so far.
Old imake packages use a site.def file (I think) to store various compile flags. These packages do not look at CFLAGS/CXXFLAGS, so you'll have to modify the site.def file to get non-default optimizations. XFree86 is liable to be one of the few packages we compile that still uses imake (thank god). I use -O3 on XFree86 with no problems.
autoconf-based packages (which use a ./configure script) rely on the CFLAGS/CXXFLAGS variable, but they also look at the host type you're building on. For these packages, you must set CFLAGS/CXXFLAGS, and you must also pass a "--host=" switch to ./configure. I've been using "--host=i386-pc-linux-gnu".
autoconf-based packages often offer a "make install-strip" in addition to a "make install" rule that simplifies stripping binaries and libraries. I'd suggest we use that whenever possible.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We ought to decide what the minimum CPU requirements are for our distro.
Once we've decided, those of us responsible for compiling packages will need to figure out how to compile packages for a specific CPU. A lot of packages will default to compiling for whatever CPU you might have (which is usually higher than a 386) and will generate code incompatible with older CPU architectures.
Also note that when a package links in static libraries, it's pulling in code from those libraries which may or may not be compatible with older processors. To be fully compatible with a certain CPU architecture, any static libraries a package compiles against must also be compatible with that CPU architecture.
Also note that by default, gcc leaves extra symbols in executables and libraries for the purpose of debugging, profiling, etc. It's good for static libraries to have this (for the sake of developers), but the symbols add up to a fair amount of disk space once all is installed. I'd suggest that ELF executables and shared libraries have these symbols stripped out via the strip utility. Everything else should be left unstripped.
There are four things I know to do for packages in general:
Set your CFLAGS and CXXFLAGS environment variable to "-mcpu=i386 -march=i386". A lot of source packages will read these variables and stick them in the options they pass to GCC. Adding "-O3" tells a package to compile for optimization level 3 (default is 2, which is not as good as 3) but is not compatible with all source packages. Whether to include "-O3" in the CFLAGS/CXXFLAGS is debatable. I set it in CFLAGS/CXXFLAGS, but if a package doesn't look at these variables, I don't try to force -O3 on it. I've had no problems with that so far.
Old imake packages use a site.def file (I think) to store various compile flags. These packages do not look at CFLAGS/CXXFLAGS, so you'll have to modify the site.def file to get non-default optimizations. XFree86 is liable to be one of the few packages we compile that still uses imake (thank god). I use -O3 on XFree86 with no problems.
autoconf-based packages (which use a ./configure script) rely on the CFLAGS/CXXFLAGS variable, but they also look at the host type you're building on. For these packages, you must set CFLAGS/CXXFLAGS, and you must also pass a "--host=" switch to ./configure. I've been using "--host=i386-pc-linux-gnu".
autoconf-based packages often offer a "make install-strip" in addition to a "make install" rule that simplifies stripping binaries and libraries. I'd suggest we use that whenever possible.