Mailinglist Archive: opensuse-buildservice (148 mails)

< Previous Next >
Re: [opensuse-buildservice] recompiling OSS repo on local instance for different arch
On Mon, Sep 16, 2013 at 04:10:36PM +0200, Damian Ivanov wrote:
I want to recompile the whole OSS 12.3 or maybe when 13.1 is out the
13.1 repo with specific optimizations (in particular for bulldozer v2
"vishera"). So when I run a VM with the OBS appliance where can I set
the global flags? in /etc/rpm ?

It's probably better to put some "Optflags" in your project config.
They will be copied into rpm's rpmrc file when doing the build.

The OpenSUSE:12.3 config contains:

Optflags: i586 -fomit-frame-pointer -fmessage-length=0
Optflags: i686 -march=i686 -mtune=generic -fomit-frame-pointer
-fmessage-length=0
Optflags: x86_64 -fmessage-length=0
Optflags: ppc -fmessage-length=0
Optflags: ppc64 -fmessage-length=0
Optflags: ia64 -fmessage-length=0
Optflags: s390 -fmessage-length=0
Optflags: s390x -fmessage-length=0
Optflags: armv5el -fmessage-length=0
Optflags: armv5tel -fmessage-length=0
Optflags: armv7l -fmessage-length=0
Optflags: armv7hl -fmessage-length=0
Optflags: sparcv9 -fmessage-length=0 -mcpu=ultrasparc
Optflags: sparc64 -fmessage-length=0 -mcpu=ultrasparc
Optflags: * -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables

The '*' optflag is always added to the arch specific one.

Will this even work or are the spec
files full of hardcoded "if or" for x86 and x64?

It should work, as for openSUSE packages it's considered a bug if
the rpm optflags are not honored.

(But: does the 1% speedup you get through optflag tweaking really
warrant a complete distribution rebuild?)

Cheers,
Michael.

--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
References