Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 162059 - "-mtune=pentium4" in /usr/lib/python2.4/config/Makefile conflicts with compat-gcc-32
"-mtune=pentium4" in /usr/lib/python2.4/config/Makefile conflicts with compat...
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2005-06-29 11:17 EDT by Nils Toedtmann
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-06 16:13:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nils Toedtmann 2005-06-29 11:17:18 EDT
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):

How reproducible:

Steps to Reproduce:
  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
Comment 1 channebicque 2005-08-10 10:05:40 EDT
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.
Comment 2 Mihai Ibanescu 2005-09-30 12:52:00 EDT
The configuration options in that Makefile are the ones used to compile python.
I am not sure how to fix this.
Comment 3 John Mahowald 2005-10-02 23:46:04 EDT
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
%ifarch x86_64
%define optflags %{__global_cflags} -march=x86_64

Haven't figured out ppc yet.
Comment 4 Jeremy Katz 2007-01-06 16:13:26 EST
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)

Note You need to log in before you can comment on or make changes to this bug.