Bug 185507 - gcc doesn't like -march=$(arch) on x86_64
Summary: gcc doesn't like -march=$(arch) on x86_64
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
(Show other bugs)
Version: 4
Hardware: x86_64 Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-15 11:33 UTC by Jón Fairbairn
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-15 13:55:32 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jón Fairbairn 2006-03-15 11:33:10 UTC
Description of problem:
gcc rejects x86_64 as a value for -march, but arch (and friends)
all return that string

Version-Release number of selected component (if applicable):
gcc-4.0.2-8.fc4

How reproducible:
always

Steps to Reproduce:
1.echo 'foo' | gcc -E - -march=x86_64
2.
3.
  
Actual results:

# 1 "<stdin>"
:0: error: bad value (x86_64) for -march= switch
:0: error: bad value (x86_64) for -mtune= switch

Expected results:

# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"
foo

Additional info:
arch outputs x86_64, as do the config.guess scripts supplied with such packages
as rpm. rpm packages are all named *.x86_64.*

gcc does accept x86-64, but this is not documented (and different from the other
programmes)

This breaks some configure scripts...

Comment 1 Jakub Jelinek 2006-03-15 13:55:32 UTC
Configure scripts that do this are helplessly broken.
There is no such CPU as x86_64, you either don't need to use -march= at all
and just use -m64 to generate 64-bit code, or you should choose some real
CPU (opteron, athlon64, nocona, k8, athlon-fx).  -march=x86-64 is supported
too as a generic 64-bit CPU, but that's the name of the arch, x86_64 is just
mangled name of the arch so that it can be used in config triplets that don't
allow hyphen in the arch name.


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