[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: optimization? (was: RE: RedHat kernel RPMs?)
- From: Jeff Johnson <jbj JBJ ORG>
- To: rpm-list redhat com
- Subject: Re: optimization? (was: RE: RedHat kernel RPMs?)
- Date: Wed, 27 Sep 2000 06:29:15 -0400
On Tue, Sep 26, 2000 at 04:46:57PM -0700, Gregory Leblanc wrote:
>
...
> their mother is trying to download it right now, I can't get a copy), and I
> noticed that more than just the kernel RPMs are supposed to be optimized for
> different architectures. Thus 3 questions:
> 1) What flags are being used on RedHat's build machine (porky?) to optimize
> their regular and kernel packages?
Packages prepared using rpm-4.0 include the configured value of %optflags
in the tag RPMTAG_OPTFLAGS, you should be able to display by doing
rpm -qp --qf '%{optflags}\n' <your rpm-4.0 binary package here>
Please note carefully that the configured value may not be the same as
the actual value of CFLAGS used, but, for many, if not most, packages the
values should be the same.
> 2) What's a good resource for more information on the black art of choosing
> those flags? For example, why does adding -s break important packages like
> glibc?
"Choosing" is a very black art indeed. You might start by identifying
the possible choices from "info gcc".
> 3) Is there a way to make 2 targets use different flags, or to have 2
> different targets use the same filename/architecture? Say I wanted 1 target
> to have -s, and a second target -not- to have -s, is there a way to do that?
In rpm, you configure the desired flags using the macro %optflags.
rpm-4.0 has per-platform configuration, currently in
/usr/lib/rpm/<arch>-<os>/macros
and
/etc/rpm/<arch>-<os>/macros
For example, to change optflags for i686 on linux, you might do
mkdir -p /etc/rpm/i686-linux
echo "%optflags YOUR_FLAGS_HERE" >> /etc/rpm/i686-linux/macros
Invoke rpm with "--target i686-linux" should have YOUR_FLAGS passed
into build scriplets in the environment variable RPM_OPT_FLAGS.
73 de Jeff
--
Jeff Johnson ARS N3NPQ
jbj@jbj.org (jbj@redhat.com)
Chapel Hill, NC
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]