Subject: Re: How to create packages with several -march?
To: Nuno Teixeira <email@example.com>
From: None <firstname.lastname@example.org>
Date: 03/18/2005 23:55:28
Nuno Teixeira wrote:
> Hello to all,
> I came to this question when I use my i386 Athlon XP PC to create
> packages to old PCs based on I486 and I586 cpus.
> Generally I don't use any -march or -mcpu gcc options to avoid problems.
> I'm working and upgrading a Pentium 200 MMX and I like to optimize the
> packages with -march=pentium-mmx using my Athlon build system.
> Is there any way to create packages with several optimizations like:
> Using only one build PC?
> Nuno Teixeira
I think you can, say you're using Pentium 4 and want to build optimized
packages for AMD Athlon, save the following file as
'/etc/mk.athlon-tbird.conf' and before you build packages run:
Here is mk.athlon-tbird.conf:
OPTIM_CPUFLAGS2=-march=athlon-tbird -mmmx -m3dnow
- packages will be installed into /usr/pkg.athlon-tbird
- packages database will be in /usr/pkg.athlon-tbird/db/pkg
- gzipped packages will be saved into /usr/packages.athlon-tbird
- object files during build will be kept in /usr/obj.athlon-tbird/pkg
See 'man packages' for options to go into your mk.conf file
Before you install packages on the target machine you would need to
setup symbolic link:
ln -s /usr/pkg.athlon-tbird /usr/pkg
The packages you built have hardcoded library paths to
/usr/pkg.athlon-tbird package directory, but you can still reference all
the executbles via /usr/pkg/bin/* as long as there is a symbolic link.
Other option is to build everything inside a chroot jail.