Bug 185507 - gcc doesn't like -march=$(arch) on x86_64
gcc doesn't like -march=$(arch) on x86_64
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2006-03-15 06:33 EST by Jón Fairbairn
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-15 08:55:32 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 Jón Fairbairn 2006-03-15 06:33:10 EST
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):

How reproducible:

Steps to Reproduce:
1.echo 'foo' | gcc -E - -march=x86_64
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>"

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

This breaks some configure scripts...
Comment 1 Jakub Jelinek 2006-03-15 08:55:32 EST
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.