Bug 162059 - "-mtune=pentium4" in /usr/lib/python2.4/config/Makefile conflicts with compat-gcc-32
Summary: "-mtune=pentium4" in /usr/lib/python2.4/config/Makefile conflicts with compat...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 4
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-29 15:17 UTC by Nils Toedtmann
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-01-06 21:13:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nils Toedtmann 2005-06-29 15:17:18 UTC
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
  [...]

Comment 1 channebicque 2005-08-10 14:05:40 UTC
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 16:52:00 UTC
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-03 03:46:04 UTC
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.

Comment 4 Jeremy Katz 2007-01-06 21:13:26 UTC
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.