c/5703: gcc powerpc64: -mcpu=630 links as 32-bits
Kevin Ryde
user42@zip.com.au
Fri Feb 15 15:36:00 GMT 2002
>Number: 5703
>Category: c
>Synopsis: gcc powerpc64: -mcpu=630 links as 32-bits
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 15 15:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.0.3
>Organization:
>Environment:
System: AIX panther 3 4 000785504C00
host: powerpc-ibm-aix4.3.2.0
build: powerpc-ibm-aix4.3.2.0
target: powerpc-ibm-aix4.3.2.0
configured with: /u/gcc/gcc-3.0.3/configure
>Description:
If -mcpu=630 is given, the linker appears to be invoked without the
gcc ppc64 directories.
>How-To-Repeat:
I'm afraid I don't have a simple case of something failing, I noticed
this on a GMP pre-release. But the output of gcc -v is, I hope,
fairly clear.
A program foo.c
int main (){}
compiled with
gcc -maix64 -mpowerpc64 -mcpu=630 -c foo.c
when linked with
gcc -v -maix64 -mpowerpc64 -mcpu=630 foo.o
reveals,
Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/specs
Configured with: /u/gcc/gcc-3.0.3/configure
Thread model: single
gcc version 3.0.3
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/collect2 -bpT:0x10000000 -bpD:0x20000000 -btextro -bnodelcsect -b64 /lib/crt0_64.o -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3 -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/../../.. foo.o /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/libgcc.a -lc /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/libgcc.a
whereas linking with
gcc -v -maix64 -mpowerpc64 foo.o
gives,
Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/specs
Configured with: /u/gcc/gcc-3.0.3/configure
Thread model: single
gcc version 3.0.3
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/collect2 -bpT:0x10000000 -bpD:0x20000000 -btextro -bnodelcsect -b64 /lib/crt0_64.o -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/ppc64 -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3 -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/../../../ppc64 -L/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/../../.. foo.o /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/ppc64/libgcc.a -lc /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.3/ppc64/libgcc.a
I think the latter is what should be used, irrespective of whether
-mcpu=630 is given or not.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list