Project

General

Profile

Actions

Bug #7842

closed

/hipster: gcc -dumpmachine problem

Added by Predrag Zečević over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-02-06
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Hi all,

is this on purpose? OI GCC:

$ ls -dal /usr/gcc/*/lib/gcc/*
drwxr-xr-x 3 root sys 3 Jan 25  2016 /usr/gcc/3.4/lib/gcc/i386-pc-solaris2.11
drwxr-xr-x 3 root bin 3 Nov  2 10:14 /usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11
drwxr-xr-x 3 root bin 3 Sep  6 16:14 /usr/gcc/5/lib/gcc/i386-pc-solaris2.11

Ilumos GCC:
$ ls -dal /opt/gcc/*/lib/gcc/*
drwxr-xr-x 3 root bin 3 Nov  7 21:30 /opt/gcc/4.4.4/lib/gcc/i386-pc-solaris2.11

I would expect something else, not i386:

$ optisa $(isalist)
amd64

E.G. Some building procedures check archive like this:

$ gcc --version | head -1
gcc (GCC) 4.9.4

$ gcc -dumpmachine
i386-pc-solaris2.11

$  /usr/gcc/5/bin/gcc -dumpmachine
i386-pc-solaris2.11

which returns wrong arch... For example, on CentOS 6:
# gcc --version | head -1
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

# gcc -dumpmachine
x86_64-redhat-linux

It is not that this is terrible important, but rather inconsistent (IMHO, of course).
Any comment on this would be valuable

Regards.

Actions #1

Updated by Aurélien Larcher over 4 years ago

  • Status changed from New to Closed

The arch is correct as the compiler is built as multilib and it is consistent with the default type of binaries produced.
The naming scheme is different but not inconsistent: the arch is i386 (least common denominator returned by isainfo) but then the compiler can produce code supporting different ISAs.
If you consider amd64 as an extension of i386 then it makes sense.

if the compiler produced amd64 binaries by default, the story would be different.

Actions

Also available in: Atom PDF