Hi -
On Wed, Mar 05, 2014 at 03:51:40PM +1100, Ken McDonell wrote:
> [...]
> /usr/bin/rpmbuild -ba --define '_topdir /home/kenj/src/pcp' --define
> '_builddir %{_topdir}' --define '_sourcedir %{_topdir}/build/tar' --define
> '_rpmdir /home/kenj/src/pcp/build/rpm' --define '_srcrpmdir
> /home/kenj/src/pcp/build/rpm' --define '_specdir %{_topdir}/build/rpm'
> --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' --clean
> pcp.spec
Note no --target overrides in there.
> and rpmbuild builds a shell script to run that looks like this ...
> [...]
> RPM_OPT_FLAGS="-O2 -g -march=i386 -mtune=i686"
> [...]
> So it is rpmbuild in this case that is adding the bogus (?) and
> additional CFLAGS and CXXFLAGS
So something went wrong around this point. Do you perhaps have a
personal $HOME/.rpm* file or a modified system one?
> $ grep 'optflag.*march=i386' /usr/lib/rpm/rpmrc
> optflags: i386 -O2 -g -march=i386 -mtune=i686
That is supposed to trigger based upon the rpmbuild --target=ARCH setting;
note similar values for i686 etc.
> [...] So the question is what is the _proper_ way to smack
> rpmbuild in a case like this?
I think the key is to stop overriding what are probably the proper
system defaults; we just need to find what's doing the dirty deed.
You should be seeing this:
% rpm --eval %_target_cpu
i686
% grep _cpu /usr/lib/rpm/macros /etc/rpm/* $HOME/.rpm*
/usr/lib/rpm/macros:%_build_cpu %{_host_cpu}
/usr/lib/rpm/macros:%_host_cpu i686
/usr/lib/rpm/macros:%_target_cpu %{_host_cpu}
- FChE
|