On Thu, Mar 14, 2002 at 01:40:34AM -0500, Aaron Haviland wrote: orion> > Just install pentium-builder, set the environment variable like it orion> > says to, and apt-get -b source <package> away! orion> orion> Well, hot damn. you're my new hero! Now I can still build optimised orion> local .debs and make non-optimised redistributable ones without messy orion> tweaking! RPM has had the ability to build for different architectures and optimize based on them since the beginning: rpm --rebuild --target=i386,i586,i686 foo.src.rpm Each distro includes RPM configuration files to define the build environment for that distro, including the optimization flags to use: optflags: i386 -O2 -march=i386 -mcpu=i686 optflags: i486 -O2 -march=i486 optflags: i586 -O2 -march=i586 optflags: i686 -O2 -march=i686 optflags: athlon -O2 -march=athlon optflags: ia64 -O2 They are usually passed to configure/make by setting variables in the .spec file (so you don't need to patch Makefiles): CC=$RPM_OPT_FLAGS ./configure make or even better, by using these macros, which will also cause the package to place all its files in the standard places that the distro has defined in the local RPM build environment (i.e., /usr/doc vs. /usr/share/doc): %configure make %makeinstall That way, when configure tests the compiler, it can be sure the compiler works with those optflags. Also, it doesn't require klugy scripts to override the compiler binary, etc., and can be used by any user, not just root (perhaps pentium-builder can too, I don't know). -- Charles R. Anderson <cra@wpi.edu> / http://angus.ind.wpi.edu/~cra/ PGP Key ID: 49BB5886 Fingerprint: EBA3 A106 7C93 FA07 8E15 3AC2 C367 A0F9 49BB 5886