Description of problem: When i build "python related" binaries with gcc32, i get the error "cc1: invalid option `tune=pentium4'" Version-Release number of selected component (if applicable): python-2.4.1-2 python-devel-2.4.1-2 compat-gcc-32-3.2.3-47.fc4 How reproducible: allways Steps to Reproduce: wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-2.0-testing-src.tgz tar xzf xen-2.0-testing-src.tgz make CC=gcc32 -C xen-2.0-testing tools Actual results: running build_ext building 'xc' extension creating build/temp.linux-i686-2.4 creating build/temp.linux-i686-2.4/xen creating build/temp.linux-i686-2.4/xen/lowlevel creating build/temp.linux-i686-2.4/xen/lowlevel/xc gcc32 -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 \ -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables\ -D_GNU_SOURCE -fPIC -m32 -march=i686 -fPIC \ -I../../tools/python/xen/lowlevel/xu -I../../tools/libxc \ -I../../tools/libxutil -Ixen/lowlevel/xc -I/usr/include/python2.4 -c \ xen/lowlevel/xc/xc.c -o build/temp.linux-i686-2.4/xen/lowlevel/xc/xc.o \ -fno-strict-aliasing -Wall -Werror cc1: invalid option `tune=pentium4' error: command 'gcc32' failed with exit status 1 make[2]: *** [build] Error 1 make[2]: Leaving directory `/usr/src/xen-2.0-testing/tools/python' make[1]: *** [install] Error 2 make[1]: Leaving directory `/usr/src/xen-2.0-testing/tools' make: *** [tools] Error 2 make: Leaving directory `/usr/src/xen-2.0-testing' Expected results: compile cleanly Additional info: When i strip "-mtune=pentium4" from the "OPT" variable in /usr/lib/python2.4/config/Makefile everything is fine. Where does that "OPT=" come from? Is it part of the original Makefile as shipped with the python rpms? According to "rpm -V", the Makefile differs from that one originally installed with python[-devel]. $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 4 model name : AMD Athlon(tm) Processor stepping : 4 [...]
I have the same problem on Centos 4.1 but with any specs or src.rpm files i try... I have upgrade all my packages but nothing to do.
The configuration options in that Makefile are the ones used to compile python. I am not sure how to fix this.
Probably %{optflags} which has a -mtune=pentium4 option. gcc32 doesn't recognize this, but it does recgonize -mcpu=i686. (I rebuilt something many times trying to figure out why gcc32 wouldn't output executables. It didn't like -mtune=pentium4) This could possibly be fixed in the spec file by redefining optflags like so: %ifarch %{ix86} %define optflags %{__global_cflags} -march=i386 -mcpu=i686 %endif %ifarch x86_64 %define optflags %{__global_cflags} -march=x86_64 %endif Haven't figured out ppc yet.
This really can't be fixed. You can't necessarily compile extensions with a different compiler than the one used for the interpreter (at least, not without some shenanigans)