[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Rebuilding .src.rpm's for performance
- From: Adam Bowns <adam-bowns ntlworld com>
- To: redhat-list redhat com
- Subject: Re: Rebuilding .src.rpm's for performance
- Date: Wed Nov 20 14:42:55 2002
Thanks for the advice. I dont seem to have a /etc/rpmrc file so i
modified the /usr/lib/rpm/rpmrc to make it use -O3 optimization when
compiling for the athlon
optflags: athlon -O3 -march=athlon
i've tested this on a few packages using the command you suggested,
rpmbuild --rebuild --target athlon-linux-gnu packagename.src.rpm
and from the screen output it looks like its doing as its told, it is
using the -march=athlon and -O3 flag's.
And boy !!! do the binaries it produces run fast !!!!!
My goal would be to rebuild all rpms installed on the system. I have
both the redhat source cd's available, but rather than simply rebuilding
everything there is, i would like to just rebuild the packages i am
using. If anyone out there has an idea for a scrip/command that would
accomplish this i would be very greatful if you would post it, and/or
and suggestions that would help me in writing the script myself (my
scripting skills are quite poor :-(
Thanks for all the help you have given me so far guys,
Adam
On Tue, 2002-11-19 at 22:23, Rick Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> And to reply to myself - I've discovered that if you use the following command:
>
> rpm --rebuild --target <arch>-redhat-linux-gnu rpmname.src.rpm
> or
> rpm --rebuild --target <arch>-linux-gnu rpmname.src.rpm
>
> (they're synonimous since one symlinks to the other in /usr/lib/rpm)
>
> so entering your directory of latest SRPMS and running:
>
> rpm --rebuild --target athlon-redhat-linux-gnu *.src.rpm
>
> could do the trick - rebuilding all packages for an athlon system, placing
> all rpms within /usr/src/redhat/RPMS/athlon.
>
> In a test rebuild for the latest gnupg package, it did use the march=athlon
> flag. I'm sure, however, that the arch needs to be within the rpmrc file. If
> you want to create one that does athlon-xp it could work. However, it
> appears you'd need to add macros, and plenty of other fun stuff within
> /usr/lib/rpm. Unless you think your apps would benefit from the difference
> between athlon and athlon-xp (SSE), it's probably not worth the extra effort.
>
> Valid arch's by default are for x86 systems:
> i386-redhat-linux-gnu
> i486-redhat-linux-gnu
> i586-redhat-linux-gnu
> i686-redhat-linux-gnu
> athlon-redhat-linux-gnu
> noarch-redhat-linux-gnu (which points to i386)
>
> It's tempting to try this on an older system to see if there's a noticable
> performance increase. If anyone else does/has - post the performance
> increases to the list - many of us would like to know if it's worth the effort.
>
> Hope this helps,
> - -Rick
> - --
> Rick Johnson, RHCE - rjohnson medata com
> Linux/WAN Administrator - Medata, Inc.
> PGP Public Key: https://mail.medata.com/pgp/rjohnson.asc
>
>
> Rick Johnson wrote:
> | Adam Bowns wrote:
> | | I am considering rebuilding all the rpm's in use on my system so they
> | | are optimised for my processor, but I have a few questions I would
> | | really like to know the answer to before i start :-)
> | |
> |
> | Funny - I was just pondering doing the same exact thing. Only reason I went
> | about some of them is that I wanted to use some newer (Rawhite/Red Hat 8.0)
> | packages on some 7.3 machines, so I needed to recompile them w/ GCC 2.9.6.
> |
> | | 1.Will it increase performance significantly ?
> |
> | I've watch the rebuild compile and the compilier does receive the mcpu=i686
> | flag at times. However, the resuilting RPM is still .i386.rpm because it's
> | i386 compatible. Unless you can figure out the speicfic rpmrc flags to make
> | it compile with athlon-xp specific code, it may not help a whole lot.
> |
> | | 2.Is rpmbuild fully linked into gcc ? Can i use all the flags mentioned
> | | in
> | |
> | |
> |
> http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options
>
> |
> | |
> |
> | ~From what I can tell in the rpmrc's wihtin /usr/lib/rpm - if you're
> | running
> | an i686, the flags will be included if appropriate. From what I can tell -
> | they're not specific unless you tell it otherwise.
> |
> | However - by default - all others are translated to i386 with the following
> | lines:
> |
> | buildarchtranslate: athlon: i386
> | buildarchtranslate: i686: i386
> | buildarchtranslate: i586: i386
> | buildarchtranslate: i486: i386
> | buildarchtranslate: i386: i386
> |
> | The i386 optflags line has the following:
> |
> | optflags: i386 -O2 -march=i386 -mcpu=i686
> |
> | Therefore the packages would be built for i386, but with i686 optimizations
> | by default.
> |
> | I think you could probably customize this within /etc/rpmrc or ~/.rpmrc to
> | override this for athlons and add any flags you desire.
> |
> | Dig around the rpmrc file for more info.
> |
> | | 3.Also, any experiences you have with rebuilding rpm's for athlon-xp
> | | architecture would be of interest to me.
> |
> | Beyond contemplation, I haven't done much w/ this. Given that the
> | default is
> | to include -mcpu=i686 -march=i386 - you're getting 386 code with 686
> | optimizations (if I'm reading the man pages correctly). For most of us,
> | that's probably good 'nuff. Red Hat has built specific i686 packages for
> | those libraries that benefit most from the changes. For 8.0, that includes
> | the kernels, glibc, and openssl.
> |
> | Correct me if I'm wrong.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> Comment: Signed and/or encpryted for everyone's protection.
>
> iEYEARECAAYFAj3aud0ACgkQIgQdhlSHZgPW2wCg2cTsqZeF1q43CouMxhCgiaVQ
> +LUAoL3qeI4PnCj6Iv4HQT+aHRzXepjn
> =usPO
> -----END PGP SIGNATURE-----
>
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request redhat com?subject=unsubscribe
> https://listman.redhat.com/mailman/listinfo/redhat-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]