[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpmbuild: unset CFLAGS & CXXFLAGS ?



Leszek Matok wrote:
Dnia 2007-11-09, o godz. 23:09:05 "Debarshi 'Rishi' Ray"
<debarshi ray gmail com> napisaƂ(a):

If a package, indeed, needed some custom value for CFLAGS, CXXFLAGS
and FFLAGS, I believe that can be done through the spec file itself
and the user's environment setting would not be required.
I build RPM-s locally from time to time (or more often) and I have to admit,
using environment variables has saved me hours of spec file editing. Imagine
recompiling more than one srpm, more than one time, with different options
(like benchmarking -Os vs -O2 or something). You can easily alias rpm to
always clear the environment, won't that solve your problem without
introducing new problems to other users? :)

That can be done easily enough by rpm itself as well:

rpmbuild -ba --define 'optflags -O77 -funslide -funpotato' foo.spec

alias rpmgentoobuild='rpmbuild --define \'optflags -O77 -funslide\' '

then you can do:

rpmgentoobuild -ba foo.spec


Don't forget to pass the rice!


--
Mike A. Harris

Come and join us on the #fedora8 IRC help forum on irc.freenode.net


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]