On Tue, 2005-04-05 at 10:38 -0600, Justin Conover wrote:
So if I use
CC=gcc32 rpmbuild -ba xmms.spec
I should get a clean build and not an error:
checking whether make sets $(MAKE)... yes checking for x86_64-redhat-linux-gnu-gcc... gcc32 checking for C compiler default output... configure: error: C compiler cannot create executables See `config.log' for more details. error: Bad exit status from /var/tmp/rpm-tmp.36577 (%build)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.36577 (%build)
And here's why: gcc3.3 and below accept different compile flags than gcc 3.4 and above. Specifically:
gcc <= 3.3: use -mcpu= gcc >= 3.4: use -mtune=
Neither gcc will accept the other option. And, since you're running on a system with gcc4 installed, the rpm OPTFLAGS macro contains -mtune. So you have to override CFLAGS as well as CC if you want things to continue to compile with gcc 3.2 and rpmbuild on a gcc4 system.
Dan